From 9e8416fe9c4c401119910fb5867b5b445e8224e7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:24:20 +0000 Subject: [PATCH 01/17] feat: [securitycenter] added cloud provider field to list findings response (#5507) - [ ] Regenerate this pull request now. feat: added http configuration rule to ResourceValueConfig and ValuedResource API methods feat: added toxic combination field to finding docs: Updated comments for ResourceValueConfig PiperOrigin-RevId: 647117058 Source-Link: https://togithub.com/googleapis/googleapis/commit/efae79d0ba30034f2dd075d0213d09e93ebeccff Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/daa5c0c61544616372983e26d39f96a61c3d96fa Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiJkYWE1YzBjNjE1NDQ2MTYzNzI5ODNlMjZkMzlmOTZhNjFjM2Q5NmZhIn0= --- .../cloud/securitycenter/v2/attack_path.proto | 1 + .../cloud/securitycenter/v2/cloud_armor.proto | 114 + .../cloud/securitycenter/v2/finding.proto | 8 + .../cloud/securitycenter/v2/folder.proto | 36 + .../securitycenter/v2/mitre_attack.proto | 14 +- .../cloud/securitycenter/v2/notebook.proto | 44 + .../cloud/securitycenter/v2/resource.proto | 217 + .../v2/resource_value_config.proto | 44 +- .../v2/securitycenter_service.proto | 81 +- .../cloud/securitycenter/v2/simulation.proto | 5 + .../securitycenter/v2/valued_resource.proto | 1 + .../protos/protos.d.ts | 10273 +++-- .../protos/protos.js | 32445 +++++++++------- .../protos/protos.json | 475 +- .../v2/security_center.group_findings.js | 6 - ...ity_center.update_resource_value_config.js | 3 + ...tadata_google.cloud.securitycenter.v2.json | 4 +- .../src/v2/security_center_client.ts | 850 +- .../src/v2/security_center_proto_list.json | 3 + .../test/gapic_security_center_v2.ts | 1095 +- 20 files changed, 27479 insertions(+), 18240 deletions(-) create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/cloud_armor.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/folder.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/notebook.proto diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/attack_path.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/attack_path.proto index af78ec66cf3f..b41641b0e101 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/attack_path.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/attack_path.proto @@ -31,6 +31,7 @@ message AttackPath { option (google.api.resource) = { type: "securitycenter.googleapis.com/AttackPath" pattern: "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}" + pattern: "organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}" plural: "attackPaths" singular: "attackPath" }; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/cloud_armor.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/cloud_armor.proto new file mode 100644 index 000000000000..19c6b66c1758 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/cloud_armor.proto @@ -0,0 +1,114 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v2; + +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; +option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudArmorProto"; +option java_package = "com.google.cloud.securitycenter.v2"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V2"; +option ruby_package = "Google::Cloud::SecurityCenter::V2"; + +// Fields related to Google Cloud Armor findings. +message CloudArmor { + // Information about the [Google Cloud Armor security + // policy](https://cloud.google.com/armor/docs/security-policy-overview) + // relevant to the finding. + SecurityPolicy security_policy = 1; + + // Information about incoming requests evaluated by [Google Cloud Armor + // security + // policies](https://cloud.google.com/armor/docs/security-policy-overview). + Requests requests = 2; + + // Information about potential Layer 7 DDoS attacks identified by [Google + // Cloud Armor Adaptive + // Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + AdaptiveProtection adaptive_protection = 3; + + // Information about DDoS attack volume and classification. + Attack attack = 4; + + // Distinguish between volumetric & protocol DDoS attack and + // application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS + // attacks, or "L_7" for Layer 7 DDoS attacks. + string threat_vector = 5; + + // Duration of attack from the start until the current moment (updated every 5 + // minutes). + google.protobuf.Duration duration = 6; +} + +// Information about the [Google Cloud Armor security +// policy](https://cloud.google.com/armor/docs/security-policy-overview) +// relevant to the finding. +message SecurityPolicy { + // The name of the Google Cloud Armor security policy, for example, + // "my-security-policy". + string name = 1; + + // The type of Google Cloud Armor security policy for example, 'backend + // security policy', 'edge security policy', 'network edge security policy', + // or 'always-on DDoS protection'. + string type = 2; + + // Whether or not the associated rule or policy is in preview mode. + bool preview = 3; +} + +// Information about the requests relevant to the finding. +message Requests { + // For 'Increasing deny ratio', the ratio is the denied traffic divided by the + // allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + // traffic in the short term divided by allowed traffic in the long term. + double ratio = 1; + + // Allowed RPS (requests per second) in the short term. + int32 short_term_allowed = 2; + + // Allowed RPS (requests per second) over the long term. + int32 long_term_allowed = 3; + + // Denied RPS (requests per second) over the long term. + int32 long_term_denied = 4; +} + +// Information about [Google Cloud Armor Adaptive +// Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). +message AdaptiveProtection { + // A score of 0 means that there is low confidence that the detected event is + // an actual attack. A score of 1 means that there is high confidence that the + // detected event is an attack. See the [Adaptive Protection + // documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + // for further explanation. + double confidence = 1; +} + +// Information about DDoS attack volume and classification. +message Attack { + // Total PPS (packets per second) volume of attack. + int32 volume_pps = 1; + + // Total BPS (bytes per second) volume of attack. + int32 volume_bps = 2; + + // Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. + string classification = 3; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/finding.proto index f14c6d69f677..ee5ca55c7a1b 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/finding.proto @@ -22,6 +22,7 @@ import "google/cloud/securitycenter/v2/access.proto"; import "google/cloud/securitycenter/v2/application.proto"; import "google/cloud/securitycenter/v2/attack_exposure.proto"; import "google/cloud/securitycenter/v2/backup_disaster_recovery.proto"; +import "google/cloud/securitycenter/v2/cloud_armor.proto"; import "google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto"; import "google/cloud/securitycenter/v2/cloud_dlp_inspection.proto"; import "google/cloud/securitycenter/v2/compliance.proto"; @@ -40,6 +41,7 @@ import "google/cloud/securitycenter/v2/kubernetes.proto"; import "google/cloud/securitycenter/v2/load_balancer.proto"; import "google/cloud/securitycenter/v2/log_entry.proto"; import "google/cloud/securitycenter/v2/mitre_attack.proto"; +import "google/cloud/securitycenter/v2/notebook.proto"; import "google/cloud/securitycenter/v2/org_policy.proto"; import "google/cloud/securitycenter/v2/process.proto"; import "google/cloud/securitycenter/v2/security_marks.proto"; @@ -431,6 +433,12 @@ message Finding { // The load balancers associated with the finding. repeated LoadBalancer load_balancers = 50; + // Fields related to Cloud Armor findings. + CloudArmor cloud_armor = 51; + + // Notebook associated with the finding. + Notebook notebook = 55; + // Contains details about a group of security issues that, when the issues // occur together, represent a greater risk than when the issues occur // independently. A group of such issues is referred to as a toxic diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/folder.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/folder.proto new file mode 100644 index 000000000000..d965797b0628 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/folder.proto @@ -0,0 +1,36 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v2; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; +option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "FolderProto"; +option java_package = "com.google.cloud.securitycenter.v2"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V2"; +option ruby_package = "Google::Cloud::SecurityCenter::V2"; + +// Message that contains the resource name and display name of a folder +// resource. +message Folder { + // Full resource name of this folder. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string resource_folder = 1; + + // The user defined display name for this folder. + string resource_folder_display_name = 2; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/mitre_attack.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/mitre_attack.proto index 3963d6f09377..7c2b56c0400a 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/mitre_attack.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/mitre_attack.proto @@ -78,7 +78,7 @@ message MitreAttack { // MITRE ATT&CK techniques that can be referenced by SCC findings. // See: https://attack.mitre.org/techniques/enterprise/ - // Next ID: 59 + // Next ID: 63 enum Technique { // Unspecified value. TECHNIQUE_UNSPECIFIED = 0; @@ -107,6 +107,9 @@ message MitreAttack { // T1059.004 UNIX_SHELL = 7; + // T1059.006 + PYTHON = 59; + // T1069 PERMISSION_GROUPS_DISCOVERY = 18; @@ -254,8 +257,17 @@ message MitreAttack { // T1595.001 SCANNING_IP_BLOCKS = 2; + // T1613 + CONTAINER_ADMINISTRATION_COMMAND = 60; + + // T1611 + ESCAPE_TO_HOST = 61; + // T1613 CONTAINER_AND_RESOURCE_DISCOVERY = 57; + + // T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62; } // The MITRE ATT&CK tactic most closely represented by this finding, if any. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/notebook.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/notebook.proto new file mode 100644 index 000000000000..b2fd80474e05 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/notebook.proto @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v2; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; +option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "NotebookProto"; +option java_package = "com.google.cloud.securitycenter.v2"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V2"; +option ruby_package = "Google::Cloud::SecurityCenter::V2"; + +// Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise +// notebook](https://cloud.google.com/colab/docs/introduction) file, that is +// associated with a finding. +message Notebook { + // The name of the notebook. + string name = 1; + + // The source notebook service, for example, "Colab Enterprise". + string service = 2; + + // The user ID of the latest author to modify the notebook. + string last_author = 3; + + // The most recent time the notebook was updated. + google.protobuf.Timestamp notebook_update_time = 4; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource.proto index 3738837292fa..0bf07600b13d 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.securitycenter.v2; import "google/api/field_behavior.proto"; +import "google/cloud/securitycenter/v2/folder.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; option go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb"; @@ -37,4 +38,220 @@ message Resource { // The full resource type of the resource. string type = 3; + + // Indicates which cloud provider the finding is from. + CloudProvider cloud_provider = 4; + + // The service or resource provider associated with the resource. + string service = 5; + + // The region or location of the service (if applicable). + string location = 6; + + oneof cloud_provider_metadata { + // The GCP metadata associated with the finding. + GcpMetadata gcp_metadata = 7; + + // The AWS metadata associated with the finding. + AwsMetadata aws_metadata = 8; + + // The Azure metadata associated with the finding. + AzureMetadata azure_metadata = 9; + } + + // Provides the path to the resource within the resource hierarchy. + ResourcePath resource_path = 10; + + // A string representation of the resource path. + // For Google Cloud, it has the format of + // organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} + // where there can be any number of folders. + // For AWS, it has the format of + // org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} + // where there can be any number of organizational units. + // For Azure, it has the format of + // mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} + // where there can be any number of management groups. + string resource_path_string = 11; +} + +// The cloud provider the finding pertains to. +enum CloudProvider { + // The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0; + + // The cloud provider is Google Cloud Platform. + GOOGLE_CLOUD_PLATFORM = 1; + + // The cloud provider is Amazon Web Services. + AMAZON_WEB_SERVICES = 2; + + // The cloud provider is Microsoft Azure. + MICROSOFT_AZURE = 3; +} + +// GCP metadata associated with the resource, only applicable if the finding's +// cloud provider is Google Cloud Platform. +message GcpMetadata { + // The full resource name of project that the resource belongs to. + string project = 1; + + // The project ID that the resource belongs to. + string project_display_name = 2; + + // The full resource name of resource's parent. + string parent = 3; + + // The human readable name of resource's parent. + string parent_display_name = 4; + + // Output only. Contains a Folder message for each folder in the assets + // ancestry. The first folder is the deepest nested folder, and the last + // folder is the folder directly under the Organization. + repeated Folder folders = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the organization that the resource belongs to. + string organization = 6; +} + +// AWS metadata associated with the resource, only applicable if the finding's +// cloud provider is Amazon Web Services. +message AwsMetadata { + // An organization is a collection of accounts that are centrally managed + // together using consolidated billing, organized hierarchically with + // organizational units (OUs), and controlled with policies. + message AwsOrganization { + // The unique identifier (ID) for the organization. The regex pattern for an + // organization ID string requires "o-" followed by from 10 to 32 lowercase + // letters or digits. + string id = 1; + } + + // An Organizational Unit (OU) is a container of AWS accounts within a root of + // an organization. Policies that are attached to an OU apply to all accounts + // contained in that OU and in any child OUs. + message AwsOrganizationalUnit { + // The unique identifier (ID) associated with this OU. The regex pattern for + // an organizational unit ID string requires "ou-" followed by from 4 to 32 + // lowercase letters or digits (the ID of the root that contains the OU). + // This string is followed by a second "-" dash and from 8 to 32 additional + // lowercase letters or digits. For example, "ou-ab12-cd34ef56". + string id = 1; + + // The friendly name of the OU. + string name = 2; + } + + // An AWS account that is a member of an organization. + message AwsAccount { + // The unique identifier (ID) of the account, containing exactly 12 digits. + string id = 1; + + // The friendly name of this account. + string name = 2; + } + + // The AWS organization associated with the resource. + AwsOrganization organization = 1; + + // A list of AWS organizational units associated with the resource, ordered + // from lowest level (closest to the account) to highest level. + repeated AwsOrganizationalUnit organizational_units = 2; + + // The AWS account associated with the resource. + AwsAccount account = 3; +} + +// Azure metadata associated with the resource, only applicable if the finding's +// cloud provider is Microsoft Azure. +message AzureMetadata { + // Represents an Azure management group. + message AzureManagementGroup { + // The UUID of the Azure management group, for example, + // "20000000-0001-0000-0000-000000000000". + string id = 1; + + // The display name of the Azure management group. + string display_name = 2; + } + + // Represents an Azure subscription. + message AzureSubscription { + // The UUID of the Azure subscription, for example, + // "291bba3f-e0a5-47bc-a099-3bdcb2a50a05". + string id = 1; + + // The display name of the Azure subscription. + string display_name = 2; + } + + // Represents an Azure resource group. + message AzureResourceGroup { + // The name of the Azure resource group. This is not a UUID. + string name = 1; + } + + // A list of Azure management groups associated with the resource, ordered + // from lowest level (closest to the subscription) to highest level. + repeated AzureManagementGroup management_groups = 1; + + // The Azure subscription associated with the resource. + AzureSubscription subscription = 2; + + // The Azure resource group associated with the resource. + AzureResourceGroup resource_group = 3; +} + +// Represents the path of resources leading up to the resource this finding is +// about. +message ResourcePath { + // The type of resource the node represents. + enum ResourcePathNodeType { + // Node type is unspecified. + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0; + + // The node represents a Google Cloud organization. + GCP_ORGANIZATION = 1; + + // The node represents a Google Cloud folder. + GCP_FOLDER = 2; + + // The node represents a Google Cloud project. + GCP_PROJECT = 3; + + // The node represents an AWS organization. + AWS_ORGANIZATION = 4; + + // The node represents an AWS organizational unit. + AWS_ORGANIZATIONAL_UNIT = 5; + + // The node represents an AWS account. + AWS_ACCOUNT = 6; + + // The node represents an Azure management group. + AZURE_MANAGEMENT_GROUP = 7; + + // The node represents an Azure subscription. + AZURE_SUBSCRIPTION = 8; + + // The node represents an Azure resource group. + AZURE_RESOURCE_GROUP = 9; + } + + // A node within the resource path. Each node represents a resource within the + // resource hierarchy. + message ResourcePathNode { + // The type of resource this node represents. + ResourcePathNodeType node_type = 1; + + // The ID of the resource this node represents. + string id = 2; + + // The display name of the resource this node represents. + string display_name = 3; + } + + // The list of nodes that make the up resource path, ordered from lowest + // level to highest level. + repeated ResourcePathNode nodes = 1; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource_value_config.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource_value_config.proto index ee224524d1a5..683fb13455f5 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource_value_config.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/resource_value_config.proto @@ -18,6 +18,7 @@ package google.cloud.securitycenter.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/securitycenter/v2/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V2"; @@ -28,12 +29,15 @@ option java_package = "com.google.cloud.securitycenter.v2"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V2"; option ruby_package = "Google::Cloud::SecurityCenter::V2"; -// A resource value config (RVC) is a mapping configuration of user's resources -// to resource values. Used in Attack path simulations. +// A resource value configuration (RVC) is a mapping configuration of user's +// resources to resource values. Used in Attack path simulations. message ResourceValueConfig { option (google.api.resource) = { type: "securitycenter.googleapis.com/ResourceValueConfig" pattern: "organizations/{organization}/resourceValueConfigs/{resource_value_config}" + pattern: "organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}" + plural: "resourceValueConfigs" + singular: "resourceValueConfig" }; // Resource value mapping for Sensitive Data Protection findings @@ -49,48 +53,52 @@ message ResourceValueConfig { ResourceValue medium_sensitivity_mapping = 2; } - // Name for the resource value config + // Name for the resource value configuration string name = 1; // Resource value level this expression represents // Only required when there is no SDP mapping in the request ResourceValue resource_value = 2; - // Required. Tag values combined with AND to check against. + // Required. Tag values combined with AND to check against. // Values in the form "tagValues/123" - // E.g. [ "tagValues/123", "tagValues/456", "tagValues/789" ] + // Example: [ "tagValues/123", "tagValues/456", "tagValues/789" ] // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing repeated string tag_values = 3 [(google.api.field_behavior) = REQUIRED]; // Apply resource_value only to resources that match resource_type. - // resource_type will be checked with "AND" of other resources. - // E.g. "storage.googleapis.com/Bucket" with resource_value "HIGH" will - // apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + // resource_type will be checked with AND of other resources. + // For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" + // will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. string resource_type = 4; - // Project or folder to scope this config to. - // For example, "project/456" would apply this config only to resources in - // "project/456" - // scope will be checked with "AND" of other resources. + // Project or folder to scope this configuration to. + // For example, "project/456" would apply this configuration only to resources + // in "project/456" scope will be checked with AND of other + // resources. string scope = 5; - // List of resource labels to search for, evaluated with AND. - // E.g. "resource_labels_selector": {"key": "value", "env": "prod"} - // will match resources with labels "key": "value" AND "env": "prod" + // List of resource labels to search for, evaluated with AND. + // For example, "resource_labels_selector": {"key": "value", "env": "prod"} + // will match resources with labels "key": "value" AND "env": + // "prod" // https://cloud.google.com/resource-manager/docs/creating-managing-labels map resource_labels_selector = 6; - // Description of the resource value config. + // Description of the resource value configuration. string description = 7; - // Output only. Timestamp this resource value config was created. + // Output only. Timestamp this resource value configuration was created. google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Timestamp this resource value config was last updated. + // Output only. Timestamp this resource value configuration was last updated. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Cloud provider this configuration applies to + CloudProvider cloud_provider = 10; + // A mapping of the sensitivity on Sensitive Data Protection finding to // resource values. This mapping can only be used in combination with a // resource_type that is related to BigQuery, e.g. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/securitycenter_service.proto index cfb1745331e5..f14bfaa8e1e7 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/securitycenter_service.proto @@ -27,6 +27,7 @@ import "google/cloud/securitycenter/v2/external_system.proto"; import "google/cloud/securitycenter/v2/finding.proto"; import "google/cloud/securitycenter/v2/mute_config.proto"; import "google/cloud/securitycenter/v2/notification_config.proto"; +import "google/cloud/securitycenter/v2/resource.proto"; import "google/cloud/securitycenter/v2/resource_value_config.proto"; import "google/cloud/securitycenter/v2/security_marks.proto"; import "google/cloud/securitycenter/v2/simulation.proto"; @@ -54,6 +55,10 @@ option (google.api.resource_definition) = { type: "securitycenter.googleapis.com/FolderLocation" pattern: "folders/{folder}/locations/{location}" }; +option (google.api.resource_definition) = { + type: "securitycenter.googleapis.com/OrganizationValuedResource" + pattern: "organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}" +}; // V2 APIs for Security Center service. service SecurityCenter { @@ -68,6 +73,10 @@ service SecurityCenter { option (google.api.http) = { post: "/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate" body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate" + body: "*" + } }; option (google.api.method_signature) = "parent,requests"; } @@ -283,6 +292,9 @@ service SecurityCenter { returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/resourceValueConfigs/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}" + } }; option (google.api.method_signature) = "name"; } @@ -306,6 +318,9 @@ service SecurityCenter { rpc GetSimulation(GetSimulationRequest) returns (Simulation) { option (google.api.http) = { get: "/v2/{name=organizations/*/simulations/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/simulations/*}" + } }; option (google.api.method_signature) = "name"; } @@ -314,6 +329,9 @@ service SecurityCenter { rpc GetValuedResource(GetValuedResourceRequest) returns (ValuedResource) { option (google.api.http) = { get: "/v2/{name=organizations/*/simulations/*/valuedResources/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/simulations/*/valuedResources/*}" + } }; option (google.api.method_signature) = "name"; } @@ -382,6 +400,9 @@ service SecurityCenter { returns (ResourceValueConfig) { option (google.api.http) = { get: "/v2/{name=organizations/*/resourceValueConfigs/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}" + } }; option (google.api.method_signature) = "name"; } @@ -445,9 +466,15 @@ service SecurityCenter { additional_bindings { get: "/v2/{parent=organizations/*/simulations/*/valuedResources/*}/attackPaths" } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*/simulations/*/valuedResources/*}/attackPaths" + } additional_bindings { get: "/v2/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths" } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*/simulations/*/attackExposureResults/*}/attackPaths" + } }; option (google.api.method_signature) = "parent"; } @@ -553,6 +580,9 @@ service SecurityCenter { returns (ListResourceValueConfigsResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/resourceValueConfigs" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs" + } }; option (google.api.method_signature) = "parent"; } @@ -808,6 +838,10 @@ service SecurityCenter { option (google.api.http) = { patch: "/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}" body: "resource_value_config" + additional_bindings { + patch: "/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}" + body: "resource_value_config" + } }; option (google.api.method_signature) = "resource_value_config,update_mask"; } @@ -1295,14 +1329,6 @@ message GroupFindingsRequest { // Required. Expression that defines what assets fields to use for grouping. // The string value should follow SQL syntax: comma separated list of fields. // For example: "parent,resource_name". - // - // The following fields are supported: - // - // * resource_name - // * category - // * state - // * parent - // * severity string group_by = 3 [(google.api.field_behavior) = REQUIRED]; // The value returned by the last `GroupFindingsResponse`; indicates @@ -1580,6 +1606,41 @@ message ListFindingsResponse { // The full resource type of the resource. string type = 3; + + // Indicates which cloud provider the finding is from. + CloudProvider cloud_provider = 4; + + // The service or resource provider associated with the resource. + string service = 5; + + // The region or location of the service (if applicable). + string location = 6; + + oneof cloud_provider_metadata { + // The GCP metadata associated with the finding. + GcpMetadata gcp_metadata = 7; + + // The AWS metadata associated with the finding. + AwsMetadata aws_metadata = 8; + + // The Azure metadata associated with the finding. + AzureMetadata azure_metadata = 9; + } + + // Provides the path to the resource within the resource hierarchy. + ResourcePath resource_path = 10; + + // A string representation of the resource path. + // For Google Cloud, it has the format of + // organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} + // where there can be any number of folders. + // For AWS, it has the format of + // org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} + // where there can be any number of organizational units. + // For Azure, it has the format of + // mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} + // where there can be any number of management groups. + string resource_path_string = 11; } // Finding matching the search request. @@ -1936,6 +1997,10 @@ message UpdateResourceValueConfigRequest { // The list of fields to be updated. // If empty all mutable fields will be updated. + // + // To update nested fields, include the top level field in the mask + // For example, to update gcp_metadata.resource_type, include the + // "gcp_metadata" field mask google.protobuf.FieldMask update_mask = 2; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/simulation.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/simulation.proto index 8656e373e3e7..d682d7cbf97e 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/simulation.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/simulation.proto @@ -18,6 +18,7 @@ package google.cloud.securitycenter.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/securitycenter/v2/resource.proto"; import "google/cloud/securitycenter/v2/valued_resource.proto"; import "google/protobuf/timestamp.proto"; @@ -34,6 +35,7 @@ message Simulation { option (google.api.resource) = { type: "securitycenter.googleapis.com/Simulation" pattern: "organizations/{organization}/simulations/{simulation}" + pattern: "organizations/{organization}/locations/{location}/simulations/{simluation}" plural: "simulations" singular: "simulation" }; @@ -49,4 +51,7 @@ message Simulation { // Resource value configurations' metadata used in this simulation. Maximum of // 100. repeated ResourceValueConfigMetadata resource_value_configs_metadata = 3; + + // Indicates which cloud provider was used in this simulation. + CloudProvider cloud_provider = 4; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/valued_resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/valued_resource.proto index a2efdde5293c..994918b58dd5 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/valued_resource.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v2/valued_resource.proto @@ -31,6 +31,7 @@ message ValuedResource { option (google.api.resource) = { type: "securitycenter.googleapis.com/ValuedResource" pattern: "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + pattern: "organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}" plural: "valuedResources" singular: "valuedResource" }; diff --git a/packages/google-cloud-securitycenter/protos/protos.d.ts b/packages/google-cloud-securitycenter/protos/protos.d.ts index ed40aba8c60a..0ff2c4bff275 100644 --- a/packages/google-cloud-securitycenter/protos/protos.d.ts +++ b/packages/google-cloud-securitycenter/protos/protos.d.ts @@ -28369,6641 +28369,8669 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudDlpDataProfile. */ - interface ICloudDlpDataProfile { + /** Properties of a CloudArmor. */ + interface ICloudArmor { - /** CloudDlpDataProfile dataProfile */ - dataProfile?: (string|null); + /** CloudArmor securityPolicy */ + securityPolicy?: (google.cloud.securitycenter.v2.ISecurityPolicy|null); - /** CloudDlpDataProfile parentType */ - parentType?: (google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|null); + /** CloudArmor requests */ + requests?: (google.cloud.securitycenter.v2.IRequests|null); + + /** CloudArmor adaptiveProtection */ + adaptiveProtection?: (google.cloud.securitycenter.v2.IAdaptiveProtection|null); + + /** CloudArmor attack */ + attack?: (google.cloud.securitycenter.v2.IAttack|null); + + /** CloudArmor threatVector */ + threatVector?: (string|null); + + /** CloudArmor duration */ + duration?: (google.protobuf.IDuration|null); } - /** Represents a CloudDlpDataProfile. */ - class CloudDlpDataProfile implements ICloudDlpDataProfile { + /** Represents a CloudArmor. */ + class CloudArmor implements ICloudArmor { /** - * Constructs a new CloudDlpDataProfile. + * Constructs a new CloudArmor. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICloudDlpDataProfile); + constructor(properties?: google.cloud.securitycenter.v2.ICloudArmor); - /** CloudDlpDataProfile dataProfile. */ - public dataProfile: string; + /** CloudArmor securityPolicy. */ + public securityPolicy?: (google.cloud.securitycenter.v2.ISecurityPolicy|null); - /** CloudDlpDataProfile parentType. */ - public parentType: (google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType); + /** CloudArmor requests. */ + public requests?: (google.cloud.securitycenter.v2.IRequests|null); + + /** CloudArmor adaptiveProtection. */ + public adaptiveProtection?: (google.cloud.securitycenter.v2.IAdaptiveProtection|null); + + /** CloudArmor attack. */ + public attack?: (google.cloud.securitycenter.v2.IAttack|null); + + /** CloudArmor threatVector. */ + public threatVector: string; + + /** CloudArmor duration. */ + public duration?: (google.protobuf.IDuration|null); /** - * Creates a new CloudDlpDataProfile instance using the specified properties. + * Creates a new CloudArmor instance using the specified properties. * @param [properties] Properties to set - * @returns CloudDlpDataProfile instance + * @returns CloudArmor instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICloudDlpDataProfile): google.cloud.securitycenter.v2.CloudDlpDataProfile; + public static create(properties?: google.cloud.securitycenter.v2.ICloudArmor): google.cloud.securitycenter.v2.CloudArmor; /** - * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. - * @param message CloudDlpDataProfile message or plain object to encode + * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudArmor.verify|verify} messages. + * @param message CloudArmor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. - * @param message CloudDlpDataProfile message or plain object to encode + * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudArmor.verify|verify} messages. + * @param message CloudArmor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * Decodes a CloudArmor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudDlpDataProfile + * @returns CloudArmor * @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.cloud.securitycenter.v2.CloudDlpDataProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.CloudArmor; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * Decodes a CloudArmor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudDlpDataProfile + * @returns CloudArmor * @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.cloud.securitycenter.v2.CloudDlpDataProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.CloudArmor; /** - * Verifies a CloudDlpDataProfile message. + * Verifies a CloudArmor 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 CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudDlpDataProfile + * @returns CloudArmor */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudDlpDataProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudArmor; /** - * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. - * @param message CloudDlpDataProfile + * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. + * @param message CloudArmor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.CloudDlpDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.CloudArmor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudDlpDataProfile to JSON. + * Converts this CloudArmor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudDlpDataProfile + * Gets the default type url for CloudArmor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CloudDlpDataProfile { - - /** ParentType enum. */ - enum ParentType { - PARENT_TYPE_UNSPECIFIED = 0, - ORGANIZATION = 1, - PROJECT = 2 - } - } - - /** Properties of a CloudDlpInspection. */ - interface ICloudDlpInspection { - - /** CloudDlpInspection inspectJob */ - inspectJob?: (string|null); + /** Properties of a SecurityPolicy. */ + interface ISecurityPolicy { - /** CloudDlpInspection infoType */ - infoType?: (string|null); + /** SecurityPolicy name */ + name?: (string|null); - /** CloudDlpInspection infoTypeCount */ - infoTypeCount?: (number|Long|string|null); + /** SecurityPolicy type */ + type?: (string|null); - /** CloudDlpInspection fullScan */ - fullScan?: (boolean|null); + /** SecurityPolicy preview */ + preview?: (boolean|null); } - /** Represents a CloudDlpInspection. */ - class CloudDlpInspection implements ICloudDlpInspection { + /** Represents a SecurityPolicy. */ + class SecurityPolicy implements ISecurityPolicy { /** - * Constructs a new CloudDlpInspection. + * Constructs a new SecurityPolicy. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICloudDlpInspection); - - /** CloudDlpInspection inspectJob. */ - public inspectJob: string; + constructor(properties?: google.cloud.securitycenter.v2.ISecurityPolicy); - /** CloudDlpInspection infoType. */ - public infoType: string; + /** SecurityPolicy name. */ + public name: string; - /** CloudDlpInspection infoTypeCount. */ - public infoTypeCount: (number|Long|string); + /** SecurityPolicy type. */ + public type: string; - /** CloudDlpInspection fullScan. */ - public fullScan: boolean; + /** SecurityPolicy preview. */ + public preview: boolean; /** - * Creates a new CloudDlpInspection instance using the specified properties. + * Creates a new SecurityPolicy instance using the specified properties. * @param [properties] Properties to set - * @returns CloudDlpInspection instance + * @returns SecurityPolicy instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICloudDlpInspection): google.cloud.securitycenter.v2.CloudDlpInspection; + public static create(properties?: google.cloud.securitycenter.v2.ISecurityPolicy): google.cloud.securitycenter.v2.SecurityPolicy; /** - * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. - * @param message CloudDlpInspection message or plain object to encode + * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPolicy.verify|verify} messages. + * @param message SecurityPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. - * @param message CloudDlpInspection message or plain object to encode + * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPolicy.verify|verify} messages. + * @param message SecurityPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer. + * Decodes a SecurityPolicy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudDlpInspection + * @returns SecurityPolicy * @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.cloud.securitycenter.v2.CloudDlpInspection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.SecurityPolicy; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudDlpInspection + * @returns SecurityPolicy * @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.cloud.securitycenter.v2.CloudDlpInspection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.SecurityPolicy; /** - * Verifies a CloudDlpInspection message. + * Verifies a SecurityPolicy 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 CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudDlpInspection + * @returns SecurityPolicy */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudDlpInspection; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityPolicy; /** - * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. - * @param message CloudDlpInspection + * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. + * @param message SecurityPolicy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.CloudDlpInspection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.SecurityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudDlpInspection to JSON. + * Converts this SecurityPolicy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudDlpInspection + * Gets the default type url for SecurityPolicy * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Compliance. */ - interface ICompliance { + /** Properties of a Requests. */ + interface IRequests { - /** Compliance standard */ - standard?: (string|null); + /** Requests ratio */ + ratio?: (number|null); - /** Compliance version */ - version?: (string|null); + /** Requests shortTermAllowed */ + shortTermAllowed?: (number|null); - /** Compliance ids */ - ids?: (string[]|null); + /** Requests longTermAllowed */ + longTermAllowed?: (number|null); + + /** Requests longTermDenied */ + longTermDenied?: (number|null); } - /** Represents a Compliance. */ - class Compliance implements ICompliance { + /** Represents a Requests. */ + class Requests implements IRequests { /** - * Constructs a new Compliance. + * Constructs a new Requests. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICompliance); + constructor(properties?: google.cloud.securitycenter.v2.IRequests); - /** Compliance standard. */ - public standard: string; + /** Requests ratio. */ + public ratio: number; - /** Compliance version. */ - public version: string; + /** Requests shortTermAllowed. */ + public shortTermAllowed: number; - /** Compliance ids. */ - public ids: string[]; + /** Requests longTermAllowed. */ + public longTermAllowed: number; + + /** Requests longTermDenied. */ + public longTermDenied: number; /** - * Creates a new Compliance instance using the specified properties. + * Creates a new Requests instance using the specified properties. * @param [properties] Properties to set - * @returns Compliance instance + * @returns Requests instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICompliance): google.cloud.securitycenter.v2.Compliance; + public static create(properties?: google.cloud.securitycenter.v2.IRequests): google.cloud.securitycenter.v2.Requests; /** - * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. - * @param message Compliance message or plain object to encode + * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v2.Requests.verify|verify} messages. + * @param message Requests message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. - * @param message Compliance message or plain object to encode + * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Requests.verify|verify} messages. + * @param message Requests message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Compliance message from the specified reader or buffer. + * Decodes a Requests message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Compliance + * @returns Requests * @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.cloud.securitycenter.v2.Compliance; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Requests; /** - * Decodes a Compliance message from the specified reader or buffer, length delimited. + * Decodes a Requests message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Compliance + * @returns Requests * @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.cloud.securitycenter.v2.Compliance; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Requests; /** - * Verifies a Compliance message. + * Verifies a Requests 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 Compliance message from a plain object. Also converts values to their respective internal types. + * Creates a Requests message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Compliance + * @returns Requests */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Compliance; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Requests; /** - * Creates a plain object from a Compliance message. Also converts values to other types if specified. - * @param message Compliance + * Creates a plain object from a Requests message. Also converts values to other types if specified. + * @param message Requests * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Compliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Requests, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Compliance to JSON. + * Converts this Requests to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Compliance + * Gets the default type url for Requests * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Connection. */ - interface IConnection { + /** Properties of an AdaptiveProtection. */ + interface IAdaptiveProtection { - /** Connection destinationIp */ - destinationIp?: (string|null); - - /** Connection destinationPort */ - destinationPort?: (number|null); - - /** Connection sourceIp */ - sourceIp?: (string|null); - - /** Connection sourcePort */ - sourcePort?: (number|null); - - /** Connection protocol */ - protocol?: (google.cloud.securitycenter.v2.Connection.Protocol|keyof typeof google.cloud.securitycenter.v2.Connection.Protocol|null); + /** AdaptiveProtection confidence */ + confidence?: (number|null); } - /** Represents a Connection. */ - class Connection implements IConnection { + /** Represents an AdaptiveProtection. */ + class AdaptiveProtection implements IAdaptiveProtection { /** - * Constructs a new Connection. + * Constructs a new AdaptiveProtection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IConnection); - - /** Connection destinationIp. */ - public destinationIp: string; - - /** Connection destinationPort. */ - public destinationPort: number; - - /** Connection sourceIp. */ - public sourceIp: string; + constructor(properties?: google.cloud.securitycenter.v2.IAdaptiveProtection); - /** Connection sourcePort. */ - public sourcePort: number; - - /** Connection protocol. */ - public protocol: (google.cloud.securitycenter.v2.Connection.Protocol|keyof typeof google.cloud.securitycenter.v2.Connection.Protocol); + /** AdaptiveProtection confidence. */ + public confidence: number; /** - * Creates a new Connection instance using the specified properties. + * Creates a new AdaptiveProtection instance using the specified properties. * @param [properties] Properties to set - * @returns Connection instance + * @returns AdaptiveProtection instance */ - public static create(properties?: google.cloud.securitycenter.v2.IConnection): google.cloud.securitycenter.v2.Connection; + public static create(properties?: google.cloud.securitycenter.v2.IAdaptiveProtection): google.cloud.securitycenter.v2.AdaptiveProtection; /** - * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. - * @param message Connection message or plain object to encode + * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v2.AdaptiveProtection.verify|verify} messages. + * @param message AdaptiveProtection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. - * @param message Connection message or plain object to encode + * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AdaptiveProtection.verify|verify} messages. + * @param message AdaptiveProtection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Connection message from the specified reader or buffer. + * Decodes an AdaptiveProtection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Connection + * @returns AdaptiveProtection * @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.cloud.securitycenter.v2.Connection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.AdaptiveProtection; /** - * Decodes a Connection message from the specified reader or buffer, length delimited. + * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Connection + * @returns AdaptiveProtection * @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.cloud.securitycenter.v2.Connection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.AdaptiveProtection; /** - * Verifies a Connection message. + * Verifies an AdaptiveProtection 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 Connection message from a plain object. Also converts values to their respective internal types. + * Creates an AdaptiveProtection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Connection + * @returns AdaptiveProtection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Connection; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AdaptiveProtection; /** - * Creates a plain object from a Connection message. Also converts values to other types if specified. - * @param message Connection + * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. + * @param message AdaptiveProtection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.AdaptiveProtection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Connection to JSON. + * Converts this AdaptiveProtection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Connection + * Gets the default type url for AdaptiveProtection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Connection { + /** Properties of an Attack. */ + interface IAttack { - /** Protocol enum. */ - enum Protocol { - PROTOCOL_UNSPECIFIED = 0, - ICMP = 1, - TCP = 6, - UDP = 17, - GRE = 47, - ESP = 50 - } - } + /** Attack volumePps */ + volumePps?: (number|null); - /** Properties of a ContactDetails. */ - interface IContactDetails { + /** Attack volumeBps */ + volumeBps?: (number|null); - /** ContactDetails contacts */ - contacts?: (google.cloud.securitycenter.v2.IContact[]|null); + /** Attack classification */ + classification?: (string|null); } - /** Represents a ContactDetails. */ - class ContactDetails implements IContactDetails { + /** Represents an Attack. */ + class Attack implements IAttack { /** - * Constructs a new ContactDetails. + * Constructs a new Attack. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IContactDetails); + constructor(properties?: google.cloud.securitycenter.v2.IAttack); - /** ContactDetails contacts. */ - public contacts: google.cloud.securitycenter.v2.IContact[]; + /** Attack volumePps. */ + public volumePps: number; + + /** Attack volumeBps. */ + public volumeBps: number; + + /** Attack classification. */ + public classification: string; /** - * Creates a new ContactDetails instance using the specified properties. + * Creates a new Attack instance using the specified properties. * @param [properties] Properties to set - * @returns ContactDetails instance + * @returns Attack instance */ - public static create(properties?: google.cloud.securitycenter.v2.IContactDetails): google.cloud.securitycenter.v2.ContactDetails; + public static create(properties?: google.cloud.securitycenter.v2.IAttack): google.cloud.securitycenter.v2.Attack; /** - * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. - * @param message ContactDetails message or plain object to encode + * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v2.Attack.verify|verify} messages. + * @param message Attack message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. - * @param message ContactDetails message or plain object to encode + * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Attack.verify|verify} messages. + * @param message Attack message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ContactDetails message from the specified reader or buffer. + * Decodes an Attack message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ContactDetails + * @returns Attack * @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.cloud.securitycenter.v2.ContactDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Attack; /** - * Decodes a ContactDetails message from the specified reader or buffer, length delimited. + * Decodes an Attack message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ContactDetails + * @returns Attack * @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.cloud.securitycenter.v2.ContactDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Attack; /** - * Verifies a ContactDetails message. + * Verifies an Attack 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 ContactDetails message from a plain object. Also converts values to their respective internal types. + * Creates an Attack message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ContactDetails + * @returns Attack */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ContactDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Attack; /** - * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. - * @param message ContactDetails + * Creates a plain object from an Attack message. Also converts values to other types if specified. + * @param message Attack * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.ContactDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Attack, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ContactDetails to JSON. + * Converts this Attack to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ContactDetails + * Gets the default type url for Attack * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Contact. */ - interface IContact { + /** Properties of a CloudDlpDataProfile. */ + interface ICloudDlpDataProfile { - /** Contact email */ - email?: (string|null); + /** CloudDlpDataProfile dataProfile */ + dataProfile?: (string|null); + + /** CloudDlpDataProfile parentType */ + parentType?: (google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|null); } - /** Represents a Contact. */ - class Contact implements IContact { + /** Represents a CloudDlpDataProfile. */ + class CloudDlpDataProfile implements ICloudDlpDataProfile { /** - * Constructs a new Contact. + * Constructs a new CloudDlpDataProfile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IContact); + constructor(properties?: google.cloud.securitycenter.v2.ICloudDlpDataProfile); - /** Contact email. */ - public email: string; + /** CloudDlpDataProfile dataProfile. */ + public dataProfile: string; + + /** CloudDlpDataProfile parentType. */ + public parentType: (google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType); /** - * Creates a new Contact instance using the specified properties. + * Creates a new CloudDlpDataProfile instance using the specified properties. * @param [properties] Properties to set - * @returns Contact instance + * @returns CloudDlpDataProfile instance */ - public static create(properties?: google.cloud.securitycenter.v2.IContact): google.cloud.securitycenter.v2.Contact; + public static create(properties?: google.cloud.securitycenter.v2.ICloudDlpDataProfile): google.cloud.securitycenter.v2.CloudDlpDataProfile; /** - * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Contact + * @returns CloudDlpDataProfile * @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.cloud.securitycenter.v2.Contact; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.CloudDlpDataProfile; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Contact + * @returns CloudDlpDataProfile * @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.cloud.securitycenter.v2.Contact; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.CloudDlpDataProfile; /** - * Verifies a Contact message. + * Verifies a CloudDlpDataProfile 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 Contact message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Contact + * @returns CloudDlpDataProfile */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Contact; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudDlpDataProfile; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. - * @param message Contact + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * @param message CloudDlpDataProfile * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.CloudDlpDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Contact to JSON. + * Converts this CloudDlpDataProfile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Contact + * Gets the default type url for CloudDlpDataProfile * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Container. */ - interface IContainer { + namespace CloudDlpDataProfile { - /** Container name */ - name?: (string|null); + /** ParentType enum. */ + enum ParentType { + PARENT_TYPE_UNSPECIFIED = 0, + ORGANIZATION = 1, + PROJECT = 2 + } + } - /** Container uri */ - uri?: (string|null); + /** Properties of a CloudDlpInspection. */ + interface ICloudDlpInspection { - /** Container imageId */ - imageId?: (string|null); + /** CloudDlpInspection inspectJob */ + inspectJob?: (string|null); - /** Container labels */ - labels?: (google.cloud.securitycenter.v2.ILabel[]|null); + /** CloudDlpInspection infoType */ + infoType?: (string|null); - /** Container createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CloudDlpInspection infoTypeCount */ + infoTypeCount?: (number|Long|string|null); + + /** CloudDlpInspection fullScan */ + fullScan?: (boolean|null); } - /** Represents a Container. */ - class Container implements IContainer { + /** Represents a CloudDlpInspection. */ + class CloudDlpInspection implements ICloudDlpInspection { /** - * Constructs a new Container. + * Constructs a new CloudDlpInspection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IContainer); - - /** Container name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v2.ICloudDlpInspection); - /** Container uri. */ - public uri: string; + /** CloudDlpInspection inspectJob. */ + public inspectJob: string; - /** Container imageId. */ - public imageId: string; + /** CloudDlpInspection infoType. */ + public infoType: string; - /** Container labels. */ - public labels: google.cloud.securitycenter.v2.ILabel[]; + /** CloudDlpInspection infoTypeCount. */ + public infoTypeCount: (number|Long|string); - /** Container createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** CloudDlpInspection fullScan. */ + public fullScan: boolean; /** - * Creates a new Container instance using the specified properties. + * Creates a new CloudDlpInspection instance using the specified properties. * @param [properties] Properties to set - * @returns Container instance + * @returns CloudDlpInspection instance */ - public static create(properties?: google.cloud.securitycenter.v2.IContainer): google.cloud.securitycenter.v2.Container; + public static create(properties?: google.cloud.securitycenter.v2.ICloudDlpInspection): google.cloud.securitycenter.v2.CloudDlpInspection; /** - * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. - * @param message Container message or plain object to encode + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. - * @param message Container message or plain object to encode + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Container message from the specified reader or buffer. + * Decodes a CloudDlpInspection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Container + * @returns CloudDlpInspection * @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.cloud.securitycenter.v2.Container; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.CloudDlpInspection; /** - * Decodes a Container message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Container + * @returns CloudDlpInspection * @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.cloud.securitycenter.v2.Container; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.CloudDlpInspection; /** - * Verifies a Container message. + * Verifies a CloudDlpInspection message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Container message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Container + * @returns CloudDlpInspection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Container; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudDlpInspection; /** - * Creates a plain object from a Container message. Also converts values to other types if specified. - * @param message Container + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * @param message CloudDlpInspection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.CloudDlpInspection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Container to JSON. + * Converts this CloudDlpInspection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Container + * Gets the default type url for CloudDlpInspection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Label. */ - interface ILabel { + /** Properties of a Compliance. */ + interface ICompliance { - /** Label name */ - name?: (string|null); + /** Compliance standard */ + standard?: (string|null); - /** Label value */ - value?: (string|null); + /** Compliance version */ + version?: (string|null); + + /** Compliance ids */ + ids?: (string[]|null); } - /** Represents a Label. */ - class Label implements ILabel { + /** Represents a Compliance. */ + class Compliance implements ICompliance { /** - * Constructs a new Label. + * Constructs a new Compliance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ILabel); + constructor(properties?: google.cloud.securitycenter.v2.ICompliance); - /** Label name. */ - public name: string; + /** Compliance standard. */ + public standard: string; - /** Label value. */ - public value: string; + /** Compliance version. */ + public version: string; + + /** Compliance ids. */ + public ids: string[]; /** - * Creates a new Label instance using the specified properties. + * Creates a new Compliance instance using the specified properties. * @param [properties] Properties to set - * @returns Label instance + * @returns Compliance instance */ - public static create(properties?: google.cloud.securitycenter.v2.ILabel): google.cloud.securitycenter.v2.Label; + public static create(properties?: google.cloud.securitycenter.v2.ICompliance): google.cloud.securitycenter.v2.Compliance; /** - * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. + * @param message Compliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. + * @param message Compliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a Compliance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Label + * @returns Compliance * @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.cloud.securitycenter.v2.Label; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Compliance; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a Compliance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Label + * @returns Compliance * @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.cloud.securitycenter.v2.Label; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Compliance; /** - * Verifies a Label message. + * Verifies a Compliance 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 Label message from a plain object. Also converts values to their respective internal types. + * Creates a Compliance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Label + * @returns Compliance */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Label; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Compliance; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. - * @param message Label + * Creates a plain object from a Compliance message. Also converts values to other types if specified. + * @param message Compliance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Compliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Label to JSON. + * Converts this Compliance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Label + * Gets the default type url for Compliance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Database. */ - interface IDatabase { - - /** Database name */ - name?: (string|null); + /** Properties of a Connection. */ + interface IConnection { - /** Database displayName */ - displayName?: (string|null); + /** Connection destinationIp */ + destinationIp?: (string|null); - /** Database userName */ - userName?: (string|null); + /** Connection destinationPort */ + destinationPort?: (number|null); - /** Database query */ - query?: (string|null); + /** Connection sourceIp */ + sourceIp?: (string|null); - /** Database grantees */ - grantees?: (string[]|null); + /** Connection sourcePort */ + sourcePort?: (number|null); - /** Database version */ - version?: (string|null); + /** Connection protocol */ + protocol?: (google.cloud.securitycenter.v2.Connection.Protocol|keyof typeof google.cloud.securitycenter.v2.Connection.Protocol|null); } - /** Represents a Database. */ - class Database implements IDatabase { + /** Represents a Connection. */ + class Connection implements IConnection { /** - * Constructs a new Database. + * Constructs a new Connection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IDatabase); - - /** Database name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v2.IConnection); - /** Database displayName. */ - public displayName: string; + /** Connection destinationIp. */ + public destinationIp: string; - /** Database userName. */ - public userName: string; + /** Connection destinationPort. */ + public destinationPort: number; - /** Database query. */ - public query: string; + /** Connection sourceIp. */ + public sourceIp: string; - /** Database grantees. */ - public grantees: string[]; + /** Connection sourcePort. */ + public sourcePort: number; - /** Database version. */ - public version: string; + /** Connection protocol. */ + public protocol: (google.cloud.securitycenter.v2.Connection.Protocol|keyof typeof google.cloud.securitycenter.v2.Connection.Protocol); /** - * Creates a new Database instance using the specified properties. + * Creates a new Connection instance using the specified properties. * @param [properties] Properties to set - * @returns Database instance + * @returns Connection instance */ - public static create(properties?: google.cloud.securitycenter.v2.IDatabase): google.cloud.securitycenter.v2.Database; + public static create(properties?: google.cloud.securitycenter.v2.IConnection): google.cloud.securitycenter.v2.Connection; /** - * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. - * @param message Database message or plain object to encode + * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. - * @param message Database message or plain object to encode + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Database message from the specified reader or buffer. + * Decodes a Connection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Database + * @returns Connection * @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.cloud.securitycenter.v2.Database; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Connection; /** - * Decodes a Database message from the specified reader or buffer, length delimited. + * Decodes a Connection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Database + * @returns Connection * @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.cloud.securitycenter.v2.Database; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Connection; /** - * Verifies a Database message. + * Verifies a Connection 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 Database message from a plain object. Also converts values to their respective internal types. + * Creates a Connection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Database + * @returns Connection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Database; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Connection; /** - * Creates a plain object from a Database message. Also converts values to other types if specified. - * @param message Database + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @param message Connection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Database, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Database to JSON. + * Converts this Connection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Database + * Gets the default type url for Connection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Exfiltration. */ - interface IExfiltration { + namespace Connection { - /** Exfiltration sources */ - sources?: (google.cloud.securitycenter.v2.IExfilResource[]|null); + /** Protocol enum. */ + enum Protocol { + PROTOCOL_UNSPECIFIED = 0, + ICMP = 1, + TCP = 6, + UDP = 17, + GRE = 47, + ESP = 50 + } + } - /** Exfiltration targets */ - targets?: (google.cloud.securitycenter.v2.IExfilResource[]|null); + /** Properties of a ContactDetails. */ + interface IContactDetails { - /** Exfiltration totalExfiltratedBytes */ - totalExfiltratedBytes?: (number|Long|string|null); + /** ContactDetails contacts */ + contacts?: (google.cloud.securitycenter.v2.IContact[]|null); } - /** Represents an Exfiltration. */ - class Exfiltration implements IExfiltration { + /** Represents a ContactDetails. */ + class ContactDetails implements IContactDetails { /** - * Constructs a new Exfiltration. + * Constructs a new ContactDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IExfiltration); - - /** Exfiltration sources. */ - public sources: google.cloud.securitycenter.v2.IExfilResource[]; - - /** Exfiltration targets. */ - public targets: google.cloud.securitycenter.v2.IExfilResource[]; + constructor(properties?: google.cloud.securitycenter.v2.IContactDetails); - /** Exfiltration totalExfiltratedBytes. */ - public totalExfiltratedBytes: (number|Long|string); + /** ContactDetails contacts. */ + public contacts: google.cloud.securitycenter.v2.IContact[]; /** - * Creates a new Exfiltration instance using the specified properties. + * Creates a new ContactDetails instance using the specified properties. * @param [properties] Properties to set - * @returns Exfiltration instance + * @returns ContactDetails instance */ - public static create(properties?: google.cloud.securitycenter.v2.IExfiltration): google.cloud.securitycenter.v2.Exfiltration; + public static create(properties?: google.cloud.securitycenter.v2.IContactDetails): google.cloud.securitycenter.v2.ContactDetails; /** - * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. - * @param message Exfiltration message or plain object to encode + * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. + * @param message ContactDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. - * @param message Exfiltration message or plain object to encode + * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. + * @param message ContactDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Exfiltration message from the specified reader or buffer. + * Decodes a ContactDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Exfiltration + * @returns ContactDetails * @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.cloud.securitycenter.v2.Exfiltration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.ContactDetails; /** - * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * Decodes a ContactDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Exfiltration + * @returns ContactDetails * @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.cloud.securitycenter.v2.Exfiltration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.ContactDetails; /** - * Verifies an Exfiltration message. + * Verifies a ContactDetails 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 Exfiltration message from a plain object. Also converts values to their respective internal types. + * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Exfiltration + * @returns ContactDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Exfiltration; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ContactDetails; /** - * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. - * @param message Exfiltration + * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. + * @param message ContactDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Exfiltration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.ContactDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Exfiltration to JSON. + * Converts this ContactDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Exfiltration + * Gets the default type url for ContactDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExfilResource. */ - interface IExfilResource { - - /** ExfilResource name */ - name?: (string|null); + /** Properties of a Contact. */ + interface IContact { - /** ExfilResource components */ - components?: (string[]|null); + /** Contact email */ + email?: (string|null); } - /** Represents an ExfilResource. */ - class ExfilResource implements IExfilResource { + /** Represents a Contact. */ + class Contact implements IContact { /** - * Constructs a new ExfilResource. + * Constructs a new Contact. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IExfilResource); - - /** ExfilResource name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v2.IContact); - /** ExfilResource components. */ - public components: string[]; + /** Contact email. */ + public email: string; /** - * Creates a new ExfilResource instance using the specified properties. + * Creates a new Contact instance using the specified properties. * @param [properties] Properties to set - * @returns ExfilResource instance + * @returns Contact instance */ - public static create(properties?: google.cloud.securitycenter.v2.IExfilResource): google.cloud.securitycenter.v2.ExfilResource; + public static create(properties?: google.cloud.securitycenter.v2.IContact): google.cloud.securitycenter.v2.Contact; /** - * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. - * @param message ExfilResource message or plain object to encode + * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IContact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. - * @param message ExfilResource message or plain object to encode + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IContact, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExfilResource message from the specified reader or buffer. + * Decodes a Contact message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExfilResource + * @returns Contact * @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.cloud.securitycenter.v2.ExfilResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Contact; /** - * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * Decodes a Contact message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExfilResource + * @returns Contact * @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.cloud.securitycenter.v2.ExfilResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Contact; /** - * Verifies an ExfilResource message. + * Verifies a Contact 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 ExfilResource message from a plain object. Also converts values to their respective internal types. + * Creates a Contact message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExfilResource + * @returns Contact */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExfilResource; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Contact; /** - * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. - * @param message ExfilResource + * Creates a plain object from a Contact message. Also converts values to other types if specified. + * @param message Contact * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.ExfilResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExfilResource to JSON. + * Converts this Contact to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExfilResource + * Gets the default type url for Contact * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExternalSystem. */ - interface IExternalSystem { + /** Properties of a Container. */ + interface IContainer { - /** ExternalSystem name */ + /** Container name */ name?: (string|null); - /** ExternalSystem assignees */ - assignees?: (string[]|null); - - /** ExternalSystem externalUid */ - externalUid?: (string|null); - - /** ExternalSystem status */ - status?: (string|null); - - /** ExternalSystem externalSystemUpdateTime */ - externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - - /** ExternalSystem caseUri */ - caseUri?: (string|null); - - /** ExternalSystem casePriority */ - casePriority?: (string|null); - - /** ExternalSystem caseSla */ - caseSla?: (google.protobuf.ITimestamp|null); + /** Container uri */ + uri?: (string|null); - /** ExternalSystem caseCreateTime */ - caseCreateTime?: (google.protobuf.ITimestamp|null); + /** Container imageId */ + imageId?: (string|null); - /** ExternalSystem caseCloseTime */ - caseCloseTime?: (google.protobuf.ITimestamp|null); + /** Container labels */ + labels?: (google.cloud.securitycenter.v2.ILabel[]|null); - /** ExternalSystem ticketInfo */ - ticketInfo?: (google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null); + /** Container createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents an ExternalSystem. */ - class ExternalSystem implements IExternalSystem { + /** Represents a Container. */ + class Container implements IContainer { /** - * Constructs a new ExternalSystem. + * Constructs a new Container. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IExternalSystem); + constructor(properties?: google.cloud.securitycenter.v2.IContainer); - /** ExternalSystem name. */ + /** Container name. */ public name: string; - /** ExternalSystem assignees. */ - public assignees: string[]; - - /** ExternalSystem externalUid. */ - public externalUid: string; - - /** ExternalSystem status. */ - public status: string; + /** Container uri. */ + public uri: string; - /** ExternalSystem externalSystemUpdateTime. */ - public externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); + /** Container imageId. */ + public imageId: string; - /** ExternalSystem caseUri. */ - public caseUri: string; + /** Container labels. */ + public labels: google.cloud.securitycenter.v2.ILabel[]; - /** ExternalSystem casePriority. */ - public casePriority: string; + /** Container createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ExternalSystem caseSla. */ - public caseSla?: (google.protobuf.ITimestamp|null); + /** + * Creates a new Container instance using the specified properties. + * @param [properties] Properties to set + * @returns Container instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IContainer): google.cloud.securitycenter.v2.Container; - /** ExternalSystem caseCreateTime. */ - public caseCreateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; - /** ExternalSystem caseCloseTime. */ - public caseCloseTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; - /** ExternalSystem ticketInfo. */ - public ticketInfo?: (google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null); + /** + * Decodes a Container message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Container; /** - * Creates a new ExternalSystem instance using the specified properties. + * Decodes a Container message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Container; + + /** + * Verifies a Container message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Container message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Container + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Container; + + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @param message Container + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Container to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Container + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Label. */ + interface ILabel { + + /** Label name */ + name?: (string|null); + + /** Label value */ + value?: (string|null); + } + + /** Represents a Label. */ + class Label implements ILabel { + + /** + * Constructs a new Label. * @param [properties] Properties to set - * @returns ExternalSystem instance */ - public static create(properties?: google.cloud.securitycenter.v2.IExternalSystem): google.cloud.securitycenter.v2.ExternalSystem; + constructor(properties?: google.cloud.securitycenter.v2.ILabel); + + /** Label name. */ + public name: string; + + /** Label value. */ + public value: string; /** - * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. - * @param message ExternalSystem message or plain object to encode + * Creates a new Label instance using the specified properties. + * @param [properties] Properties to set + * @returns Label instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ILabel): google.cloud.securitycenter.v2.Label; + + /** + * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. + * @param message Label message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. - * @param message ExternalSystem message or plain object to encode + * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. + * @param message Label message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExternalSystem message from the specified reader or buffer. + * Decodes a Label message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExternalSystem + * @returns Label * @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.cloud.securitycenter.v2.ExternalSystem; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Label; /** - * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * Decodes a Label message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExternalSystem + * @returns Label * @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.cloud.securitycenter.v2.ExternalSystem; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Label; /** - * Verifies an ExternalSystem message. + * Verifies a Label 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 ExternalSystem message from a plain object. Also converts values to their respective internal types. + * Creates a Label message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExternalSystem + * @returns Label */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExternalSystem; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Label; /** - * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. - * @param message ExternalSystem + * Creates a plain object from a Label message. Also converts values to other types if specified. + * @param message Label * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.ExternalSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExternalSystem to JSON. + * Converts this Label to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExternalSystem + * Gets the default type url for Label * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ExternalSystem { + /** Properties of a Database. */ + interface IDatabase { - /** Properties of a TicketInfo. */ - interface ITicketInfo { + /** Database name */ + name?: (string|null); - /** TicketInfo id */ - id?: (string|null); + /** Database displayName */ + displayName?: (string|null); - /** TicketInfo assignee */ - assignee?: (string|null); + /** Database userName */ + userName?: (string|null); - /** TicketInfo description */ - description?: (string|null); + /** Database query */ + query?: (string|null); - /** TicketInfo uri */ - uri?: (string|null); + /** Database grantees */ + grantees?: (string[]|null); - /** TicketInfo status */ - status?: (string|null); + /** Database version */ + version?: (string|null); + } - /** TicketInfo updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** Represents a Database. */ + class Database implements IDatabase { - /** Represents a TicketInfo. */ - class TicketInfo implements ITicketInfo { + /** + * Constructs a new Database. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IDatabase); - /** - * Constructs a new TicketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo); + /** Database name. */ + public name: string; - /** TicketInfo id. */ - public id: string; + /** Database displayName. */ + public displayName: string; - /** TicketInfo assignee. */ - public assignee: string; + /** Database userName. */ + public userName: string; - /** TicketInfo description. */ - public description: string; + /** Database query. */ + public query: string; - /** TicketInfo uri. */ - public uri: string; + /** Database grantees. */ + public grantees: string[]; - /** TicketInfo status. */ - public status: string; + /** Database version. */ + public version: string; - /** TicketInfo updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new Database instance using the specified properties. + * @param [properties] Properties to set + * @returns Database instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IDatabase): google.cloud.securitycenter.v2.Database; - /** - * Creates a new TicketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TicketInfo instance - */ - public static create(properties?: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo): google.cloud.securitycenter.v2.ExternalSystem.TicketInfo; + /** + * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * @param message Database message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. - * @param message TicketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * @param message Database message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. - * @param message TicketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TicketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TicketInfo - * @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.cloud.securitycenter.v2.ExternalSystem.TicketInfo; + /** + * Decodes a Database message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Database + * @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.cloud.securitycenter.v2.Database; - /** - * Decodes a TicketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TicketInfo - * @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.cloud.securitycenter.v2.ExternalSystem.TicketInfo; + /** + * Decodes a Database message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Database + * @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.cloud.securitycenter.v2.Database; - /** - * Verifies a TicketInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Database 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 TicketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TicketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExternalSystem.TicketInfo; + /** + * Creates a Database message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Database + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Database; - /** - * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. - * @param message TicketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.ExternalSystem.TicketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Database message. Also converts values to other types if specified. + * @param message Database + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Database, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this TicketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Database to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for TicketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Database + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a File. */ - interface IFile { - - /** File path */ - path?: (string|null); - - /** File size */ - size?: (number|Long|string|null); - - /** File sha256 */ - sha256?: (string|null); - - /** File hashedSize */ - hashedSize?: (number|Long|string|null); + /** Properties of an Exfiltration. */ + interface IExfiltration { - /** File partiallyHashed */ - partiallyHashed?: (boolean|null); + /** Exfiltration sources */ + sources?: (google.cloud.securitycenter.v2.IExfilResource[]|null); - /** File contents */ - contents?: (string|null); + /** Exfiltration targets */ + targets?: (google.cloud.securitycenter.v2.IExfilResource[]|null); - /** File diskPath */ - diskPath?: (google.cloud.securitycenter.v2.File.IDiskPath|null); + /** Exfiltration totalExfiltratedBytes */ + totalExfiltratedBytes?: (number|Long|string|null); } - /** Represents a File. */ - class File implements IFile { + /** Represents an Exfiltration. */ + class Exfiltration implements IExfiltration { /** - * Constructs a new File. + * Constructs a new Exfiltration. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IFile); - - /** File path. */ - public path: string; - - /** File size. */ - public size: (number|Long|string); - - /** File sha256. */ - public sha256: string; - - /** File hashedSize. */ - public hashedSize: (number|Long|string); + constructor(properties?: google.cloud.securitycenter.v2.IExfiltration); - /** File partiallyHashed. */ - public partiallyHashed: boolean; + /** Exfiltration sources. */ + public sources: google.cloud.securitycenter.v2.IExfilResource[]; - /** File contents. */ - public contents: string; + /** Exfiltration targets. */ + public targets: google.cloud.securitycenter.v2.IExfilResource[]; - /** File diskPath. */ - public diskPath?: (google.cloud.securitycenter.v2.File.IDiskPath|null); + /** Exfiltration totalExfiltratedBytes. */ + public totalExfiltratedBytes: (number|Long|string); /** - * Creates a new File instance using the specified properties. + * Creates a new Exfiltration instance using the specified properties. * @param [properties] Properties to set - * @returns File instance + * @returns Exfiltration instance */ - public static create(properties?: google.cloud.securitycenter.v2.IFile): google.cloud.securitycenter.v2.File; + public static create(properties?: google.cloud.securitycenter.v2.IExfiltration): google.cloud.securitycenter.v2.Exfiltration; /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. - * @param message File message or plain object to encode + * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * @param message Exfiltration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. - * @param message File message or plain object to encode + * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * @param message Exfiltration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a File message from the specified reader or buffer. + * Decodes an Exfiltration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns File + * @returns Exfiltration * @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.cloud.securitycenter.v2.File; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Exfiltration; /** - * Decodes a File message from the specified reader or buffer, length delimited. + * Decodes an Exfiltration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns File + * @returns Exfiltration * @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.cloud.securitycenter.v2.File; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Exfiltration; /** - * Verifies a File message. + * Verifies an Exfiltration 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 File message from a plain object. Also converts values to their respective internal types. + * Creates an Exfiltration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns File + * @returns Exfiltration */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.File; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Exfiltration; /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File + * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. + * @param message Exfiltration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Exfiltration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this File to JSON. + * Converts this Exfiltration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for File + * Gets the default type url for Exfiltration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace File { - - /** Properties of a DiskPath. */ - interface IDiskPath { + /** Properties of an ExfilResource. */ + interface IExfilResource { - /** DiskPath partitionUuid */ - partitionUuid?: (string|null); + /** ExfilResource name */ + name?: (string|null); - /** DiskPath relativePath */ - relativePath?: (string|null); - } + /** ExfilResource components */ + components?: (string[]|null); + } - /** Represents a DiskPath. */ - class DiskPath implements IDiskPath { + /** Represents an ExfilResource. */ + class ExfilResource implements IExfilResource { - /** - * Constructs a new DiskPath. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.File.IDiskPath); + /** + * Constructs a new ExfilResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IExfilResource); - /** DiskPath partitionUuid. */ - public partitionUuid: string; + /** ExfilResource name. */ + public name: string; - /** DiskPath relativePath. */ - public relativePath: string; + /** ExfilResource components. */ + public components: string[]; - /** - * Creates a new DiskPath instance using the specified properties. - * @param [properties] Properties to set - * @returns DiskPath instance - */ - public static create(properties?: google.cloud.securitycenter.v2.File.IDiskPath): google.cloud.securitycenter.v2.File.DiskPath; + /** + * Creates a new ExfilResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExfilResource instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IExfilResource): google.cloud.securitycenter.v2.ExfilResource; - /** - * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. - * @param message DiskPath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * @param message ExfilResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. - * @param message DiskPath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * @param message ExfilResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DiskPath message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiskPath - * @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.cloud.securitycenter.v2.File.DiskPath; + /** + * Decodes an ExfilResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExfilResource + * @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.cloud.securitycenter.v2.ExfilResource; - /** - * Decodes a DiskPath message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiskPath - * @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.cloud.securitycenter.v2.File.DiskPath; + /** + * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExfilResource + * @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.cloud.securitycenter.v2.ExfilResource; - /** - * Verifies a DiskPath message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an ExfilResource 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 DiskPath message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiskPath - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.File.DiskPath; + /** + * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExfilResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExfilResource; - /** - * Creates a plain object from a DiskPath message. Also converts values to other types if specified. - * @param message DiskPath - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.File.DiskPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * @param message ExfilResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.ExfilResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DiskPath to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExfilResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for DiskPath - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ExfilResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Finding. */ - interface IFinding { + /** Properties of an ExternalSystem. */ + interface IExternalSystem { - /** Finding name */ + /** ExternalSystem name */ name?: (string|null); - /** Finding canonicalName */ - canonicalName?: (string|null); - - /** Finding parent */ - parent?: (string|null); - - /** Finding resourceName */ - resourceName?: (string|null); + /** ExternalSystem assignees */ + assignees?: (string[]|null); - /** Finding state */ - state?: (google.cloud.securitycenter.v2.Finding.State|keyof typeof google.cloud.securitycenter.v2.Finding.State|null); + /** ExternalSystem externalUid */ + externalUid?: (string|null); - /** Finding category */ - category?: (string|null); + /** ExternalSystem status */ + status?: (string|null); - /** Finding externalUri */ - externalUri?: (string|null); + /** ExternalSystem externalSystemUpdateTime */ + externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - /** Finding sourceProperties */ - sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + /** ExternalSystem caseUri */ + caseUri?: (string|null); - /** Finding securityMarks */ - securityMarks?: (google.cloud.securitycenter.v2.ISecurityMarks|null); + /** ExternalSystem casePriority */ + casePriority?: (string|null); - /** Finding eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); + /** ExternalSystem caseSla */ + caseSla?: (google.protobuf.ITimestamp|null); - /** Finding createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ExternalSystem caseCreateTime */ + caseCreateTime?: (google.protobuf.ITimestamp|null); - /** Finding severity */ - severity?: (google.cloud.securitycenter.v2.Finding.Severity|keyof typeof google.cloud.securitycenter.v2.Finding.Severity|null); + /** ExternalSystem caseCloseTime */ + caseCloseTime?: (google.protobuf.ITimestamp|null); - /** Finding mute */ - mute?: (google.cloud.securitycenter.v2.Finding.Mute|keyof typeof google.cloud.securitycenter.v2.Finding.Mute|null); + /** ExternalSystem ticketInfo */ + ticketInfo?: (google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null); + } - /** Finding findingClass */ - findingClass?: (google.cloud.securitycenter.v2.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v2.Finding.FindingClass|null); + /** Represents an ExternalSystem. */ + class ExternalSystem implements IExternalSystem { - /** Finding indicator */ - indicator?: (google.cloud.securitycenter.v2.IIndicator|null); + /** + * Constructs a new ExternalSystem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IExternalSystem); - /** Finding vulnerability */ - vulnerability?: (google.cloud.securitycenter.v2.IVulnerability|null); + /** ExternalSystem name. */ + public name: string; - /** Finding muteUpdateTime */ - muteUpdateTime?: (google.protobuf.ITimestamp|null); + /** ExternalSystem assignees. */ + public assignees: string[]; - /** Finding externalSystems */ - externalSystems?: ({ [k: string]: google.cloud.securitycenter.v2.IExternalSystem }|null); + /** ExternalSystem externalUid. */ + public externalUid: string; - /** Finding mitreAttack */ - mitreAttack?: (google.cloud.securitycenter.v2.IMitreAttack|null); + /** ExternalSystem status. */ + public status: string; - /** Finding access */ - access?: (google.cloud.securitycenter.v2.IAccess|null); + /** ExternalSystem externalSystemUpdateTime. */ + public externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - /** Finding connections */ - connections?: (google.cloud.securitycenter.v2.IConnection[]|null); + /** ExternalSystem caseUri. */ + public caseUri: string; - /** Finding muteInitiator */ - muteInitiator?: (string|null); + /** ExternalSystem casePriority. */ + public casePriority: string; - /** Finding processes */ - processes?: (google.cloud.securitycenter.v2.IProcess[]|null); + /** ExternalSystem caseSla. */ + public caseSla?: (google.protobuf.ITimestamp|null); - /** Finding contacts */ - contacts?: ({ [k: string]: google.cloud.securitycenter.v2.IContactDetails }|null); + /** ExternalSystem caseCreateTime. */ + public caseCreateTime?: (google.protobuf.ITimestamp|null); - /** Finding compliances */ - compliances?: (google.cloud.securitycenter.v2.ICompliance[]|null); + /** ExternalSystem caseCloseTime. */ + public caseCloseTime?: (google.protobuf.ITimestamp|null); - /** Finding parentDisplayName */ - parentDisplayName?: (string|null); + /** ExternalSystem ticketInfo. */ + public ticketInfo?: (google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null); - /** Finding description */ - description?: (string|null); + /** + * Creates a new ExternalSystem instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalSystem instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IExternalSystem): google.cloud.securitycenter.v2.ExternalSystem; - /** Finding exfiltration */ - exfiltration?: (google.cloud.securitycenter.v2.IExfiltration|null); + /** + * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. + * @param message ExternalSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding iamBindings */ - iamBindings?: (google.cloud.securitycenter.v2.IIamBinding[]|null); + /** + * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. + * @param message ExternalSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding nextSteps */ - nextSteps?: (string|null); + /** + * Decodes an ExternalSystem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalSystem + * @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.cloud.securitycenter.v2.ExternalSystem; - /** Finding moduleName */ - moduleName?: (string|null); + /** + * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalSystem + * @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.cloud.securitycenter.v2.ExternalSystem; - /** Finding containers */ - containers?: (google.cloud.securitycenter.v2.IContainer[]|null); + /** + * Verifies an ExternalSystem 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); - /** Finding kubernetes */ - kubernetes?: (google.cloud.securitycenter.v2.IKubernetes|null); + /** + * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalSystem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExternalSystem; - /** Finding database */ - database?: (google.cloud.securitycenter.v2.IDatabase|null); + /** + * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * @param message ExternalSystem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.ExternalSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Finding attackExposure */ - attackExposure?: (google.cloud.securitycenter.v2.IAttackExposure|null); + /** + * Converts this ExternalSystem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Finding files */ - files?: (google.cloud.securitycenter.v2.IFile[]|null); + /** + * Gets the default type url for ExternalSystem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Finding cloudDlpInspection */ - cloudDlpInspection?: (google.cloud.securitycenter.v2.ICloudDlpInspection|null); + namespace ExternalSystem { - /** Finding cloudDlpDataProfile */ - cloudDlpDataProfile?: (google.cloud.securitycenter.v2.ICloudDlpDataProfile|null); + /** Properties of a TicketInfo. */ + interface ITicketInfo { - /** Finding kernelRootkit */ - kernelRootkit?: (google.cloud.securitycenter.v2.IKernelRootkit|null); + /** TicketInfo id */ + id?: (string|null); - /** Finding orgPolicies */ - orgPolicies?: (google.cloud.securitycenter.v2.IOrgPolicy[]|null); + /** TicketInfo assignee */ + assignee?: (string|null); - /** Finding application */ - application?: (google.cloud.securitycenter.v2.IApplication|null); + /** TicketInfo description */ + description?: (string|null); - /** Finding backupDisasterRecovery */ - backupDisasterRecovery?: (google.cloud.securitycenter.v2.IBackupDisasterRecovery|null); + /** TicketInfo uri */ + uri?: (string|null); - /** Finding securityPosture */ - securityPosture?: (google.cloud.securitycenter.v2.ISecurityPosture|null); + /** TicketInfo status */ + status?: (string|null); - /** Finding logEntries */ - logEntries?: (google.cloud.securitycenter.v2.ILogEntry[]|null); + /** TicketInfo updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** Finding loadBalancers */ - loadBalancers?: (google.cloud.securitycenter.v2.ILoadBalancer[]|null); + /** Represents a TicketInfo. */ + class TicketInfo implements ITicketInfo { - /** Finding toxicCombination */ - toxicCombination?: (google.cloud.securitycenter.v2.IToxicCombination|null); + /** + * Constructs a new TicketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo); - /** Finding groupMemberships */ - groupMemberships?: (google.cloud.securitycenter.v2.IGroupMembership[]|null); - } + /** TicketInfo id. */ + public id: string; - /** Represents a Finding. */ - class Finding implements IFinding { + /** TicketInfo assignee. */ + public assignee: string; - /** - * Constructs a new Finding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IFinding); + /** TicketInfo description. */ + public description: string; - /** Finding name. */ - public name: string; + /** TicketInfo uri. */ + public uri: string; - /** Finding canonicalName. */ - public canonicalName: string; + /** TicketInfo status. */ + public status: string; - /** Finding parent. */ - public parent: string; + /** TicketInfo updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Finding resourceName. */ - public resourceName: string; + /** + * Creates a new TicketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TicketInfo instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo): google.cloud.securitycenter.v2.ExternalSystem.TicketInfo; - /** Finding state. */ - public state: (google.cloud.securitycenter.v2.Finding.State|keyof typeof google.cloud.securitycenter.v2.Finding.State); + /** + * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. + * @param message TicketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding category. */ - public category: string; + /** + * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. + * @param message TicketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding externalUri. */ - public externalUri: string; + /** + * Decodes a TicketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TicketInfo + * @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.cloud.securitycenter.v2.ExternalSystem.TicketInfo; - /** Finding sourceProperties. */ - public sourceProperties: { [k: string]: google.protobuf.IValue }; + /** + * Decodes a TicketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TicketInfo + * @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.cloud.securitycenter.v2.ExternalSystem.TicketInfo; - /** Finding securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v2.ISecurityMarks|null); + /** + * Verifies a TicketInfo 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); - /** Finding eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a TicketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TicketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ExternalSystem.TicketInfo; - /** Finding createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. + * @param message TicketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.ExternalSystem.TicketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Finding severity. */ - public severity: (google.cloud.securitycenter.v2.Finding.Severity|keyof typeof google.cloud.securitycenter.v2.Finding.Severity); + /** + * Converts this TicketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Finding mute. */ - public mute: (google.cloud.securitycenter.v2.Finding.Mute|keyof typeof google.cloud.securitycenter.v2.Finding.Mute); + /** + * Gets the default type url for TicketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Finding findingClass. */ - public findingClass: (google.cloud.securitycenter.v2.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v2.Finding.FindingClass); + /** Properties of a File. */ + interface IFile { - /** Finding indicator. */ - public indicator?: (google.cloud.securitycenter.v2.IIndicator|null); + /** File path */ + path?: (string|null); - /** Finding vulnerability. */ - public vulnerability?: (google.cloud.securitycenter.v2.IVulnerability|null); + /** File size */ + size?: (number|Long|string|null); - /** Finding muteUpdateTime. */ - public muteUpdateTime?: (google.protobuf.ITimestamp|null); + /** File sha256 */ + sha256?: (string|null); - /** Finding externalSystems. */ - public externalSystems: { [k: string]: google.cloud.securitycenter.v2.IExternalSystem }; + /** File hashedSize */ + hashedSize?: (number|Long|string|null); - /** Finding mitreAttack. */ - public mitreAttack?: (google.cloud.securitycenter.v2.IMitreAttack|null); + /** File partiallyHashed */ + partiallyHashed?: (boolean|null); - /** Finding access. */ - public access?: (google.cloud.securitycenter.v2.IAccess|null); + /** File contents */ + contents?: (string|null); - /** Finding connections. */ - public connections: google.cloud.securitycenter.v2.IConnection[]; + /** File diskPath */ + diskPath?: (google.cloud.securitycenter.v2.File.IDiskPath|null); + } - /** Finding muteInitiator. */ - public muteInitiator: string; - - /** Finding processes. */ - public processes: google.cloud.securitycenter.v2.IProcess[]; - - /** Finding contacts. */ - public contacts: { [k: string]: google.cloud.securitycenter.v2.IContactDetails }; - - /** Finding compliances. */ - public compliances: google.cloud.securitycenter.v2.ICompliance[]; - - /** Finding parentDisplayName. */ - public parentDisplayName: string; - - /** Finding description. */ - public description: string; - - /** Finding exfiltration. */ - public exfiltration?: (google.cloud.securitycenter.v2.IExfiltration|null); - - /** Finding iamBindings. */ - public iamBindings: google.cloud.securitycenter.v2.IIamBinding[]; - - /** Finding nextSteps. */ - public nextSteps: string; - - /** Finding moduleName. */ - public moduleName: string; - - /** Finding containers. */ - public containers: google.cloud.securitycenter.v2.IContainer[]; - - /** Finding kubernetes. */ - public kubernetes?: (google.cloud.securitycenter.v2.IKubernetes|null); - - /** Finding database. */ - public database?: (google.cloud.securitycenter.v2.IDatabase|null); - - /** Finding attackExposure. */ - public attackExposure?: (google.cloud.securitycenter.v2.IAttackExposure|null); - - /** Finding files. */ - public files: google.cloud.securitycenter.v2.IFile[]; - - /** Finding cloudDlpInspection. */ - public cloudDlpInspection?: (google.cloud.securitycenter.v2.ICloudDlpInspection|null); - - /** Finding cloudDlpDataProfile. */ - public cloudDlpDataProfile?: (google.cloud.securitycenter.v2.ICloudDlpDataProfile|null); - - /** Finding kernelRootkit. */ - public kernelRootkit?: (google.cloud.securitycenter.v2.IKernelRootkit|null); + /** Represents a File. */ + class File implements IFile { - /** Finding orgPolicies. */ - public orgPolicies: google.cloud.securitycenter.v2.IOrgPolicy[]; + /** + * Constructs a new File. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IFile); - /** Finding application. */ - public application?: (google.cloud.securitycenter.v2.IApplication|null); + /** File path. */ + public path: string; - /** Finding backupDisasterRecovery. */ - public backupDisasterRecovery?: (google.cloud.securitycenter.v2.IBackupDisasterRecovery|null); + /** File size. */ + public size: (number|Long|string); - /** Finding securityPosture. */ - public securityPosture?: (google.cloud.securitycenter.v2.ISecurityPosture|null); + /** File sha256. */ + public sha256: string; - /** Finding logEntries. */ - public logEntries: google.cloud.securitycenter.v2.ILogEntry[]; + /** File hashedSize. */ + public hashedSize: (number|Long|string); - /** Finding loadBalancers. */ - public loadBalancers: google.cloud.securitycenter.v2.ILoadBalancer[]; + /** File partiallyHashed. */ + public partiallyHashed: boolean; - /** Finding toxicCombination. */ - public toxicCombination?: (google.cloud.securitycenter.v2.IToxicCombination|null); + /** File contents. */ + public contents: string; - /** Finding groupMemberships. */ - public groupMemberships: google.cloud.securitycenter.v2.IGroupMembership[]; + /** File diskPath. */ + public diskPath?: (google.cloud.securitycenter.v2.File.IDiskPath|null); /** - * Creates a new Finding instance using the specified properties. + * Creates a new File instance using the specified properties. * @param [properties] Properties to set - * @returns Finding instance + * @returns File instance */ - public static create(properties?: google.cloud.securitycenter.v2.IFinding): google.cloud.securitycenter.v2.Finding; + public static create(properties?: google.cloud.securitycenter.v2.IFile): google.cloud.securitycenter.v2.File; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. + * @param message File message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. + * @param message File message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes a File message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Finding + * @returns File * @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.cloud.securitycenter.v2.Finding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.File; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Finding + * @returns File * @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.cloud.securitycenter.v2.Finding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.File; /** - * Verifies a Finding message. + * Verifies a File 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 Finding message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Finding + * @returns File */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Finding; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.File; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. - * @param message Finding + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Finding to JSON. + * Converts this File to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Finding + * Gets the default type url for File * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Finding { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } + namespace File { - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } + /** Properties of a DiskPath. */ + interface IDiskPath { - /** Mute enum. */ - enum Mute { - MUTE_UNSPECIFIED = 0, - MUTED = 1, - UNMUTED = 2, - UNDEFINED = 3 - } + /** DiskPath partitionUuid */ + partitionUuid?: (string|null); - /** FindingClass enum. */ - enum FindingClass { - FINDING_CLASS_UNSPECIFIED = 0, - THREAT = 1, - VULNERABILITY = 2, - MISCONFIGURATION = 3, - OBSERVATION = 4, - SCC_ERROR = 5, - POSTURE_VIOLATION = 6, - TOXIC_COMBINATION = 7 + /** DiskPath relativePath */ + relativePath?: (string|null); } - } - /** Properties of a GroupMembership. */ - interface IGroupMembership { + /** Represents a DiskPath. */ + class DiskPath implements IDiskPath { - /** GroupMembership groupType */ - groupType?: (google.cloud.securitycenter.v2.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v2.GroupMembership.GroupType|null); + /** + * Constructs a new DiskPath. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.File.IDiskPath); - /** GroupMembership groupId */ - groupId?: (string|null); - } + /** DiskPath partitionUuid. */ + public partitionUuid: string; - /** Represents a GroupMembership. */ - class GroupMembership implements IGroupMembership { + /** DiskPath relativePath. */ + public relativePath: string; - /** - * Constructs a new GroupMembership. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IGroupMembership); + /** + * Creates a new DiskPath instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskPath instance + */ + public static create(properties?: google.cloud.securitycenter.v2.File.IDiskPath): google.cloud.securitycenter.v2.File.DiskPath; - /** GroupMembership groupType. */ - public groupType: (google.cloud.securitycenter.v2.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v2.GroupMembership.GroupType); + /** + * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. + * @param message DiskPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; - /** GroupMembership groupId. */ - public groupId: string; + /** + * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. + * @param message DiskPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new GroupMembership instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupMembership instance - */ - public static create(properties?: google.cloud.securitycenter.v2.IGroupMembership): google.cloud.securitycenter.v2.GroupMembership; + /** + * Decodes a DiskPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskPath + * @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.cloud.securitycenter.v2.File.DiskPath; - /** - * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. - * @param message GroupMembership message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a DiskPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskPath + * @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.cloud.securitycenter.v2.File.DiskPath; - /** - * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. - * @param message GroupMembership message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a DiskPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a GroupMembership message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupMembership - * @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.cloud.securitycenter.v2.GroupMembership; + /** + * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskPath + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.File.DiskPath; - /** - * Decodes a GroupMembership message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupMembership - * @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.cloud.securitycenter.v2.GroupMembership; + /** + * Creates a plain object from a DiskPath message. Also converts values to other types if specified. + * @param message DiskPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.File.DiskPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a GroupMembership message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this DiskPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupMembership - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.GroupMembership; + /** + * Gets the default type url for DiskPath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. - * @param message GroupMembership - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.GroupMembership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Finding. */ + interface IFinding { - /** - * Converts this GroupMembership to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding name */ + name?: (string|null); - /** - * Gets the default type url for GroupMembership - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Finding canonicalName */ + canonicalName?: (string|null); - namespace GroupMembership { + /** Finding parent */ + parent?: (string|null); - /** GroupType enum. */ - enum GroupType { - GROUP_TYPE_UNSPECIFIED = 0, - GROUP_TYPE_TOXIC_COMBINATION = 1 - } - } + /** Finding resourceName */ + resourceName?: (string|null); - /** Properties of an IamBinding. */ - interface IIamBinding { + /** Finding state */ + state?: (google.cloud.securitycenter.v2.Finding.State|keyof typeof google.cloud.securitycenter.v2.Finding.State|null); - /** IamBinding action */ - action?: (google.cloud.securitycenter.v2.IamBinding.Action|keyof typeof google.cloud.securitycenter.v2.IamBinding.Action|null); + /** Finding category */ + category?: (string|null); - /** IamBinding role */ - role?: (string|null); + /** Finding externalUri */ + externalUri?: (string|null); - /** IamBinding member */ - member?: (string|null); - } + /** Finding sourceProperties */ + sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - /** Represents an IamBinding. */ - class IamBinding implements IIamBinding { + /** Finding securityMarks */ + securityMarks?: (google.cloud.securitycenter.v2.ISecurityMarks|null); - /** - * Constructs a new IamBinding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IIamBinding); + /** Finding eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); - /** IamBinding action. */ - public action: (google.cloud.securitycenter.v2.IamBinding.Action|keyof typeof google.cloud.securitycenter.v2.IamBinding.Action); + /** Finding createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** IamBinding role. */ - public role: string; + /** Finding severity */ + severity?: (google.cloud.securitycenter.v2.Finding.Severity|keyof typeof google.cloud.securitycenter.v2.Finding.Severity|null); - /** IamBinding member. */ - public member: string; + /** Finding mute */ + mute?: (google.cloud.securitycenter.v2.Finding.Mute|keyof typeof google.cloud.securitycenter.v2.Finding.Mute|null); - /** - * Creates a new IamBinding instance using the specified properties. - * @param [properties] Properties to set - * @returns IamBinding instance - */ - public static create(properties?: google.cloud.securitycenter.v2.IIamBinding): google.cloud.securitycenter.v2.IamBinding; + /** Finding findingClass */ + findingClass?: (google.cloud.securitycenter.v2.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v2.Finding.FindingClass|null); - /** - * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. - * @param message IamBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding indicator */ + indicator?: (google.cloud.securitycenter.v2.IIndicator|null); - /** - * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. - * @param message IamBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding vulnerability */ + vulnerability?: (google.cloud.securitycenter.v2.IVulnerability|null); - /** - * Decodes an IamBinding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IamBinding - * @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.cloud.securitycenter.v2.IamBinding; + /** Finding muteUpdateTime */ + muteUpdateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an IamBinding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IamBinding - * @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.cloud.securitycenter.v2.IamBinding; + /** Finding externalSystems */ + externalSystems?: ({ [k: string]: google.cloud.securitycenter.v2.IExternalSystem }|null); - /** - * Verifies an IamBinding 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); + /** Finding mitreAttack */ + mitreAttack?: (google.cloud.securitycenter.v2.IMitreAttack|null); - /** - * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IamBinding - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.IamBinding; + /** Finding access */ + access?: (google.cloud.securitycenter.v2.IAccess|null); - /** - * Creates a plain object from an IamBinding message. Also converts values to other types if specified. - * @param message IamBinding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.IamBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Finding connections */ + connections?: (google.cloud.securitycenter.v2.IConnection[]|null); - /** - * Converts this IamBinding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding muteInitiator */ + muteInitiator?: (string|null); - /** - * Gets the default type url for IamBinding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Finding processes */ + processes?: (google.cloud.securitycenter.v2.IProcess[]|null); - namespace IamBinding { + /** Finding contacts */ + contacts?: ({ [k: string]: google.cloud.securitycenter.v2.IContactDetails }|null); - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } + /** Finding compliances */ + compliances?: (google.cloud.securitycenter.v2.ICompliance[]|null); - /** Properties of an Indicator. */ - interface IIndicator { + /** Finding parentDisplayName */ + parentDisplayName?: (string|null); - /** Indicator ipAddresses */ - ipAddresses?: (string[]|null); + /** Finding description */ + description?: (string|null); - /** Indicator domains */ - domains?: (string[]|null); + /** Finding exfiltration */ + exfiltration?: (google.cloud.securitycenter.v2.IExfiltration|null); - /** Indicator signatures */ - signatures?: (google.cloud.securitycenter.v2.Indicator.IProcessSignature[]|null); + /** Finding iamBindings */ + iamBindings?: (google.cloud.securitycenter.v2.IIamBinding[]|null); - /** Indicator uris */ - uris?: (string[]|null); + /** Finding nextSteps */ + nextSteps?: (string|null); + + /** Finding moduleName */ + moduleName?: (string|null); + + /** Finding containers */ + containers?: (google.cloud.securitycenter.v2.IContainer[]|null); + + /** Finding kubernetes */ + kubernetes?: (google.cloud.securitycenter.v2.IKubernetes|null); + + /** Finding database */ + database?: (google.cloud.securitycenter.v2.IDatabase|null); + + /** Finding attackExposure */ + attackExposure?: (google.cloud.securitycenter.v2.IAttackExposure|null); + + /** Finding files */ + files?: (google.cloud.securitycenter.v2.IFile[]|null); + + /** Finding cloudDlpInspection */ + cloudDlpInspection?: (google.cloud.securitycenter.v2.ICloudDlpInspection|null); + + /** Finding cloudDlpDataProfile */ + cloudDlpDataProfile?: (google.cloud.securitycenter.v2.ICloudDlpDataProfile|null); + + /** Finding kernelRootkit */ + kernelRootkit?: (google.cloud.securitycenter.v2.IKernelRootkit|null); + + /** Finding orgPolicies */ + orgPolicies?: (google.cloud.securitycenter.v2.IOrgPolicy[]|null); + + /** Finding application */ + application?: (google.cloud.securitycenter.v2.IApplication|null); + + /** Finding backupDisasterRecovery */ + backupDisasterRecovery?: (google.cloud.securitycenter.v2.IBackupDisasterRecovery|null); + + /** Finding securityPosture */ + securityPosture?: (google.cloud.securitycenter.v2.ISecurityPosture|null); + + /** Finding logEntries */ + logEntries?: (google.cloud.securitycenter.v2.ILogEntry[]|null); + + /** Finding loadBalancers */ + loadBalancers?: (google.cloud.securitycenter.v2.ILoadBalancer[]|null); + + /** Finding cloudArmor */ + cloudArmor?: (google.cloud.securitycenter.v2.ICloudArmor|null); + + /** Finding notebook */ + notebook?: (google.cloud.securitycenter.v2.INotebook|null); + + /** Finding toxicCombination */ + toxicCombination?: (google.cloud.securitycenter.v2.IToxicCombination|null); + + /** Finding groupMemberships */ + groupMemberships?: (google.cloud.securitycenter.v2.IGroupMembership[]|null); } - /** Represents an Indicator. */ - class Indicator implements IIndicator { + /** Represents a Finding. */ + class Finding implements IFinding { /** - * Constructs a new Indicator. + * Constructs a new Finding. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IIndicator); + constructor(properties?: google.cloud.securitycenter.v2.IFinding); - /** Indicator ipAddresses. */ - public ipAddresses: string[]; + /** Finding name. */ + public name: string; - /** Indicator domains. */ - public domains: string[]; + /** Finding canonicalName. */ + public canonicalName: string; - /** Indicator signatures. */ - public signatures: google.cloud.securitycenter.v2.Indicator.IProcessSignature[]; + /** Finding parent. */ + public parent: string; - /** Indicator uris. */ - public uris: string[]; + /** Finding resourceName. */ + public resourceName: string; + + /** Finding state. */ + public state: (google.cloud.securitycenter.v2.Finding.State|keyof typeof google.cloud.securitycenter.v2.Finding.State); + + /** Finding category. */ + public category: string; + + /** Finding externalUri. */ + public externalUri: string; + + /** Finding sourceProperties. */ + public sourceProperties: { [k: string]: google.protobuf.IValue }; + + /** Finding securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v2.ISecurityMarks|null); + + /** Finding eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** Finding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Finding severity. */ + public severity: (google.cloud.securitycenter.v2.Finding.Severity|keyof typeof google.cloud.securitycenter.v2.Finding.Severity); + + /** Finding mute. */ + public mute: (google.cloud.securitycenter.v2.Finding.Mute|keyof typeof google.cloud.securitycenter.v2.Finding.Mute); + + /** Finding findingClass. */ + public findingClass: (google.cloud.securitycenter.v2.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v2.Finding.FindingClass); + + /** Finding indicator. */ + public indicator?: (google.cloud.securitycenter.v2.IIndicator|null); + + /** Finding vulnerability. */ + public vulnerability?: (google.cloud.securitycenter.v2.IVulnerability|null); + + /** Finding muteUpdateTime. */ + public muteUpdateTime?: (google.protobuf.ITimestamp|null); + + /** Finding externalSystems. */ + public externalSystems: { [k: string]: google.cloud.securitycenter.v2.IExternalSystem }; + + /** Finding mitreAttack. */ + public mitreAttack?: (google.cloud.securitycenter.v2.IMitreAttack|null); + + /** Finding access. */ + public access?: (google.cloud.securitycenter.v2.IAccess|null); + + /** Finding connections. */ + public connections: google.cloud.securitycenter.v2.IConnection[]; + + /** Finding muteInitiator. */ + public muteInitiator: string; + + /** Finding processes. */ + public processes: google.cloud.securitycenter.v2.IProcess[]; + + /** Finding contacts. */ + public contacts: { [k: string]: google.cloud.securitycenter.v2.IContactDetails }; + + /** Finding compliances. */ + public compliances: google.cloud.securitycenter.v2.ICompliance[]; + + /** Finding parentDisplayName. */ + public parentDisplayName: string; + + /** Finding description. */ + public description: string; + + /** Finding exfiltration. */ + public exfiltration?: (google.cloud.securitycenter.v2.IExfiltration|null); + + /** Finding iamBindings. */ + public iamBindings: google.cloud.securitycenter.v2.IIamBinding[]; + + /** Finding nextSteps. */ + public nextSteps: string; + + /** Finding moduleName. */ + public moduleName: string; + + /** Finding containers. */ + public containers: google.cloud.securitycenter.v2.IContainer[]; + + /** Finding kubernetes. */ + public kubernetes?: (google.cloud.securitycenter.v2.IKubernetes|null); + + /** Finding database. */ + public database?: (google.cloud.securitycenter.v2.IDatabase|null); + + /** Finding attackExposure. */ + public attackExposure?: (google.cloud.securitycenter.v2.IAttackExposure|null); + + /** Finding files. */ + public files: google.cloud.securitycenter.v2.IFile[]; + + /** Finding cloudDlpInspection. */ + public cloudDlpInspection?: (google.cloud.securitycenter.v2.ICloudDlpInspection|null); + + /** Finding cloudDlpDataProfile. */ + public cloudDlpDataProfile?: (google.cloud.securitycenter.v2.ICloudDlpDataProfile|null); + + /** Finding kernelRootkit. */ + public kernelRootkit?: (google.cloud.securitycenter.v2.IKernelRootkit|null); + + /** Finding orgPolicies. */ + public orgPolicies: google.cloud.securitycenter.v2.IOrgPolicy[]; + + /** Finding application. */ + public application?: (google.cloud.securitycenter.v2.IApplication|null); + + /** Finding backupDisasterRecovery. */ + public backupDisasterRecovery?: (google.cloud.securitycenter.v2.IBackupDisasterRecovery|null); + + /** Finding securityPosture. */ + public securityPosture?: (google.cloud.securitycenter.v2.ISecurityPosture|null); + + /** Finding logEntries. */ + public logEntries: google.cloud.securitycenter.v2.ILogEntry[]; + + /** Finding loadBalancers. */ + public loadBalancers: google.cloud.securitycenter.v2.ILoadBalancer[]; + + /** Finding cloudArmor. */ + public cloudArmor?: (google.cloud.securitycenter.v2.ICloudArmor|null); + + /** Finding notebook. */ + public notebook?: (google.cloud.securitycenter.v2.INotebook|null); + + /** Finding toxicCombination. */ + public toxicCombination?: (google.cloud.securitycenter.v2.IToxicCombination|null); + + /** Finding groupMemberships. */ + public groupMemberships: google.cloud.securitycenter.v2.IGroupMembership[]; /** - * Creates a new Indicator instance using the specified properties. + * Creates a new Finding instance using the specified properties. * @param [properties] Properties to set - * @returns Indicator instance + * @returns Finding instance */ - public static create(properties?: google.cloud.securitycenter.v2.IIndicator): google.cloud.securitycenter.v2.Indicator; + public static create(properties?: google.cloud.securitycenter.v2.IFinding): google.cloud.securitycenter.v2.Finding; /** - * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. - * @param message Indicator message or plain object to encode + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. - * @param message Indicator message or plain object to encode + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Indicator message from the specified reader or buffer. + * Decodes a Finding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Indicator + * @returns Finding * @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.cloud.securitycenter.v2.Indicator; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Finding; /** - * Decodes an Indicator message from the specified reader or buffer, length delimited. + * Decodes a Finding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Indicator + * @returns Finding * @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.cloud.securitycenter.v2.Indicator; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Finding; /** - * Verifies an Indicator message. + * Verifies a Finding 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 Indicator message from a plain object. Also converts values to their respective internal types. + * Creates a Finding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Indicator + * @returns Finding */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Finding; /** - * Creates a plain object from an Indicator message. Also converts values to other types if specified. - * @param message Indicator + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @param message Finding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Indicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Indicator to JSON. + * Converts this Finding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Indicator + * Gets the default type url for Finding * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Indicator { + namespace Finding { - /** Properties of a ProcessSignature. */ - interface IProcessSignature { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } - /** ProcessSignature memoryHashSignature */ - memoryHashSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null); + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } - /** ProcessSignature yaraRuleSignature */ - yaraRuleSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null); + /** Mute enum. */ + enum Mute { + MUTE_UNSPECIFIED = 0, + MUTED = 1, + UNMUTED = 2, + UNDEFINED = 3 + } - /** ProcessSignature signatureType */ - signatureType?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|null); + /** FindingClass enum. */ + enum FindingClass { + FINDING_CLASS_UNSPECIFIED = 0, + THREAT = 1, + VULNERABILITY = 2, + MISCONFIGURATION = 3, + OBSERVATION = 4, + SCC_ERROR = 5, + POSTURE_VIOLATION = 6, + TOXIC_COMBINATION = 7 } + } - /** Represents a ProcessSignature. */ - class ProcessSignature implements IProcessSignature { + /** Properties of a GroupMembership. */ + interface IGroupMembership { - /** - * Constructs a new ProcessSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Indicator.IProcessSignature); + /** GroupMembership groupType */ + groupType?: (google.cloud.securitycenter.v2.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v2.GroupMembership.GroupType|null); - /** ProcessSignature memoryHashSignature. */ - public memoryHashSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null); + /** GroupMembership groupId */ + groupId?: (string|null); + } - /** ProcessSignature yaraRuleSignature. */ - public yaraRuleSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null); + /** Represents a GroupMembership. */ + class GroupMembership implements IGroupMembership { - /** ProcessSignature signatureType. */ - public signatureType: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType); + /** + * Constructs a new GroupMembership. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IGroupMembership); - /** ProcessSignature signature. */ - public signature?: ("memoryHashSignature"|"yaraRuleSignature"); + /** GroupMembership groupType. */ + public groupType: (google.cloud.securitycenter.v2.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v2.GroupMembership.GroupType); - /** - * Creates a new ProcessSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns ProcessSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Indicator.IProcessSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature; + /** GroupMembership groupId. */ + public groupId: string; - /** - * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. - * @param message ProcessSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new GroupMembership instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupMembership instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IGroupMembership): google.cloud.securitycenter.v2.GroupMembership; - /** - * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. - * @param message ProcessSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * @param message GroupMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ProcessSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProcessSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature; + /** + * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * @param message GroupMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProcessSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature; + /** + * Decodes a GroupMembership message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupMembership + * @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.cloud.securitycenter.v2.GroupMembership; - /** - * Verifies a ProcessSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupMembership + * @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.cloud.securitycenter.v2.GroupMembership; - /** - * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProcessSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature; + /** + * Verifies a GroupMembership message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. - * @param message ProcessSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupMembership + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.GroupMembership; - /** - * Converts this ProcessSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. + * @param message GroupMembership + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.GroupMembership, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for ProcessSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this GroupMembership to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace ProcessSignature { + /** + * Gets the default type url for GroupMembership + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a MemoryHashSignature. */ - interface IMemoryHashSignature { + namespace GroupMembership { - /** MemoryHashSignature binaryFamily */ - binaryFamily?: (string|null); + /** GroupType enum. */ + enum GroupType { + GROUP_TYPE_UNSPECIFIED = 0, + GROUP_TYPE_TOXIC_COMBINATION = 1 + } + } - /** MemoryHashSignature detections */ - detections?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]|null); - } + /** Properties of an IamBinding. */ + interface IIamBinding { - /** Represents a MemoryHashSignature. */ - class MemoryHashSignature implements IMemoryHashSignature { + /** IamBinding action */ + action?: (google.cloud.securitycenter.v2.IamBinding.Action|keyof typeof google.cloud.securitycenter.v2.IamBinding.Action|null); - /** - * Constructs a new MemoryHashSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature); + /** IamBinding role */ + role?: (string|null); - /** MemoryHashSignature binaryFamily. */ - public binaryFamily: string; + /** IamBinding member */ + member?: (string|null); + } - /** MemoryHashSignature detections. */ - public detections: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]; + /** Represents an IamBinding. */ + class IamBinding implements IIamBinding { - /** - * Creates a new MemoryHashSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns MemoryHashSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Constructs a new IamBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IIamBinding); - /** - * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @param message MemoryHashSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** IamBinding action. */ + public action: (google.cloud.securitycenter.v2.IamBinding.Action|keyof typeof google.cloud.securitycenter.v2.IamBinding.Action); - /** - * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @param message MemoryHashSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** IamBinding role. */ + public role: string; - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MemoryHashSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; + /** IamBinding member. */ + public member: string; - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MemoryHashSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Creates a new IamBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns IamBinding instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IIamBinding): google.cloud.securitycenter.v2.IamBinding; - /** - * Verifies a MemoryHashSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. + * @param message IamBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MemoryHashSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. + * @param message IamBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. - * @param message MemoryHashSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an IamBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IamBinding + * @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.cloud.securitycenter.v2.IamBinding; - /** - * Converts this MemoryHashSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes an IamBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IamBinding + * @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.cloud.securitycenter.v2.IamBinding; - /** - * Gets the default type url for MemoryHashSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies an IamBinding 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); - namespace MemoryHashSignature { + /** + * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IamBinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.IamBinding; - /** Properties of a Detection. */ - interface IDetection { + /** + * Creates a plain object from an IamBinding message. Also converts values to other types if specified. + * @param message IamBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.IamBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Detection binary */ - binary?: (string|null); + /** + * Converts this IamBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Detection percentPagesMatched */ - percentPagesMatched?: (number|null); - } + /** + * Gets the default type url for IamBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a Detection. */ - class Detection implements IDetection { + namespace IamBinding { - /** - * Constructs a new Detection. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection); + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } - /** Detection binary. */ - public binary: string; + /** Properties of an Indicator. */ + interface IIndicator { - /** Detection percentPagesMatched. */ - public percentPagesMatched: number; + /** Indicator ipAddresses */ + ipAddresses?: (string[]|null); - /** - * Creates a new Detection instance using the specified properties. - * @param [properties] Properties to set - * @returns Detection instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** Indicator domains */ + domains?: (string[]|null); - /** - * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @param message Detection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; + /** Indicator signatures */ + signatures?: (google.cloud.securitycenter.v2.Indicator.IProcessSignature[]|null); - /** - * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @param message Detection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; + /** Indicator uris */ + uris?: (string[]|null); + } - /** - * Decodes a Detection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Detection - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** Represents an Indicator. */ + class Indicator implements IIndicator { - /** - * Decodes a Detection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Detection - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** + * Constructs a new Indicator. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IIndicator); - /** - * Verifies a Detection 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); + /** Indicator ipAddresses. */ + public ipAddresses: string[]; - /** - * Creates a Detection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Detection - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** Indicator domains. */ + public domains: string[]; - /** - * Creates a plain object from a Detection message. Also converts values to other types if specified. - * @param message Detection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Detection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Detection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a YaraRuleSignature. */ - interface IYaraRuleSignature { - - /** YaraRuleSignature yaraRule */ - yaraRule?: (string|null); - } - - /** Represents a YaraRuleSignature. */ - class YaraRuleSignature implements IYaraRuleSignature { - - /** - * Constructs a new YaraRuleSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature); - - /** YaraRuleSignature yaraRule. */ - public yaraRule: string; - - /** - * Creates a new YaraRuleSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns YaraRuleSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - - /** - * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @param message YaraRuleSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @param message YaraRuleSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YaraRuleSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YaraRuleSignature - * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - - /** - * Verifies a YaraRuleSignature 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 YaraRuleSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YaraRuleSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - - /** - * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. - * @param message YaraRuleSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this YaraRuleSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for YaraRuleSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SignatureType enum. */ - enum SignatureType { - SIGNATURE_TYPE_UNSPECIFIED = 0, - SIGNATURE_TYPE_PROCESS = 1, - SIGNATURE_TYPE_FILE = 2 - } - } - } - - /** Properties of a KernelRootkit. */ - interface IKernelRootkit { - - /** KernelRootkit name */ - name?: (string|null); - - /** KernelRootkit unexpectedCodeModification */ - unexpectedCodeModification?: (boolean|null); - - /** KernelRootkit unexpectedReadOnlyDataModification */ - unexpectedReadOnlyDataModification?: (boolean|null); - - /** KernelRootkit unexpectedFtraceHandler */ - unexpectedFtraceHandler?: (boolean|null); - - /** KernelRootkit unexpectedKprobeHandler */ - unexpectedKprobeHandler?: (boolean|null); - - /** KernelRootkit unexpectedKernelCodePages */ - unexpectedKernelCodePages?: (boolean|null); - - /** KernelRootkit unexpectedSystemCallHandler */ - unexpectedSystemCallHandler?: (boolean|null); - - /** KernelRootkit unexpectedInterruptHandler */ - unexpectedInterruptHandler?: (boolean|null); - - /** KernelRootkit unexpectedProcessesInRunqueue */ - unexpectedProcessesInRunqueue?: (boolean|null); - } - - /** Represents a KernelRootkit. */ - class KernelRootkit implements IKernelRootkit { - - /** - * Constructs a new KernelRootkit. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IKernelRootkit); - - /** KernelRootkit name. */ - public name: string; - - /** KernelRootkit unexpectedCodeModification. */ - public unexpectedCodeModification: boolean; - - /** KernelRootkit unexpectedReadOnlyDataModification. */ - public unexpectedReadOnlyDataModification: boolean; - - /** KernelRootkit unexpectedFtraceHandler. */ - public unexpectedFtraceHandler: boolean; - - /** KernelRootkit unexpectedKprobeHandler. */ - public unexpectedKprobeHandler: boolean; - - /** KernelRootkit unexpectedKernelCodePages. */ - public unexpectedKernelCodePages: boolean; - - /** KernelRootkit unexpectedSystemCallHandler. */ - public unexpectedSystemCallHandler: boolean; - - /** KernelRootkit unexpectedInterruptHandler. */ - public unexpectedInterruptHandler: boolean; + /** Indicator signatures. */ + public signatures: google.cloud.securitycenter.v2.Indicator.IProcessSignature[]; - /** KernelRootkit unexpectedProcessesInRunqueue. */ - public unexpectedProcessesInRunqueue: boolean; + /** Indicator uris. */ + public uris: string[]; /** - * Creates a new KernelRootkit instance using the specified properties. + * Creates a new Indicator instance using the specified properties. * @param [properties] Properties to set - * @returns KernelRootkit instance + * @returns Indicator instance */ - public static create(properties?: google.cloud.securitycenter.v2.IKernelRootkit): google.cloud.securitycenter.v2.KernelRootkit; + public static create(properties?: google.cloud.securitycenter.v2.IIndicator): google.cloud.securitycenter.v2.Indicator; /** - * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. - * @param message KernelRootkit message or plain object to encode + * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. + * @param message Indicator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. - * @param message KernelRootkit message or plain object to encode + * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. + * @param message Indicator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KernelRootkit message from the specified reader or buffer. + * Decodes an Indicator message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KernelRootkit + * @returns Indicator * @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.cloud.securitycenter.v2.KernelRootkit; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Indicator; /** - * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * Decodes an Indicator message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KernelRootkit + * @returns Indicator * @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.cloud.securitycenter.v2.KernelRootkit; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Indicator; /** - * Verifies a KernelRootkit message. + * Verifies an Indicator 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 KernelRootkit message from a plain object. Also converts values to their respective internal types. + * Creates an Indicator message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KernelRootkit + * @returns Indicator */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.KernelRootkit; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator; /** - * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. - * @param message KernelRootkit + * Creates a plain object from an Indicator message. Also converts values to other types if specified. + * @param message Indicator * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.KernelRootkit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Indicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KernelRootkit to JSON. + * Converts this Indicator to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KernelRootkit + * Gets the default type url for Indicator * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Kubernetes. */ - interface IKubernetes { + namespace Indicator { - /** Kubernetes pods */ - pods?: (google.cloud.securitycenter.v2.Kubernetes.IPod[]|null); + /** Properties of a ProcessSignature. */ + interface IProcessSignature { - /** Kubernetes nodes */ - nodes?: (google.cloud.securitycenter.v2.Kubernetes.INode[]|null); + /** ProcessSignature memoryHashSignature */ + memoryHashSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null); - /** Kubernetes nodePools */ - nodePools?: (google.cloud.securitycenter.v2.Kubernetes.INodePool[]|null); + /** ProcessSignature yaraRuleSignature */ + yaraRuleSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null); - /** Kubernetes roles */ - roles?: (google.cloud.securitycenter.v2.Kubernetes.IRole[]|null); - - /** Kubernetes bindings */ - bindings?: (google.cloud.securitycenter.v2.Kubernetes.IBinding[]|null); - - /** Kubernetes accessReviews */ - accessReviews?: (google.cloud.securitycenter.v2.Kubernetes.IAccessReview[]|null); - - /** Kubernetes objects */ - objects?: (google.cloud.securitycenter.v2.Kubernetes.IObject[]|null); - } - - /** Represents a Kubernetes. */ - class Kubernetes implements IKubernetes { - - /** - * Constructs a new Kubernetes. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IKubernetes); - - /** Kubernetes pods. */ - public pods: google.cloud.securitycenter.v2.Kubernetes.IPod[]; - - /** Kubernetes nodes. */ - public nodes: google.cloud.securitycenter.v2.Kubernetes.INode[]; - - /** Kubernetes nodePools. */ - public nodePools: google.cloud.securitycenter.v2.Kubernetes.INodePool[]; - - /** Kubernetes roles. */ - public roles: google.cloud.securitycenter.v2.Kubernetes.IRole[]; - - /** Kubernetes bindings. */ - public bindings: google.cloud.securitycenter.v2.Kubernetes.IBinding[]; - - /** Kubernetes accessReviews. */ - public accessReviews: google.cloud.securitycenter.v2.Kubernetes.IAccessReview[]; - - /** Kubernetes objects. */ - public objects: google.cloud.securitycenter.v2.Kubernetes.IObject[]; - - /** - * Creates a new Kubernetes instance using the specified properties. - * @param [properties] Properties to set - * @returns Kubernetes instance - */ - public static create(properties?: google.cloud.securitycenter.v2.IKubernetes): google.cloud.securitycenter.v2.Kubernetes; - - /** - * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. - * @param message Kubernetes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. - * @param message Kubernetes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Kubernetes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Kubernetes - * @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.cloud.securitycenter.v2.Kubernetes; - - /** - * Decodes a Kubernetes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Kubernetes - * @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.cloud.securitycenter.v2.Kubernetes; - - /** - * Verifies a Kubernetes 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 Kubernetes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Kubernetes - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes; - - /** - * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. - * @param message Kubernetes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Kubernetes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Kubernetes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Kubernetes { - - /** Properties of a Pod. */ - interface IPod { - - /** Pod ns */ - ns?: (string|null); - - /** Pod name */ - name?: (string|null); - - /** Pod labels */ - labels?: (google.cloud.securitycenter.v2.ILabel[]|null); - - /** Pod containers */ - containers?: (google.cloud.securitycenter.v2.IContainer[]|null); + /** ProcessSignature signatureType */ + signatureType?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|null); } - /** Represents a Pod. */ - class Pod implements IPod { + /** Represents a ProcessSignature. */ + class ProcessSignature implements IProcessSignature { /** - * Constructs a new Pod. + * Constructs a new ProcessSignature. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IPod); + constructor(properties?: google.cloud.securitycenter.v2.Indicator.IProcessSignature); - /** Pod ns. */ - public ns: string; + /** ProcessSignature memoryHashSignature. */ + public memoryHashSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null); - /** Pod name. */ - public name: string; + /** ProcessSignature yaraRuleSignature. */ + public yaraRuleSignature?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null); - /** Pod labels. */ - public labels: google.cloud.securitycenter.v2.ILabel[]; + /** ProcessSignature signatureType. */ + public signatureType: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType); - /** Pod containers. */ - public containers: google.cloud.securitycenter.v2.IContainer[]; + /** ProcessSignature signature. */ + public signature?: ("memoryHashSignature"|"yaraRuleSignature"); /** - * Creates a new Pod instance using the specified properties. + * Creates a new ProcessSignature instance using the specified properties. * @param [properties] Properties to set - * @returns Pod instance + * @returns ProcessSignature instance */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IPod): google.cloud.securitycenter.v2.Kubernetes.Pod; + public static create(properties?: google.cloud.securitycenter.v2.Indicator.IProcessSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature; /** - * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. - * @param message Pod message or plain object to encode + * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. + * @param message ProcessSignature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. - * @param message Pod message or plain object to encode + * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. + * @param message ProcessSignature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Pod message from the specified reader or buffer. + * Decodes a ProcessSignature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Pod + * @returns ProcessSignature * @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.cloud.securitycenter.v2.Kubernetes.Pod; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Indicator.ProcessSignature; /** - * Decodes a Pod message from the specified reader or buffer, length delimited. + * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Pod + * @returns ProcessSignature * @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.cloud.securitycenter.v2.Kubernetes.Pod; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Indicator.ProcessSignature; /** - * Verifies a Pod message. + * Verifies a ProcessSignature 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 Pod message from a plain object. Also converts values to their respective internal types. + * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Pod + * @returns ProcessSignature */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Pod; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature; /** - * Creates a plain object from a Pod message. Also converts values to other types if specified. - * @param message Pod + * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. + * @param message ProcessSignature * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Pod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Pod to JSON. + * Converts this ProcessSignature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Pod + * Gets the default type url for ProcessSignature * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Node. */ - interface INode { + namespace ProcessSignature { - /** Node name */ - name?: (string|null); - } + /** Properties of a MemoryHashSignature. */ + interface IMemoryHashSignature { - /** Represents a Node. */ - class Node implements INode { + /** MemoryHashSignature binaryFamily */ + binaryFamily?: (string|null); - /** - * Constructs a new Node. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.INode); + /** MemoryHashSignature detections */ + detections?: (google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]|null); + } - /** Node name. */ - public name: string; + /** Represents a MemoryHashSignature. */ + class MemoryHashSignature implements IMemoryHashSignature { - /** - * Creates a new Node instance using the specified properties. - * @param [properties] Properties to set - * @returns Node instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.INode): google.cloud.securitycenter.v2.Kubernetes.Node; + /** + * Constructs a new MemoryHashSignature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature); - /** - * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + /** MemoryHashSignature binaryFamily. */ + public binaryFamily: string; - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Node message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Node - * @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.cloud.securitycenter.v2.Kubernetes.Node; + /** MemoryHashSignature detections. */ + public detections: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]; - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Node - * @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.cloud.securitycenter.v2.Kubernetes.Node; + /** + * Creates a new MemoryHashSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns MemoryHashSignature instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; - /** - * Verifies a Node message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @param message MemoryHashSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Node - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Node; + /** + * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @param message MemoryHashSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a Node message. Also converts values to other types if specified. - * @param message Node - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MemoryHashSignature + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; - /** - * Converts this Node to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MemoryHashSignature + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; - /** - * Gets the default type url for Node - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a MemoryHashSignature 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); - /** Properties of a NodePool. */ - interface INodePool { + /** + * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MemoryHashSignature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature; - /** NodePool name */ - name?: (string|null); + /** + * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. + * @param message MemoryHashSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** NodePool nodes */ - nodes?: (google.cloud.securitycenter.v2.Kubernetes.INode[]|null); - } + /** + * Converts this MemoryHashSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a NodePool. */ - class NodePool implements INodePool { + /** + * Gets the default type url for MemoryHashSignature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new NodePool. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.INodePool); + namespace MemoryHashSignature { - /** NodePool name. */ - public name: string; + /** Properties of a Detection. */ + interface IDetection { - /** NodePool nodes. */ - public nodes: google.cloud.securitycenter.v2.Kubernetes.INode[]; + /** Detection binary */ + binary?: (string|null); - /** - * Creates a new NodePool instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePool instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.INodePool): google.cloud.securitycenter.v2.Kubernetes.NodePool; + /** Detection percentPagesMatched */ + percentPagesMatched?: (number|null); + } - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Detection. */ + class Detection implements IDetection { - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Detection. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection); - /** - * Decodes a NodePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePool - * @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.cloud.securitycenter.v2.Kubernetes.NodePool; + /** Detection binary. */ + public binary: string; - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePool - * @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.cloud.securitycenter.v2.Kubernetes.NodePool; + /** Detection percentPagesMatched. */ + public percentPagesMatched: number; - /** - * Verifies a NodePool 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 new Detection instance using the specified properties. + * @param [properties] Properties to set + * @returns Detection instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePool - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.NodePool; + /** + * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @param message Detection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @param message NodePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @param message Detection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this NodePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a Detection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Detection + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; - /** - * Gets the default type url for NodePool - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a Detection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Detection + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; - /** Properties of a Role. */ - interface IRole { + /** + * Verifies a Detection 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); - /** Role kind */ - kind?: (google.cloud.securitycenter.v2.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Role.Kind|null); + /** + * Creates a Detection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Detection + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection; - /** Role ns */ - ns?: (string|null); + /** + * Creates a plain object from a Detection message. Also converts values to other types if specified. + * @param message Detection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Role name */ - name?: (string|null); - } + /** + * Converts this Detection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a Role. */ - class Role implements IRole { + /** + * Gets the default type url for Detection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Constructs a new Role. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IRole); + /** Properties of a YaraRuleSignature. */ + interface IYaraRuleSignature { - /** Role kind. */ - public kind: (google.cloud.securitycenter.v2.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Role.Kind); + /** YaraRuleSignature yaraRule */ + yaraRule?: (string|null); + } - /** Role ns. */ - public ns: string; + /** Represents a YaraRuleSignature. */ + class YaraRuleSignature implements IYaraRuleSignature { - /** Role name. */ - public name: string; + /** + * Constructs a new YaraRuleSignature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature); - /** - * Creates a new Role instance using the specified properties. - * @param [properties] Properties to set - * @returns Role instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IRole): google.cloud.securitycenter.v2.Kubernetes.Role; + /** YaraRuleSignature yaraRule. */ + public yaraRule: string; - /** - * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. - * @param message Role message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new YaraRuleSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns YaraRuleSignature instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature): google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. - * @param message Role message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @param message YaraRuleSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Role message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Role - * @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.cloud.securitycenter.v2.Kubernetes.Role; + /** + * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @param message YaraRuleSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Role message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Role - * @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.cloud.securitycenter.v2.Kubernetes.Role; + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YaraRuleSignature + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - /** - * Verifies a Role message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YaraRuleSignature + * @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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - /** - * Creates a Role message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Role - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Role; + /** + * Verifies a YaraRuleSignature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Role message. Also converts values to other types if specified. - * @param message Role - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YaraRuleSignature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature; - /** - * Converts this Role to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. + * @param message YaraRuleSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for Role - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this YaraRuleSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace Role { + /** + * Gets the default type url for YaraRuleSignature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - ROLE = 1, - CLUSTER_ROLE = 2 + /** SignatureType enum. */ + enum SignatureType { + SIGNATURE_TYPE_UNSPECIFIED = 0, + SIGNATURE_TYPE_PROCESS = 1, + SIGNATURE_TYPE_FILE = 2 } } + } - /** Properties of a Binding. */ - interface IBinding { - - /** Binding ns */ - ns?: (string|null); + /** Properties of a KernelRootkit. */ + interface IKernelRootkit { - /** Binding name */ - name?: (string|null); + /** KernelRootkit name */ + name?: (string|null); - /** Binding role */ - role?: (google.cloud.securitycenter.v2.Kubernetes.IRole|null); + /** KernelRootkit unexpectedCodeModification */ + unexpectedCodeModification?: (boolean|null); - /** Binding subjects */ - subjects?: (google.cloud.securitycenter.v2.Kubernetes.ISubject[]|null); - } + /** KernelRootkit unexpectedReadOnlyDataModification */ + unexpectedReadOnlyDataModification?: (boolean|null); - /** Represents a Binding. */ - class Binding implements IBinding { + /** KernelRootkit unexpectedFtraceHandler */ + unexpectedFtraceHandler?: (boolean|null); - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IBinding); + /** KernelRootkit unexpectedKprobeHandler */ + unexpectedKprobeHandler?: (boolean|null); + + /** KernelRootkit unexpectedKernelCodePages */ + unexpectedKernelCodePages?: (boolean|null); + + /** KernelRootkit unexpectedSystemCallHandler */ + unexpectedSystemCallHandler?: (boolean|null); + + /** KernelRootkit unexpectedInterruptHandler */ + unexpectedInterruptHandler?: (boolean|null); + + /** KernelRootkit unexpectedProcessesInRunqueue */ + unexpectedProcessesInRunqueue?: (boolean|null); + } + + /** Represents a KernelRootkit. */ + class KernelRootkit implements IKernelRootkit { + + /** + * Constructs a new KernelRootkit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IKernelRootkit); + + /** KernelRootkit name. */ + public name: string; + + /** KernelRootkit unexpectedCodeModification. */ + public unexpectedCodeModification: boolean; + + /** KernelRootkit unexpectedReadOnlyDataModification. */ + public unexpectedReadOnlyDataModification: boolean; + + /** KernelRootkit unexpectedFtraceHandler. */ + public unexpectedFtraceHandler: boolean; + + /** KernelRootkit unexpectedKprobeHandler. */ + public unexpectedKprobeHandler: boolean; + + /** KernelRootkit unexpectedKernelCodePages. */ + public unexpectedKernelCodePages: boolean; + + /** KernelRootkit unexpectedSystemCallHandler. */ + public unexpectedSystemCallHandler: boolean; + + /** KernelRootkit unexpectedInterruptHandler. */ + public unexpectedInterruptHandler: boolean; + + /** KernelRootkit unexpectedProcessesInRunqueue. */ + public unexpectedProcessesInRunqueue: boolean; + + /** + * Creates a new KernelRootkit instance using the specified properties. + * @param [properties] Properties to set + * @returns KernelRootkit instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IKernelRootkit): google.cloud.securitycenter.v2.KernelRootkit; + + /** + * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. + * @param message KernelRootkit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. + * @param message KernelRootkit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KernelRootkit + * @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.cloud.securitycenter.v2.KernelRootkit; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KernelRootkit + * @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.cloud.securitycenter.v2.KernelRootkit; + + /** + * Verifies a KernelRootkit 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 KernelRootkit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KernelRootkit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.KernelRootkit; + + /** + * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. + * @param message KernelRootkit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.KernelRootkit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KernelRootkit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KernelRootkit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Kubernetes. */ + interface IKubernetes { + + /** Kubernetes pods */ + pods?: (google.cloud.securitycenter.v2.Kubernetes.IPod[]|null); + + /** Kubernetes nodes */ + nodes?: (google.cloud.securitycenter.v2.Kubernetes.INode[]|null); + + /** Kubernetes nodePools */ + nodePools?: (google.cloud.securitycenter.v2.Kubernetes.INodePool[]|null); + + /** Kubernetes roles */ + roles?: (google.cloud.securitycenter.v2.Kubernetes.IRole[]|null); + + /** Kubernetes bindings */ + bindings?: (google.cloud.securitycenter.v2.Kubernetes.IBinding[]|null); + + /** Kubernetes accessReviews */ + accessReviews?: (google.cloud.securitycenter.v2.Kubernetes.IAccessReview[]|null); + + /** Kubernetes objects */ + objects?: (google.cloud.securitycenter.v2.Kubernetes.IObject[]|null); + } + + /** Represents a Kubernetes. */ + class Kubernetes implements IKubernetes { + + /** + * Constructs a new Kubernetes. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IKubernetes); + + /** Kubernetes pods. */ + public pods: google.cloud.securitycenter.v2.Kubernetes.IPod[]; + + /** Kubernetes nodes. */ + public nodes: google.cloud.securitycenter.v2.Kubernetes.INode[]; + + /** Kubernetes nodePools. */ + public nodePools: google.cloud.securitycenter.v2.Kubernetes.INodePool[]; + + /** Kubernetes roles. */ + public roles: google.cloud.securitycenter.v2.Kubernetes.IRole[]; + + /** Kubernetes bindings. */ + public bindings: google.cloud.securitycenter.v2.Kubernetes.IBinding[]; + + /** Kubernetes accessReviews. */ + public accessReviews: google.cloud.securitycenter.v2.Kubernetes.IAccessReview[]; + + /** Kubernetes objects. */ + public objects: google.cloud.securitycenter.v2.Kubernetes.IObject[]; + + /** + * Creates a new Kubernetes instance using the specified properties. + * @param [properties] Properties to set + * @returns Kubernetes instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IKubernetes): google.cloud.securitycenter.v2.Kubernetes; + + /** + * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. + * @param message Kubernetes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. + * @param message Kubernetes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Kubernetes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Kubernetes + * @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.cloud.securitycenter.v2.Kubernetes; + + /** + * Decodes a Kubernetes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Kubernetes + * @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.cloud.securitycenter.v2.Kubernetes; + + /** + * Verifies a Kubernetes 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 Kubernetes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Kubernetes + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes; + + /** + * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. + * @param message Kubernetes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Kubernetes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Kubernetes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Kubernetes { + + /** Properties of a Pod. */ + interface IPod { + + /** Pod ns */ + ns?: (string|null); + + /** Pod name */ + name?: (string|null); + + /** Pod labels */ + labels?: (google.cloud.securitycenter.v2.ILabel[]|null); + + /** Pod containers */ + containers?: (google.cloud.securitycenter.v2.IContainer[]|null); + } + + /** Represents a Pod. */ + class Pod implements IPod { + + /** + * Constructs a new Pod. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IPod); + + /** Pod ns. */ + public ns: string; + + /** Pod name. */ + public name: string; + + /** Pod labels. */ + public labels: google.cloud.securitycenter.v2.ILabel[]; + + /** Pod containers. */ + public containers: google.cloud.securitycenter.v2.IContainer[]; + + /** + * Creates a new Pod instance using the specified properties. + * @param [properties] Properties to set + * @returns Pod instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IPod): google.cloud.securitycenter.v2.Kubernetes.Pod; + + /** + * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. + * @param message Pod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. + * @param message Pod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pod + * @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.cloud.securitycenter.v2.Kubernetes.Pod; + + /** + * Decodes a Pod message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pod + * @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.cloud.securitycenter.v2.Kubernetes.Pod; + + /** + * Verifies a Pod 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 Pod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pod + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Pod; + + /** + * Creates a plain object from a Pod message. Also converts values to other types if specified. + * @param message Pod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Pod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Node. */ + interface INode { + + /** Node name */ + name?: (string|null); + } + + /** Represents a Node. */ + class Node implements INode { + + /** + * Constructs a new Node. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.INode); + + /** Node name. */ + public name: string; + + /** + * Creates a new Node instance using the specified properties. + * @param [properties] Properties to set + * @returns Node instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.INode): google.cloud.securitycenter.v2.Kubernetes.Node; + + /** + * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. + * @param message Node message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. + * @param message Node message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Node message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Node + * @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.cloud.securitycenter.v2.Kubernetes.Node; + + /** + * Decodes a Node message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Node + * @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.cloud.securitycenter.v2.Kubernetes.Node; + + /** + * Verifies a Node 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 Node message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Node + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Node; + + /** + * Creates a plain object from a Node message. Also converts values to other types if specified. + * @param message Node + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Node to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Node + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePool. */ + interface INodePool { + + /** NodePool name */ + name?: (string|null); + + /** NodePool nodes */ + nodes?: (google.cloud.securitycenter.v2.Kubernetes.INode[]|null); + } + + /** Represents a NodePool. */ + class NodePool implements INodePool { + + /** + * Constructs a new NodePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.INodePool); + + /** NodePool name. */ + public name: string; + + /** NodePool nodes. */ + public nodes: google.cloud.securitycenter.v2.Kubernetes.INode[]; + + /** + * Creates a new NodePool instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePool instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.INodePool): google.cloud.securitycenter.v2.Kubernetes.NodePool; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePool + * @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.cloud.securitycenter.v2.Kubernetes.NodePool; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePool + * @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.cloud.securitycenter.v2.Kubernetes.NodePool; + + /** + * Verifies a NodePool 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 NodePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.NodePool; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @param message NodePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Role. */ + interface IRole { + + /** Role kind */ + kind?: (google.cloud.securitycenter.v2.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Role.Kind|null); + + /** Role ns */ + ns?: (string|null); + + /** Role name */ + name?: (string|null); + } + + /** Represents a Role. */ + class Role implements IRole { + + /** + * Constructs a new Role. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IRole); + + /** Role kind. */ + public kind: (google.cloud.securitycenter.v2.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Role.Kind); + + /** Role ns. */ + public ns: string; + + /** Role name. */ + public name: string; + + /** + * Creates a new Role instance using the specified properties. + * @param [properties] Properties to set + * @returns Role instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IRole): google.cloud.securitycenter.v2.Kubernetes.Role; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Role message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Role + * @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.cloud.securitycenter.v2.Kubernetes.Role; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Role + * @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.cloud.securitycenter.v2.Kubernetes.Role; + + /** + * Verifies a Role 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 Role message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Role + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Role; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @param message Role + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Role to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Role + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Role { + + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + ROLE = 1, + CLUSTER_ROLE = 2 + } + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding ns */ + ns?: (string|null); + + /** Binding name */ + name?: (string|null); + + /** Binding role */ + role?: (google.cloud.securitycenter.v2.Kubernetes.IRole|null); + + /** Binding subjects */ + subjects?: (google.cloud.securitycenter.v2.Kubernetes.ISubject[]|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IBinding); /** Binding ns. */ public ns: string; - /** Binding name. */ - public name: string; + /** Binding name. */ + public name: string; + + /** Binding role. */ + public role?: (google.cloud.securitycenter.v2.Kubernetes.IRole|null); + + /** Binding subjects. */ + public subjects: google.cloud.securitycenter.v2.Kubernetes.ISubject[]; + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IBinding): google.cloud.securitycenter.v2.Kubernetes.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @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.cloud.securitycenter.v2.Kubernetes.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @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.cloud.securitycenter.v2.Kubernetes.Binding; + + /** + * Verifies a Binding 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 Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Subject. */ + interface ISubject { + + /** Subject kind */ + kind?: (google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|null); + + /** Subject ns */ + ns?: (string|null); + + /** Subject name */ + name?: (string|null); + } + + /** Represents a Subject. */ + class Subject implements ISubject { + + /** + * Constructs a new Subject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.ISubject); + + /** Subject kind. */ + public kind: (google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType); + + /** Subject ns. */ + public ns: string; + + /** Subject name. */ + public name: string; + + /** + * Creates a new Subject instance using the specified properties. + * @param [properties] Properties to set + * @returns Subject instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.ISubject): google.cloud.securitycenter.v2.Kubernetes.Subject; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subject + * @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.cloud.securitycenter.v2.Kubernetes.Subject; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subject + * @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.cloud.securitycenter.v2.Kubernetes.Subject; + + /** + * Verifies a Subject 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 Subject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Subject; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Subject { + + /** AuthType enum. */ + enum AuthType { + AUTH_TYPE_UNSPECIFIED = 0, + USER = 1, + SERVICEACCOUNT = 2, + GROUP = 3 + } + } + + /** Properties of an AccessReview. */ + interface IAccessReview { + + /** AccessReview group */ + group?: (string|null); + + /** AccessReview ns */ + ns?: (string|null); + + /** AccessReview name */ + name?: (string|null); + + /** AccessReview resource */ + resource?: (string|null); + + /** AccessReview subresource */ + subresource?: (string|null); + + /** AccessReview verb */ + verb?: (string|null); + + /** AccessReview version */ + version?: (string|null); + } + + /** Represents an AccessReview. */ + class AccessReview implements IAccessReview { + + /** + * Constructs a new AccessReview. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IAccessReview); + + /** AccessReview group. */ + public group: string; + + /** AccessReview ns. */ + public ns: string; + + /** AccessReview name. */ + public name: string; + + /** AccessReview resource. */ + public resource: string; + + /** AccessReview subresource. */ + public subresource: string; + + /** AccessReview verb. */ + public verb: string; + + /** AccessReview version. */ + public version: string; + + /** + * Creates a new AccessReview instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessReview instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IAccessReview): google.cloud.securitycenter.v2.Kubernetes.AccessReview; + + /** + * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. + * @param message AccessReview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. + * @param message AccessReview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessReview message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessReview + * @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.cloud.securitycenter.v2.Kubernetes.AccessReview; + + /** + * Decodes an AccessReview message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessReview + * @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.cloud.securitycenter.v2.Kubernetes.AccessReview; + + /** + * Verifies an AccessReview 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 AccessReview message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessReview + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.AccessReview; + + /** + * Creates a plain object from an AccessReview message. Also converts values to other types if specified. + * @param message AccessReview + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.AccessReview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessReview to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessReview + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Object. */ + interface IObject { + + /** Object group */ + group?: (string|null); + + /** Object kind */ + kind?: (string|null); + + /** Object ns */ + ns?: (string|null); + + /** Object name */ + name?: (string|null); + + /** Object containers */ + containers?: (google.cloud.securitycenter.v2.IContainer[]|null); + } + + /** Represents an Object. */ + class Object implements IObject { + + /** + * Constructs a new Object. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IObject); + + /** Object group. */ + public group: string; + + /** Object kind. */ + public kind: string; + + /** Object ns. */ + public ns: string; + + /** Object name. */ + public name: string; + + /** Object containers. */ + public containers: google.cloud.securitycenter.v2.IContainer[]; + + /** + * Creates a new Object instance using the specified properties. + * @param [properties] Properties to set + * @returns Object instance + */ + public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IObject): google.cloud.securitycenter.v2.Kubernetes.Object; + + /** + * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. + * @param message Object message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. + * @param message Object message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Object message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Object + * @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.cloud.securitycenter.v2.Kubernetes.Object; + + /** + * Decodes an Object message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Object + * @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.cloud.securitycenter.v2.Kubernetes.Object; + + /** + * Verifies an Object 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 Object message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Object + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Object; + + /** + * Creates a plain object from an Object message. Also converts values to other types if specified. + * @param message Object + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Object, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Object to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Object + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadBalancer. */ + interface ILoadBalancer { + + /** LoadBalancer name */ + name?: (string|null); + } + + /** Represents a LoadBalancer. */ + class LoadBalancer implements ILoadBalancer { + + /** + * Constructs a new LoadBalancer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.ILoadBalancer); + + /** LoadBalancer name. */ + public name: string; + + /** + * Creates a new LoadBalancer instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancer instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ILoadBalancer): google.cloud.securitycenter.v2.LoadBalancer; + + /** + * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * @param message LoadBalancer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * @param message LoadBalancer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancer + * @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.cloud.securitycenter.v2.LoadBalancer; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancer + * @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.cloud.securitycenter.v2.LoadBalancer; + + /** + * Verifies a LoadBalancer 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 LoadBalancer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.LoadBalancer; + + /** + * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. + * @param message LoadBalancer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.LoadBalancer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LogEntry. */ + interface ILogEntry { + + /** LogEntry cloudLoggingEntry */ + cloudLoggingEntry?: (google.cloud.securitycenter.v2.ICloudLoggingEntry|null); + } + + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { + + /** + * Constructs a new LogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.ILogEntry); + + /** LogEntry cloudLoggingEntry. */ + public cloudLoggingEntry?: (google.cloud.securitycenter.v2.ICloudLoggingEntry|null); + + /** LogEntry logEntry. */ + public logEntry?: "cloudLoggingEntry"; + + /** + * Creates a new LogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntry instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ILogEntry): google.cloud.securitycenter.v2.LogEntry; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntry + * @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.cloud.securitycenter.v2.LogEntry; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntry + * @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.cloud.securitycenter.v2.LogEntry; + + /** + * Verifies a LogEntry 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 LogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.LogEntry; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudLoggingEntry. */ + interface ICloudLoggingEntry { + + /** CloudLoggingEntry insertId */ + insertId?: (string|null); + + /** CloudLoggingEntry logId */ + logId?: (string|null); + + /** CloudLoggingEntry resourceContainer */ + resourceContainer?: (string|null); + + /** CloudLoggingEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudLoggingEntry. */ + class CloudLoggingEntry implements ICloudLoggingEntry { + + /** + * Constructs a new CloudLoggingEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.ICloudLoggingEntry); + + /** CloudLoggingEntry insertId. */ + public insertId: string; + + /** CloudLoggingEntry logId. */ + public logId: string; + + /** CloudLoggingEntry resourceContainer. */ + public resourceContainer: string; + + /** CloudLoggingEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CloudLoggingEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudLoggingEntry instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ICloudLoggingEntry): google.cloud.securitycenter.v2.CloudLoggingEntry; + + /** + * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. + * @param message CloudLoggingEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. + * @param message CloudLoggingEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudLoggingEntry + * @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.cloud.securitycenter.v2.CloudLoggingEntry; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudLoggingEntry + * @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.cloud.securitycenter.v2.CloudLoggingEntry; + + /** + * Verifies a CloudLoggingEntry 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 CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudLoggingEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudLoggingEntry; + + /** + * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. + * @param message CloudLoggingEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.CloudLoggingEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudLoggingEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudLoggingEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MitreAttack. */ + interface IMitreAttack { + + /** MitreAttack primaryTactic */ + primaryTactic?: (google.cloud.securitycenter.v2.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v2.MitreAttack.Tactic|null); - /** Binding role. */ - public role?: (google.cloud.securitycenter.v2.Kubernetes.IRole|null); + /** MitreAttack primaryTechniques */ + primaryTechniques?: (google.cloud.securitycenter.v2.MitreAttack.Technique[]|null); - /** Binding subjects. */ - public subjects: google.cloud.securitycenter.v2.Kubernetes.ISubject[]; + /** MitreAttack additionalTactics */ + additionalTactics?: (google.cloud.securitycenter.v2.MitreAttack.Tactic[]|null); - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IBinding): google.cloud.securitycenter.v2.Kubernetes.Binding; + /** MitreAttack additionalTechniques */ + additionalTechniques?: (google.cloud.securitycenter.v2.MitreAttack.Technique[]|null); - /** - * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** MitreAttack version */ + version?: (string|null); + } - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MitreAttack. */ + class MitreAttack implements IMitreAttack { - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @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.cloud.securitycenter.v2.Kubernetes.Binding; + /** + * Constructs a new MitreAttack. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IMitreAttack); + + /** MitreAttack primaryTactic. */ + public primaryTactic: (google.cloud.securitycenter.v2.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v2.MitreAttack.Tactic); + + /** MitreAttack primaryTechniques. */ + public primaryTechniques: google.cloud.securitycenter.v2.MitreAttack.Technique[]; + + /** MitreAttack additionalTactics. */ + public additionalTactics: google.cloud.securitycenter.v2.MitreAttack.Tactic[]; + + /** MitreAttack additionalTechniques. */ + public additionalTechniques: google.cloud.securitycenter.v2.MitreAttack.Technique[]; + + /** MitreAttack version. */ + public version: string; + + /** + * Creates a new MitreAttack instance using the specified properties. + * @param [properties] Properties to set + * @returns MitreAttack instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IMitreAttack): google.cloud.securitycenter.v2.MitreAttack; + + /** + * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. + * @param message MitreAttack message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. + * @param message MitreAttack message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MitreAttack message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MitreAttack + * @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.cloud.securitycenter.v2.MitreAttack; + + /** + * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MitreAttack + * @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.cloud.securitycenter.v2.MitreAttack; + + /** + * Verifies a MitreAttack 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 MitreAttack message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MitreAttack + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.MitreAttack; + + /** + * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. + * @param message MitreAttack + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.MitreAttack, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MitreAttack to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MitreAttack + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MitreAttack { + + /** Tactic enum. */ + enum Tactic { + TACTIC_UNSPECIFIED = 0, + RECONNAISSANCE = 1, + RESOURCE_DEVELOPMENT = 2, + INITIAL_ACCESS = 5, + EXECUTION = 3, + PERSISTENCE = 6, + PRIVILEGE_ESCALATION = 8, + DEFENSE_EVASION = 7, + CREDENTIAL_ACCESS = 9, + DISCOVERY = 10, + LATERAL_MOVEMENT = 11, + COLLECTION = 12, + COMMAND_AND_CONTROL = 4, + EXFILTRATION = 13, + IMPACT = 14 + } + + /** Technique enum. */ + enum Technique { + TECHNIQUE_UNSPECIFIED = 0, + MASQUERADING = 49, + MATCH_LEGITIMATE_NAME_OR_LOCATION = 50, + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37, + STARTUP_ITEMS = 38, + NETWORK_SERVICE_DISCOVERY = 32, + PROCESS_DISCOVERY = 56, + COMMAND_AND_SCRIPTING_INTERPRETER = 6, + UNIX_SHELL = 7, + PYTHON = 59, + PERMISSION_GROUPS_DISCOVERY = 18, + CLOUD_GROUPS = 19, + APPLICATION_LAYER_PROTOCOL = 45, + DNS = 46, + SOFTWARE_DEPLOYMENT_TOOLS = 47, + VALID_ACCOUNTS = 14, + DEFAULT_ACCOUNTS = 35, + LOCAL_ACCOUNTS = 15, + CLOUD_ACCOUNTS = 16, + PROXY = 9, + EXTERNAL_PROXY = 10, + MULTI_HOP_PROXY = 11, + ACCOUNT_MANIPULATION = 22, + ADDITIONAL_CLOUD_CREDENTIALS = 40, + SSH_AUTHORIZED_KEYS = 23, + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58, + INGRESS_TOOL_TRANSFER = 3, + NATIVE_API = 4, + BRUTE_FORCE = 44, + SHARED_MODULES = 5, + ACCESS_TOKEN_MANIPULATION = 33, + TOKEN_IMPERSONATION_OR_THEFT = 39, + EXPLOIT_PUBLIC_FACING_APPLICATION = 27, + DOMAIN_POLICY_MODIFICATION = 30, + DATA_DESTRUCTION = 29, + SERVICE_STOP = 52, + INHIBIT_SYSTEM_RECOVERY = 36, + RESOURCE_HIJACKING = 8, + NETWORK_DENIAL_OF_SERVICE = 17, + CLOUD_SERVICE_DISCOVERY = 48, + STEAL_APPLICATION_ACCESS_TOKEN = 42, + ACCOUNT_ACCESS_REMOVAL = 51, + STEAL_WEB_SESSION_COOKIE = 25, + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24, + ABUSE_ELEVATION_CONTROL_MECHANISM = 34, + UNSECURED_CREDENTIALS = 13, + MODIFY_AUTHENTICATION_PROCESS = 28, + IMPAIR_DEFENSES = 31, + DISABLE_OR_MODIFY_TOOLS = 55, + EXFILTRATION_OVER_WEB_SERVICE = 20, + EXFILTRATION_TO_CLOUD_STORAGE = 21, + DYNAMIC_RESOLUTION = 12, + LATERAL_TOOL_TRANSFER = 41, + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26, + CREATE_SNAPSHOT = 54, + CLOUD_INFRASTRUCTURE_DISCOVERY = 53, + OBTAIN_CAPABILITIES = 43, + ACTIVE_SCANNING = 1, + SCANNING_IP_BLOCKS = 2, + CONTAINER_ADMINISTRATION_COMMAND = 60, + ESCAPE_TO_HOST = 61, + CONTAINER_AND_RESOURCE_DISCOVERY = 57, + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + } + } + + /** Properties of a Notebook. */ + interface INotebook { + + /** Notebook name */ + name?: (string|null); + + /** Notebook service */ + service?: (string|null); + + /** Notebook lastAuthor */ + lastAuthor?: (string|null); + + /** Notebook notebookUpdateTime */ + notebookUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Notebook. */ + class Notebook implements INotebook { + + /** + * Constructs a new Notebook. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.INotebook); + + /** Notebook name. */ + public name: string; - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @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.cloud.securitycenter.v2.Kubernetes.Binding; + /** Notebook service. */ + public service: string; - /** - * Verifies a Binding 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); + /** Notebook lastAuthor. */ + public lastAuthor: string; - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Binding; + /** Notebook notebookUpdateTime. */ + public notebookUpdateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new Notebook instance using the specified properties. + * @param [properties] Properties to set + * @returns Notebook instance + */ + public static create(properties?: google.cloud.securitycenter.v2.INotebook): google.cloud.securitycenter.v2.Notebook; - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v2.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Subject. */ - interface ISubject { + /** + * Decodes a Notebook message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Notebook + * @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.cloud.securitycenter.v2.Notebook; - /** Subject kind */ - kind?: (google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|null); + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Notebook + * @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.cloud.securitycenter.v2.Notebook; - /** Subject ns */ - ns?: (string|null); + /** + * Verifies a Notebook 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); - /** Subject name */ - name?: (string|null); - } + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Notebook + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Notebook; - /** Represents a Subject. */ - class Subject implements ISubject { + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @param message Notebook + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new Subject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.ISubject); + /** + * Converts this Notebook to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Subject kind. */ - public kind: (google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType); + /** + * Gets the default type url for Notebook + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Subject ns. */ - public ns: string; + /** Properties of an OrgPolicy. */ + interface IOrgPolicy { - /** Subject name. */ - public name: string; + /** OrgPolicy name */ + name?: (string|null); + } - /** - * Creates a new Subject instance using the specified properties. - * @param [properties] Properties to set - * @returns Subject instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.ISubject): google.cloud.securitycenter.v2.Kubernetes.Subject; + /** Represents an OrgPolicy. */ + class OrgPolicy implements IOrgPolicy { - /** - * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new OrgPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IOrgPolicy); - /** - * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + /** OrgPolicy name. */ + public name: string; - /** - * Decodes a Subject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Subject - * @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.cloud.securitycenter.v2.Kubernetes.Subject; + /** + * Creates a new OrgPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrgPolicy instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IOrgPolicy): google.cloud.securitycenter.v2.OrgPolicy; - /** - * Decodes a Subject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Subject - * @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.cloud.securitycenter.v2.Kubernetes.Subject; + /** + * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * @param message OrgPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Subject message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * @param message OrgPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Subject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Subject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Subject; + /** + * Decodes an OrgPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrgPolicy + * @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.cloud.securitycenter.v2.OrgPolicy; - /** - * Creates a plain object from a Subject message. Also converts values to other types if specified. - * @param message Subject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrgPolicy + * @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.cloud.securitycenter.v2.OrgPolicy; - /** - * Converts this Subject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies an OrgPolicy 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); - /** - * Gets the default type url for Subject - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates an OrgPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrgPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.OrgPolicy; - namespace Subject { + /** + * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. + * @param message OrgPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.OrgPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AuthType enum. */ - enum AuthType { - AUTH_TYPE_UNSPECIFIED = 0, - USER = 1, - SERVICEACCOUNT = 2, - GROUP = 3 - } - } + /** + * Converts this OrgPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of an AccessReview. */ - interface IAccessReview { + /** + * Gets the default type url for OrgPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AccessReview group */ - group?: (string|null); + /** Properties of a Process. */ + interface IProcess { - /** AccessReview ns */ - ns?: (string|null); + /** Process name */ + name?: (string|null); - /** AccessReview name */ - name?: (string|null); + /** Process binary */ + binary?: (google.cloud.securitycenter.v2.IFile|null); - /** AccessReview resource */ - resource?: (string|null); + /** Process libraries */ + libraries?: (google.cloud.securitycenter.v2.IFile[]|null); - /** AccessReview subresource */ - subresource?: (string|null); + /** Process script */ + script?: (google.cloud.securitycenter.v2.IFile|null); - /** AccessReview verb */ - verb?: (string|null); + /** Process args */ + args?: (string[]|null); - /** AccessReview version */ - version?: (string|null); - } + /** Process argumentsTruncated */ + argumentsTruncated?: (boolean|null); - /** Represents an AccessReview. */ - class AccessReview implements IAccessReview { + /** Process envVariables */ + envVariables?: (google.cloud.securitycenter.v2.IEnvironmentVariable[]|null); - /** - * Constructs a new AccessReview. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IAccessReview); + /** Process envVariablesTruncated */ + envVariablesTruncated?: (boolean|null); - /** AccessReview group. */ - public group: string; + /** Process pid */ + pid?: (number|Long|string|null); - /** AccessReview ns. */ - public ns: string; + /** Process parentPid */ + parentPid?: (number|Long|string|null); + } - /** AccessReview name. */ - public name: string; + /** Represents a Process. */ + class Process implements IProcess { - /** AccessReview resource. */ - public resource: string; + /** + * Constructs a new Process. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IProcess); - /** AccessReview subresource. */ - public subresource: string; + /** Process name. */ + public name: string; - /** AccessReview verb. */ - public verb: string; + /** Process binary. */ + public binary?: (google.cloud.securitycenter.v2.IFile|null); - /** AccessReview version. */ - public version: string; + /** Process libraries. */ + public libraries: google.cloud.securitycenter.v2.IFile[]; - /** - * Creates a new AccessReview instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessReview instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IAccessReview): google.cloud.securitycenter.v2.Kubernetes.AccessReview; + /** Process script. */ + public script?: (google.cloud.securitycenter.v2.IFile|null); - /** - * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. - * @param message AccessReview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** Process args. */ + public args: string[]; - /** - * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. - * @param message AccessReview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** Process argumentsTruncated. */ + public argumentsTruncated: boolean; - /** - * Decodes an AccessReview message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessReview - * @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.cloud.securitycenter.v2.Kubernetes.AccessReview; + /** Process envVariables. */ + public envVariables: google.cloud.securitycenter.v2.IEnvironmentVariable[]; - /** - * Decodes an AccessReview message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessReview - * @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.cloud.securitycenter.v2.Kubernetes.AccessReview; + /** Process envVariablesTruncated. */ + public envVariablesTruncated: boolean; - /** - * Verifies an AccessReview 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); + /** Process pid. */ + public pid: (number|Long|string); - /** - * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessReview - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.AccessReview; + /** Process parentPid. */ + public parentPid: (number|Long|string); - /** - * Creates a plain object from an AccessReview message. Also converts values to other types if specified. - * @param message AccessReview - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.AccessReview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new Process instance using the specified properties. + * @param [properties] Properties to set + * @returns Process instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IProcess): google.cloud.securitycenter.v2.Process; - /** - * Converts this AccessReview to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * @param message Process message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for AccessReview - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * @param message Process message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an Object. */ - interface IObject { + /** + * Decodes a Process message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Process + * @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.cloud.securitycenter.v2.Process; - /** Object group */ - group?: (string|null); + /** + * Decodes a Process message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Process + * @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.cloud.securitycenter.v2.Process; - /** Object kind */ - kind?: (string|null); + /** + * Verifies a Process 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); - /** Object ns */ - ns?: (string|null); + /** + * Creates a Process message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Process + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Process; - /** Object name */ - name?: (string|null); + /** + * Creates a plain object from a Process message. Also converts values to other types if specified. + * @param message Process + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Process to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Object containers */ - containers?: (google.cloud.securitycenter.v2.IContainer[]|null); - } + /** + * Gets the default type url for Process + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents an Object. */ - class Object implements IObject { + /** Properties of an EnvironmentVariable. */ + interface IEnvironmentVariable { - /** - * Constructs a new Object. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.Kubernetes.IObject); + /** EnvironmentVariable name */ + name?: (string|null); - /** Object group. */ - public group: string; + /** EnvironmentVariable val */ + val?: (string|null); + } - /** Object kind. */ - public kind: string; + /** Represents an EnvironmentVariable. */ + class EnvironmentVariable implements IEnvironmentVariable { - /** Object ns. */ - public ns: string; + /** + * Constructs a new EnvironmentVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IEnvironmentVariable); - /** Object name. */ - public name: string; + /** EnvironmentVariable name. */ + public name: string; - /** Object containers. */ - public containers: google.cloud.securitycenter.v2.IContainer[]; + /** EnvironmentVariable val. */ + public val: string; - /** - * Creates a new Object instance using the specified properties. - * @param [properties] Properties to set - * @returns Object instance - */ - public static create(properties?: google.cloud.securitycenter.v2.Kubernetes.IObject): google.cloud.securitycenter.v2.Kubernetes.Object; + /** + * Creates a new EnvironmentVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentVariable instance + */ + public static create(properties?: google.cloud.securitycenter.v2.IEnvironmentVariable): google.cloud.securitycenter.v2.EnvironmentVariable; - /** - * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. - * @param message Object message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * @param message EnvironmentVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. - * @param message Object message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * @param message EnvironmentVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Object message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Object - * @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.cloud.securitycenter.v2.Kubernetes.Object; + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentVariable + * @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.cloud.securitycenter.v2.EnvironmentVariable; - /** - * Decodes an Object message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Object - * @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.cloud.securitycenter.v2.Kubernetes.Object; + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentVariable + * @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.cloud.securitycenter.v2.EnvironmentVariable; - /** - * Verifies an Object message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an EnvironmentVariable 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 Object message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Object - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Kubernetes.Object; + /** + * Creates an EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentVariable + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.EnvironmentVariable; - /** - * Creates a plain object from an Object message. Also converts values to other types if specified. - * @param message Object - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Kubernetes.Object, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. + * @param message EnvironmentVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.EnvironmentVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Object to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this EnvironmentVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Object - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for EnvironmentVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LoadBalancer. */ - interface ILoadBalancer { + /** Properties of a SecurityMarks. */ + interface ISecurityMarks { - /** LoadBalancer name */ + /** SecurityMarks name */ name?: (string|null); + + /** SecurityMarks marks */ + marks?: ({ [k: string]: string }|null); + + /** SecurityMarks canonicalName */ + canonicalName?: (string|null); } - /** Represents a LoadBalancer. */ - class LoadBalancer implements ILoadBalancer { + /** Represents a SecurityMarks. */ + class SecurityMarks implements ISecurityMarks { /** - * Constructs a new LoadBalancer. + * Constructs a new SecurityMarks. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ILoadBalancer); + constructor(properties?: google.cloud.securitycenter.v2.ISecurityMarks); - /** LoadBalancer name. */ + /** SecurityMarks name. */ public name: string; + /** SecurityMarks marks. */ + public marks: { [k: string]: string }; + + /** SecurityMarks canonicalName. */ + public canonicalName: string; + /** - * Creates a new LoadBalancer instance using the specified properties. + * Creates a new SecurityMarks instance using the specified properties. * @param [properties] Properties to set - * @returns LoadBalancer instance + * @returns SecurityMarks instance */ - public static create(properties?: google.cloud.securitycenter.v2.ILoadBalancer): google.cloud.securitycenter.v2.LoadBalancer; + public static create(properties?: google.cloud.securitycenter.v2.ISecurityMarks): google.cloud.securitycenter.v2.SecurityMarks; /** - * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. - * @param message LoadBalancer message or plain object to encode + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. - * @param message LoadBalancer message or plain object to encode + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * @param message SecurityMarks message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoadBalancer message from the specified reader or buffer. + * Decodes a SecurityMarks message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoadBalancer + * @returns SecurityMarks * @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.cloud.securitycenter.v2.LoadBalancer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.SecurityMarks; /** - * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoadBalancer + * @returns SecurityMarks * @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.cloud.securitycenter.v2.LoadBalancer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.SecurityMarks; /** - * Verifies a LoadBalancer message. + * Verifies a SecurityMarks 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 LoadBalancer message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoadBalancer + * @returns SecurityMarks */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.LoadBalancer; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityMarks; /** - * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. - * @param message LoadBalancer + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * @param message SecurityMarks * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.LoadBalancer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoadBalancer to JSON. + * Converts this SecurityMarks to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LoadBalancer + * Gets the default type url for SecurityMarks * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LogEntry. */ - interface ILogEntry { + /** Properties of a SecurityPosture. */ + interface ISecurityPosture { - /** LogEntry cloudLoggingEntry */ - cloudLoggingEntry?: (google.cloud.securitycenter.v2.ICloudLoggingEntry|null); + /** SecurityPosture name */ + name?: (string|null); + + /** SecurityPosture revisionId */ + revisionId?: (string|null); + + /** SecurityPosture postureDeploymentResource */ + postureDeploymentResource?: (string|null); + + /** SecurityPosture postureDeployment */ + postureDeployment?: (string|null); + + /** SecurityPosture changedPolicy */ + changedPolicy?: (string|null); + + /** SecurityPosture policySet */ + policySet?: (string|null); + + /** SecurityPosture policy */ + policy?: (string|null); + + /** SecurityPosture policyDriftDetails */ + policyDriftDetails?: (google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails[]|null); } - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** Represents a SecurityPosture. */ + class SecurityPosture implements ISecurityPosture { /** - * Constructs a new LogEntry. + * Constructs a new SecurityPosture. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ILogEntry); + constructor(properties?: google.cloud.securitycenter.v2.ISecurityPosture); - /** LogEntry cloudLoggingEntry. */ - public cloudLoggingEntry?: (google.cloud.securitycenter.v2.ICloudLoggingEntry|null); + /** SecurityPosture name. */ + public name: string; - /** LogEntry logEntry. */ - public logEntry?: "cloudLoggingEntry"; + /** SecurityPosture revisionId. */ + public revisionId: string; + + /** SecurityPosture postureDeploymentResource. */ + public postureDeploymentResource: string; + + /** SecurityPosture postureDeployment. */ + public postureDeployment: string; + + /** SecurityPosture changedPolicy. */ + public changedPolicy: string; + + /** SecurityPosture policySet. */ + public policySet: string; + + /** SecurityPosture policy. */ + public policy: string; + + /** SecurityPosture policyDriftDetails. */ + public policyDriftDetails: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails[]; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new SecurityPosture instance using the specified properties. * @param [properties] Properties to set - * @returns LogEntry instance + * @returns SecurityPosture instance */ - public static create(properties?: google.cloud.securitycenter.v2.ILogEntry): google.cloud.securitycenter.v2.LogEntry; + public static create(properties?: google.cloud.securitycenter.v2.ISecurityPosture): google.cloud.securitycenter.v2.SecurityPosture; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * @param message SecurityPosture message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode + * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * @param message SecurityPosture message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a SecurityPosture message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LogEntry + * @returns SecurityPosture * @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.cloud.securitycenter.v2.LogEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.SecurityPosture; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LogEntry + * @returns SecurityPosture * @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.cloud.securitycenter.v2.LogEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.SecurityPosture; /** - * Verifies a LogEntry message. + * Verifies a SecurityPosture 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 LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPosture message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LogEntry + * @returns SecurityPosture */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.LogEntry; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityPosture; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry + * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. + * @param message SecurityPosture * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.SecurityPosture, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LogEntry to JSON. + * Converts this SecurityPosture to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LogEntry + * Gets the default type url for SecurityPosture * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudLoggingEntry. */ - interface ICloudLoggingEntry { + namespace SecurityPosture { - /** CloudLoggingEntry insertId */ - insertId?: (string|null); + /** Properties of a PolicyDriftDetails. */ + interface IPolicyDriftDetails { - /** CloudLoggingEntry logId */ - logId?: (string|null); + /** PolicyDriftDetails field */ + field?: (string|null); - /** CloudLoggingEntry resourceContainer */ - resourceContainer?: (string|null); + /** PolicyDriftDetails expectedValue */ + expectedValue?: (string|null); - /** CloudLoggingEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); + /** PolicyDriftDetails detectedValue */ + detectedValue?: (string|null); + } + + /** Represents a PolicyDriftDetails. */ + class PolicyDriftDetails implements IPolicyDriftDetails { + + /** + * Constructs a new PolicyDriftDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails); + + /** PolicyDriftDetails field. */ + public field: string; + + /** PolicyDriftDetails expectedValue. */ + public expectedValue: string; + + /** PolicyDriftDetails detectedValue. */ + public detectedValue: string; + + /** + * Creates a new PolicyDriftDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDriftDetails instance + */ + public static create(properties?: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails): google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; + + /** + * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @param message PolicyDriftDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @param message PolicyDriftDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDriftDetails + * @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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDriftDetails + * @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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; + + /** + * Verifies a PolicyDriftDetails 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 PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDriftDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; + + /** + * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. + * @param message PolicyDriftDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDriftDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDriftDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a CloudLoggingEntry. */ - class CloudLoggingEntry implements ICloudLoggingEntry { + /** Properties of a ToxicCombination. */ + interface IToxicCombination { + + /** ToxicCombination attackExposureScore */ + attackExposureScore?: (number|null); + + /** ToxicCombination relatedFindings */ + relatedFindings?: (string[]|null); + } + + /** Represents a ToxicCombination. */ + class ToxicCombination implements IToxicCombination { /** - * Constructs a new CloudLoggingEntry. + * Constructs a new ToxicCombination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICloudLoggingEntry); - - /** CloudLoggingEntry insertId. */ - public insertId: string; - - /** CloudLoggingEntry logId. */ - public logId: string; + constructor(properties?: google.cloud.securitycenter.v2.IToxicCombination); - /** CloudLoggingEntry resourceContainer. */ - public resourceContainer: string; + /** ToxicCombination attackExposureScore. */ + public attackExposureScore: number; - /** CloudLoggingEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** ToxicCombination relatedFindings. */ + public relatedFindings: string[]; /** - * Creates a new CloudLoggingEntry instance using the specified properties. + * Creates a new ToxicCombination instance using the specified properties. * @param [properties] Properties to set - * @returns CloudLoggingEntry instance + * @returns ToxicCombination instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICloudLoggingEntry): google.cloud.securitycenter.v2.CloudLoggingEntry; + public static create(properties?: google.cloud.securitycenter.v2.IToxicCombination): google.cloud.securitycenter.v2.ToxicCombination; /** - * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. - * @param message CloudLoggingEntry message or plain object to encode + * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * @param message ToxicCombination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. - * @param message CloudLoggingEntry message or plain object to encode + * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * @param message ToxicCombination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * Decodes a ToxicCombination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudLoggingEntry + * @returns ToxicCombination * @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.cloud.securitycenter.v2.CloudLoggingEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.ToxicCombination; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudLoggingEntry + * @returns ToxicCombination * @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.cloud.securitycenter.v2.CloudLoggingEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.ToxicCombination; /** - * Verifies a CloudLoggingEntry message. + * Verifies a ToxicCombination 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 CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * Creates a ToxicCombination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudLoggingEntry + * @returns ToxicCombination */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.CloudLoggingEntry; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ToxicCombination; /** - * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. - * @param message CloudLoggingEntry + * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. + * @param message ToxicCombination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.CloudLoggingEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.ToxicCombination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudLoggingEntry to JSON. + * Converts this ToxicCombination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudLoggingEntry + * Gets the default type url for ToxicCombination * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MitreAttack. */ - interface IMitreAttack { - - /** MitreAttack primaryTactic */ - primaryTactic?: (google.cloud.securitycenter.v2.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v2.MitreAttack.Tactic|null); + /** Properties of a Vulnerability. */ + interface IVulnerability { - /** MitreAttack primaryTechniques */ - primaryTechniques?: (google.cloud.securitycenter.v2.MitreAttack.Technique[]|null); + /** Vulnerability cve */ + cve?: (google.cloud.securitycenter.v2.ICve|null); - /** MitreAttack additionalTactics */ - additionalTactics?: (google.cloud.securitycenter.v2.MitreAttack.Tactic[]|null); + /** Vulnerability offendingPackage */ + offendingPackage?: (google.cloud.securitycenter.v2.IPackage|null); - /** MitreAttack additionalTechniques */ - additionalTechniques?: (google.cloud.securitycenter.v2.MitreAttack.Technique[]|null); + /** Vulnerability fixedPackage */ + fixedPackage?: (google.cloud.securitycenter.v2.IPackage|null); - /** MitreAttack version */ - version?: (string|null); + /** Vulnerability securityBulletin */ + securityBulletin?: (google.cloud.securitycenter.v2.ISecurityBulletin|null); } - /** Represents a MitreAttack. */ - class MitreAttack implements IMitreAttack { + /** Represents a Vulnerability. */ + class Vulnerability implements IVulnerability { /** - * Constructs a new MitreAttack. + * Constructs a new Vulnerability. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IMitreAttack); - - /** MitreAttack primaryTactic. */ - public primaryTactic: (google.cloud.securitycenter.v2.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v2.MitreAttack.Tactic); + constructor(properties?: google.cloud.securitycenter.v2.IVulnerability); - /** MitreAttack primaryTechniques. */ - public primaryTechniques: google.cloud.securitycenter.v2.MitreAttack.Technique[]; + /** Vulnerability cve. */ + public cve?: (google.cloud.securitycenter.v2.ICve|null); - /** MitreAttack additionalTactics. */ - public additionalTactics: google.cloud.securitycenter.v2.MitreAttack.Tactic[]; + /** Vulnerability offendingPackage. */ + public offendingPackage?: (google.cloud.securitycenter.v2.IPackage|null); - /** MitreAttack additionalTechniques. */ - public additionalTechniques: google.cloud.securitycenter.v2.MitreAttack.Technique[]; + /** Vulnerability fixedPackage. */ + public fixedPackage?: (google.cloud.securitycenter.v2.IPackage|null); - /** MitreAttack version. */ - public version: string; + /** Vulnerability securityBulletin. */ + public securityBulletin?: (google.cloud.securitycenter.v2.ISecurityBulletin|null); /** - * Creates a new MitreAttack instance using the specified properties. + * Creates a new Vulnerability instance using the specified properties. * @param [properties] Properties to set - * @returns MitreAttack instance + * @returns Vulnerability instance */ - public static create(properties?: google.cloud.securitycenter.v2.IMitreAttack): google.cloud.securitycenter.v2.MitreAttack; + public static create(properties?: google.cloud.securitycenter.v2.IVulnerability): google.cloud.securitycenter.v2.Vulnerability; /** - * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. - * @param message MitreAttack message or plain object to encode + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. - * @param message MitreAttack message or plain object to encode + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MitreAttack message from the specified reader or buffer. + * Decodes a Vulnerability message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MitreAttack + * @returns Vulnerability * @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.cloud.securitycenter.v2.MitreAttack; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Vulnerability; /** - * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MitreAttack - * @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.cloud.securitycenter.v2.MitreAttack; - - /** - * Verifies a MitreAttack 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 MitreAttack message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MitreAttack - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.MitreAttack; - - /** - * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. - * @param message MitreAttack - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.MitreAttack, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MitreAttack to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MitreAttack - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MitreAttack { - - /** Tactic enum. */ - enum Tactic { - TACTIC_UNSPECIFIED = 0, - RECONNAISSANCE = 1, - RESOURCE_DEVELOPMENT = 2, - INITIAL_ACCESS = 5, - EXECUTION = 3, - PERSISTENCE = 6, - PRIVILEGE_ESCALATION = 8, - DEFENSE_EVASION = 7, - CREDENTIAL_ACCESS = 9, - DISCOVERY = 10, - LATERAL_MOVEMENT = 11, - COLLECTION = 12, - COMMAND_AND_CONTROL = 4, - EXFILTRATION = 13, - IMPACT = 14 - } - - /** Technique enum. */ - enum Technique { - TECHNIQUE_UNSPECIFIED = 0, - MASQUERADING = 49, - MATCH_LEGITIMATE_NAME_OR_LOCATION = 50, - BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37, - STARTUP_ITEMS = 38, - NETWORK_SERVICE_DISCOVERY = 32, - PROCESS_DISCOVERY = 56, - COMMAND_AND_SCRIPTING_INTERPRETER = 6, - UNIX_SHELL = 7, - PERMISSION_GROUPS_DISCOVERY = 18, - CLOUD_GROUPS = 19, - APPLICATION_LAYER_PROTOCOL = 45, - DNS = 46, - SOFTWARE_DEPLOYMENT_TOOLS = 47, - VALID_ACCOUNTS = 14, - DEFAULT_ACCOUNTS = 35, - LOCAL_ACCOUNTS = 15, - CLOUD_ACCOUNTS = 16, - PROXY = 9, - EXTERNAL_PROXY = 10, - MULTI_HOP_PROXY = 11, - ACCOUNT_MANIPULATION = 22, - ADDITIONAL_CLOUD_CREDENTIALS = 40, - SSH_AUTHORIZED_KEYS = 23, - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58, - INGRESS_TOOL_TRANSFER = 3, - NATIVE_API = 4, - BRUTE_FORCE = 44, - SHARED_MODULES = 5, - ACCESS_TOKEN_MANIPULATION = 33, - TOKEN_IMPERSONATION_OR_THEFT = 39, - EXPLOIT_PUBLIC_FACING_APPLICATION = 27, - DOMAIN_POLICY_MODIFICATION = 30, - DATA_DESTRUCTION = 29, - SERVICE_STOP = 52, - INHIBIT_SYSTEM_RECOVERY = 36, - RESOURCE_HIJACKING = 8, - NETWORK_DENIAL_OF_SERVICE = 17, - CLOUD_SERVICE_DISCOVERY = 48, - STEAL_APPLICATION_ACCESS_TOKEN = 42, - ACCOUNT_ACCESS_REMOVAL = 51, - STEAL_WEB_SESSION_COOKIE = 25, - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24, - ABUSE_ELEVATION_CONTROL_MECHANISM = 34, - UNSECURED_CREDENTIALS = 13, - MODIFY_AUTHENTICATION_PROCESS = 28, - IMPAIR_DEFENSES = 31, - DISABLE_OR_MODIFY_TOOLS = 55, - EXFILTRATION_OVER_WEB_SERVICE = 20, - EXFILTRATION_TO_CLOUD_STORAGE = 21, - DYNAMIC_RESOLUTION = 12, - LATERAL_TOOL_TRANSFER = 41, - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26, - CREATE_SNAPSHOT = 54, - CLOUD_INFRASTRUCTURE_DISCOVERY = 53, - OBTAIN_CAPABILITIES = 43, - ACTIVE_SCANNING = 1, - SCANNING_IP_BLOCKS = 2, - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - } + * @returns Vulnerability + * @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.cloud.securitycenter.v2.Vulnerability; + + /** + * Verifies a Vulnerability 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 Vulnerability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vulnerability + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Vulnerability; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @param message Vulnerability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vulnerability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Vulnerability + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OrgPolicy. */ - interface IOrgPolicy { + /** Properties of a Cve. */ + interface ICve { - /** OrgPolicy name */ - name?: (string|null); + /** Cve id */ + id?: (string|null); + + /** Cve references */ + references?: (google.cloud.securitycenter.v2.IReference[]|null); + + /** Cve cvssv3 */ + cvssv3?: (google.cloud.securitycenter.v2.ICvssv3|null); + + /** Cve upstreamFixAvailable */ + upstreamFixAvailable?: (boolean|null); + + /** Cve impact */ + impact?: (google.cloud.securitycenter.v2.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v2.Cve.RiskRating|null); + + /** Cve exploitationActivity */ + exploitationActivity?: (google.cloud.securitycenter.v2.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v2.Cve.ExploitationActivity|null); + + /** Cve observedInTheWild */ + observedInTheWild?: (boolean|null); + + /** Cve zeroDay */ + zeroDay?: (boolean|null); } - /** Represents an OrgPolicy. */ - class OrgPolicy implements IOrgPolicy { + /** Represents a Cve. */ + class Cve implements ICve { /** - * Constructs a new OrgPolicy. + * Constructs a new Cve. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IOrgPolicy); + constructor(properties?: google.cloud.securitycenter.v2.ICve); - /** OrgPolicy name. */ - public name: string; + /** Cve id. */ + public id: string; + + /** Cve references. */ + public references: google.cloud.securitycenter.v2.IReference[]; + + /** Cve cvssv3. */ + public cvssv3?: (google.cloud.securitycenter.v2.ICvssv3|null); + + /** Cve upstreamFixAvailable. */ + public upstreamFixAvailable: boolean; + + /** Cve impact. */ + public impact: (google.cloud.securitycenter.v2.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v2.Cve.RiskRating); + + /** Cve exploitationActivity. */ + public exploitationActivity: (google.cloud.securitycenter.v2.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v2.Cve.ExploitationActivity); + + /** Cve observedInTheWild. */ + public observedInTheWild: boolean; + + /** Cve zeroDay. */ + public zeroDay: boolean; /** - * Creates a new OrgPolicy instance using the specified properties. + * Creates a new Cve instance using the specified properties. * @param [properties] Properties to set - * @returns OrgPolicy instance + * @returns Cve instance */ - public static create(properties?: google.cloud.securitycenter.v2.IOrgPolicy): google.cloud.securitycenter.v2.OrgPolicy; + public static create(properties?: google.cloud.securitycenter.v2.ICve): google.cloud.securitycenter.v2.Cve; /** - * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. - * @param message OrgPolicy message or plain object to encode + * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. + * @param message Cve message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICve, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. - * @param message OrgPolicy message or plain object to encode + * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. + * @param message Cve message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICve, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OrgPolicy message from the specified reader or buffer. + * Decodes a Cve message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OrgPolicy + * @returns Cve * @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.cloud.securitycenter.v2.OrgPolicy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Cve; /** - * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * Decodes a Cve message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OrgPolicy + * @returns Cve * @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.cloud.securitycenter.v2.OrgPolicy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Cve; /** - * Verifies an OrgPolicy message. + * Verifies a Cve 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 OrgPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a Cve message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OrgPolicy + * @returns Cve */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.OrgPolicy; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Cve; /** - * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. - * @param message OrgPolicy + * Creates a plain object from a Cve message. Also converts values to other types if specified. + * @param message Cve * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.OrgPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Cve, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OrgPolicy to JSON. + * Converts this Cve to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OrgPolicy + * Gets the default type url for Cve * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Process. */ - interface IProcess { - - /** Process name */ - name?: (string|null); - - /** Process binary */ - binary?: (google.cloud.securitycenter.v2.IFile|null); - - /** Process libraries */ - libraries?: (google.cloud.securitycenter.v2.IFile[]|null); - - /** Process script */ - script?: (google.cloud.securitycenter.v2.IFile|null); - - /** Process args */ - args?: (string[]|null); + namespace Cve { - /** Process argumentsTruncated */ - argumentsTruncated?: (boolean|null); + /** RiskRating enum. */ + enum RiskRating { + RISK_RATING_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3, + CRITICAL = 4 + } - /** Process envVariables */ - envVariables?: (google.cloud.securitycenter.v2.IEnvironmentVariable[]|null); + /** ExploitationActivity enum. */ + enum ExploitationActivity { + EXPLOITATION_ACTIVITY_UNSPECIFIED = 0, + WIDE = 1, + CONFIRMED = 2, + AVAILABLE = 3, + ANTICIPATED = 4, + NO_KNOWN = 5 + } + } - /** Process envVariablesTruncated */ - envVariablesTruncated?: (boolean|null); + /** Properties of a Reference. */ + interface IReference { - /** Process pid */ - pid?: (number|Long|string|null); + /** Reference source */ + source?: (string|null); - /** Process parentPid */ - parentPid?: (number|Long|string|null); + /** Reference uri */ + uri?: (string|null); } - /** Represents a Process. */ - class Process implements IProcess { + /** Represents a Reference. */ + class Reference implements IReference { /** - * Constructs a new Process. + * Constructs a new Reference. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IProcess); - - /** Process name. */ - public name: string; - - /** Process binary. */ - public binary?: (google.cloud.securitycenter.v2.IFile|null); - - /** Process libraries. */ - public libraries: google.cloud.securitycenter.v2.IFile[]; - - /** Process script. */ - public script?: (google.cloud.securitycenter.v2.IFile|null); - - /** Process args. */ - public args: string[]; - - /** Process argumentsTruncated. */ - public argumentsTruncated: boolean; - - /** Process envVariables. */ - public envVariables: google.cloud.securitycenter.v2.IEnvironmentVariable[]; - - /** Process envVariablesTruncated. */ - public envVariablesTruncated: boolean; + constructor(properties?: google.cloud.securitycenter.v2.IReference); - /** Process pid. */ - public pid: (number|Long|string); + /** Reference source. */ + public source: string; - /** Process parentPid. */ - public parentPid: (number|Long|string); + /** Reference uri. */ + public uri: string; /** - * Creates a new Process instance using the specified properties. + * Creates a new Reference instance using the specified properties. * @param [properties] Properties to set - * @returns Process instance + * @returns Reference instance */ - public static create(properties?: google.cloud.securitycenter.v2.IProcess): google.cloud.securitycenter.v2.Process; + public static create(properties?: google.cloud.securitycenter.v2.IReference): google.cloud.securitycenter.v2.Reference; /** - * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. - * @param message Process message or plain object to encode + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IReference, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. - * @param message Process message or plain object to encode + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Process message from the specified reader or buffer. + * Decodes a Reference message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Process + * @returns Reference * @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.cloud.securitycenter.v2.Process; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Reference; /** - * Decodes a Process message from the specified reader or buffer, length delimited. + * Decodes a Reference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Process + * @returns Reference * @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.cloud.securitycenter.v2.Process; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Reference; /** - * Verifies a Process message. + * Verifies a Reference 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 Process message from a plain object. Also converts values to their respective internal types. + * Creates a Reference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Process + * @returns Reference */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Process; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Reference; /** - * Creates a plain object from a Process message. Also converts values to other types if specified. - * @param message Process + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @param message Reference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Process to JSON. + * Converts this Reference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Process + * Gets the default type url for Reference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnvironmentVariable. */ - interface IEnvironmentVariable { + /** Properties of a Cvssv3. */ + interface ICvssv3 { - /** EnvironmentVariable name */ - name?: (string|null); + /** Cvssv3 baseScore */ + baseScore?: (number|null); - /** EnvironmentVariable val */ - val?: (string|null); + /** Cvssv3 attackVector */ + attackVector?: (google.cloud.securitycenter.v2.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackVector|null); + + /** Cvssv3 attackComplexity */ + attackComplexity?: (google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|null); + + /** Cvssv3 privilegesRequired */ + privilegesRequired?: (google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|null); + + /** Cvssv3 userInteraction */ + userInteraction?: (google.cloud.securitycenter.v2.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v2.Cvssv3.UserInteraction|null); + + /** Cvssv3 scope */ + scope?: (google.cloud.securitycenter.v2.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Scope|null); + + /** Cvssv3 confidentialityImpact */ + confidentialityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); + + /** Cvssv3 integrityImpact */ + integrityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); + + /** Cvssv3 availabilityImpact */ + availabilityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); } - /** Represents an EnvironmentVariable. */ - class EnvironmentVariable implements IEnvironmentVariable { + /** Represents a Cvssv3. */ + class Cvssv3 implements ICvssv3 { /** - * Constructs a new EnvironmentVariable. + * Constructs a new Cvssv3. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IEnvironmentVariable); + constructor(properties?: google.cloud.securitycenter.v2.ICvssv3); - /** EnvironmentVariable name. */ - public name: string; + /** Cvssv3 baseScore. */ + public baseScore: number; - /** EnvironmentVariable val. */ - public val: string; + /** Cvssv3 attackVector. */ + public attackVector: (google.cloud.securitycenter.v2.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackVector); + + /** Cvssv3 attackComplexity. */ + public attackComplexity: (google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackComplexity); + + /** Cvssv3 privilegesRequired. */ + public privilegesRequired: (google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired); + + /** Cvssv3 userInteraction. */ + public userInteraction: (google.cloud.securitycenter.v2.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v2.Cvssv3.UserInteraction); + + /** Cvssv3 scope. */ + public scope: (google.cloud.securitycenter.v2.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Scope); + + /** Cvssv3 confidentialityImpact. */ + public confidentialityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); + + /** Cvssv3 integrityImpact. */ + public integrityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); + + /** Cvssv3 availabilityImpact. */ + public availabilityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); /** - * Creates a new EnvironmentVariable instance using the specified properties. + * Creates a new Cvssv3 instance using the specified properties. * @param [properties] Properties to set - * @returns EnvironmentVariable instance + * @returns Cvssv3 instance */ - public static create(properties?: google.cloud.securitycenter.v2.IEnvironmentVariable): google.cloud.securitycenter.v2.EnvironmentVariable; + public static create(properties?: google.cloud.securitycenter.v2.ICvssv3): google.cloud.securitycenter.v2.Cvssv3; /** - * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. - * @param message EnvironmentVariable message or plain object to encode + * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. + * @param message Cvssv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. - * @param message EnvironmentVariable message or plain object to encode + * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. + * @param message Cvssv3 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer. + * Decodes a Cvssv3 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnvironmentVariable + * @returns Cvssv3 * @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.cloud.securitycenter.v2.EnvironmentVariable; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Cvssv3; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnvironmentVariable + * @returns Cvssv3 * @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.cloud.securitycenter.v2.EnvironmentVariable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Cvssv3; /** - * Verifies an EnvironmentVariable message. + * Verifies a Cvssv3 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 EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * Creates a Cvssv3 message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnvironmentVariable + * @returns Cvssv3 */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.EnvironmentVariable; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Cvssv3; /** - * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. - * @param message EnvironmentVariable + * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. + * @param message Cvssv3 * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.EnvironmentVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Cvssv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnvironmentVariable to JSON. + * Converts this Cvssv3 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnvironmentVariable + * Gets the default type url for Cvssv3 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecurityMarks. */ - interface ISecurityMarks { + namespace Cvssv3 { - /** SecurityMarks name */ - name?: (string|null); + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } - /** SecurityMarks marks */ - marks?: ({ [k: string]: string }|null); + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } - /** SecurityMarks canonicalName */ - canonicalName?: (string|null); + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } + + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } + + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } + + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } } - /** Represents a SecurityMarks. */ - class SecurityMarks implements ISecurityMarks { + /** Properties of a Package. */ + interface IPackage { + + /** Package packageName */ + packageName?: (string|null); + + /** Package cpeUri */ + cpeUri?: (string|null); + + /** Package packageType */ + packageType?: (string|null); + + /** Package packageVersion */ + packageVersion?: (string|null); + } + + /** Represents a Package. */ + class Package implements IPackage { /** - * Constructs a new SecurityMarks. + * Constructs a new Package. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ISecurityMarks); + constructor(properties?: google.cloud.securitycenter.v2.IPackage); - /** SecurityMarks name. */ - public name: string; + /** Package packageName. */ + public packageName: string; - /** SecurityMarks marks. */ - public marks: { [k: string]: string }; + /** Package cpeUri. */ + public cpeUri: string; - /** SecurityMarks canonicalName. */ - public canonicalName: string; + /** Package packageType. */ + public packageType: string; + + /** Package packageVersion. */ + public packageVersion: string; /** - * Creates a new SecurityMarks instance using the specified properties. + * Creates a new Package instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityMarks instance + * @returns Package instance */ - public static create(properties?: google.cloud.securitycenter.v2.ISecurityMarks): google.cloud.securitycenter.v2.SecurityMarks; + public static create(properties?: google.cloud.securitycenter.v2.IPackage): google.cloud.securitycenter.v2.Package; /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. + * @param message Package message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. - * @param message SecurityMarks message or plain object to encode + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. + * @param message Package message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityMarks, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a Package message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityMarks + * @returns Package * @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.cloud.securitycenter.v2.SecurityMarks; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Package; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a Package message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityMarks + * @returns Package * @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.cloud.securitycenter.v2.SecurityMarks; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Package; /** - * Verifies a SecurityMarks message. + * Verifies a Package 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 SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a Package message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityMarks + * @returns Package */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityMarks; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Package; /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. - * @param message SecurityMarks + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @param message Package * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.SecurityMarks, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityMarks to JSON. + * Converts this Package to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityMarks + * Gets the default type url for Package * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecurityPosture. */ - interface ISecurityPosture { - - /** SecurityPosture name */ - name?: (string|null); - - /** SecurityPosture revisionId */ - revisionId?: (string|null); - - /** SecurityPosture postureDeploymentResource */ - postureDeploymentResource?: (string|null); - - /** SecurityPosture postureDeployment */ - postureDeployment?: (string|null); - - /** SecurityPosture changedPolicy */ - changedPolicy?: (string|null); + /** Properties of a SecurityBulletin. */ + interface ISecurityBulletin { - /** SecurityPosture policySet */ - policySet?: (string|null); + /** SecurityBulletin bulletinId */ + bulletinId?: (string|null); - /** SecurityPosture policy */ - policy?: (string|null); + /** SecurityBulletin submissionTime */ + submissionTime?: (google.protobuf.ITimestamp|null); - /** SecurityPosture policyDriftDetails */ - policyDriftDetails?: (google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails[]|null); + /** SecurityBulletin suggestedUpgradeVersion */ + suggestedUpgradeVersion?: (string|null); } - /** Represents a SecurityPosture. */ - class SecurityPosture implements ISecurityPosture { + /** Represents a SecurityBulletin. */ + class SecurityBulletin implements ISecurityBulletin { /** - * Constructs a new SecurityPosture. + * Constructs a new SecurityBulletin. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ISecurityPosture); - - /** SecurityPosture name. */ - public name: string; - - /** SecurityPosture revisionId. */ - public revisionId: string; - - /** SecurityPosture postureDeploymentResource. */ - public postureDeploymentResource: string; - - /** SecurityPosture postureDeployment. */ - public postureDeployment: string; - - /** SecurityPosture changedPolicy. */ - public changedPolicy: string; + constructor(properties?: google.cloud.securitycenter.v2.ISecurityBulletin); - /** SecurityPosture policySet. */ - public policySet: string; + /** SecurityBulletin bulletinId. */ + public bulletinId: string; - /** SecurityPosture policy. */ - public policy: string; + /** SecurityBulletin submissionTime. */ + public submissionTime?: (google.protobuf.ITimestamp|null); - /** SecurityPosture policyDriftDetails. */ - public policyDriftDetails: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails[]; + /** SecurityBulletin suggestedUpgradeVersion. */ + public suggestedUpgradeVersion: string; /** - * Creates a new SecurityPosture instance using the specified properties. + * Creates a new SecurityBulletin instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityPosture instance + * @returns SecurityBulletin instance */ - public static create(properties?: google.cloud.securitycenter.v2.ISecurityPosture): google.cloud.securitycenter.v2.SecurityPosture; + public static create(properties?: google.cloud.securitycenter.v2.ISecurityBulletin): google.cloud.securitycenter.v2.SecurityBulletin; /** - * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. - * @param message SecurityPosture message or plain object to encode + * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. + * @param message SecurityBulletin message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. - * @param message SecurityPosture message or plain object to encode + * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. + * @param message SecurityBulletin message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityPosture message from the specified reader or buffer. + * Decodes a SecurityBulletin message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityPosture + * @returns SecurityBulletin * @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.cloud.securitycenter.v2.SecurityPosture; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.SecurityBulletin; /** - * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityPosture + * @returns SecurityBulletin * @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.cloud.securitycenter.v2.SecurityPosture; - - /** - * Verifies a SecurityPosture 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 SecurityPosture message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityPosture - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityPosture; - - /** - * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. - * @param message SecurityPosture - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.SecurityPosture, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityPosture to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.SecurityBulletin; /** - * Gets the default type url for SecurityPosture - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityPosture { - - /** Properties of a PolicyDriftDetails. */ - interface IPolicyDriftDetails { - - /** PolicyDriftDetails field */ - field?: (string|null); - - /** PolicyDriftDetails expectedValue */ - expectedValue?: (string|null); - - /** PolicyDriftDetails detectedValue */ - detectedValue?: (string|null); - } - - /** Represents a PolicyDriftDetails. */ - class PolicyDriftDetails implements IPolicyDriftDetails { - - /** - * Constructs a new PolicyDriftDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails); - - /** PolicyDriftDetails field. */ - public field: string; - - /** PolicyDriftDetails expectedValue. */ - public expectedValue: string; - - /** PolicyDriftDetails detectedValue. */ - public detectedValue: string; - - /** - * Creates a new PolicyDriftDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDriftDetails instance - */ - public static create(properties?: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails): google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; - - /** - * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @param message PolicyDriftDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @param message PolicyDriftDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDriftDetails - * @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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDriftDetails - * @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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; - - /** - * Verifies a PolicyDriftDetails 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 PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDriftDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails; + * Verifies a SecurityBulletin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. - * @param message PolicyDriftDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityBulletin + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityBulletin; - /** - * Converts this PolicyDriftDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. + * @param message SecurityBulletin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.SecurityBulletin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for PolicyDriftDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this SecurityBulletin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityBulletin + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ToxicCombination. */ - interface IToxicCombination { + /** Properties of a Folder. */ + interface IFolder { - /** ToxicCombination attackExposureScore */ - attackExposureScore?: (number|null); + /** Folder resourceFolder */ + resourceFolder?: (string|null); - /** ToxicCombination relatedFindings */ - relatedFindings?: (string[]|null); + /** Folder resourceFolderDisplayName */ + resourceFolderDisplayName?: (string|null); } - /** Represents a ToxicCombination. */ - class ToxicCombination implements IToxicCombination { + /** Represents a Folder. */ + class Folder implements IFolder { /** - * Constructs a new ToxicCombination. + * Constructs a new Folder. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IToxicCombination); + constructor(properties?: google.cloud.securitycenter.v2.IFolder); - /** ToxicCombination attackExposureScore. */ - public attackExposureScore: number; + /** Folder resourceFolder. */ + public resourceFolder: string; - /** ToxicCombination relatedFindings. */ - public relatedFindings: string[]; + /** Folder resourceFolderDisplayName. */ + public resourceFolderDisplayName: string; /** - * Creates a new ToxicCombination instance using the specified properties. + * Creates a new Folder instance using the specified properties. * @param [properties] Properties to set - * @returns ToxicCombination instance + * @returns Folder instance */ - public static create(properties?: google.cloud.securitycenter.v2.IToxicCombination): google.cloud.securitycenter.v2.ToxicCombination; + public static create(properties?: google.cloud.securitycenter.v2.IFolder): google.cloud.securitycenter.v2.Folder; /** - * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. - * @param message ToxicCombination message or plain object to encode + * Encodes the specified Folder message. Does not implicitly {@link google.cloud.securitycenter.v2.Folder.verify|verify} messages. + * @param message Folder message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IFolder, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. - * @param message ToxicCombination message or plain object to encode + * Encodes the specified Folder message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Folder.verify|verify} messages. + * @param message Folder message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IFolder, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ToxicCombination message from the specified reader or buffer. + * Decodes a Folder message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ToxicCombination + * @returns Folder * @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.cloud.securitycenter.v2.ToxicCombination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Folder; /** - * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * Decodes a Folder message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ToxicCombination + * @returns Folder * @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.cloud.securitycenter.v2.ToxicCombination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Folder; /** - * Verifies a ToxicCombination message. + * Verifies a Folder 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 ToxicCombination message from a plain object. Also converts values to their respective internal types. + * Creates a Folder message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ToxicCombination + * @returns Folder */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ToxicCombination; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Folder; /** - * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. - * @param message ToxicCombination + * Creates a plain object from a Folder message. Also converts values to other types if specified. + * @param message Folder * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.ToxicCombination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Folder, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ToxicCombination to JSON. + * Converts this Folder to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ToxicCombination + * Gets the default type url for Folder * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Vulnerability. */ - interface IVulnerability { + /** Properties of a MuteConfig. */ + interface IMuteConfig { - /** Vulnerability cve */ - cve?: (google.cloud.securitycenter.v2.ICve|null); + /** MuteConfig name */ + name?: (string|null); - /** Vulnerability offendingPackage */ - offendingPackage?: (google.cloud.securitycenter.v2.IPackage|null); + /** MuteConfig description */ + description?: (string|null); - /** Vulnerability fixedPackage */ - fixedPackage?: (google.cloud.securitycenter.v2.IPackage|null); + /** MuteConfig filter */ + filter?: (string|null); - /** Vulnerability securityBulletin */ - securityBulletin?: (google.cloud.securitycenter.v2.ISecurityBulletin|null); + /** MuteConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig mostRecentEditor */ + mostRecentEditor?: (string|null); + + /** MuteConfig type */ + type?: (google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|keyof typeof google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|null); } - /** Represents a Vulnerability. */ - class Vulnerability implements IVulnerability { + /** Represents a MuteConfig. */ + class MuteConfig implements IMuteConfig { /** - * Constructs a new Vulnerability. + * Constructs a new MuteConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IVulnerability); + constructor(properties?: google.cloud.securitycenter.v2.IMuteConfig); - /** Vulnerability cve. */ - public cve?: (google.cloud.securitycenter.v2.ICve|null); + /** MuteConfig name. */ + public name: string; - /** Vulnerability offendingPackage. */ - public offendingPackage?: (google.cloud.securitycenter.v2.IPackage|null); + /** MuteConfig description. */ + public description: string; - /** Vulnerability fixedPackage. */ - public fixedPackage?: (google.cloud.securitycenter.v2.IPackage|null); + /** MuteConfig filter. */ + public filter: string; - /** Vulnerability securityBulletin. */ - public securityBulletin?: (google.cloud.securitycenter.v2.ISecurityBulletin|null); + /** MuteConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig mostRecentEditor. */ + public mostRecentEditor: string; + + /** MuteConfig type. */ + public type: (google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|keyof typeof google.cloud.securitycenter.v2.MuteConfig.MuteConfigType); /** - * Creates a new Vulnerability instance using the specified properties. + * Creates a new MuteConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Vulnerability instance + * @returns MuteConfig instance */ - public static create(properties?: google.cloud.securitycenter.v2.IVulnerability): google.cloud.securitycenter.v2.Vulnerability; + public static create(properties?: google.cloud.securitycenter.v2.IMuteConfig): google.cloud.securitycenter.v2.MuteConfig; /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode + * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. + * @param message MuteConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode + * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. + * @param message MuteConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Vulnerability message from the specified reader or buffer. + * Decodes a MuteConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Vulnerability + * @returns MuteConfig * @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.cloud.securitycenter.v2.Vulnerability; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.MuteConfig; /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * Decodes a MuteConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Vulnerability + * @returns MuteConfig * @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.cloud.securitycenter.v2.Vulnerability; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.MuteConfig; /** - * Verifies a Vulnerability message. + * Verifies a MuteConfig 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 Vulnerability message from a plain object. Also converts values to their respective internal types. + * Creates a MuteConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Vulnerability + * @returns MuteConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Vulnerability; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.MuteConfig; /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. - * @param message Vulnerability + * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. + * @param message MuteConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.MuteConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Vulnerability to JSON. + * Converts this MuteConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Vulnerability + * Gets the default type url for MuteConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Cve. */ - interface ICve { - - /** Cve id */ - id?: (string|null); + namespace MuteConfig { - /** Cve references */ - references?: (google.cloud.securitycenter.v2.IReference[]|null); + /** MuteConfigType enum. */ + enum MuteConfigType { + MUTE_CONFIG_TYPE_UNSPECIFIED = 0, + STATIC = 1 + } + } - /** Cve cvssv3 */ - cvssv3?: (google.cloud.securitycenter.v2.ICvssv3|null); + /** Properties of a NotificationConfig. */ + interface INotificationConfig { - /** Cve upstreamFixAvailable */ - upstreamFixAvailable?: (boolean|null); + /** NotificationConfig name */ + name?: (string|null); - /** Cve impact */ - impact?: (google.cloud.securitycenter.v2.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v2.Cve.RiskRating|null); + /** NotificationConfig description */ + description?: (string|null); - /** Cve exploitationActivity */ - exploitationActivity?: (google.cloud.securitycenter.v2.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v2.Cve.ExploitationActivity|null); + /** NotificationConfig pubsubTopic */ + pubsubTopic?: (string|null); - /** Cve observedInTheWild */ - observedInTheWild?: (boolean|null); + /** NotificationConfig serviceAccount */ + serviceAccount?: (string|null); - /** Cve zeroDay */ - zeroDay?: (boolean|null); + /** NotificationConfig streamingConfig */ + streamingConfig?: (google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null); } - /** Represents a Cve. */ - class Cve implements ICve { + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { /** - * Constructs a new Cve. + * Constructs a new NotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICve); - - /** Cve id. */ - public id: string; - - /** Cve references. */ - public references: google.cloud.securitycenter.v2.IReference[]; + constructor(properties?: google.cloud.securitycenter.v2.INotificationConfig); - /** Cve cvssv3. */ - public cvssv3?: (google.cloud.securitycenter.v2.ICvssv3|null); + /** NotificationConfig name. */ + public name: string; - /** Cve upstreamFixAvailable. */ - public upstreamFixAvailable: boolean; + /** NotificationConfig description. */ + public description: string; - /** Cve impact. */ - public impact: (google.cloud.securitycenter.v2.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v2.Cve.RiskRating); + /** NotificationConfig pubsubTopic. */ + public pubsubTopic: string; - /** Cve exploitationActivity. */ - public exploitationActivity: (google.cloud.securitycenter.v2.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v2.Cve.ExploitationActivity); + /** NotificationConfig serviceAccount. */ + public serviceAccount: string; - /** Cve observedInTheWild. */ - public observedInTheWild: boolean; + /** NotificationConfig streamingConfig. */ + public streamingConfig?: (google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null); - /** Cve zeroDay. */ - public zeroDay: boolean; + /** NotificationConfig notifyConfig. */ + public notifyConfig?: "streamingConfig"; /** - * Creates a new Cve instance using the specified properties. + * Creates a new NotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Cve instance + * @returns NotificationConfig instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICve): google.cloud.securitycenter.v2.Cve; + public static create(properties?: google.cloud.securitycenter.v2.INotificationConfig): google.cloud.securitycenter.v2.NotificationConfig; /** - * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. - * @param message Cve message or plain object to encode + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. - * @param message Cve message or plain object to encode + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cve message from the specified reader or buffer. + * Decodes a NotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Cve + * @returns NotificationConfig * @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.cloud.securitycenter.v2.Cve; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.NotificationConfig; /** - * Decodes a Cve message from the specified reader or buffer, length delimited. + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cve + * @returns NotificationConfig * @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.cloud.securitycenter.v2.Cve; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.NotificationConfig; /** - * Verifies a Cve message. + * Verifies a NotificationConfig 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 Cve message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cve + * @returns NotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Cve; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationConfig; /** - * Creates a plain object from a Cve message. Also converts values to other types if specified. - * @param message Cve + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Cve, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cve to JSON. + * Converts this NotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cve + * Gets the default type url for NotificationConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Cve { + namespace NotificationConfig { - /** RiskRating enum. */ - enum RiskRating { - RISK_RATING_UNSPECIFIED = 0, - LOW = 1, - MEDIUM = 2, - HIGH = 3, - CRITICAL = 4 + /** Properties of a StreamingConfig. */ + interface IStreamingConfig { + + /** StreamingConfig filter */ + filter?: (string|null); } - /** ExploitationActivity enum. */ - enum ExploitationActivity { - EXPLOITATION_ACTIVITY_UNSPECIFIED = 0, - WIDE = 1, - CONFIRMED = 2, - AVAILABLE = 3, - ANTICIPATED = 4, - NO_KNOWN = 5 + /** Represents a StreamingConfig. */ + class StreamingConfig implements IStreamingConfig { + + /** + * Constructs a new StreamingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig); + + /** StreamingConfig filter. */ + public filter: string; + + /** + * Creates a new StreamingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamingConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig): google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + + /** + * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * @param message StreamingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * @param message StreamingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamingConfig + * @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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamingConfig + * @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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + + /** + * Verifies a StreamingConfig 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 StreamingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + + /** + * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. + * @param message StreamingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } - /** Properties of a Reference. */ - interface IReference { + /** Properties of a NotificationMessage. */ + interface INotificationMessage { - /** Reference source */ - source?: (string|null); + /** NotificationMessage notificationConfigName */ + notificationConfigName?: (string|null); - /** Reference uri */ - uri?: (string|null); + /** NotificationMessage finding */ + finding?: (google.cloud.securitycenter.v2.IFinding|null); + + /** NotificationMessage resource */ + resource?: (google.cloud.securitycenter.v2.IResource|null); } - /** Represents a Reference. */ - class Reference implements IReference { + /** Represents a NotificationMessage. */ + class NotificationMessage implements INotificationMessage { /** - * Constructs a new Reference. + * Constructs a new NotificationMessage. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IReference); + constructor(properties?: google.cloud.securitycenter.v2.INotificationMessage); - /** Reference source. */ - public source: string; + /** NotificationMessage notificationConfigName. */ + public notificationConfigName: string; - /** Reference uri. */ - public uri: string; + /** NotificationMessage finding. */ + public finding?: (google.cloud.securitycenter.v2.IFinding|null); + + /** NotificationMessage resource. */ + public resource?: (google.cloud.securitycenter.v2.IResource|null); + + /** NotificationMessage event. */ + public event?: "finding"; /** - * Creates a new Reference instance using the specified properties. + * Creates a new NotificationMessage instance using the specified properties. * @param [properties] Properties to set - * @returns Reference instance + * @returns NotificationMessage instance */ - public static create(properties?: google.cloud.securitycenter.v2.IReference): google.cloud.securitycenter.v2.Reference; + public static create(properties?: google.cloud.securitycenter.v2.INotificationMessage): google.cloud.securitycenter.v2.NotificationMessage; /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode + * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. + * @param message NotificationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode + * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. + * @param message NotificationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Reference message from the specified reader or buffer. + * Decodes a NotificationMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Reference + * @returns NotificationMessage * @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.cloud.securitycenter.v2.Reference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.NotificationMessage; /** - * Decodes a Reference message from the specified reader or buffer, length delimited. + * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Reference + * @returns NotificationMessage * @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.cloud.securitycenter.v2.Reference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.NotificationMessage; /** - * Verifies a Reference message. + * Verifies a NotificationMessage 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 Reference message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Reference + * @returns NotificationMessage */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Reference; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationMessage; /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. - * @param message Reference + * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. + * @param message NotificationMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.NotificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Reference to JSON. + * Converts this NotificationMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Reference + * Gets the default type url for NotificationMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Cvssv3. */ - interface ICvssv3 { + /** Properties of a Resource. */ + interface IResource { - /** Cvssv3 baseScore */ - baseScore?: (number|null); + /** Resource name */ + name?: (string|null); - /** Cvssv3 attackVector */ - attackVector?: (google.cloud.securitycenter.v2.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackVector|null); + /** Resource displayName */ + displayName?: (string|null); - /** Cvssv3 attackComplexity */ - attackComplexity?: (google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|null); + /** Resource type */ + type?: (string|null); - /** Cvssv3 privilegesRequired */ - privilegesRequired?: (google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|null); + /** Resource cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider|null); - /** Cvssv3 userInteraction */ - userInteraction?: (google.cloud.securitycenter.v2.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v2.Cvssv3.UserInteraction|null); + /** Resource service */ + service?: (string|null); - /** Cvssv3 scope */ - scope?: (google.cloud.securitycenter.v2.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Scope|null); + /** Resource location */ + location?: (string|null); - /** Cvssv3 confidentialityImpact */ - confidentialityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); + /** Resource gcpMetadata */ + gcpMetadata?: (google.cloud.securitycenter.v2.IGcpMetadata|null); - /** Cvssv3 integrityImpact */ - integrityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); + /** Resource awsMetadata */ + awsMetadata?: (google.cloud.securitycenter.v2.IAwsMetadata|null); - /** Cvssv3 availabilityImpact */ - availabilityImpact?: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact|null); + /** Resource azureMetadata */ + azureMetadata?: (google.cloud.securitycenter.v2.IAzureMetadata|null); + + /** Resource resourcePath */ + resourcePath?: (google.cloud.securitycenter.v2.IResourcePath|null); + + /** Resource resourcePathString */ + resourcePathString?: (string|null); } - /** Represents a Cvssv3. */ - class Cvssv3 implements ICvssv3 { + /** Represents a Resource. */ + class Resource implements IResource { /** - * Constructs a new Cvssv3. + * Constructs a new Resource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ICvssv3); + constructor(properties?: google.cloud.securitycenter.v2.IResource); - /** Cvssv3 baseScore. */ - public baseScore: number; + /** Resource name. */ + public name: string; - /** Cvssv3 attackVector. */ - public attackVector: (google.cloud.securitycenter.v2.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackVector); + /** Resource displayName. */ + public displayName: string; - /** Cvssv3 attackComplexity. */ - public attackComplexity: (google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v2.Cvssv3.AttackComplexity); + /** Resource type. */ + public type: string; - /** Cvssv3 privilegesRequired. */ - public privilegesRequired: (google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired); + /** Resource cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider); - /** Cvssv3 userInteraction. */ - public userInteraction: (google.cloud.securitycenter.v2.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v2.Cvssv3.UserInteraction); + /** Resource service. */ + public service: string; - /** Cvssv3 scope. */ - public scope: (google.cloud.securitycenter.v2.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Scope); + /** Resource location. */ + public location: string; - /** Cvssv3 confidentialityImpact. */ - public confidentialityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); + /** Resource gcpMetadata. */ + public gcpMetadata?: (google.cloud.securitycenter.v2.IGcpMetadata|null); - /** Cvssv3 integrityImpact. */ - public integrityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); + /** Resource awsMetadata. */ + public awsMetadata?: (google.cloud.securitycenter.v2.IAwsMetadata|null); - /** Cvssv3 availabilityImpact. */ - public availabilityImpact: (google.cloud.securitycenter.v2.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v2.Cvssv3.Impact); + /** Resource azureMetadata. */ + public azureMetadata?: (google.cloud.securitycenter.v2.IAzureMetadata|null); + + /** Resource resourcePath. */ + public resourcePath?: (google.cloud.securitycenter.v2.IResourcePath|null); + + /** Resource resourcePathString. */ + public resourcePathString: string; + + /** Resource cloudProviderMetadata. */ + public cloudProviderMetadata?: ("gcpMetadata"|"awsMetadata"|"azureMetadata"); /** - * Creates a new Cvssv3 instance using the specified properties. + * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set - * @returns Cvssv3 instance + * @returns Resource instance */ - public static create(properties?: google.cloud.securitycenter.v2.ICvssv3): google.cloud.securitycenter.v2.Cvssv3; + public static create(properties?: google.cloud.securitycenter.v2.IResource): google.cloud.securitycenter.v2.Resource; /** - * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. - * @param message Cvssv3 message or plain object to encode + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. - * @param message Cvssv3 message or plain object to encode + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cvssv3 message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Cvssv3 + * @returns Resource * @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.cloud.securitycenter.v2.Cvssv3; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.Resource; /** - * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cvssv3 + * @returns Resource * @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.cloud.securitycenter.v2.Cvssv3; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.Resource; /** - * Verifies a Cvssv3 message. + * Verifies a Resource 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 Cvssv3 message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cvssv3 + * @returns Resource */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Cvssv3; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Resource; /** - * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. - * @param message Cvssv3 + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Cvssv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cvssv3 to JSON. + * Converts this Resource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cvssv3 + * Gets the default type url for Resource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Cvssv3 { - - /** AttackVector enum. */ - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0, - ATTACK_VECTOR_NETWORK = 1, - ATTACK_VECTOR_ADJACENT = 2, - ATTACK_VECTOR_LOCAL = 3, - ATTACK_VECTOR_PHYSICAL = 4 - } - - /** AttackComplexity enum. */ - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0, - ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 - } - - /** PrivilegesRequired enum. */ - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0, - PRIVILEGES_REQUIRED_NONE = 1, - PRIVILEGES_REQUIRED_LOW = 2, - PRIVILEGES_REQUIRED_HIGH = 3 - } - - /** UserInteraction enum. */ - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0, - USER_INTERACTION_NONE = 1, - USER_INTERACTION_REQUIRED = 2 - } + /** CloudProvider enum. */ + enum CloudProvider { + CLOUD_PROVIDER_UNSPECIFIED = 0, + GOOGLE_CLOUD_PLATFORM = 1, + AMAZON_WEB_SERVICES = 2, + MICROSOFT_AZURE = 3 + } - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - SCOPE_UNCHANGED = 1, - SCOPE_CHANGED = 2 - } + /** Properties of a GcpMetadata. */ + interface IGcpMetadata { - /** Impact enum. */ - enum Impact { - IMPACT_UNSPECIFIED = 0, - IMPACT_HIGH = 1, - IMPACT_LOW = 2, - IMPACT_NONE = 3 - } - } + /** GcpMetadata project */ + project?: (string|null); - /** Properties of a Package. */ - interface IPackage { + /** GcpMetadata projectDisplayName */ + projectDisplayName?: (string|null); - /** Package packageName */ - packageName?: (string|null); + /** GcpMetadata parent */ + parent?: (string|null); - /** Package cpeUri */ - cpeUri?: (string|null); + /** GcpMetadata parentDisplayName */ + parentDisplayName?: (string|null); - /** Package packageType */ - packageType?: (string|null); + /** GcpMetadata folders */ + folders?: (google.cloud.securitycenter.v2.IFolder[]|null); - /** Package packageVersion */ - packageVersion?: (string|null); + /** GcpMetadata organization */ + organization?: (string|null); } - /** Represents a Package. */ - class Package implements IPackage { + /** Represents a GcpMetadata. */ + class GcpMetadata implements IGcpMetadata { /** - * Constructs a new Package. + * Constructs a new GcpMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.IPackage); + constructor(properties?: google.cloud.securitycenter.v2.IGcpMetadata); - /** Package packageName. */ - public packageName: string; + /** GcpMetadata project. */ + public project: string; - /** Package cpeUri. */ - public cpeUri: string; + /** GcpMetadata projectDisplayName. */ + public projectDisplayName: string; - /** Package packageType. */ - public packageType: string; + /** GcpMetadata parent. */ + public parent: string; - /** Package packageVersion. */ - public packageVersion: string; + /** GcpMetadata parentDisplayName. */ + public parentDisplayName: string; + + /** GcpMetadata folders. */ + public folders: google.cloud.securitycenter.v2.IFolder[]; + + /** GcpMetadata organization. */ + public organization: string; /** - * Creates a new Package instance using the specified properties. + * Creates a new GcpMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Package instance + * @returns GcpMetadata instance */ - public static create(properties?: google.cloud.securitycenter.v2.IPackage): google.cloud.securitycenter.v2.Package; + public static create(properties?: google.cloud.securitycenter.v2.IGcpMetadata): google.cloud.securitycenter.v2.GcpMetadata; /** - * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified GcpMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.GcpMetadata.verify|verify} messages. + * @param message GcpMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IGcpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified GcpMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GcpMetadata.verify|verify} messages. + * @param message GcpMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IGcpMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Package message from the specified reader or buffer. + * Decodes a GcpMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Package + * @returns GcpMetadata * @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.cloud.securitycenter.v2.Package; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.GcpMetadata; /** - * Decodes a Package message from the specified reader or buffer, length delimited. + * Decodes a GcpMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Package + * @returns GcpMetadata * @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.cloud.securitycenter.v2.Package; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.GcpMetadata; /** - * Verifies a Package message. + * Verifies a GcpMetadata 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 Package message from a plain object. Also converts values to their respective internal types. + * Creates a GcpMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Package + * @returns GcpMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Package; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.GcpMetadata; /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @param message Package + * Creates a plain object from a GcpMetadata message. Also converts values to other types if specified. + * @param message GcpMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.GcpMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Package to JSON. + * Converts this GcpMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Package + * Gets the default type url for GcpMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecurityBulletin. */ - interface ISecurityBulletin { - - /** SecurityBulletin bulletinId */ - bulletinId?: (string|null); + /** Properties of an AwsMetadata. */ + interface IAwsMetadata { - /** SecurityBulletin submissionTime */ - submissionTime?: (google.protobuf.ITimestamp|null); + /** AwsMetadata organization */ + organization?: (google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization|null); - /** SecurityBulletin suggestedUpgradeVersion */ - suggestedUpgradeVersion?: (string|null); + /** AwsMetadata organizationalUnits */ + organizationalUnits?: (google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit[]|null); + + /** AwsMetadata account */ + account?: (google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount|null); } - /** Represents a SecurityBulletin. */ - class SecurityBulletin implements ISecurityBulletin { + /** Represents an AwsMetadata. */ + class AwsMetadata implements IAwsMetadata { /** - * Constructs a new SecurityBulletin. + * Constructs a new AwsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.ISecurityBulletin); + constructor(properties?: google.cloud.securitycenter.v2.IAwsMetadata); - /** SecurityBulletin bulletinId. */ - public bulletinId: string; + /** AwsMetadata organization. */ + public organization?: (google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization|null); - /** SecurityBulletin submissionTime. */ - public submissionTime?: (google.protobuf.ITimestamp|null); + /** AwsMetadata organizationalUnits. */ + public organizationalUnits: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit[]; - /** SecurityBulletin suggestedUpgradeVersion. */ - public suggestedUpgradeVersion: string; + /** AwsMetadata account. */ + public account?: (google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount|null); /** - * Creates a new SecurityBulletin instance using the specified properties. + * Creates a new AwsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityBulletin instance + * @returns AwsMetadata instance */ - public static create(properties?: google.cloud.securitycenter.v2.ISecurityBulletin): google.cloud.securitycenter.v2.SecurityBulletin; + public static create(properties?: google.cloud.securitycenter.v2.IAwsMetadata): google.cloud.securitycenter.v2.AwsMetadata; /** - * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. - * @param message SecurityBulletin message or plain object to encode + * Encodes the specified AwsMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.verify|verify} messages. + * @param message AwsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IAwsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. - * @param message SecurityBulletin message or plain object to encode + * Encodes the specified AwsMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.verify|verify} messages. + * @param message AwsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IAwsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityBulletin message from the specified reader or buffer. + * Decodes an AwsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityBulletin + * @returns AwsMetadata * @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.cloud.securitycenter.v2.SecurityBulletin; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.AwsMetadata; /** - * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * Decodes an AwsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityBulletin + * @returns AwsMetadata * @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.cloud.securitycenter.v2.SecurityBulletin; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.AwsMetadata; /** - * Verifies a SecurityBulletin message. + * Verifies an AwsMetadata 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 SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * Creates an AwsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityBulletin + * @returns AwsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.SecurityBulletin; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AwsMetadata; /** - * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. - * @param message SecurityBulletin + * Creates a plain object from an AwsMetadata message. Also converts values to other types if specified. + * @param message AwsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.SecurityBulletin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.AwsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityBulletin to JSON. + * Converts this AwsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityBulletin + * Gets the default type url for AwsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MuteConfig. */ - interface IMuteConfig { + namespace AwsMetadata { - /** MuteConfig name */ - name?: (string|null); + /** Properties of an AwsOrganization. */ + interface IAwsOrganization { - /** MuteConfig description */ - description?: (string|null); + /** AwsOrganization id */ + id?: (string|null); + } - /** MuteConfig filter */ - filter?: (string|null); + /** Represents an AwsOrganization. */ + class AwsOrganization implements IAwsOrganization { - /** MuteConfig createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new AwsOrganization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization); - /** MuteConfig updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** AwsOrganization id. */ + public id: string; - /** MuteConfig mostRecentEditor */ - mostRecentEditor?: (string|null); + /** + * Creates a new AwsOrganization instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsOrganization instance + */ + public static create(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization): google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization; - /** MuteConfig type */ - type?: (google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|keyof typeof google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|null); - } + /** + * Encodes the specified AwsOrganization message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.verify|verify} messages. + * @param message AwsOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a MuteConfig. */ - class MuteConfig implements IMuteConfig { + /** + * Encodes the specified AwsOrganization message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.verify|verify} messages. + * @param message AwsOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new MuteConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IMuteConfig); + /** + * Decodes an AwsOrganization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsOrganization + * @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.cloud.securitycenter.v2.AwsMetadata.AwsOrganization; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsOrganization + * @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.cloud.securitycenter.v2.AwsMetadata.AwsOrganization; + + /** + * Verifies an AwsOrganization 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 AwsOrganization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsOrganization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization; + + /** + * Creates a plain object from an AwsOrganization message. Also converts values to other types if specified. + * @param message AwsOrganization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsOrganization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsOrganization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsOrganizationalUnit. */ + interface IAwsOrganizationalUnit { + + /** AwsOrganizationalUnit id */ + id?: (string|null); + + /** AwsOrganizationalUnit name */ + name?: (string|null); + } + + /** Represents an AwsOrganizationalUnit. */ + class AwsOrganizationalUnit implements IAwsOrganizationalUnit { + + /** + * Constructs a new AwsOrganizationalUnit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit); + + /** AwsOrganizationalUnit id. */ + public id: string; + + /** AwsOrganizationalUnit name. */ + public name: string; + + /** + * Creates a new AwsOrganizationalUnit instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsOrganizationalUnit instance + */ + public static create(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit): google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit; + + /** + * Encodes the specified AwsOrganizationalUnit message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @param message AwsOrganizationalUnit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsOrganizationalUnit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @param message AwsOrganizationalUnit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsOrganizationalUnit + * @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.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsOrganizationalUnit + * @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.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit; + + /** + * Verifies an AwsOrganizationalUnit 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 AwsOrganizationalUnit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsOrganizationalUnit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit; + + /** + * Creates a plain object from an AwsOrganizationalUnit message. Also converts values to other types if specified. + * @param message AwsOrganizationalUnit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsOrganizationalUnit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsOrganizationalUnit + * @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 id */ + id?: (string|null); + + /** AwsAccount name */ + name?: (string|null); + } + + /** Represents an AwsAccount. */ + class AwsAccount implements IAwsAccount { + + /** + * Constructs a new AwsAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount); + + /** AwsAccount id. */ + public id: string; + + /** AwsAccount name. */ + public name: string; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccount instance + */ + public static create(properties?: google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount): google.cloud.securitycenter.v2.AwsMetadata.AwsAccount; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.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.cloud.securitycenter.v2.AwsMetadata.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; + } + } - /** MuteConfig name. */ - public name: string; + /** Properties of an AzureMetadata. */ + interface IAzureMetadata { - /** MuteConfig description. */ - public description: string; + /** AzureMetadata managementGroups */ + managementGroups?: (google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup[]|null); - /** MuteConfig filter. */ - public filter: string; + /** AzureMetadata subscription */ + subscription?: (google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription|null); - /** MuteConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** AzureMetadata resourceGroup */ + resourceGroup?: (google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup|null); + } - /** MuteConfig updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents an AzureMetadata. */ + class AzureMetadata implements IAzureMetadata { - /** MuteConfig mostRecentEditor. */ - public mostRecentEditor: string; + /** + * Constructs a new AzureMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.IAzureMetadata); - /** MuteConfig type. */ - public type: (google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|keyof typeof google.cloud.securitycenter.v2.MuteConfig.MuteConfigType); + /** AzureMetadata managementGroups. */ + public managementGroups: google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup[]; + + /** AzureMetadata subscription. */ + public subscription?: (google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription|null); + + /** AzureMetadata resourceGroup. */ + public resourceGroup?: (google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup|null); /** - * Creates a new MuteConfig instance using the specified properties. + * Creates a new AzureMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MuteConfig instance + * @returns AzureMetadata instance */ - public static create(properties?: google.cloud.securitycenter.v2.IMuteConfig): google.cloud.securitycenter.v2.MuteConfig; + public static create(properties?: google.cloud.securitycenter.v2.IAzureMetadata): google.cloud.securitycenter.v2.AzureMetadata; /** - * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. - * @param message MuteConfig message or plain object to encode + * Encodes the specified AzureMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.verify|verify} messages. + * @param message AzureMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IAzureMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. - * @param message MuteConfig message or plain object to encode + * Encodes the specified AzureMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.verify|verify} messages. + * @param message AzureMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IAzureMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MuteConfig message from the specified reader or buffer. + * Decodes an AzureMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MuteConfig + * @returns AzureMetadata * @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.cloud.securitycenter.v2.MuteConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.AzureMetadata; /** - * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MuteConfig + * @returns AzureMetadata * @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.cloud.securitycenter.v2.MuteConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.AzureMetadata; /** - * Verifies a MuteConfig message. + * Verifies an AzureMetadata 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 MuteConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MuteConfig + * @returns AzureMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.MuteConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AzureMetadata; /** - * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. - * @param message MuteConfig + * Creates a plain object from an AzureMetadata message. Also converts values to other types if specified. + * @param message AzureMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.MuteConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.AzureMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MuteConfig to JSON. + * Converts this AzureMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MuteConfig + * Gets the default type url for AzureMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MuteConfig { + namespace AzureMetadata { - /** MuteConfigType enum. */ - enum MuteConfigType { - MUTE_CONFIG_TYPE_UNSPECIFIED = 0, - STATIC = 1 + /** Properties of an AzureManagementGroup. */ + interface IAzureManagementGroup { + + /** AzureManagementGroup id */ + id?: (string|null); + + /** AzureManagementGroup displayName */ + displayName?: (string|null); } - } - /** Properties of a NotificationConfig. */ - interface INotificationConfig { + /** Represents an AzureManagementGroup. */ + class AzureManagementGroup implements IAzureManagementGroup { - /** NotificationConfig name */ - name?: (string|null); + /** + * Constructs a new AzureManagementGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup); - /** NotificationConfig description */ - description?: (string|null); + /** AzureManagementGroup id. */ + public id: string; - /** NotificationConfig pubsubTopic */ - pubsubTopic?: (string|null); + /** AzureManagementGroup displayName. */ + public displayName: string; - /** NotificationConfig serviceAccount */ - serviceAccount?: (string|null); + /** + * Creates a new AzureManagementGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureManagementGroup instance + */ + public static create(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup): google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup; - /** NotificationConfig streamingConfig */ - streamingConfig?: (google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null); - } + /** + * Encodes the specified AzureManagementGroup message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @param message AzureManagementGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { + /** + * Encodes the specified AzureManagementGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @param message AzureManagementGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new NotificationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.INotificationConfig); + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureManagementGroup + * @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.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup; - /** NotificationConfig name. */ - public name: string; + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureManagementGroup + * @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.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup; - /** NotificationConfig description. */ - public description: string; + /** + * Verifies an AzureManagementGroup 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); - /** NotificationConfig pubsubTopic. */ - public pubsubTopic: string; + /** + * Creates an AzureManagementGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureManagementGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup; - /** NotificationConfig serviceAccount. */ - public serviceAccount: string; + /** + * Creates a plain object from an AzureManagementGroup message. Also converts values to other types if specified. + * @param message AzureManagementGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** NotificationConfig streamingConfig. */ - public streamingConfig?: (google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null); + /** + * Converts this AzureManagementGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NotificationConfig notifyConfig. */ - public notifyConfig?: "streamingConfig"; + /** + * Gets the default type url for AzureManagementGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new NotificationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NotificationConfig instance - */ - public static create(properties?: google.cloud.securitycenter.v2.INotificationConfig): google.cloud.securitycenter.v2.NotificationConfig; + /** Properties of an AzureSubscription. */ + interface IAzureSubscription { - /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** AzureSubscription id */ + id?: (string|null); - /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** AzureSubscription displayName */ + displayName?: (string|null); + } - /** - * Decodes a NotificationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotificationConfig - * @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.cloud.securitycenter.v2.NotificationConfig; + /** Represents an AzureSubscription. */ + class AzureSubscription implements IAzureSubscription { - /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotificationConfig - * @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.cloud.securitycenter.v2.NotificationConfig; + /** + * Constructs a new AzureSubscription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription); - /** - * Verifies a NotificationConfig 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); + /** AzureSubscription id. */ + public id: string; - /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotificationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationConfig; + /** AzureSubscription displayName. */ + public displayName: string; - /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new AzureSubscription instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureSubscription instance + */ + public static create(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription): google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription; - /** - * Converts this NotificationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified AzureSubscription message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.verify|verify} messages. + * @param message AzureSubscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for NotificationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified AzureSubscription message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.verify|verify} messages. + * @param message AzureSubscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription, writer?: $protobuf.Writer): $protobuf.Writer; - namespace NotificationConfig { + /** + * Decodes an AzureSubscription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureSubscription + * @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.cloud.securitycenter.v2.AzureMetadata.AzureSubscription; + + /** + * Decodes an AzureSubscription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureSubscription + * @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.cloud.securitycenter.v2.AzureMetadata.AzureSubscription; + + /** + * Verifies an AzureSubscription 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 AzureSubscription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureSubscription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription; + + /** + * Creates a plain object from an AzureSubscription message. Also converts values to other types if specified. + * @param message AzureSubscription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureSubscription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureSubscription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a StreamingConfig. */ - interface IStreamingConfig { + /** Properties of an AzureResourceGroup. */ + interface IAzureResourceGroup { - /** StreamingConfig filter */ - filter?: (string|null); + /** AzureResourceGroup name */ + name?: (string|null); } - /** Represents a StreamingConfig. */ - class StreamingConfig implements IStreamingConfig { + /** Represents an AzureResourceGroup. */ + class AzureResourceGroup implements IAzureResourceGroup { /** - * Constructs a new StreamingConfig. + * Constructs a new AzureResourceGroup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig); + constructor(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup); - /** StreamingConfig filter. */ - public filter: string; + /** AzureResourceGroup name. */ + public name: string; /** - * Creates a new StreamingConfig instance using the specified properties. + * Creates a new AzureResourceGroup instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingConfig instance + * @returns AzureResourceGroup instance */ - public static create(properties?: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig): google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + public static create(properties?: google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup): google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup; /** - * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. - * @param message StreamingConfig message or plain object to encode + * Encodes the specified AzureResourceGroup message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @param message AzureResourceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. - * @param message StreamingConfig message or plain object to encode + * Encodes the specified AzureResourceGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @param message AzureResourceGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingConfig message from the specified reader or buffer. + * Decodes an AzureResourceGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamingConfig + * @returns AzureResourceGroup * @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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup; /** - * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureResourceGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingConfig + * @returns AzureResourceGroup * @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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup; /** - * Verifies a StreamingConfig message. + * Verifies an AzureResourceGroup 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 StreamingConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureResourceGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingConfig + * @returns AzureResourceGroup */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup; /** - * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. - * @param message StreamingConfig + * Creates a plain object from an AzureResourceGroup message. Also converts values to other types if specified. + * @param message AzureResourceGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingConfig to JSON. + * Converts this AzureResourceGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StreamingConfig + * Gets the default type url for AzureResourceGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -35011,225 +37039,227 @@ export namespace google { } } - /** Properties of a NotificationMessage. */ - interface INotificationMessage { - - /** NotificationMessage notificationConfigName */ - notificationConfigName?: (string|null); - - /** NotificationMessage finding */ - finding?: (google.cloud.securitycenter.v2.IFinding|null); + /** Properties of a ResourcePath. */ + interface IResourcePath { - /** NotificationMessage resource */ - resource?: (google.cloud.securitycenter.v2.IResource|null); + /** ResourcePath nodes */ + nodes?: (google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode[]|null); } - /** Represents a NotificationMessage. */ - class NotificationMessage implements INotificationMessage { + /** Represents a ResourcePath. */ + class ResourcePath implements IResourcePath { /** - * Constructs a new NotificationMessage. + * Constructs a new ResourcePath. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v2.INotificationMessage); - - /** NotificationMessage notificationConfigName. */ - public notificationConfigName: string; - - /** NotificationMessage finding. */ - public finding?: (google.cloud.securitycenter.v2.IFinding|null); - - /** NotificationMessage resource. */ - public resource?: (google.cloud.securitycenter.v2.IResource|null); + constructor(properties?: google.cloud.securitycenter.v2.IResourcePath); - /** NotificationMessage event. */ - public event?: "finding"; + /** ResourcePath nodes. */ + public nodes: google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode[]; /** - * Creates a new NotificationMessage instance using the specified properties. + * Creates a new ResourcePath instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationMessage instance + * @returns ResourcePath instance */ - public static create(properties?: google.cloud.securitycenter.v2.INotificationMessage): google.cloud.securitycenter.v2.NotificationMessage; + public static create(properties?: google.cloud.securitycenter.v2.IResourcePath): google.cloud.securitycenter.v2.ResourcePath; /** - * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. - * @param message NotificationMessage message or plain object to encode + * Encodes the specified ResourcePath message. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.verify|verify} messages. + * @param message ResourcePath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v2.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v2.IResourcePath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. - * @param message NotificationMessage message or plain object to encode + * Encodes the specified ResourcePath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.verify|verify} messages. + * @param message ResourcePath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v2.IResourcePath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationMessage message from the specified reader or buffer. + * Decodes a ResourcePath message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationMessage + * @returns ResourcePath * @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.cloud.securitycenter.v2.NotificationMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v2.ResourcePath; /** - * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * Decodes a ResourcePath message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationMessage + * @returns ResourcePath * @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.cloud.securitycenter.v2.NotificationMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v2.ResourcePath; /** - * Verifies a NotificationMessage message. + * Verifies a ResourcePath 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 NotificationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ResourcePath message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationMessage + * @returns ResourcePath */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.NotificationMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ResourcePath; /** - * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. - * @param message NotificationMessage + * Creates a plain object from a ResourcePath message. Also converts values to other types if specified. + * @param message ResourcePath * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v2.NotificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v2.ResourcePath, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationMessage to JSON. + * Converts this ResourcePath to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NotificationMessage + * Gets the default type url for ResourcePath * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Resource. */ - interface IResource { + namespace ResourcePath { - /** Resource name */ - name?: (string|null); + /** ResourcePathNodeType enum. */ + enum ResourcePathNodeType { + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0, + GCP_ORGANIZATION = 1, + GCP_FOLDER = 2, + GCP_PROJECT = 3, + AWS_ORGANIZATION = 4, + AWS_ORGANIZATIONAL_UNIT = 5, + AWS_ACCOUNT = 6, + AZURE_MANAGEMENT_GROUP = 7, + AZURE_SUBSCRIPTION = 8, + AZURE_RESOURCE_GROUP = 9 + } - /** Resource displayName */ - displayName?: (string|null); + /** Properties of a ResourcePathNode. */ + interface IResourcePathNode { - /** Resource type */ - type?: (string|null); - } + /** ResourcePathNode nodeType */ + nodeType?: (google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType|keyof typeof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType|null); - /** Represents a Resource. */ - class Resource implements IResource { + /** ResourcePathNode id */ + id?: (string|null); - /** - * Constructs a new Resource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v2.IResource); + /** ResourcePathNode displayName */ + displayName?: (string|null); + } - /** Resource name. */ - public name: string; + /** Represents a ResourcePathNode. */ + class ResourcePathNode implements IResourcePathNode { - /** Resource displayName. */ - public displayName: string; + /** + * Constructs a new ResourcePathNode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode); - /** Resource type. */ - public type: string; + /** ResourcePathNode nodeType. */ + public nodeType: (google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType|keyof typeof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType); - /** - * Creates a new Resource instance using the specified properties. - * @param [properties] Properties to set - * @returns Resource instance - */ - public static create(properties?: google.cloud.securitycenter.v2.IResource): google.cloud.securitycenter.v2.Resource; + /** ResourcePathNode id. */ + public id: string; - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v2.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** ResourcePathNode displayName. */ + public displayName: string; - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v2.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ResourcePathNode instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourcePathNode instance + */ + public static create(properties?: google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode): google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode; - /** - * Decodes a Resource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Resource - * @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.cloud.securitycenter.v2.Resource; + /** + * Encodes the specified ResourcePathNode message. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.verify|verify} messages. + * @param message ResourcePathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Resource - * @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.cloud.securitycenter.v2.Resource; + /** + * Encodes the specified ResourcePathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.verify|verify} messages. + * @param message ResourcePathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Resource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ResourcePathNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourcePathNode + * @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.cloud.securitycenter.v2.ResourcePath.ResourcePathNode; - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Resource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.Resource; + /** + * Decodes a ResourcePathNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourcePathNode + * @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.cloud.securitycenter.v2.ResourcePath.ResourcePathNode; - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v2.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ResourcePathNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this Resource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ResourcePathNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourcePathNode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode; - /** - * Gets the default type url for Resource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Creates a plain object from a ResourcePathNode message. Also converts values to other types if specified. + * @param message ResourcePathNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourcePathNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourcePathNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a ResourceValueConfig. */ @@ -35262,6 +37292,9 @@ export namespace google { /** ResourceValueConfig updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + /** ResourceValueConfig cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider|null); + /** ResourceValueConfig sensitiveDataProtectionMapping */ sensitiveDataProtectionMapping?: (google.cloud.securitycenter.v2.ResourceValueConfig.ISensitiveDataProtectionMapping|null); } @@ -35302,6 +37335,9 @@ export namespace google { /** ResourceValueConfig updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** ResourceValueConfig cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider); + /** ResourceValueConfig sensitiveDataProtectionMapping. */ public sensitiveDataProtectionMapping?: (google.cloud.securitycenter.v2.ResourceValueConfig.ISensitiveDataProtectionMapping|null); @@ -39582,6 +41618,30 @@ export namespace google { /** Resource type */ type?: (string|null); + + /** Resource cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider|null); + + /** Resource service */ + service?: (string|null); + + /** Resource location */ + location?: (string|null); + + /** Resource gcpMetadata */ + gcpMetadata?: (google.cloud.securitycenter.v2.IGcpMetadata|null); + + /** Resource awsMetadata */ + awsMetadata?: (google.cloud.securitycenter.v2.IAwsMetadata|null); + + /** Resource azureMetadata */ + azureMetadata?: (google.cloud.securitycenter.v2.IAzureMetadata|null); + + /** Resource resourcePath */ + resourcePath?: (google.cloud.securitycenter.v2.IResourcePath|null); + + /** Resource resourcePathString */ + resourcePathString?: (string|null); } /** Represents a Resource. */ @@ -39602,6 +41662,33 @@ export namespace google { /** Resource type. */ public type: string; + /** Resource cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider); + + /** Resource service. */ + public service: string; + + /** Resource location. */ + public location: string; + + /** Resource gcpMetadata. */ + public gcpMetadata?: (google.cloud.securitycenter.v2.IGcpMetadata|null); + + /** Resource awsMetadata. */ + public awsMetadata?: (google.cloud.securitycenter.v2.IAwsMetadata|null); + + /** Resource azureMetadata. */ + public azureMetadata?: (google.cloud.securitycenter.v2.IAzureMetadata|null); + + /** Resource resourcePath. */ + public resourcePath?: (google.cloud.securitycenter.v2.IResourcePath|null); + + /** Resource resourcePathString. */ + public resourcePathString: string; + + /** Resource cloudProviderMetadata. */ + public cloudProviderMetadata?: ("gcpMetadata"|"awsMetadata"|"azureMetadata"); + /** * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set @@ -41801,6 +43888,9 @@ export namespace google { /** Simulation resourceValueConfigsMetadata */ resourceValueConfigsMetadata?: (google.cloud.securitycenter.v2.IResourceValueConfigMetadata[]|null); + + /** Simulation cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider|null); } /** Represents a Simulation. */ @@ -41821,6 +43911,9 @@ export namespace google { /** Simulation resourceValueConfigsMetadata. */ public resourceValueConfigsMetadata: google.cloud.securitycenter.v2.IResourceValueConfigMetadata[]; + /** Simulation cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v2.CloudProvider|keyof typeof google.cloud.securitycenter.v2.CloudProvider); + /** * Creates a new Simulation instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-securitycenter/protos/protos.js b/packages/google-cloud-securitycenter/protos/protos.js index e8378b0cd6dc..b5d968e78f1e 100644 --- a/packages/google-cloud-securitycenter/protos/protos.js +++ b/packages/google-cloud-securitycenter/protos/protos.js @@ -70710,25 +70710,29 @@ return BigQueryExport; })(); - v2.CloudDlpDataProfile = (function() { + v2.CloudArmor = (function() { /** - * Properties of a CloudDlpDataProfile. + * Properties of a CloudArmor. * @memberof google.cloud.securitycenter.v2 - * @interface ICloudDlpDataProfile - * @property {string|null} [dataProfile] CloudDlpDataProfile dataProfile - * @property {google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|null} [parentType] CloudDlpDataProfile parentType + * @interface ICloudArmor + * @property {google.cloud.securitycenter.v2.ISecurityPolicy|null} [securityPolicy] CloudArmor securityPolicy + * @property {google.cloud.securitycenter.v2.IRequests|null} [requests] CloudArmor requests + * @property {google.cloud.securitycenter.v2.IAdaptiveProtection|null} [adaptiveProtection] CloudArmor adaptiveProtection + * @property {google.cloud.securitycenter.v2.IAttack|null} [attack] CloudArmor attack + * @property {string|null} [threatVector] CloudArmor threatVector + * @property {google.protobuf.IDuration|null} [duration] CloudArmor duration */ /** - * Constructs a new CloudDlpDataProfile. + * Constructs a new CloudArmor. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a CloudDlpDataProfile. - * @implements ICloudDlpDataProfile + * @classdesc Represents a CloudArmor. + * @implements ICloudArmor * @constructor - * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICloudArmor=} [properties] Properties to set */ - function CloudDlpDataProfile(properties) { + function CloudArmor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -70736,89 +70740,145 @@ } /** - * CloudDlpDataProfile dataProfile. - * @member {string} dataProfile - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * CloudArmor securityPolicy. + * @member {google.cloud.securitycenter.v2.ISecurityPolicy|null|undefined} securityPolicy + * @memberof google.cloud.securitycenter.v2.CloudArmor * @instance */ - CloudDlpDataProfile.prototype.dataProfile = ""; + CloudArmor.prototype.securityPolicy = null; /** - * CloudDlpDataProfile parentType. - * @member {google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType} parentType - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * CloudArmor requests. + * @member {google.cloud.securitycenter.v2.IRequests|null|undefined} requests + * @memberof google.cloud.securitycenter.v2.CloudArmor * @instance */ - CloudDlpDataProfile.prototype.parentType = 0; + CloudArmor.prototype.requests = null; /** - * Creates a new CloudDlpDataProfile instance using the specified properties. + * CloudArmor adaptiveProtection. + * @member {google.cloud.securitycenter.v2.IAdaptiveProtection|null|undefined} adaptiveProtection + * @memberof google.cloud.securitycenter.v2.CloudArmor + * @instance + */ + CloudArmor.prototype.adaptiveProtection = null; + + /** + * CloudArmor attack. + * @member {google.cloud.securitycenter.v2.IAttack|null|undefined} attack + * @memberof google.cloud.securitycenter.v2.CloudArmor + * @instance + */ + CloudArmor.prototype.attack = null; + + /** + * CloudArmor threatVector. + * @member {string} threatVector + * @memberof google.cloud.securitycenter.v2.CloudArmor + * @instance + */ + CloudArmor.prototype.threatVector = ""; + + /** + * CloudArmor duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.securitycenter.v2.CloudArmor + * @instance + */ + CloudArmor.prototype.duration = null; + + /** + * Creates a new CloudArmor instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile instance + * @param {google.cloud.securitycenter.v2.ICloudArmor=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.CloudArmor} CloudArmor instance */ - CloudDlpDataProfile.create = function create(properties) { - return new CloudDlpDataProfile(properties); + CloudArmor.create = function create(properties) { + return new CloudArmor(properties); }; /** - * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. + * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudArmor.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudArmor} message CloudArmor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpDataProfile.encode = function encode(message, writer) { + CloudArmor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataProfile); - if (message.parentType != null && Object.hasOwnProperty.call(message, "parentType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.parentType); + if (message.securityPolicy != null && Object.hasOwnProperty.call(message, "securityPolicy")) + $root.google.cloud.securitycenter.v2.SecurityPolicy.encode(message.securityPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requests != null && Object.hasOwnProperty.call(message, "requests")) + $root.google.cloud.securitycenter.v2.Requests.encode(message.requests, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.adaptiveProtection != null && Object.hasOwnProperty.call(message, "adaptiveProtection")) + $root.google.cloud.securitycenter.v2.AdaptiveProtection.encode(message.adaptiveProtection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.attack != null && Object.hasOwnProperty.call(message, "attack")) + $root.google.cloud.securitycenter.v2.Attack.encode(message.attack, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.threatVector != null && Object.hasOwnProperty.call(message, "threatVector")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.threatVector); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. + * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudArmor.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudArmor} message CloudArmor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + CloudArmor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * Decodes a CloudArmor message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v2.CloudArmor} CloudArmor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpDataProfile.decode = function decode(reader, length) { + CloudArmor.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.cloud.securitycenter.v2.CloudDlpDataProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.CloudArmor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataProfile = reader.string(); + message.securityPolicy = $root.google.cloud.securitycenter.v2.SecurityPolicy.decode(reader, reader.uint32()); break; } case 2: { - message.parentType = reader.int32(); + message.requests = $root.google.cloud.securitycenter.v2.Requests.decode(reader, reader.uint32()); + break; + } + case 3: { + message.adaptiveProtection = $root.google.cloud.securitycenter.v2.AdaptiveProtection.decode(reader, reader.uint32()); + break; + } + case 4: { + message.attack = $root.google.cloud.securitycenter.v2.Attack.decode(reader, reader.uint32()); + break; + } + case 5: { + message.threatVector = reader.string(); + break; + } + case 6: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -70830,174 +70890,190 @@ }; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * Decodes a CloudArmor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v2.CloudArmor} CloudArmor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpDataProfile.decodeDelimited = function decodeDelimited(reader) { + CloudArmor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudDlpDataProfile message. + * Verifies a CloudArmor message. * @function verify - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudDlpDataProfile.verify = function verify(message) { + CloudArmor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) - if (!$util.isString(message.dataProfile)) - return "dataProfile: string expected"; - if (message.parentType != null && message.hasOwnProperty("parentType")) - switch (message.parentType) { - default: - return "parentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) { + var error = $root.google.cloud.securitycenter.v2.SecurityPolicy.verify(message.securityPolicy); + if (error) + return "securityPolicy." + error; + } + if (message.requests != null && message.hasOwnProperty("requests")) { + var error = $root.google.cloud.securitycenter.v2.Requests.verify(message.requests); + if (error) + return "requests." + error; + } + if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) { + var error = $root.google.cloud.securitycenter.v2.AdaptiveProtection.verify(message.adaptiveProtection); + if (error) + return "adaptiveProtection." + error; + } + if (message.attack != null && message.hasOwnProperty("attack")) { + var error = $root.google.cloud.securitycenter.v2.Attack.verify(message.attack); + if (error) + return "attack." + error; + } + if (message.threatVector != null && message.hasOwnProperty("threatVector")) + if (!$util.isString(message.threatVector)) + return "threatVector: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } return null; }; /** - * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v2.CloudArmor} CloudArmor */ - CloudDlpDataProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.CloudDlpDataProfile) + CloudArmor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.CloudArmor) return object; - var message = new $root.google.cloud.securitycenter.v2.CloudDlpDataProfile(); - if (object.dataProfile != null) - message.dataProfile = String(object.dataProfile); - switch (object.parentType) { - default: - if (typeof object.parentType === "number") { - message.parentType = object.parentType; - break; - } - break; - case "PARENT_TYPE_UNSPECIFIED": - case 0: - message.parentType = 0; - break; - case "ORGANIZATION": - case 1: - message.parentType = 1; - break; - case "PROJECT": - case 2: - message.parentType = 2; - break; + var message = new $root.google.cloud.securitycenter.v2.CloudArmor(); + if (object.securityPolicy != null) { + if (typeof object.securityPolicy !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudArmor.securityPolicy: object expected"); + message.securityPolicy = $root.google.cloud.securitycenter.v2.SecurityPolicy.fromObject(object.securityPolicy); + } + if (object.requests != null) { + if (typeof object.requests !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudArmor.requests: object expected"); + message.requests = $root.google.cloud.securitycenter.v2.Requests.fromObject(object.requests); + } + if (object.adaptiveProtection != null) { + if (typeof object.adaptiveProtection !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudArmor.adaptiveProtection: object expected"); + message.adaptiveProtection = $root.google.cloud.securitycenter.v2.AdaptiveProtection.fromObject(object.adaptiveProtection); + } + if (object.attack != null) { + if (typeof object.attack !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudArmor.attack: object expected"); + message.attack = $root.google.cloud.securitycenter.v2.Attack.fromObject(object.attack); + } + if (object.threatVector != null) + message.threatVector = String(object.threatVector); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudArmor.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); } return message; }; /** - * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static - * @param {google.cloud.securitycenter.v2.CloudDlpDataProfile} message CloudDlpDataProfile + * @param {google.cloud.securitycenter.v2.CloudArmor} message CloudArmor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudDlpDataProfile.toObject = function toObject(message, options) { + CloudArmor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataProfile = ""; - object.parentType = options.enums === String ? "PARENT_TYPE_UNSPECIFIED" : 0; + object.securityPolicy = null; + object.requests = null; + object.adaptiveProtection = null; + object.attack = null; + object.threatVector = ""; + object.duration = null; } - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) - object.dataProfile = message.dataProfile; - if (message.parentType != null && message.hasOwnProperty("parentType")) - object.parentType = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType[message.parentType] === undefined ? message.parentType : $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType[message.parentType] : message.parentType; + if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) + object.securityPolicy = $root.google.cloud.securitycenter.v2.SecurityPolicy.toObject(message.securityPolicy, options); + if (message.requests != null && message.hasOwnProperty("requests")) + object.requests = $root.google.cloud.securitycenter.v2.Requests.toObject(message.requests, options); + if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) + object.adaptiveProtection = $root.google.cloud.securitycenter.v2.AdaptiveProtection.toObject(message.adaptiveProtection, options); + if (message.attack != null && message.hasOwnProperty("attack")) + object.attack = $root.google.cloud.securitycenter.v2.Attack.toObject(message.attack, options); + if (message.threatVector != null && message.hasOwnProperty("threatVector")) + object.threatVector = message.threatVector; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); return object; }; /** - * Converts this CloudDlpDataProfile to JSON. + * Converts this CloudArmor to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @instance * @returns {Object.} JSON object */ - CloudDlpDataProfile.prototype.toJSON = function toJSON() { + CloudArmor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudDlpDataProfile + * Gets the default type url for CloudArmor * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.CloudArmor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudDlpDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudArmor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudDlpDataProfile"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudArmor"; }; - /** - * ParentType enum. - * @name google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType - * @enum {number} - * @property {number} PARENT_TYPE_UNSPECIFIED=0 PARENT_TYPE_UNSPECIFIED value - * @property {number} ORGANIZATION=1 ORGANIZATION value - * @property {number} PROJECT=2 PROJECT value - */ - CloudDlpDataProfile.ParentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORGANIZATION"] = 1; - values[valuesById[2] = "PROJECT"] = 2; - return values; - })(); - - return CloudDlpDataProfile; + return CloudArmor; })(); - v2.CloudDlpInspection = (function() { + v2.SecurityPolicy = (function() { /** - * Properties of a CloudDlpInspection. + * Properties of a SecurityPolicy. * @memberof google.cloud.securitycenter.v2 - * @interface ICloudDlpInspection - * @property {string|null} [inspectJob] CloudDlpInspection inspectJob - * @property {string|null} [infoType] CloudDlpInspection infoType - * @property {number|Long|null} [infoTypeCount] CloudDlpInspection infoTypeCount - * @property {boolean|null} [fullScan] CloudDlpInspection fullScan + * @interface ISecurityPolicy + * @property {string|null} [name] SecurityPolicy name + * @property {string|null} [type] SecurityPolicy type + * @property {boolean|null} [preview] SecurityPolicy preview */ /** - * Constructs a new CloudDlpInspection. + * Constructs a new SecurityPolicy. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a CloudDlpInspection. - * @implements ICloudDlpInspection + * @classdesc Represents a SecurityPolicy. + * @implements ISecurityPolicy * @constructor - * @param {google.cloud.securitycenter.v2.ICloudDlpInspection=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ISecurityPolicy=} [properties] Properties to set */ - function CloudDlpInspection(properties) { + function SecurityPolicy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71005,117 +71081,103 @@ } /** - * CloudDlpInspection inspectJob. - * @member {string} inspectJob - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection - * @instance - */ - CloudDlpInspection.prototype.inspectJob = ""; - - /** - * CloudDlpInspection infoType. - * @member {string} infoType - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * SecurityPolicy name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @instance */ - CloudDlpInspection.prototype.infoType = ""; + SecurityPolicy.prototype.name = ""; /** - * CloudDlpInspection infoTypeCount. - * @member {number|Long} infoTypeCount - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * SecurityPolicy type. + * @member {string} type + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @instance */ - CloudDlpInspection.prototype.infoTypeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SecurityPolicy.prototype.type = ""; /** - * CloudDlpInspection fullScan. - * @member {boolean} fullScan - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * SecurityPolicy preview. + * @member {boolean} preview + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @instance */ - CloudDlpInspection.prototype.fullScan = false; + SecurityPolicy.prototype.preview = false; /** - * Creates a new CloudDlpInspection instance using the specified properties. + * Creates a new SecurityPolicy instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpInspection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection instance + * @param {google.cloud.securitycenter.v2.ISecurityPolicy=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.SecurityPolicy} SecurityPolicy instance */ - CloudDlpInspection.create = function create(properties) { - return new CloudDlpInspection(properties); + SecurityPolicy.create = function create(properties) { + return new SecurityPolicy(properties); }; /** - * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. + * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPolicy.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {google.cloud.securitycenter.v2.ISecurityPolicy} message SecurityPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpInspection.encode = function encode(message, writer) { + SecurityPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inspectJob); - if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.infoType); - if (message.infoTypeCount != null && Object.hasOwnProperty.call(message, "infoTypeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.infoTypeCount); - if (message.fullScan != null && Object.hasOwnProperty.call(message, "fullScan")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.fullScan); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.preview != null && Object.hasOwnProperty.call(message, "preview")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preview); return writer; }; /** - * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. + * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v2.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {google.cloud.securitycenter.v2.ISecurityPolicy} message SecurityPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpInspection.encodeDelimited = function encodeDelimited(message, writer) { + SecurityPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer. + * Decodes a SecurityPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v2.SecurityPolicy} SecurityPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpInspection.decode = function decode(reader, length) { + SecurityPolicy.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.cloud.securitycenter.v2.CloudDlpInspection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.SecurityPolicy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.inspectJob = reader.string(); + message.name = reader.string(); break; } case 2: { - message.infoType = reader.string(); + message.type = reader.string(); break; } case 3: { - message.infoTypeCount = reader.int64(); - break; - } - case 4: { - message.fullScan = reader.bool(); + message.preview = reader.bool(); break; } default: @@ -71127,164 +71189,142 @@ }; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v2.SecurityPolicy} SecurityPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpInspection.decodeDelimited = function decodeDelimited(reader) { + SecurityPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudDlpInspection message. + * Verifies a SecurityPolicy message. * @function verify - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudDlpInspection.verify = function verify(message) { + SecurityPolicy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) - if (!$util.isString(message.inspectJob)) - return "inspectJob: string expected"; - if (message.infoType != null && message.hasOwnProperty("infoType")) - if (!$util.isString(message.infoType)) - return "infoType: string expected"; - if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) - if (!$util.isInteger(message.infoTypeCount) && !(message.infoTypeCount && $util.isInteger(message.infoTypeCount.low) && $util.isInteger(message.infoTypeCount.high))) - return "infoTypeCount: integer|Long expected"; - if (message.fullScan != null && message.hasOwnProperty("fullScan")) - if (typeof message.fullScan !== "boolean") - return "fullScan: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.preview != null && message.hasOwnProperty("preview")) + if (typeof message.preview !== "boolean") + return "preview: boolean expected"; return null; }; /** - * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v2.SecurityPolicy} SecurityPolicy */ - CloudDlpInspection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.CloudDlpInspection) + SecurityPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.SecurityPolicy) return object; - var message = new $root.google.cloud.securitycenter.v2.CloudDlpInspection(); - if (object.inspectJob != null) - message.inspectJob = String(object.inspectJob); - if (object.infoType != null) - message.infoType = String(object.infoType); - if (object.infoTypeCount != null) - if ($util.Long) - (message.infoTypeCount = $util.Long.fromValue(object.infoTypeCount)).unsigned = false; - else if (typeof object.infoTypeCount === "string") - message.infoTypeCount = parseInt(object.infoTypeCount, 10); - else if (typeof object.infoTypeCount === "number") - message.infoTypeCount = object.infoTypeCount; - else if (typeof object.infoTypeCount === "object") - message.infoTypeCount = new $util.LongBits(object.infoTypeCount.low >>> 0, object.infoTypeCount.high >>> 0).toNumber(); - if (object.fullScan != null) - message.fullScan = Boolean(object.fullScan); + var message = new $root.google.cloud.securitycenter.v2.SecurityPolicy(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.preview != null) + message.preview = Boolean(object.preview); return message; }; /** - * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v2.CloudDlpInspection} message CloudDlpInspection + * @param {google.cloud.securitycenter.v2.SecurityPolicy} message SecurityPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudDlpInspection.toObject = function toObject(message, options) { + SecurityPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.inspectJob = ""; - object.infoType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.infoTypeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.infoTypeCount = options.longs === String ? "0" : 0; - object.fullScan = false; + object.name = ""; + object.type = ""; + object.preview = false; } - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) - object.inspectJob = message.inspectJob; - if (message.infoType != null && message.hasOwnProperty("infoType")) - object.infoType = message.infoType; - if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) - if (typeof message.infoTypeCount === "number") - object.infoTypeCount = options.longs === String ? String(message.infoTypeCount) : message.infoTypeCount; - else - object.infoTypeCount = options.longs === String ? $util.Long.prototype.toString.call(message.infoTypeCount) : options.longs === Number ? new $util.LongBits(message.infoTypeCount.low >>> 0, message.infoTypeCount.high >>> 0).toNumber() : message.infoTypeCount; - if (message.fullScan != null && message.hasOwnProperty("fullScan")) - object.fullScan = message.fullScan; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.preview != null && message.hasOwnProperty("preview")) + object.preview = message.preview; return object; }; /** - * Converts this CloudDlpInspection to JSON. + * Converts this SecurityPolicy to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @instance * @returns {Object.} JSON object */ - CloudDlpInspection.prototype.toJSON = function toJSON() { + SecurityPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudDlpInspection + * Gets the default type url for SecurityPolicy * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.CloudDlpInspection + * @memberof google.cloud.securitycenter.v2.SecurityPolicy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudDlpInspection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecurityPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudDlpInspection"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityPolicy"; }; - return CloudDlpInspection; + return SecurityPolicy; })(); - v2.Compliance = (function() { + v2.Requests = (function() { /** - * Properties of a Compliance. + * Properties of a Requests. * @memberof google.cloud.securitycenter.v2 - * @interface ICompliance - * @property {string|null} [standard] Compliance standard - * @property {string|null} [version] Compliance version - * @property {Array.|null} [ids] Compliance ids + * @interface IRequests + * @property {number|null} [ratio] Requests ratio + * @property {number|null} [shortTermAllowed] Requests shortTermAllowed + * @property {number|null} [longTermAllowed] Requests longTermAllowed + * @property {number|null} [longTermDenied] Requests longTermDenied */ /** - * Constructs a new Compliance. + * Constructs a new Requests. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Compliance. - * @implements ICompliance + * @classdesc Represents a Requests. + * @implements IRequests * @constructor - * @param {google.cloud.securitycenter.v2.ICompliance=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IRequests=} [properties] Properties to set */ - function Compliance(properties) { - this.ids = []; + function Requests(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71292,106 +71332,117 @@ } /** - * Compliance standard. - * @member {string} standard - * @memberof google.cloud.securitycenter.v2.Compliance + * Requests ratio. + * @member {number} ratio + * @memberof google.cloud.securitycenter.v2.Requests * @instance */ - Compliance.prototype.standard = ""; + Requests.prototype.ratio = 0; /** - * Compliance version. - * @member {string} version - * @memberof google.cloud.securitycenter.v2.Compliance + * Requests shortTermAllowed. + * @member {number} shortTermAllowed + * @memberof google.cloud.securitycenter.v2.Requests * @instance */ - Compliance.prototype.version = ""; + Requests.prototype.shortTermAllowed = 0; /** - * Compliance ids. - * @member {Array.} ids - * @memberof google.cloud.securitycenter.v2.Compliance + * Requests longTermAllowed. + * @member {number} longTermAllowed + * @memberof google.cloud.securitycenter.v2.Requests * @instance */ - Compliance.prototype.ids = $util.emptyArray; + Requests.prototype.longTermAllowed = 0; /** - * Creates a new Compliance instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Compliance + * Requests longTermDenied. + * @member {number} longTermDenied + * @memberof google.cloud.securitycenter.v2.Requests + * @instance + */ + Requests.prototype.longTermDenied = 0; + + /** + * Creates a new Requests instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Requests * @static - * @param {google.cloud.securitycenter.v2.ICompliance=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Compliance} Compliance instance + * @param {google.cloud.securitycenter.v2.IRequests=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Requests} Requests instance */ - Compliance.create = function create(properties) { - return new Compliance(properties); + Requests.create = function create(properties) { + return new Requests(properties); }; /** - * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. + * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v2.Requests.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static - * @param {google.cloud.securitycenter.v2.ICompliance} message Compliance message or plain object to encode + * @param {google.cloud.securitycenter.v2.IRequests} message Requests message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Compliance.encode = function encode(message, writer) { + Requests.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.ids != null && message.ids.length) - for (var i = 0; i < message.ids.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.ratio); + if (message.shortTermAllowed != null && Object.hasOwnProperty.call(message, "shortTermAllowed")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.shortTermAllowed); + if (message.longTermAllowed != null && Object.hasOwnProperty.call(message, "longTermAllowed")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.longTermAllowed); + if (message.longTermDenied != null && Object.hasOwnProperty.call(message, "longTermDenied")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.longTermDenied); return writer; }; /** - * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. + * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Requests.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static - * @param {google.cloud.securitycenter.v2.ICompliance} message Compliance message or plain object to encode + * @param {google.cloud.securitycenter.v2.IRequests} message Requests message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Compliance.encodeDelimited = function encodeDelimited(message, writer) { + Requests.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Compliance message from the specified reader or buffer. + * Decodes a Requests message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Compliance} Compliance + * @returns {google.cloud.securitycenter.v2.Requests} Requests * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Compliance.decode = function decode(reader, length) { + Requests.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.cloud.securitycenter.v2.Compliance(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Requests(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.standard = reader.string(); + message.ratio = reader.double(); break; } case 2: { - message.version = reader.string(); + message.shortTermAllowed = reader.int32(); break; } case 3: { - if (!(message.ids && message.ids.length)) - message.ids = []; - message.ids.push(reader.string()); + message.longTermAllowed = reader.int32(); + break; + } + case 4: { + message.longTermDenied = reader.int32(); break; } default: @@ -71403,156 +71454,147 @@ }; /** - * Decodes a Compliance message from the specified reader or buffer, length delimited. + * Decodes a Requests message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Compliance} Compliance + * @returns {google.cloud.securitycenter.v2.Requests} Requests * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Compliance.decodeDelimited = function decodeDelimited(reader) { + Requests.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Compliance message. + * Verifies a Requests message. * @function verify - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Compliance.verify = function verify(message) { + Requests.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.standard != null && message.hasOwnProperty("standard")) - if (!$util.isString(message.standard)) - return "standard: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.ids != null && message.hasOwnProperty("ids")) { - if (!Array.isArray(message.ids)) - return "ids: array expected"; - for (var i = 0; i < message.ids.length; ++i) - if (!$util.isString(message.ids[i])) - return "ids: string[] expected"; - } + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) + if (!$util.isInteger(message.shortTermAllowed)) + return "shortTermAllowed: integer expected"; + if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) + if (!$util.isInteger(message.longTermAllowed)) + return "longTermAllowed: integer expected"; + if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) + if (!$util.isInteger(message.longTermDenied)) + return "longTermDenied: integer expected"; return null; }; /** - * Creates a Compliance message from a plain object. Also converts values to their respective internal types. + * Creates a Requests message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Compliance} Compliance + * @returns {google.cloud.securitycenter.v2.Requests} Requests */ - Compliance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Compliance) + Requests.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Requests) return object; - var message = new $root.google.cloud.securitycenter.v2.Compliance(); - if (object.standard != null) - message.standard = String(object.standard); - if (object.version != null) - message.version = String(object.version); - if (object.ids) { - if (!Array.isArray(object.ids)) - throw TypeError(".google.cloud.securitycenter.v2.Compliance.ids: array expected"); - message.ids = []; - for (var i = 0; i < object.ids.length; ++i) - message.ids[i] = String(object.ids[i]); - } + var message = new $root.google.cloud.securitycenter.v2.Requests(); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.shortTermAllowed != null) + message.shortTermAllowed = object.shortTermAllowed | 0; + if (object.longTermAllowed != null) + message.longTermAllowed = object.longTermAllowed | 0; + if (object.longTermDenied != null) + message.longTermDenied = object.longTermDenied | 0; return message; }; /** - * Creates a plain object from a Compliance message. Also converts values to other types if specified. + * Creates a plain object from a Requests message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static - * @param {google.cloud.securitycenter.v2.Compliance} message Compliance + * @param {google.cloud.securitycenter.v2.Requests} message Requests * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Compliance.toObject = function toObject(message, options) { + Requests.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.ids = []; if (options.defaults) { - object.standard = ""; - object.version = ""; - } - if (message.standard != null && message.hasOwnProperty("standard")) - object.standard = message.standard; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.ids && message.ids.length) { - object.ids = []; - for (var j = 0; j < message.ids.length; ++j) - object.ids[j] = message.ids[j]; + object.ratio = 0; + object.shortTermAllowed = 0; + object.longTermAllowed = 0; + object.longTermDenied = 0; } + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) + object.shortTermAllowed = message.shortTermAllowed; + if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) + object.longTermAllowed = message.longTermAllowed; + if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) + object.longTermDenied = message.longTermDenied; return object; }; /** - * Converts this Compliance to JSON. + * Converts this Requests to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @instance * @returns {Object.} JSON object */ - Compliance.prototype.toJSON = function toJSON() { + Requests.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Compliance + * Gets the default type url for Requests * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Compliance + * @memberof google.cloud.securitycenter.v2.Requests * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Compliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Requests.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Compliance"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Requests"; }; - return Compliance; + return Requests; })(); - v2.Connection = (function() { + v2.AdaptiveProtection = (function() { /** - * Properties of a Connection. + * Properties of an AdaptiveProtection. * @memberof google.cloud.securitycenter.v2 - * @interface IConnection - * @property {string|null} [destinationIp] Connection destinationIp - * @property {number|null} [destinationPort] Connection destinationPort - * @property {string|null} [sourceIp] Connection sourceIp - * @property {number|null} [sourcePort] Connection sourcePort - * @property {google.cloud.securitycenter.v2.Connection.Protocol|null} [protocol] Connection protocol + * @interface IAdaptiveProtection + * @property {number|null} [confidence] AdaptiveProtection confidence */ /** - * Constructs a new Connection. + * Constructs a new AdaptiveProtection. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Connection. - * @implements IConnection + * @classdesc Represents an AdaptiveProtection. + * @implements IAdaptiveProtection * @constructor - * @param {google.cloud.securitycenter.v2.IConnection=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IAdaptiveProtection=} [properties] Properties to set */ - function Connection(properties) { + function AdaptiveProtection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71560,131 +71602,75 @@ } /** - * Connection destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.securitycenter.v2.Connection - * @instance - */ - Connection.prototype.destinationIp = ""; - - /** - * Connection destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.securitycenter.v2.Connection - * @instance - */ - Connection.prototype.destinationPort = 0; - - /** - * Connection sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.securitycenter.v2.Connection - * @instance - */ - Connection.prototype.sourceIp = ""; - - /** - * Connection sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.securitycenter.v2.Connection - * @instance - */ - Connection.prototype.sourcePort = 0; - - /** - * Connection protocol. - * @member {google.cloud.securitycenter.v2.Connection.Protocol} protocol - * @memberof google.cloud.securitycenter.v2.Connection + * AdaptiveProtection confidence. + * @member {number} confidence + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @instance */ - Connection.prototype.protocol = 0; + AdaptiveProtection.prototype.confidence = 0; /** - * Creates a new Connection instance using the specified properties. + * Creates a new AdaptiveProtection instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v2.IConnection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Connection} Connection instance + * @param {google.cloud.securitycenter.v2.IAdaptiveProtection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AdaptiveProtection} AdaptiveProtection instance */ - Connection.create = function create(properties) { - return new Connection(properties); + AdaptiveProtection.create = function create(properties) { + return new AdaptiveProtection(properties); }; /** - * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. + * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v2.AdaptiveProtection.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v2.IConnection} message Connection message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Connection.encode = function encode(message, writer) { + AdaptiveProtection.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationIp); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationPort); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protocol); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidence); return writer; }; /** - * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. + * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AdaptiveProtection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v2.IConnection} message Connection message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Connection.encodeDelimited = function encodeDelimited(message, writer) { + AdaptiveProtection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Connection message from the specified reader or buffer. + * Decodes an AdaptiveProtection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Connection} Connection + * @returns {google.cloud.securitycenter.v2.AdaptiveProtection} AdaptiveProtection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Connection.decode = function decode(reader, length) { + AdaptiveProtection.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.cloud.securitycenter.v2.Connection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.AdaptiveProtection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.destinationIp = reader.string(); - break; - } - case 2: { - message.destinationPort = reader.int32(); - break; - } - case 3: { - message.sourceIp = reader.string(); - break; - } - case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.protocol = reader.int32(); + message.confidence = reader.double(); break; } default: @@ -71696,217 +71682,124 @@ }; /** - * Decodes a Connection message from the specified reader or buffer, length delimited. + * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Connection} Connection + * @returns {google.cloud.securitycenter.v2.AdaptiveProtection} AdaptiveProtection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Connection.decodeDelimited = function decodeDelimited(reader) { + AdaptiveProtection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Connection message. + * Verifies an AdaptiveProtection message. * @function verify - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Connection.verify = function verify(message) { + AdaptiveProtection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - switch (message.protocol) { - default: - return "protocol: enum value expected"; - case 0: - case 1: - case 6: - case 17: - case 47: - case 50: - break; - } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * Creates an AdaptiveProtection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Connection} Connection + * @returns {google.cloud.securitycenter.v2.AdaptiveProtection} AdaptiveProtection */ - Connection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Connection) + AdaptiveProtection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AdaptiveProtection) return object; - var message = new $root.google.cloud.securitycenter.v2.Connection(); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - switch (object.protocol) { - default: - if (typeof object.protocol === "number") { - message.protocol = object.protocol; - break; - } - break; - case "PROTOCOL_UNSPECIFIED": - case 0: - message.protocol = 0; - break; - case "ICMP": - case 1: - message.protocol = 1; - break; - case "TCP": - case 6: - message.protocol = 6; - break; - case "UDP": - case 17: - message.protocol = 17; - break; - case "GRE": - case 47: - message.protocol = 47; - break; - case "ESP": - case 50: - message.protocol = 50; - break; - } + var message = new $root.google.cloud.securitycenter.v2.AdaptiveProtection(); + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a Connection message. Also converts values to other types if specified. + * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v2.Connection} message Connection + * @param {google.cloud.securitycenter.v2.AdaptiveProtection} message AdaptiveProtection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Connection.toObject = function toObject(message, options) { + AdaptiveProtection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.destinationIp = ""; - object.destinationPort = 0; - object.sourceIp = ""; - object.sourcePort = 0; - object.protocol = options.enums === String ? "PROTOCOL_UNSPECIFIED" : 0; - } - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = options.enums === String ? $root.google.cloud.securitycenter.v2.Connection.Protocol[message.protocol] === undefined ? message.protocol : $root.google.cloud.securitycenter.v2.Connection.Protocol[message.protocol] : message.protocol; + if (options.defaults) + object.confidence = 0; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this Connection to JSON. + * Converts this AdaptiveProtection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @instance * @returns {Object.} JSON object */ - Connection.prototype.toJSON = function toJSON() { + AdaptiveProtection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Connection + * Gets the default type url for AdaptiveProtection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Connection + * @memberof google.cloud.securitycenter.v2.AdaptiveProtection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdaptiveProtection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Connection"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AdaptiveProtection"; }; - /** - * Protocol enum. - * @name google.cloud.securitycenter.v2.Connection.Protocol - * @enum {number} - * @property {number} PROTOCOL_UNSPECIFIED=0 PROTOCOL_UNSPECIFIED value - * @property {number} ICMP=1 ICMP value - * @property {number} TCP=6 TCP value - * @property {number} UDP=17 UDP value - * @property {number} GRE=47 GRE value - * @property {number} ESP=50 ESP value - */ - Connection.Protocol = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROTOCOL_UNSPECIFIED"] = 0; - values[valuesById[1] = "ICMP"] = 1; - values[valuesById[6] = "TCP"] = 6; - values[valuesById[17] = "UDP"] = 17; - values[valuesById[47] = "GRE"] = 47; - values[valuesById[50] = "ESP"] = 50; - return values; - })(); - - return Connection; + return AdaptiveProtection; })(); - v2.ContactDetails = (function() { + v2.Attack = (function() { /** - * Properties of a ContactDetails. + * Properties of an Attack. * @memberof google.cloud.securitycenter.v2 - * @interface IContactDetails - * @property {Array.|null} [contacts] ContactDetails contacts + * @interface IAttack + * @property {number|null} [volumePps] Attack volumePps + * @property {number|null} [volumeBps] Attack volumeBps + * @property {string|null} [classification] Attack classification */ /** - * Constructs a new ContactDetails. + * Constructs a new Attack. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a ContactDetails. - * @implements IContactDetails + * @classdesc Represents an Attack. + * @implements IAttack * @constructor - * @param {google.cloud.securitycenter.v2.IContactDetails=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IAttack=} [properties] Properties to set */ - function ContactDetails(properties) { - this.contacts = []; + function Attack(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -71914,82 +71807,107 @@ } /** - * ContactDetails contacts. - * @member {Array.} contacts - * @memberof google.cloud.securitycenter.v2.ContactDetails + * Attack volumePps. + * @member {number} volumePps + * @memberof google.cloud.securitycenter.v2.Attack * @instance */ - ContactDetails.prototype.contacts = $util.emptyArray; + Attack.prototype.volumePps = 0; /** - * Creates a new ContactDetails instance using the specified properties. + * Attack volumeBps. + * @member {number} volumeBps + * @memberof google.cloud.securitycenter.v2.Attack + * @instance + */ + Attack.prototype.volumeBps = 0; + + /** + * Attack classification. + * @member {string} classification + * @memberof google.cloud.securitycenter.v2.Attack + * @instance + */ + Attack.prototype.classification = ""; + + /** + * Creates a new Attack instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static - * @param {google.cloud.securitycenter.v2.IContactDetails=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails instance + * @param {google.cloud.securitycenter.v2.IAttack=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Attack} Attack instance */ - ContactDetails.create = function create(properties) { - return new ContactDetails(properties); + Attack.create = function create(properties) { + return new Attack(properties); }; /** - * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. + * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v2.Attack.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static - * @param {google.cloud.securitycenter.v2.IContactDetails} message ContactDetails message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAttack} message Attack message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactDetails.encode = function encode(message, writer) { + Attack.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.contacts != null && message.contacts.length) - for (var i = 0; i < message.contacts.length; ++i) - $root.google.cloud.securitycenter.v2.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.volumePps != null && Object.hasOwnProperty.call(message, "volumePps")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.volumePps); + if (message.volumeBps != null && Object.hasOwnProperty.call(message, "volumeBps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.volumeBps); + if (message.classification != null && Object.hasOwnProperty.call(message, "classification")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.classification); return writer; }; /** - * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. + * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Attack.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static - * @param {google.cloud.securitycenter.v2.IContactDetails} message ContactDetails message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAttack} message Attack message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactDetails.encodeDelimited = function encodeDelimited(message, writer) { + Attack.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContactDetails message from the specified reader or buffer. + * Decodes an Attack message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v2.Attack} Attack * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactDetails.decode = function decode(reader, length) { + Attack.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.cloud.securitycenter.v2.ContactDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Attack(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.contacts && message.contacts.length)) - message.contacts = []; - message.contacts.push($root.google.cloud.securitycenter.v2.Contact.decode(reader, reader.uint32())); + message.volumePps = reader.int32(); break; } - default: - reader.skipType(tag & 7); + case 2: { + message.volumeBps = reader.int32(); + break; + } + case 3: { + message.classification = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -71997,139 +71915,140 @@ }; /** - * Decodes a ContactDetails message from the specified reader or buffer, length delimited. + * Decodes an Attack message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v2.Attack} Attack * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactDetails.decodeDelimited = function decodeDelimited(reader) { + Attack.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContactDetails message. + * Verifies an Attack message. * @function verify - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContactDetails.verify = function verify(message) { + Attack.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!Array.isArray(message.contacts)) - return "contacts: array expected"; - for (var i = 0; i < message.contacts.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Contact.verify(message.contacts[i]); - if (error) - return "contacts." + error; - } - } + if (message.volumePps != null && message.hasOwnProperty("volumePps")) + if (!$util.isInteger(message.volumePps)) + return "volumePps: integer expected"; + if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) + if (!$util.isInteger(message.volumeBps)) + return "volumeBps: integer expected"; + if (message.classification != null && message.hasOwnProperty("classification")) + if (!$util.isString(message.classification)) + return "classification: string expected"; return null; }; /** - * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. + * Creates an Attack message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v2.Attack} Attack */ - ContactDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.ContactDetails) + Attack.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Attack) return object; - var message = new $root.google.cloud.securitycenter.v2.ContactDetails(); - if (object.contacts) { - if (!Array.isArray(object.contacts)) - throw TypeError(".google.cloud.securitycenter.v2.ContactDetails.contacts: array expected"); - message.contacts = []; - for (var i = 0; i < object.contacts.length; ++i) { - if (typeof object.contacts[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ContactDetails.contacts: object expected"); - message.contacts[i] = $root.google.cloud.securitycenter.v2.Contact.fromObject(object.contacts[i]); - } - } + var message = new $root.google.cloud.securitycenter.v2.Attack(); + if (object.volumePps != null) + message.volumePps = object.volumePps | 0; + if (object.volumeBps != null) + message.volumeBps = object.volumeBps | 0; + if (object.classification != null) + message.classification = String(object.classification); return message; }; /** - * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. + * Creates a plain object from an Attack message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static - * @param {google.cloud.securitycenter.v2.ContactDetails} message ContactDetails + * @param {google.cloud.securitycenter.v2.Attack} message Attack * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContactDetails.toObject = function toObject(message, options) { + Attack.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.contacts = []; - if (message.contacts && message.contacts.length) { - object.contacts = []; - for (var j = 0; j < message.contacts.length; ++j) - object.contacts[j] = $root.google.cloud.securitycenter.v2.Contact.toObject(message.contacts[j], options); + if (options.defaults) { + object.volumePps = 0; + object.volumeBps = 0; + object.classification = ""; } + if (message.volumePps != null && message.hasOwnProperty("volumePps")) + object.volumePps = message.volumePps; + if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) + object.volumeBps = message.volumeBps; + if (message.classification != null && message.hasOwnProperty("classification")) + object.classification = message.classification; return object; }; /** - * Converts this ContactDetails to JSON. + * Converts this Attack to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @instance * @returns {Object.} JSON object */ - ContactDetails.prototype.toJSON = function toJSON() { + Attack.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ContactDetails + * Gets the default type url for Attack * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.ContactDetails + * @memberof google.cloud.securitycenter.v2.Attack * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ContactDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Attack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.ContactDetails"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Attack"; }; - return ContactDetails; + return Attack; })(); - v2.Contact = (function() { + v2.CloudDlpDataProfile = (function() { /** - * Properties of a Contact. + * Properties of a CloudDlpDataProfile. * @memberof google.cloud.securitycenter.v2 - * @interface IContact - * @property {string|null} [email] Contact email + * @interface ICloudDlpDataProfile + * @property {string|null} [dataProfile] CloudDlpDataProfile dataProfile + * @property {google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType|null} [parentType] CloudDlpDataProfile parentType */ /** - * Constructs a new Contact. + * Constructs a new CloudDlpDataProfile. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Contact. - * @implements IContact + * @classdesc Represents a CloudDlpDataProfile. + * @implements ICloudDlpDataProfile * @constructor - * @param {google.cloud.securitycenter.v2.IContact=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile=} [properties] Properties to set */ - function Contact(properties) { + function CloudDlpDataProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72137,75 +72056,89 @@ } /** - * Contact email. - * @member {string} email - * @memberof google.cloud.securitycenter.v2.Contact + * CloudDlpDataProfile dataProfile. + * @member {string} dataProfile + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @instance */ - Contact.prototype.email = ""; + CloudDlpDataProfile.prototype.dataProfile = ""; /** - * Creates a new Contact instance using the specified properties. + * CloudDlpDataProfile parentType. + * @member {google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType} parentType + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile + * @instance + */ + CloudDlpDataProfile.prototype.parentType = 0; + + /** + * Creates a new CloudDlpDataProfile instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v2.IContact=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Contact} Contact instance + * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile instance */ - Contact.create = function create(properties) { - return new Contact(properties); + CloudDlpDataProfile.create = function create(properties) { + return new CloudDlpDataProfile(properties); }; /** - * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v2.IContact} message Contact message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encode = function encode(message, writer) { + CloudDlpDataProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataProfile); + if (message.parentType != null && Object.hasOwnProperty.call(message, "parentType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.parentType); return writer; }; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpDataProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v2.IContact} message Contact message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encodeDelimited = function encodeDelimited(message, writer) { + CloudDlpDataProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Contact} Contact + * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decode = function decode(reader, length) { + CloudDlpDataProfile.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.cloud.securitycenter.v2.Contact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.CloudDlpDataProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.email = reader.string(); + message.dataProfile = reader.string(); + break; + } + case 2: { + message.parentType = reader.int32(); break; } default: @@ -72217,127 +72150,174 @@ }; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Contact} Contact + * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decodeDelimited = function decodeDelimited(reader) { + CloudDlpDataProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Contact message. + * Verifies a CloudDlpDataProfile message. * @function verify - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Contact.verify = function verify(message) { + CloudDlpDataProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.email != null && message.hasOwnProperty("email")) - if (!$util.isString(message.email)) - return "email: string expected"; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + if (!$util.isString(message.dataProfile)) + return "dataProfile: string expected"; + if (message.parentType != null && message.hasOwnProperty("parentType")) + switch (message.parentType) { + default: + return "parentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Contact message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Contact} Contact + * @returns {google.cloud.securitycenter.v2.CloudDlpDataProfile} CloudDlpDataProfile */ - Contact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Contact) + CloudDlpDataProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.CloudDlpDataProfile) return object; - var message = new $root.google.cloud.securitycenter.v2.Contact(); - if (object.email != null) - message.email = String(object.email); + var message = new $root.google.cloud.securitycenter.v2.CloudDlpDataProfile(); + if (object.dataProfile != null) + message.dataProfile = String(object.dataProfile); + switch (object.parentType) { + default: + if (typeof object.parentType === "number") { + message.parentType = object.parentType; + break; + } + break; + case "PARENT_TYPE_UNSPECIFIED": + case 0: + message.parentType = 0; + break; + case "ORGANIZATION": + case 1: + message.parentType = 1; + break; + case "PROJECT": + case 2: + message.parentType = 2; + break; + } return message; }; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v2.Contact} message Contact + * @param {google.cloud.securitycenter.v2.CloudDlpDataProfile} message CloudDlpDataProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Contact.toObject = function toObject(message, options) { + CloudDlpDataProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) - object.email = message.email; + if (options.defaults) { + object.dataProfile = ""; + object.parentType = options.enums === String ? "PARENT_TYPE_UNSPECIFIED" : 0; + } + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + object.dataProfile = message.dataProfile; + if (message.parentType != null && message.hasOwnProperty("parentType")) + object.parentType = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType[message.parentType] === undefined ? message.parentType : $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType[message.parentType] : message.parentType; return object; }; /** - * Converts this Contact to JSON. + * Converts this CloudDlpDataProfile to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @instance * @returns {Object.} JSON object */ - Contact.prototype.toJSON = function toJSON() { + CloudDlpDataProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Contact + * Gets the default type url for CloudDlpDataProfile * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Contact + * @memberof google.cloud.securitycenter.v2.CloudDlpDataProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudDlpDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Contact"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudDlpDataProfile"; }; - return Contact; + /** + * ParentType enum. + * @name google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType + * @enum {number} + * @property {number} PARENT_TYPE_UNSPECIFIED=0 PARENT_TYPE_UNSPECIFIED value + * @property {number} ORGANIZATION=1 ORGANIZATION value + * @property {number} PROJECT=2 PROJECT value + */ + CloudDlpDataProfile.ParentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORGANIZATION"] = 1; + values[valuesById[2] = "PROJECT"] = 2; + return values; + })(); + + return CloudDlpDataProfile; })(); - v2.Container = (function() { + v2.CloudDlpInspection = (function() { /** - * Properties of a Container. + * Properties of a CloudDlpInspection. * @memberof google.cloud.securitycenter.v2 - * @interface IContainer - * @property {string|null} [name] Container name - * @property {string|null} [uri] Container uri - * @property {string|null} [imageId] Container imageId - * @property {Array.|null} [labels] Container labels - * @property {google.protobuf.ITimestamp|null} [createTime] Container createTime + * @interface ICloudDlpInspection + * @property {string|null} [inspectJob] CloudDlpInspection inspectJob + * @property {string|null} [infoType] CloudDlpInspection infoType + * @property {number|Long|null} [infoTypeCount] CloudDlpInspection infoTypeCount + * @property {boolean|null} [fullScan] CloudDlpInspection fullScan */ /** - * Constructs a new Container. + * Constructs a new CloudDlpInspection. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Container. - * @implements IContainer + * @classdesc Represents a CloudDlpInspection. + * @implements ICloudDlpInspection * @constructor - * @param {google.cloud.securitycenter.v2.IContainer=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICloudDlpInspection=} [properties] Properties to set */ - function Container(properties) { - this.labels = []; + function CloudDlpInspection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72345,134 +72325,117 @@ } /** - * Container name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Container - * @instance - */ - Container.prototype.name = ""; - - /** - * Container uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v2.Container + * CloudDlpInspection inspectJob. + * @member {string} inspectJob + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @instance */ - Container.prototype.uri = ""; + CloudDlpInspection.prototype.inspectJob = ""; /** - * Container imageId. - * @member {string} imageId - * @memberof google.cloud.securitycenter.v2.Container + * CloudDlpInspection infoType. + * @member {string} infoType + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @instance */ - Container.prototype.imageId = ""; + CloudDlpInspection.prototype.infoType = ""; /** - * Container labels. - * @member {Array.} labels - * @memberof google.cloud.securitycenter.v2.Container + * CloudDlpInspection infoTypeCount. + * @member {number|Long} infoTypeCount + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @instance */ - Container.prototype.labels = $util.emptyArray; + CloudDlpInspection.prototype.infoTypeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Container createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v2.Container + * CloudDlpInspection fullScan. + * @member {boolean} fullScan + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @instance */ - Container.prototype.createTime = null; + CloudDlpInspection.prototype.fullScan = false; /** - * Creates a new Container instance using the specified properties. + * Creates a new CloudDlpInspection instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v2.IContainer=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Container} Container instance + * @param {google.cloud.securitycenter.v2.ICloudDlpInspection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection instance */ - Container.create = function create(properties) { - return new Container(properties); + CloudDlpInspection.create = function create(properties) { + return new CloudDlpInspection(properties); }; /** - * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v2.IContainer} message Container message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Container.encode = function encode(message, writer) { + CloudDlpInspection.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.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.imageId != null && Object.hasOwnProperty.call(message, "imageId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageId); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.cloud.securitycenter.v2.Label.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inspectJob); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.infoType); + if (message.infoTypeCount != null && Object.hasOwnProperty.call(message, "infoTypeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.infoTypeCount); + if (message.fullScan != null && Object.hasOwnProperty.call(message, "fullScan")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.fullScan); return writer; }; /** - * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudDlpInspection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v2.IContainer} message Container message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Container.encodeDelimited = function encodeDelimited(message, writer) { + CloudDlpInspection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Container message from the specified reader or buffer. + * Decodes a CloudDlpInspection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Container} Container + * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Container.decode = function decode(reader, length) { + CloudDlpInspection.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.cloud.securitycenter.v2.Container(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.CloudDlpInspection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.inspectJob = reader.string(); break; } case 2: { - message.uri = reader.string(); + message.infoType = reader.string(); break; } case 3: { - message.imageId = reader.string(); + message.infoTypeCount = reader.int64(); break; } case 4: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.cloud.securitycenter.v2.Label.decode(reader, reader.uint32())); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.fullScan = reader.bool(); break; } default: @@ -72484,179 +72447,164 @@ }; /** - * Decodes a Container message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Container} Container + * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Container.decodeDelimited = function decodeDelimited(reader) { + CloudDlpInspection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Container message. + * Verifies a CloudDlpInspection message. * @function verify - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Container.verify = function verify(message) { + CloudDlpInspection.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.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.imageId != null && message.hasOwnProperty("imageId")) - if (!$util.isString(message.imageId)) - return "imageId: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Label.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + if (!$util.isString(message.inspectJob)) + return "inspectJob: string expected"; + if (message.infoType != null && message.hasOwnProperty("infoType")) + if (!$util.isString(message.infoType)) + return "infoType: string expected"; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (!$util.isInteger(message.infoTypeCount) && !(message.infoTypeCount && $util.isInteger(message.infoTypeCount.low) && $util.isInteger(message.infoTypeCount.high))) + return "infoTypeCount: integer|Long expected"; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + if (typeof message.fullScan !== "boolean") + return "fullScan: boolean expected"; return null; }; /** - * Creates a Container message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Container} Container + * @returns {google.cloud.securitycenter.v2.CloudDlpInspection} CloudDlpInspection */ - Container.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Container) + CloudDlpInspection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.CloudDlpInspection) return object; - var message = new $root.google.cloud.securitycenter.v2.Container(); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.imageId != null) - message.imageId = String(object.imageId); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.cloud.securitycenter.v2.Container.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Container.labels: object expected"); - message.labels[i] = $root.google.cloud.securitycenter.v2.Label.fromObject(object.labels[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Container.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + var message = new $root.google.cloud.securitycenter.v2.CloudDlpInspection(); + if (object.inspectJob != null) + message.inspectJob = String(object.inspectJob); + if (object.infoType != null) + message.infoType = String(object.infoType); + if (object.infoTypeCount != null) + if ($util.Long) + (message.infoTypeCount = $util.Long.fromValue(object.infoTypeCount)).unsigned = false; + else if (typeof object.infoTypeCount === "string") + message.infoTypeCount = parseInt(object.infoTypeCount, 10); + else if (typeof object.infoTypeCount === "number") + message.infoTypeCount = object.infoTypeCount; + else if (typeof object.infoTypeCount === "object") + message.infoTypeCount = new $util.LongBits(object.infoTypeCount.low >>> 0, object.infoTypeCount.high >>> 0).toNumber(); + if (object.fullScan != null) + message.fullScan = Boolean(object.fullScan); return message; }; /** - * Creates a plain object from a Container message. Also converts values to other types if specified. + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v2.Container} message Container + * @param {google.cloud.securitycenter.v2.CloudDlpInspection} message CloudDlpInspection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Container.toObject = function toObject(message, options) { + CloudDlpInspection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; if (options.defaults) { - object.name = ""; - object.uri = ""; - object.imageId = ""; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.imageId != null && message.hasOwnProperty("imageId")) - object.imageId = message.imageId; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.cloud.securitycenter.v2.Label.toObject(message.labels[j], options); + object.inspectJob = ""; + object.infoType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.infoTypeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.infoTypeCount = options.longs === String ? "0" : 0; + object.fullScan = false; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + object.inspectJob = message.inspectJob; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = message.infoType; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (typeof message.infoTypeCount === "number") + object.infoTypeCount = options.longs === String ? String(message.infoTypeCount) : message.infoTypeCount; + else + object.infoTypeCount = options.longs === String ? $util.Long.prototype.toString.call(message.infoTypeCount) : options.longs === Number ? new $util.LongBits(message.infoTypeCount.low >>> 0, message.infoTypeCount.high >>> 0).toNumber() : message.infoTypeCount; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + object.fullScan = message.fullScan; return object; }; /** - * Converts this Container to JSON. + * Converts this CloudDlpInspection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @instance * @returns {Object.} JSON object */ - Container.prototype.toJSON = function toJSON() { + CloudDlpInspection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Container + * Gets the default type url for CloudDlpInspection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Container + * @memberof google.cloud.securitycenter.v2.CloudDlpInspection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Container.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudDlpInspection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Container"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudDlpInspection"; }; - return Container; + return CloudDlpInspection; })(); - v2.Label = (function() { + v2.Compliance = (function() { /** - * Properties of a Label. + * Properties of a Compliance. * @memberof google.cloud.securitycenter.v2 - * @interface ILabel - * @property {string|null} [name] Label name - * @property {string|null} [value] Label value + * @interface ICompliance + * @property {string|null} [standard] Compliance standard + * @property {string|null} [version] Compliance version + * @property {Array.|null} [ids] Compliance ids */ /** - * Constructs a new Label. + * Constructs a new Compliance. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Label. - * @implements ILabel + * @classdesc Represents a Compliance. + * @implements ICompliance * @constructor - * @param {google.cloud.securitycenter.v2.ILabel=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICompliance=} [properties] Properties to set */ - function Label(properties) { + function Compliance(properties) { + this.ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72664,89 +72612,106 @@ } /** - * Label name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Label + * Compliance standard. + * @member {string} standard + * @memberof google.cloud.securitycenter.v2.Compliance * @instance */ - Label.prototype.name = ""; + Compliance.prototype.standard = ""; /** - * Label value. - * @member {string} value - * @memberof google.cloud.securitycenter.v2.Label + * Compliance version. + * @member {string} version + * @memberof google.cloud.securitycenter.v2.Compliance * @instance */ - Label.prototype.value = ""; + Compliance.prototype.version = ""; /** - * Creates a new Label instance using the specified properties. + * Compliance ids. + * @member {Array.} ids + * @memberof google.cloud.securitycenter.v2.Compliance + * @instance + */ + Compliance.prototype.ids = $util.emptyArray; + + /** + * Creates a new Compliance instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static - * @param {google.cloud.securitycenter.v2.ILabel=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Label} Label instance + * @param {google.cloud.securitycenter.v2.ICompliance=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Compliance} Compliance instance */ - Label.create = function create(properties) { - return new Label(properties); + Compliance.create = function create(properties) { + return new Compliance(properties); }; /** - * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. + * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static - * @param {google.cloud.securitycenter.v2.ILabel} message Label message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICompliance} message Compliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encode = function encode(message, writer) { + Compliance.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.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); return writer; }; /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. + * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Compliance.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static - * @param {google.cloud.securitycenter.v2.ILabel} message Label message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICompliance} message Compliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encodeDelimited = function encodeDelimited(message, writer) { + Compliance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a Compliance message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Label} Label + * @returns {google.cloud.securitycenter.v2.Compliance} Compliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decode = function decode(reader, length) { + Compliance.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.cloud.securitycenter.v2.Label(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Compliance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.standard = reader.string(); break; } case 2: { - message.value = reader.string(); + message.version = reader.string(); + break; + } + case 3: { + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push(reader.string()); break; } default: @@ -72758,137 +72723,156 @@ }; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a Compliance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Label} Label + * @returns {google.cloud.securitycenter.v2.Compliance} Compliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decodeDelimited = function decodeDelimited(reader) { + Compliance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Label message. + * Verifies a Compliance message. * @function verify - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Label.verify = function verify(message) { + Compliance.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.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.standard != null && message.hasOwnProperty("standard")) + if (!$util.isString(message.standard)) + return "standard: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) + if (!$util.isString(message.ids[i])) + return "ids: string[] expected"; + } return null; }; /** - * Creates a Label message from a plain object. Also converts values to their respective internal types. + * Creates a Compliance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Label} Label + * @returns {google.cloud.securitycenter.v2.Compliance} Compliance */ - Label.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Label) + Compliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Compliance) return object; - var message = new $root.google.cloud.securitycenter.v2.Label(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.cloud.securitycenter.v2.Compliance(); + if (object.standard != null) + message.standard = String(object.standard); + if (object.version != null) + message.version = String(object.version); + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".google.cloud.securitycenter.v2.Compliance.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) + message.ids[i] = String(object.ids[i]); + } return message; }; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. + * Creates a plain object from a Compliance message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static - * @param {google.cloud.securitycenter.v2.Label} message Label + * @param {google.cloud.securitycenter.v2.Compliance} message Compliance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Label.toObject = function toObject(message, options) { + Compliance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.ids = []; if (options.defaults) { - object.name = ""; - object.value = ""; + object.standard = ""; + object.version = ""; + } + if (message.standard != null && message.hasOwnProperty("standard")) + object.standard = message.standard; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = message.ids[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; return object; }; /** - * Converts this Label to JSON. + * Converts this Compliance to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @instance * @returns {Object.} JSON object */ - Label.prototype.toJSON = function toJSON() { + Compliance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Label + * Gets the default type url for Compliance * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Label + * @memberof google.cloud.securitycenter.v2.Compliance * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Compliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Label"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Compliance"; }; - return Label; + return Compliance; })(); - v2.Database = (function() { + v2.Connection = (function() { /** - * Properties of a Database. + * Properties of a Connection. * @memberof google.cloud.securitycenter.v2 - * @interface IDatabase - * @property {string|null} [name] Database name - * @property {string|null} [displayName] Database displayName - * @property {string|null} [userName] Database userName - * @property {string|null} [query] Database query - * @property {Array.|null} [grantees] Database grantees - * @property {string|null} [version] Database version + * @interface IConnection + * @property {string|null} [destinationIp] Connection destinationIp + * @property {number|null} [destinationPort] Connection destinationPort + * @property {string|null} [sourceIp] Connection sourceIp + * @property {number|null} [sourcePort] Connection sourcePort + * @property {google.cloud.securitycenter.v2.Connection.Protocol|null} [protocol] Connection protocol */ /** - * Constructs a new Database. + * Constructs a new Connection. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Database. - * @implements IDatabase + * @classdesc Represents a Connection. + * @implements IConnection * @constructor - * @param {google.cloud.securitycenter.v2.IDatabase=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IConnection=} [properties] Properties to set */ - function Database(properties) { - this.grantees = []; + function Connection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -72896,148 +72880,131 @@ } /** - * Database name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Database - * @instance - */ - Database.prototype.name = ""; - - /** - * Database displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v2.Database + * Connection destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.securitycenter.v2.Connection * @instance */ - Database.prototype.displayName = ""; + Connection.prototype.destinationIp = ""; /** - * Database userName. - * @member {string} userName - * @memberof google.cloud.securitycenter.v2.Database + * Connection destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.securitycenter.v2.Connection * @instance */ - Database.prototype.userName = ""; + Connection.prototype.destinationPort = 0; /** - * Database query. - * @member {string} query - * @memberof google.cloud.securitycenter.v2.Database + * Connection sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.securitycenter.v2.Connection * @instance */ - Database.prototype.query = ""; + Connection.prototype.sourceIp = ""; /** - * Database grantees. - * @member {Array.} grantees - * @memberof google.cloud.securitycenter.v2.Database + * Connection sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.securitycenter.v2.Connection * @instance */ - Database.prototype.grantees = $util.emptyArray; + Connection.prototype.sourcePort = 0; /** - * Database version. - * @member {string} version - * @memberof google.cloud.securitycenter.v2.Database + * Connection protocol. + * @member {google.cloud.securitycenter.v2.Connection.Protocol} protocol + * @memberof google.cloud.securitycenter.v2.Connection * @instance */ - Database.prototype.version = ""; + Connection.prototype.protocol = 0; /** - * Creates a new Database instance using the specified properties. + * Creates a new Connection instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static - * @param {google.cloud.securitycenter.v2.IDatabase=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Database} Database instance + * @param {google.cloud.securitycenter.v2.IConnection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Connection} Connection instance */ - Database.create = function create(properties) { - return new Database(properties); + Connection.create = function create(properties) { + return new Connection(properties); }; /** - * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static - * @param {google.cloud.securitycenter.v2.IDatabase} message Database message or plain object to encode + * @param {google.cloud.securitycenter.v2.IConnection} message Connection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Database.encode = function encode(message, writer) { + Connection.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userName); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); - if (message.grantees != null && message.grantees.length) - for (var i = 0; i < message.grantees.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.grantees[i]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationIp); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationPort); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protocol); return writer; }; /** - * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Connection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static - * @param {google.cloud.securitycenter.v2.IDatabase} message Database message or plain object to encode + * @param {google.cloud.securitycenter.v2.IConnection} message Connection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Database.encodeDelimited = function encodeDelimited(message, writer) { + Connection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Database message from the specified reader or buffer. + * Decodes a Connection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Database} Database + * @returns {google.cloud.securitycenter.v2.Connection} Connection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Database.decode = function decode(reader, length) { + Connection.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.cloud.securitycenter.v2.Database(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Connection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.destinationIp = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.destinationPort = reader.int32(); break; } case 3: { - message.userName = reader.string(); + message.sourceIp = reader.string(); break; } case 4: { - message.query = reader.string(); + message.sourcePort = reader.int32(); break; } case 5: { - if (!(message.grantees && message.grantees.length)) - message.grantees = []; - message.grantees.push(reader.string()); - break; - } - case 6: { - message.version = reader.string(); + message.protocol = reader.int32(); break; } default: @@ -73049,180 +73016,217 @@ }; /** - * Decodes a Database message from the specified reader or buffer, length delimited. + * Decodes a Connection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Database} Database + * @returns {google.cloud.securitycenter.v2.Connection} Connection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Database.decodeDelimited = function decodeDelimited(reader) { + Connection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Database message. + * Verifies a Connection message. * @function verify - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Database.verify = function verify(message) { + Connection.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.userName != null && message.hasOwnProperty("userName")) - if (!$util.isString(message.userName)) - return "userName: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.grantees != null && message.hasOwnProperty("grantees")) { - if (!Array.isArray(message.grantees)) - return "grantees: array expected"; - for (var i = 0; i < message.grantees.length; ++i) - if (!$util.isString(message.grantees[i])) - return "grantees: string[] expected"; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + switch (message.protocol) { + default: + return "protocol: enum value expected"; + case 0: + case 1: + case 6: + case 17: + case 47: + case 50: + break; + } return null; }; /** - * Creates a Database message from a plain object. Also converts values to their respective internal types. + * Creates a Connection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Database} Database + * @returns {google.cloud.securitycenter.v2.Connection} Connection */ - Database.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Database) + Connection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Connection) return object; - var message = new $root.google.cloud.securitycenter.v2.Database(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.userName != null) - message.userName = String(object.userName); - if (object.query != null) - message.query = String(object.query); - if (object.grantees) { - if (!Array.isArray(object.grantees)) - throw TypeError(".google.cloud.securitycenter.v2.Database.grantees: array expected"); - message.grantees = []; - for (var i = 0; i < object.grantees.length; ++i) - message.grantees[i] = String(object.grantees[i]); + var message = new $root.google.cloud.securitycenter.v2.Connection(); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + switch (object.protocol) { + default: + if (typeof object.protocol === "number") { + message.protocol = object.protocol; + break; + } + break; + case "PROTOCOL_UNSPECIFIED": + case 0: + message.protocol = 0; + break; + case "ICMP": + case 1: + message.protocol = 1; + break; + case "TCP": + case 6: + message.protocol = 6; + break; + case "UDP": + case 17: + message.protocol = 17; + break; + case "GRE": + case 47: + message.protocol = 47; + break; + case "ESP": + case 50: + message.protocol = 50; + break; } - if (object.version != null) - message.version = String(object.version); return message; }; /** - * Creates a plain object from a Database message. Also converts values to other types if specified. + * Creates a plain object from a Connection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static - * @param {google.cloud.securitycenter.v2.Database} message Database + * @param {google.cloud.securitycenter.v2.Connection} message Connection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Database.toObject = function toObject(message, options) { + Connection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.grantees = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.userName = ""; - object.query = ""; - object.version = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.userName != null && message.hasOwnProperty("userName")) - object.userName = message.userName; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.grantees && message.grantees.length) { - object.grantees = []; - for (var j = 0; j < message.grantees.length; ++j) - object.grantees[j] = message.grantees[j]; + object.destinationIp = ""; + object.destinationPort = 0; + object.sourceIp = ""; + object.sourcePort = 0; + object.protocol = options.enums === String ? "PROTOCOL_UNSPECIFIED" : 0; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = options.enums === String ? $root.google.cloud.securitycenter.v2.Connection.Protocol[message.protocol] === undefined ? message.protocol : $root.google.cloud.securitycenter.v2.Connection.Protocol[message.protocol] : message.protocol; return object; }; /** - * Converts this Database to JSON. + * Converts this Connection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @instance * @returns {Object.} JSON object */ - Database.prototype.toJSON = function toJSON() { + Connection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Database + * Gets the default type url for Connection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Database + * @memberof google.cloud.securitycenter.v2.Connection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Database"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Connection"; }; - return Database; + /** + * Protocol enum. + * @name google.cloud.securitycenter.v2.Connection.Protocol + * @enum {number} + * @property {number} PROTOCOL_UNSPECIFIED=0 PROTOCOL_UNSPECIFIED value + * @property {number} ICMP=1 ICMP value + * @property {number} TCP=6 TCP value + * @property {number} UDP=17 UDP value + * @property {number} GRE=47 GRE value + * @property {number} ESP=50 ESP value + */ + Connection.Protocol = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROTOCOL_UNSPECIFIED"] = 0; + values[valuesById[1] = "ICMP"] = 1; + values[valuesById[6] = "TCP"] = 6; + values[valuesById[17] = "UDP"] = 17; + values[valuesById[47] = "GRE"] = 47; + values[valuesById[50] = "ESP"] = 50; + return values; + })(); + + return Connection; })(); - v2.Exfiltration = (function() { + v2.ContactDetails = (function() { /** - * Properties of an Exfiltration. + * Properties of a ContactDetails. * @memberof google.cloud.securitycenter.v2 - * @interface IExfiltration - * @property {Array.|null} [sources] Exfiltration sources - * @property {Array.|null} [targets] Exfiltration targets - * @property {number|Long|null} [totalExfiltratedBytes] Exfiltration totalExfiltratedBytes + * @interface IContactDetails + * @property {Array.|null} [contacts] ContactDetails contacts */ /** - * Constructs a new Exfiltration. + * Constructs a new ContactDetails. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an Exfiltration. - * @implements IExfiltration + * @classdesc Represents a ContactDetails. + * @implements IContactDetails * @constructor - * @param {google.cloud.securitycenter.v2.IExfiltration=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IContactDetails=} [properties] Properties to set */ - function Exfiltration(properties) { - this.sources = []; - this.targets = []; + function ContactDetails(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73230,109 +73234,78 @@ } /** - * Exfiltration sources. - * @member {Array.} sources - * @memberof google.cloud.securitycenter.v2.Exfiltration - * @instance - */ - Exfiltration.prototype.sources = $util.emptyArray; - - /** - * Exfiltration targets. - * @member {Array.} targets - * @memberof google.cloud.securitycenter.v2.Exfiltration - * @instance - */ - Exfiltration.prototype.targets = $util.emptyArray; - - /** - * Exfiltration totalExfiltratedBytes. - * @member {number|Long} totalExfiltratedBytes - * @memberof google.cloud.securitycenter.v2.Exfiltration + * ContactDetails contacts. + * @member {Array.} contacts + * @memberof google.cloud.securitycenter.v2.ContactDetails * @instance */ - Exfiltration.prototype.totalExfiltratedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ContactDetails.prototype.contacts = $util.emptyArray; /** - * Creates a new Exfiltration instance using the specified properties. + * Creates a new ContactDetails instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static - * @param {google.cloud.securitycenter.v2.IExfiltration=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration instance + * @param {google.cloud.securitycenter.v2.IContactDetails=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails instance */ - Exfiltration.create = function create(properties) { - return new Exfiltration(properties); + ContactDetails.create = function create(properties) { + return new ContactDetails(properties); }; /** - * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static - * @param {google.cloud.securitycenter.v2.IExfiltration} message Exfiltration message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContactDetails} message ContactDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exfiltration.encode = function encode(message, writer) { + ContactDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.securitycenter.v2.ExfilResource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - $root.google.cloud.securitycenter.v2.ExfilResource.encode(message.targets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.totalExfiltratedBytes != null && Object.hasOwnProperty.call(message, "totalExfiltratedBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalExfiltratedBytes); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.google.cloud.securitycenter.v2.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ContactDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static - * @param {google.cloud.securitycenter.v2.IExfiltration} message Exfiltration message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContactDetails} message ContactDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exfiltration.encodeDelimited = function encodeDelimited(message, writer) { + ContactDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Exfiltration message from the specified reader or buffer. + * Decodes a ContactDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exfiltration.decode = function decode(reader, length) { + ContactDetails.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.cloud.securitycenter.v2.Exfiltration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.ContactDetails(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.securitycenter.v2.ExfilResource.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.cloud.securitycenter.v2.ExfilResource.decode(reader, reader.uint32())); - break; - } - case 3: { - message.totalExfiltratedBytes = reader.int64(); + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.google.cloud.securitycenter.v2.Contact.decode(reader, reader.uint32())); break; } default: @@ -73344,190 +73317,139 @@ }; /** - * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * Decodes a ContactDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exfiltration.decodeDelimited = function decodeDelimited(reader) { + ContactDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Exfiltration message. + * Verifies a ContactDetails message. * @function verify - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Exfiltration.verify = function verify(message) { + ContactDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.ExfilResource.verify(message.sources[i]); - if (error) - return "sources." + 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.cloud.securitycenter.v2.ExfilResource.verify(message.targets[i]); + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Contact.verify(message.contacts[i]); if (error) - return "targets." + error; + return "contacts." + error; } } - if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) - if (!$util.isInteger(message.totalExfiltratedBytes) && !(message.totalExfiltratedBytes && $util.isInteger(message.totalExfiltratedBytes.low) && $util.isInteger(message.totalExfiltratedBytes.high))) - return "totalExfiltratedBytes: integer|Long expected"; return null; }; /** - * Creates an Exfiltration message from a plain object. Also converts values to their respective internal types. + * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v2.ContactDetails} ContactDetails */ - Exfiltration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Exfiltration) + ContactDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ContactDetails) return object; - var message = new $root.google.cloud.securitycenter.v2.Exfiltration(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.sources: object expected"); - message.sources[i] = $root.google.cloud.securitycenter.v2.ExfilResource.fromObject(object.sources[i]); - } - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) { - if (typeof object.targets[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.targets: object expected"); - message.targets[i] = $root.google.cloud.securitycenter.v2.ExfilResource.fromObject(object.targets[i]); + var message = new $root.google.cloud.securitycenter.v2.ContactDetails(); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".google.cloud.securitycenter.v2.ContactDetails.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ContactDetails.contacts: object expected"); + message.contacts[i] = $root.google.cloud.securitycenter.v2.Contact.fromObject(object.contacts[i]); } } - if (object.totalExfiltratedBytes != null) - if ($util.Long) - (message.totalExfiltratedBytes = $util.Long.fromValue(object.totalExfiltratedBytes)).unsigned = false; - else if (typeof object.totalExfiltratedBytes === "string") - message.totalExfiltratedBytes = parseInt(object.totalExfiltratedBytes, 10); - else if (typeof object.totalExfiltratedBytes === "number") - message.totalExfiltratedBytes = object.totalExfiltratedBytes; - else if (typeof object.totalExfiltratedBytes === "object") - message.totalExfiltratedBytes = new $util.LongBits(object.totalExfiltratedBytes.low >>> 0, object.totalExfiltratedBytes.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. + * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static - * @param {google.cloud.securitycenter.v2.Exfiltration} message Exfiltration + * @param {google.cloud.securitycenter.v2.ContactDetails} message ContactDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Exfiltration.toObject = function toObject(message, options) { + ContactDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sources = []; - object.targets = []; - } - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalExfiltratedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalExfiltratedBytes = options.longs === String ? "0" : 0; - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.securitycenter.v2.ExfilResource.toObject(message.sources[j], options); - } - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = $root.google.cloud.securitycenter.v2.ExfilResource.toObject(message.targets[j], options); + if (options.arrays || options.defaults) + object.contacts = []; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.google.cloud.securitycenter.v2.Contact.toObject(message.contacts[j], options); } - if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) - if (typeof message.totalExfiltratedBytes === "number") - object.totalExfiltratedBytes = options.longs === String ? String(message.totalExfiltratedBytes) : message.totalExfiltratedBytes; - else - object.totalExfiltratedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalExfiltratedBytes) : options.longs === Number ? new $util.LongBits(message.totalExfiltratedBytes.low >>> 0, message.totalExfiltratedBytes.high >>> 0).toNumber() : message.totalExfiltratedBytes; return object; }; /** - * Converts this Exfiltration to JSON. + * Converts this ContactDetails to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @instance * @returns {Object.} JSON object */ - Exfiltration.prototype.toJSON = function toJSON() { + ContactDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Exfiltration + * Gets the default type url for ContactDetails * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Exfiltration + * @memberof google.cloud.securitycenter.v2.ContactDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Exfiltration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContactDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Exfiltration"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ContactDetails"; }; - return Exfiltration; + return ContactDetails; })(); - v2.ExfilResource = (function() { + v2.Contact = (function() { /** - * Properties of an ExfilResource. + * Properties of a Contact. * @memberof google.cloud.securitycenter.v2 - * @interface IExfilResource - * @property {string|null} [name] ExfilResource name - * @property {Array.|null} [components] ExfilResource components + * @interface IContact + * @property {string|null} [email] Contact email */ /** - * Constructs a new ExfilResource. + * Constructs a new Contact. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an ExfilResource. - * @implements IExfilResource + * @classdesc Represents a Contact. + * @implements IContact * @constructor - * @param {google.cloud.securitycenter.v2.IExfilResource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IContact=} [properties] Properties to set */ - function ExfilResource(properties) { - this.components = []; + function Contact(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73535,92 +73457,75 @@ } /** - * ExfilResource name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.ExfilResource - * @instance - */ - ExfilResource.prototype.name = ""; - - /** - * ExfilResource components. - * @member {Array.} components - * @memberof google.cloud.securitycenter.v2.ExfilResource + * Contact email. + * @member {string} email + * @memberof google.cloud.securitycenter.v2.Contact * @instance */ - ExfilResource.prototype.components = $util.emptyArray; + Contact.prototype.email = ""; /** - * Creates a new ExfilResource instance using the specified properties. + * Creates a new Contact instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static - * @param {google.cloud.securitycenter.v2.IExfilResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource instance + * @param {google.cloud.securitycenter.v2.IContact=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Contact} Contact instance */ - ExfilResource.create = function create(properties) { - return new ExfilResource(properties); + Contact.create = function create(properties) { + return new Contact(properties); }; /** - * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static - * @param {google.cloud.securitycenter.v2.IExfilResource} message ExfilResource message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContact} message Contact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExfilResource.encode = function encode(message, writer) { + Contact.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.components != null && message.components.length) - for (var i = 0; i < message.components.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.components[i]); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); return writer; }; /** - * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Contact.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static - * @param {google.cloud.securitycenter.v2.IExfilResource} message ExfilResource message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContact} message Contact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExfilResource.encodeDelimited = function encodeDelimited(message, writer) { + Contact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExfilResource message from the specified reader or buffer. + * Decodes a Contact message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v2.Contact} Contact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExfilResource.decode = function decode(reader, length) { + Contact.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.cloud.securitycenter.v2.ExfilResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Contact(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.components && message.components.length)) - message.components = []; - message.components.push(reader.string()); + message.email = reader.string(); break; } default: @@ -73632,154 +73537,127 @@ }; /** - * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * Decodes a Contact message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v2.Contact} Contact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExfilResource.decodeDelimited = function decodeDelimited(reader) { + Contact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExfilResource message. + * Verifies a Contact message. * @function verify - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExfilResource.verify = function verify(message) { + Contact.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.components != null && message.hasOwnProperty("components")) { - if (!Array.isArray(message.components)) - return "components: array expected"; - for (var i = 0; i < message.components.length; ++i) - if (!$util.isString(message.components[i])) - return "components: string[] expected"; - } + if (message.email != null && message.hasOwnProperty("email")) + if (!$util.isString(message.email)) + return "email: string expected"; return null; }; /** - * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * Creates a Contact message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v2.Contact} Contact */ - ExfilResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.ExfilResource) + Contact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Contact) return object; - var message = new $root.google.cloud.securitycenter.v2.ExfilResource(); - if (object.name != null) - message.name = String(object.name); - if (object.components) { - if (!Array.isArray(object.components)) - throw TypeError(".google.cloud.securitycenter.v2.ExfilResource.components: array expected"); - message.components = []; - for (var i = 0; i < object.components.length; ++i) - message.components[i] = String(object.components[i]); - } + var message = new $root.google.cloud.securitycenter.v2.Contact(); + if (object.email != null) + message.email = String(object.email); return message; }; /** - * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * Creates a plain object from a Contact message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static - * @param {google.cloud.securitycenter.v2.ExfilResource} message ExfilResource + * @param {google.cloud.securitycenter.v2.Contact} message Contact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExfilResource.toObject = function toObject(message, options) { + Contact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.components = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.components && message.components.length) { - object.components = []; - for (var j = 0; j < message.components.length; ++j) - object.components[j] = message.components[j]; - } + object.email = ""; + if (message.email != null && message.hasOwnProperty("email")) + object.email = message.email; return object; }; /** - * Converts this ExfilResource to JSON. + * Converts this Contact to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @instance * @returns {Object.} JSON object */ - ExfilResource.prototype.toJSON = function toJSON() { + Contact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExfilResource + * Gets the default type url for Contact * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.ExfilResource + * @memberof google.cloud.securitycenter.v2.Contact * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExfilResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExfilResource"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Contact"; }; - return ExfilResource; + return Contact; })(); - v2.ExternalSystem = (function() { + v2.Container = (function() { /** - * Properties of an ExternalSystem. + * Properties of a Container. * @memberof google.cloud.securitycenter.v2 - * @interface IExternalSystem - * @property {string|null} [name] ExternalSystem name - * @property {Array.|null} [assignees] ExternalSystem assignees - * @property {string|null} [externalUid] ExternalSystem externalUid - * @property {string|null} [status] ExternalSystem status - * @property {google.protobuf.ITimestamp|null} [externalSystemUpdateTime] ExternalSystem externalSystemUpdateTime - * @property {string|null} [caseUri] ExternalSystem caseUri - * @property {string|null} [casePriority] ExternalSystem casePriority - * @property {google.protobuf.ITimestamp|null} [caseSla] ExternalSystem caseSla - * @property {google.protobuf.ITimestamp|null} [caseCreateTime] ExternalSystem caseCreateTime - * @property {google.protobuf.ITimestamp|null} [caseCloseTime] ExternalSystem caseCloseTime - * @property {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null} [ticketInfo] ExternalSystem ticketInfo + * @interface IContainer + * @property {string|null} [name] Container name + * @property {string|null} [uri] Container uri + * @property {string|null} [imageId] Container imageId + * @property {Array.|null} [labels] Container labels + * @property {google.protobuf.ITimestamp|null} [createTime] Container createTime */ /** - * Constructs a new ExternalSystem. + * Constructs a new Container. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an ExternalSystem. - * @implements IExternalSystem + * @classdesc Represents a Container. + * @implements IContainer * @constructor - * @param {google.cloud.securitycenter.v2.IExternalSystem=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IContainer=} [properties] Properties to set */ - function ExternalSystem(properties) { - this.assignees = []; + function Container(properties) { + this.labels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -73787,171 +73665,111 @@ } /** - * ExternalSystem name. + * Container name. * @member {string} name - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.name = ""; - - /** - * ExternalSystem assignees. - * @member {Array.} assignees - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.assignees = $util.emptyArray; - - /** - * ExternalSystem externalUid. - * @member {string} externalUid - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.externalUid = ""; - - /** - * ExternalSystem status. - * @member {string} status - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.status = ""; - - /** - * ExternalSystem externalSystemUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} externalSystemUpdateTime - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.externalSystemUpdateTime = null; - - /** - * ExternalSystem caseUri. - * @member {string} caseUri - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @instance - */ - ExternalSystem.prototype.caseUri = ""; - - /** - * ExternalSystem casePriority. - * @member {string} casePriority - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @instance */ - ExternalSystem.prototype.casePriority = ""; + Container.prototype.name = ""; /** - * ExternalSystem caseSla. - * @member {google.protobuf.ITimestamp|null|undefined} caseSla - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * Container uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v2.Container * @instance */ - ExternalSystem.prototype.caseSla = null; + Container.prototype.uri = ""; /** - * ExternalSystem caseCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} caseCreateTime - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * Container imageId. + * @member {string} imageId + * @memberof google.cloud.securitycenter.v2.Container * @instance */ - ExternalSystem.prototype.caseCreateTime = null; + Container.prototype.imageId = ""; /** - * ExternalSystem caseCloseTime. - * @member {google.protobuf.ITimestamp|null|undefined} caseCloseTime - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * Container labels. + * @member {Array.} labels + * @memberof google.cloud.securitycenter.v2.Container * @instance */ - ExternalSystem.prototype.caseCloseTime = null; + Container.prototype.labels = $util.emptyArray; /** - * ExternalSystem ticketInfo. - * @member {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null|undefined} ticketInfo - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * Container createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v2.Container * @instance */ - ExternalSystem.prototype.ticketInfo = null; + Container.prototype.createTime = null; /** - * Creates a new ExternalSystem instance using the specified properties. + * Creates a new Container instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static - * @param {google.cloud.securitycenter.v2.IExternalSystem=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem instance + * @param {google.cloud.securitycenter.v2.IContainer=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Container} Container instance */ - ExternalSystem.create = function create(properties) { - return new ExternalSystem(properties); + Container.create = function create(properties) { + return new Container(properties); }; /** - * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. + * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static - * @param {google.cloud.securitycenter.v2.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContainer} message Container message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalSystem.encode = function encode(message, writer) { + Container.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.assignees != null && message.assignees.length) - for (var i = 0; i < message.assignees.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignees[i]); - if (message.externalUid != null && Object.hasOwnProperty.call(message, "externalUid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalUid); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.status); - if (message.externalSystemUpdateTime != null && Object.hasOwnProperty.call(message, "externalSystemUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.externalSystemUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.caseUri != null && Object.hasOwnProperty.call(message, "caseUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.caseUri); - if (message.casePriority != null && Object.hasOwnProperty.call(message, "casePriority")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.casePriority); - if (message.ticketInfo != null && Object.hasOwnProperty.call(message, "ticketInfo")) - $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.encode(message.ticketInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.caseSla != null && Object.hasOwnProperty.call(message, "caseSla")) - $root.google.protobuf.Timestamp.encode(message.caseSla, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.caseCreateTime != null && Object.hasOwnProperty.call(message, "caseCreateTime")) - $root.google.protobuf.Timestamp.encode(message.caseCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.caseCloseTime != null && Object.hasOwnProperty.call(message, "caseCloseTime")) - $root.google.protobuf.Timestamp.encode(message.caseCloseTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.imageId != null && Object.hasOwnProperty.call(message, "imageId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageId); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.cloud.securitycenter.v2.Label.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Container.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static - * @param {google.cloud.securitycenter.v2.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {google.cloud.securitycenter.v2.IContainer} message Container message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalSystem.encodeDelimited = function encodeDelimited(message, writer) { + Container.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExternalSystem message from the specified reader or buffer. + * Decodes a Container message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v2.Container} Container * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalSystem.decode = function decode(reader, length) { + Container.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.ExternalSystem(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Container(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -73960,45 +73778,21 @@ break; } case 2: { - if (!(message.assignees && message.assignees.length)) - message.assignees = []; - message.assignees.push(reader.string()); + message.uri = reader.string(); break; } case 3: { - message.externalUid = reader.string(); + message.imageId = reader.string(); break; } case 4: { - message.status = reader.string(); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.cloud.securitycenter.v2.Label.decode(reader, reader.uint32())); break; } case 5: { - message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.caseUri = reader.string(); - break; - } - case 7: { - message.casePriority = reader.string(); - break; - } - case 9: { - message.caseSla = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.caseCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.caseCloseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -74010,571 +73804,179 @@ }; /** - * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * Decodes a Container message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v2.Container} Container * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalSystem.decodeDelimited = function decodeDelimited(reader) { + Container.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExternalSystem message. + * Verifies a Container message. * @function verify - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExternalSystem.verify = function verify(message) { + Container.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.assignees != null && message.hasOwnProperty("assignees")) { - if (!Array.isArray(message.assignees)) - return "assignees: array expected"; - for (var i = 0; i < message.assignees.length; ++i) - if (!$util.isString(message.assignees[i])) - return "assignees: string[] expected"; - } - if (message.externalUid != null && message.hasOwnProperty("externalUid")) - if (!$util.isString(message.externalUid)) - return "externalUid: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.externalSystemUpdateTime); - if (error) - return "externalSystemUpdateTime." + error; - } - if (message.caseUri != null && message.hasOwnProperty("caseUri")) - if (!$util.isString(message.caseUri)) - return "caseUri: string expected"; - if (message.casePriority != null && message.hasOwnProperty("casePriority")) - if (!$util.isString(message.casePriority)) - return "casePriority: string expected"; - if (message.caseSla != null && message.hasOwnProperty("caseSla")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseSla); - if (error) - return "caseSla." + error; - } - if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseCreateTime); - if (error) - return "caseCreateTime." + error; - } - if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseCloseTime); - if (error) - return "caseCloseTime." + error; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.imageId != null && message.hasOwnProperty("imageId")) + if (!$util.isString(message.imageId)) + return "imageId: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Label.verify(message.labels[i]); + if (error) + return "labels." + error; + } } - if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) { - var error = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify(message.ticketInfo); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "ticketInfo." + error; + return "createTime." + error; } return null; }; /** - * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * Creates a Container message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v2.Container} Container */ - ExternalSystem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.ExternalSystem) + Container.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Container) return object; - var message = new $root.google.cloud.securitycenter.v2.ExternalSystem(); + var message = new $root.google.cloud.securitycenter.v2.Container(); if (object.name != null) message.name = String(object.name); - if (object.assignees) { - if (!Array.isArray(object.assignees)) - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.assignees: array expected"); - message.assignees = []; - for (var i = 0; i < object.assignees.length; ++i) - message.assignees[i] = String(object.assignees[i]); - } - if (object.externalUid != null) - message.externalUid = String(object.externalUid); - if (object.status != null) - message.status = String(object.status); - if (object.externalSystemUpdateTime != null) { - if (typeof object.externalSystemUpdateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.externalSystemUpdateTime: object expected"); - message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.externalSystemUpdateTime); - } - if (object.caseUri != null) - message.caseUri = String(object.caseUri); - if (object.casePriority != null) - message.casePriority = String(object.casePriority); - if (object.caseSla != null) { - if (typeof object.caseSla !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseSla: object expected"); - message.caseSla = $root.google.protobuf.Timestamp.fromObject(object.caseSla); - } - if (object.caseCreateTime != null) { - if (typeof object.caseCreateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseCreateTime: object expected"); - message.caseCreateTime = $root.google.protobuf.Timestamp.fromObject(object.caseCreateTime); - } - if (object.caseCloseTime != null) { - if (typeof object.caseCloseTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseCloseTime: object expected"); - message.caseCloseTime = $root.google.protobuf.Timestamp.fromObject(object.caseCloseTime); + if (object.uri != null) + message.uri = String(object.uri); + if (object.imageId != null) + message.imageId = String(object.imageId); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.securitycenter.v2.Container.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Container.labels: object expected"); + message.labels[i] = $root.google.cloud.securitycenter.v2.Label.fromObject(object.labels[i]); + } } - if (object.ticketInfo != null) { - if (typeof object.ticketInfo !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.ticketInfo: object expected"); - message.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.fromObject(object.ticketInfo); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Container.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * Creates a plain object from a Container message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static - * @param {google.cloud.securitycenter.v2.ExternalSystem} message ExternalSystem + * @param {google.cloud.securitycenter.v2.Container} message Container * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExternalSystem.toObject = function toObject(message, options) { + Container.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.assignees = []; + object.labels = []; if (options.defaults) { object.name = ""; - object.externalUid = ""; - object.status = ""; - object.externalSystemUpdateTime = null; - object.caseUri = ""; - object.casePriority = ""; - object.ticketInfo = null; - object.caseSla = null; - object.caseCreateTime = null; - object.caseCloseTime = null; + object.uri = ""; + object.imageId = ""; + object.createTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.assignees && message.assignees.length) { - object.assignees = []; - for (var j = 0; j < message.assignees.length; ++j) - object.assignees[j] = message.assignees[j]; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.imageId != null && message.hasOwnProperty("imageId")) + object.imageId = message.imageId; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.cloud.securitycenter.v2.Label.toObject(message.labels[j], options); } - if (message.externalUid != null && message.hasOwnProperty("externalUid")) - object.externalUid = message.externalUid; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) - object.externalSystemUpdateTime = $root.google.protobuf.Timestamp.toObject(message.externalSystemUpdateTime, options); - if (message.caseUri != null && message.hasOwnProperty("caseUri")) - object.caseUri = message.caseUri; - if (message.casePriority != null && message.hasOwnProperty("casePriority")) - object.casePriority = message.casePriority; - if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) - object.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.toObject(message.ticketInfo, options); - if (message.caseSla != null && message.hasOwnProperty("caseSla")) - object.caseSla = $root.google.protobuf.Timestamp.toObject(message.caseSla, options); - if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) - object.caseCreateTime = $root.google.protobuf.Timestamp.toObject(message.caseCreateTime, options); - if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) - object.caseCloseTime = $root.google.protobuf.Timestamp.toObject(message.caseCloseTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this ExternalSystem to JSON. + * Converts this Container to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @instance * @returns {Object.} JSON object */ - ExternalSystem.prototype.toJSON = function toJSON() { + Container.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExternalSystem + * Gets the default type url for Container * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @memberof google.cloud.securitycenter.v2.Container * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExternalSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Container.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExternalSystem"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Container"; }; - ExternalSystem.TicketInfo = (function() { + return Container; + })(); - /** - * Properties of a TicketInfo. - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @interface ITicketInfo - * @property {string|null} [id] TicketInfo id - * @property {string|null} [assignee] TicketInfo assignee - * @property {string|null} [description] TicketInfo description - * @property {string|null} [uri] TicketInfo uri - * @property {string|null} [status] TicketInfo status - * @property {google.protobuf.ITimestamp|null} [updateTime] TicketInfo updateTime - */ - - /** - * Constructs a new TicketInfo. - * @memberof google.cloud.securitycenter.v2.ExternalSystem - * @classdesc Represents a TicketInfo. - * @implements ITicketInfo - * @constructor - * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo=} [properties] Properties to set - */ - function TicketInfo(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]]; - } - - /** - * TicketInfo id. - * @member {string} id - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.id = ""; - - /** - * TicketInfo assignee. - * @member {string} assignee - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.assignee = ""; - - /** - * TicketInfo description. - * @member {string} description - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.description = ""; - - /** - * TicketInfo uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.uri = ""; - - /** - * TicketInfo status. - * @member {string} status - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.status = ""; - - /** - * TicketInfo updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.updateTime = null; - - /** - * Creates a new TicketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo instance - */ - TicketInfo.create = function create(properties) { - return new TicketInfo(properties); - }; - - /** - * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TicketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.assignee != null && Object.hasOwnProperty.call(message, "assignee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignee); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.status); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TicketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TicketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TicketInfo.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.cloud.securitycenter.v2.ExternalSystem.TicketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.assignee = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.uri = reader.string(); - break; - } - case 5: { - message.status = reader.string(); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TicketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TicketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TicketInfo message. - * @function verify - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TicketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.assignee != null && message.hasOwnProperty("assignee")) - if (!$util.isString(message.assignee)) - return "assignee: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a TicketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo - */ - TicketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) - return object; - var message = new $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.assignee != null) - message.assignee = String(object.assignee); - if (object.description != null) - message.description = String(object.description); - if (object.uri != null) - message.uri = String(object.uri); - if (object.status != null) - message.status = String(object.status); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} message TicketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TicketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.assignee = ""; - object.description = ""; - object.uri = ""; - object.status = ""; - object.updateTime = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.assignee != null && message.hasOwnProperty("assignee")) - object.assignee = message.assignee; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this TicketInfo to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @instance - * @returns {Object.} JSON object - */ - TicketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TicketInfo - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TicketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExternalSystem.TicketInfo"; - }; - - return TicketInfo; - })(); - - return ExternalSystem; - })(); - - v2.File = (function() { + v2.Label = (function() { /** - * Properties of a File. + * Properties of a Label. * @memberof google.cloud.securitycenter.v2 - * @interface IFile - * @property {string|null} [path] File path - * @property {number|Long|null} [size] File size - * @property {string|null} [sha256] File sha256 - * @property {number|Long|null} [hashedSize] File hashedSize - * @property {boolean|null} [partiallyHashed] File partiallyHashed - * @property {string|null} [contents] File contents - * @property {google.cloud.securitycenter.v2.File.IDiskPath|null} [diskPath] File diskPath + * @interface ILabel + * @property {string|null} [name] Label name + * @property {string|null} [value] Label value */ /** - * Constructs a new File. + * Constructs a new Label. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a File. - * @implements IFile + * @classdesc Represents a Label. + * @implements ILabel * @constructor - * @param {google.cloud.securitycenter.v2.IFile=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ILabel=} [properties] Properties to set */ - function File(properties) { + function Label(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74582,159 +73984,89 @@ } /** - * File path. - * @member {string} path - * @memberof google.cloud.securitycenter.v2.File - * @instance - */ - File.prototype.path = ""; - - /** - * File size. - * @member {number|Long} size - * @memberof google.cloud.securitycenter.v2.File - * @instance - */ - File.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * File sha256. - * @member {string} sha256 - * @memberof google.cloud.securitycenter.v2.File - * @instance - */ - File.prototype.sha256 = ""; - - /** - * File hashedSize. - * @member {number|Long} hashedSize - * @memberof google.cloud.securitycenter.v2.File - * @instance - */ - File.prototype.hashedSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * File partiallyHashed. - * @member {boolean} partiallyHashed - * @memberof google.cloud.securitycenter.v2.File - * @instance - */ - File.prototype.partiallyHashed = false; - - /** - * File contents. - * @member {string} contents - * @memberof google.cloud.securitycenter.v2.File + * Label name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Label * @instance */ - File.prototype.contents = ""; + Label.prototype.name = ""; /** - * File diskPath. - * @member {google.cloud.securitycenter.v2.File.IDiskPath|null|undefined} diskPath - * @memberof google.cloud.securitycenter.v2.File + * Label value. + * @member {string} value + * @memberof google.cloud.securitycenter.v2.Label * @instance */ - File.prototype.diskPath = null; + Label.prototype.value = ""; /** - * Creates a new File instance using the specified properties. + * Creates a new Label instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static - * @param {google.cloud.securitycenter.v2.IFile=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.File} File instance + * @param {google.cloud.securitycenter.v2.ILabel=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Label} Label instance */ - File.create = function create(properties) { - return new File(properties); + Label.create = function create(properties) { + return new Label(properties); }; /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. + * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static - * @param {google.cloud.securitycenter.v2.IFile} message File message or plain object to encode + * @param {google.cloud.securitycenter.v2.ILabel} message Label message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encode = function encode(message, writer) { + Label.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.size != null && Object.hasOwnProperty.call(message, "size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.size); - if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sha256); - if (message.hashedSize != null && Object.hasOwnProperty.call(message, "hashedSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.hashedSize); - if (message.partiallyHashed != null && Object.hasOwnProperty.call(message, "partiallyHashed")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partiallyHashed); - if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.contents); - if (message.diskPath != null && Object.hasOwnProperty.call(message, "diskPath")) - $root.google.cloud.securitycenter.v2.File.DiskPath.encode(message.diskPath, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); return writer; }; /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. + * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Label.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static - * @param {google.cloud.securitycenter.v2.IFile} message File message or plain object to encode + * @param {google.cloud.securitycenter.v2.ILabel} message Label message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encodeDelimited = function encodeDelimited(message, writer) { + Label.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a File message from the specified reader or buffer. + * Decodes a Label message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.File} File + * @returns {google.cloud.securitycenter.v2.Label} Label * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - File.decode = function decode(reader, length) { + Label.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.cloud.securitycenter.v2.File(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Label(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.path = reader.string(); + message.name = reader.string(); break; } case 2: { - message.size = reader.int64(); - break; - } - case 3: { - message.sha256 = reader.string(); - break; - } - case 4: { - message.hashedSize = reader.int64(); - break; - } - case 5: { - message.partiallyHashed = reader.bool(); - break; - } - case 6: { - message.contents = reader.string(); - break; - } - case 7: { - message.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.decode(reader, reader.uint32()); + message.value = reader.string(); break; } default: @@ -74746,490 +74078,137 @@ }; /** - * Decodes a File message from the specified reader or buffer, length delimited. + * Decodes a Label message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.File} File + * @returns {google.cloud.securitycenter.v2.Label} Label * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - File.decodeDelimited = function decodeDelimited(reader) { + Label.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a File message. + * Verifies a Label message. * @function verify - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - File.verify = function verify(message) { + Label.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.size != null && message.hasOwnProperty("size")) - if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high))) - return "size: integer|Long expected"; - if (message.sha256 != null && message.hasOwnProperty("sha256")) - if (!$util.isString(message.sha256)) - return "sha256: string expected"; - if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) - if (!$util.isInteger(message.hashedSize) && !(message.hashedSize && $util.isInteger(message.hashedSize.low) && $util.isInteger(message.hashedSize.high))) - return "hashedSize: integer|Long expected"; - if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) - if (typeof message.partiallyHashed !== "boolean") - return "partiallyHashed: boolean expected"; - if (message.contents != null && message.hasOwnProperty("contents")) - if (!$util.isString(message.contents)) - return "contents: string expected"; - if (message.diskPath != null && message.hasOwnProperty("diskPath")) { - var error = $root.google.cloud.securitycenter.v2.File.DiskPath.verify(message.diskPath); - if (error) - return "diskPath." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a File message from a plain object. Also converts values to their respective internal types. + * Creates a Label message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.File} File + * @returns {google.cloud.securitycenter.v2.Label} Label */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.File) + Label.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Label) return object; - var message = new $root.google.cloud.securitycenter.v2.File(); - if (object.path != null) - message.path = String(object.path); - if (object.size != null) - if ($util.Long) - (message.size = $util.Long.fromValue(object.size)).unsigned = false; - else if (typeof object.size === "string") - message.size = parseInt(object.size, 10); - else if (typeof object.size === "number") - message.size = object.size; - else if (typeof object.size === "object") - message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(); - if (object.sha256 != null) - message.sha256 = String(object.sha256); - if (object.hashedSize != null) - if ($util.Long) - (message.hashedSize = $util.Long.fromValue(object.hashedSize)).unsigned = false; - else if (typeof object.hashedSize === "string") - message.hashedSize = parseInt(object.hashedSize, 10); - else if (typeof object.hashedSize === "number") - message.hashedSize = object.hashedSize; - else if (typeof object.hashedSize === "object") - message.hashedSize = new $util.LongBits(object.hashedSize.low >>> 0, object.hashedSize.high >>> 0).toNumber(); - if (object.partiallyHashed != null) - message.partiallyHashed = Boolean(object.partiallyHashed); - if (object.contents != null) - message.contents = String(object.contents); - if (object.diskPath != null) { - if (typeof object.diskPath !== "object") - throw TypeError(".google.cloud.securitycenter.v2.File.diskPath: object expected"); - message.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.fromObject(object.diskPath); - } + var message = new $root.google.cloud.securitycenter.v2.Label(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a File message. Also converts values to other types if specified. + * Creates a plain object from a Label message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static - * @param {google.cloud.securitycenter.v2.File} message File + * @param {google.cloud.securitycenter.v2.Label} message Label * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - File.toObject = function toObject(message, options) { + Label.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.path = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.size = options.longs === String ? "0" : 0; - object.sha256 = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hashedSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hashedSize = options.longs === String ? "0" : 0; - object.partiallyHashed = false; - object.contents = ""; - object.diskPath = null; + object.name = ""; + object.value = ""; } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.size != null && message.hasOwnProperty("size")) - if (typeof message.size === "number") - object.size = options.longs === String ? String(message.size) : message.size; - else - object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber() : message.size; - if (message.sha256 != null && message.hasOwnProperty("sha256")) - object.sha256 = message.sha256; - if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) - if (typeof message.hashedSize === "number") - object.hashedSize = options.longs === String ? String(message.hashedSize) : message.hashedSize; - else - object.hashedSize = options.longs === String ? $util.Long.prototype.toString.call(message.hashedSize) : options.longs === Number ? new $util.LongBits(message.hashedSize.low >>> 0, message.hashedSize.high >>> 0).toNumber() : message.hashedSize; - if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) - object.partiallyHashed = message.partiallyHashed; - if (message.contents != null && message.hasOwnProperty("contents")) - object.contents = message.contents; - if (message.diskPath != null && message.hasOwnProperty("diskPath")) - object.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.toObject(message.diskPath, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this File to JSON. + * Converts this Label to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @instance * @returns {Object.} JSON object */ - File.prototype.toJSON = function toJSON() { + Label.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for File + * Gets the default type url for Label * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.File + * @memberof google.cloud.securitycenter.v2.Label * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.File"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Label"; }; - File.DiskPath = (function() { - - /** - * Properties of a DiskPath. - * @memberof google.cloud.securitycenter.v2.File - * @interface IDiskPath - * @property {string|null} [partitionUuid] DiskPath partitionUuid - * @property {string|null} [relativePath] DiskPath relativePath - */ - - /** - * Constructs a new DiskPath. - * @memberof google.cloud.securitycenter.v2.File - * @classdesc Represents a DiskPath. - * @implements IDiskPath - * @constructor - * @param {google.cloud.securitycenter.v2.File.IDiskPath=} [properties] Properties to set - */ - function DiskPath(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]]; - } - - /** - * DiskPath partitionUuid. - * @member {string} partitionUuid - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @instance - */ - DiskPath.prototype.partitionUuid = ""; - - /** - * DiskPath relativePath. - * @member {string} relativePath - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @instance - */ - DiskPath.prototype.relativePath = ""; - - /** - * Creates a new DiskPath instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v2.File.IDiskPath=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath instance - */ - DiskPath.create = function create(properties) { - return new DiskPath(properties); - }; - - /** - * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v2.File.IDiskPath} message DiskPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiskPath.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partitionUuid != null && Object.hasOwnProperty.call(message, "partitionUuid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partitionUuid); - if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePath); - return writer; - }; - - /** - * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v2.File.IDiskPath} message DiskPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiskPath.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiskPath message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiskPath.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.cloud.securitycenter.v2.File.DiskPath(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partitionUuid = reader.string(); - break; - } - case 2: { - message.relativePath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiskPath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiskPath.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiskPath message. - * @function verify - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiskPath.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) - if (!$util.isString(message.partitionUuid)) - return "partitionUuid: string expected"; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - if (!$util.isString(message.relativePath)) - return "relativePath: string expected"; - return null; - }; - - /** - * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath - */ - DiskPath.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.File.DiskPath) - return object; - var message = new $root.google.cloud.securitycenter.v2.File.DiskPath(); - if (object.partitionUuid != null) - message.partitionUuid = String(object.partitionUuid); - if (object.relativePath != null) - message.relativePath = String(object.relativePath); - return message; - }; - - /** - * Creates a plain object from a DiskPath message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v2.File.DiskPath} message DiskPath - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiskPath.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.partitionUuid = ""; - object.relativePath = ""; - } - if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) - object.partitionUuid = message.partitionUuid; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - object.relativePath = message.relativePath; - return object; - }; - - /** - * Converts this DiskPath to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @instance - * @returns {Object.} JSON object - */ - DiskPath.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiskPath - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.File.DiskPath - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiskPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.File.DiskPath"; - }; - - return DiskPath; - })(); - - return File; + return Label; })(); - v2.Finding = (function() { + v2.Database = (function() { /** - * Properties of a Finding. + * Properties of a Database. * @memberof google.cloud.securitycenter.v2 - * @interface IFinding - * @property {string|null} [name] Finding name - * @property {string|null} [canonicalName] Finding canonicalName - * @property {string|null} [parent] Finding parent - * @property {string|null} [resourceName] Finding resourceName - * @property {google.cloud.securitycenter.v2.Finding.State|null} [state] Finding state - * @property {string|null} [category] Finding category - * @property {string|null} [externalUri] Finding externalUri - * @property {Object.|null} [sourceProperties] Finding sourceProperties - * @property {google.cloud.securitycenter.v2.ISecurityMarks|null} [securityMarks] Finding securityMarks - * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime - * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime - * @property {google.cloud.securitycenter.v2.Finding.Severity|null} [severity] Finding severity - * @property {google.cloud.securitycenter.v2.Finding.Mute|null} [mute] Finding mute - * @property {google.cloud.securitycenter.v2.Finding.FindingClass|null} [findingClass] Finding findingClass - * @property {google.cloud.securitycenter.v2.IIndicator|null} [indicator] Finding indicator - * @property {google.cloud.securitycenter.v2.IVulnerability|null} [vulnerability] Finding vulnerability - * @property {google.protobuf.ITimestamp|null} [muteUpdateTime] Finding muteUpdateTime - * @property {Object.|null} [externalSystems] Finding externalSystems - * @property {google.cloud.securitycenter.v2.IMitreAttack|null} [mitreAttack] Finding mitreAttack - * @property {google.cloud.securitycenter.v2.IAccess|null} [access] Finding access - * @property {Array.|null} [connections] Finding connections - * @property {string|null} [muteInitiator] Finding muteInitiator - * @property {Array.|null} [processes] Finding processes - * @property {Object.|null} [contacts] Finding contacts - * @property {Array.|null} [compliances] Finding compliances - * @property {string|null} [parentDisplayName] Finding parentDisplayName - * @property {string|null} [description] Finding description - * @property {google.cloud.securitycenter.v2.IExfiltration|null} [exfiltration] Finding exfiltration - * @property {Array.|null} [iamBindings] Finding iamBindings - * @property {string|null} [nextSteps] Finding nextSteps - * @property {string|null} [moduleName] Finding moduleName - * @property {Array.|null} [containers] Finding containers - * @property {google.cloud.securitycenter.v2.IKubernetes|null} [kubernetes] Finding kubernetes - * @property {google.cloud.securitycenter.v2.IDatabase|null} [database] Finding database - * @property {google.cloud.securitycenter.v2.IAttackExposure|null} [attackExposure] Finding attackExposure - * @property {Array.|null} [files] Finding files - * @property {google.cloud.securitycenter.v2.ICloudDlpInspection|null} [cloudDlpInspection] Finding cloudDlpInspection - * @property {google.cloud.securitycenter.v2.ICloudDlpDataProfile|null} [cloudDlpDataProfile] Finding cloudDlpDataProfile - * @property {google.cloud.securitycenter.v2.IKernelRootkit|null} [kernelRootkit] Finding kernelRootkit - * @property {Array.|null} [orgPolicies] Finding orgPolicies - * @property {google.cloud.securitycenter.v2.IApplication|null} [application] Finding application - * @property {google.cloud.securitycenter.v2.IBackupDisasterRecovery|null} [backupDisasterRecovery] Finding backupDisasterRecovery - * @property {google.cloud.securitycenter.v2.ISecurityPosture|null} [securityPosture] Finding securityPosture - * @property {Array.|null} [logEntries] Finding logEntries - * @property {Array.|null} [loadBalancers] Finding loadBalancers - * @property {google.cloud.securitycenter.v2.IToxicCombination|null} [toxicCombination] Finding toxicCombination - * @property {Array.|null} [groupMemberships] Finding groupMemberships + * @interface IDatabase + * @property {string|null} [name] Database name + * @property {string|null} [displayName] Database displayName + * @property {string|null} [userName] Database userName + * @property {string|null} [query] Database query + * @property {Array.|null} [grantees] Database grantees + * @property {string|null} [version] Database version */ /** - * Constructs a new Finding. + * Constructs a new Database. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Finding. - * @implements IFinding + * @classdesc Represents a Database. + * @implements IDatabase * @constructor - * @param {google.cloud.securitycenter.v2.IFinding=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IDatabase=} [properties] Properties to set */ - function Finding(properties) { - this.sourceProperties = {}; - this.externalSystems = {}; - this.connections = []; - this.processes = []; - this.contacts = {}; - this.compliances = []; - this.iamBindings = []; - this.containers = []; - this.files = []; - this.orgPolicies = []; - this.logEntries = []; - this.loadBalancers = []; - this.groupMemberships = []; + function Database(properties) { + this.grantees = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -75237,549 +74216,1062 @@ } /** - * Finding name. + * Database name. * @member {string} name - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.name = ""; + Database.prototype.name = ""; /** - * Finding canonicalName. - * @member {string} canonicalName - * @memberof google.cloud.securitycenter.v2.Finding + * Database displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.canonicalName = ""; + Database.prototype.displayName = ""; /** - * Finding parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v2.Finding + * Database userName. + * @member {string} userName + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.parent = ""; + Database.prototype.userName = ""; /** - * Finding resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v2.Finding + * Database query. + * @member {string} query + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.resourceName = ""; + Database.prototype.query = ""; /** - * Finding state. - * @member {google.cloud.securitycenter.v2.Finding.State} state - * @memberof google.cloud.securitycenter.v2.Finding + * Database grantees. + * @member {Array.} grantees + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.state = 0; + Database.prototype.grantees = $util.emptyArray; /** - * Finding category. - * @member {string} category - * @memberof google.cloud.securitycenter.v2.Finding + * Database version. + * @member {string} version + * @memberof google.cloud.securitycenter.v2.Database * @instance */ - Finding.prototype.category = ""; + Database.prototype.version = ""; /** - * Finding externalUri. - * @member {string} externalUri - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates a new Database instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {google.cloud.securitycenter.v2.IDatabase=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Database} Database instance */ - Finding.prototype.externalUri = ""; + Database.create = function create(properties) { + return new Database(properties); + }; /** - * Finding sourceProperties. - * @member {Object.} sourceProperties - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {google.cloud.securitycenter.v2.IDatabase} message Database message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.sourceProperties = $util.emptyObject; + Database.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userName); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); + if (message.grantees != null && message.grantees.length) + for (var i = 0; i < message.grantees.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.grantees[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); + return writer; + }; /** - * Finding securityMarks. - * @member {google.cloud.securitycenter.v2.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Database.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {google.cloud.securitycenter.v2.IDatabase} message Database message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.securityMarks = null; + Database.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Finding eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Decodes a Database message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Database} Database + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.prototype.eventTime = null; + Database.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.cloud.securitycenter.v2.Database(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.userName = reader.string(); + break; + } + case 4: { + message.query = reader.string(); + break; + } + case 5: { + if (!(message.grantees && message.grantees.length)) + message.grantees = []; + message.grantees.push(reader.string()); + break; + } + case 6: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Finding createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Decodes a Database message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Database} Database + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.prototype.createTime = null; + Database.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Finding severity. - * @member {google.cloud.securitycenter.v2.Finding.Severity} severity - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Verifies a Database message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.prototype.severity = 0; + Database.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.userName != null && message.hasOwnProperty("userName")) + if (!$util.isString(message.userName)) + return "userName: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.grantees != null && message.hasOwnProperty("grantees")) { + if (!Array.isArray(message.grantees)) + return "grantees: array expected"; + for (var i = 0; i < message.grantees.length; ++i) + if (!$util.isString(message.grantees[i])) + return "grantees: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; /** - * Finding mute. - * @member {google.cloud.securitycenter.v2.Finding.Mute} mute - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates a Database message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Database} Database */ - Finding.prototype.mute = 0; + Database.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Database) + return object; + var message = new $root.google.cloud.securitycenter.v2.Database(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.userName != null) + message.userName = String(object.userName); + if (object.query != null) + message.query = String(object.query); + if (object.grantees) { + if (!Array.isArray(object.grantees)) + throw TypeError(".google.cloud.securitycenter.v2.Database.grantees: array expected"); + message.grantees = []; + for (var i = 0; i < object.grantees.length; ++i) + message.grantees[i] = String(object.grantees[i]); + } + if (object.version != null) + message.version = String(object.version); + return message; + }; /** - * Finding findingClass. - * @member {google.cloud.securitycenter.v2.Finding.FindingClass} findingClass - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates a plain object from a Database message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {google.cloud.securitycenter.v2.Database} message Database + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Finding.prototype.findingClass = 0; + Database.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.grantees = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.userName = ""; + object.query = ""; + object.version = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.userName != null && message.hasOwnProperty("userName")) + object.userName = message.userName; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.grantees && message.grantees.length) { + object.grantees = []; + for (var j = 0; j < message.grantees.length; ++j) + object.grantees[j] = message.grantees[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; /** - * Finding indicator. - * @member {google.cloud.securitycenter.v2.IIndicator|null|undefined} indicator - * @memberof google.cloud.securitycenter.v2.Finding + * Converts this Database to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Database * @instance + * @returns {Object.} JSON object */ - Finding.prototype.indicator = null; + Database.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Finding vulnerability. - * @member {google.cloud.securitycenter.v2.IVulnerability|null|undefined} vulnerability - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Gets the default type url for Database + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Database + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Finding.prototype.vulnerability = null; + Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Database"; + }; - /** - * Finding muteUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} muteUpdateTime - * @memberof google.cloud.securitycenter.v2.Finding - * @instance - */ - Finding.prototype.muteUpdateTime = null; + return Database; + })(); - /** - * Finding externalSystems. - * @member {Object.} externalSystems - * @memberof google.cloud.securitycenter.v2.Finding - * @instance - */ - Finding.prototype.externalSystems = $util.emptyObject; + v2.Exfiltration = (function() { /** - * Finding mitreAttack. - * @member {google.cloud.securitycenter.v2.IMitreAttack|null|undefined} mitreAttack - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Properties of an Exfiltration. + * @memberof google.cloud.securitycenter.v2 + * @interface IExfiltration + * @property {Array.|null} [sources] Exfiltration sources + * @property {Array.|null} [targets] Exfiltration targets + * @property {number|Long|null} [totalExfiltratedBytes] Exfiltration totalExfiltratedBytes */ - Finding.prototype.mitreAttack = null; /** - * Finding access. - * @member {google.cloud.securitycenter.v2.IAccess|null|undefined} access - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Constructs a new Exfiltration. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an Exfiltration. + * @implements IExfiltration + * @constructor + * @param {google.cloud.securitycenter.v2.IExfiltration=} [properties] Properties to set */ - Finding.prototype.access = null; + function Exfiltration(properties) { + this.sources = []; + this.targets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Finding connections. - * @member {Array.} connections - * @memberof google.cloud.securitycenter.v2.Finding + * Exfiltration sources. + * @member {Array.} sources + * @memberof google.cloud.securitycenter.v2.Exfiltration * @instance */ - Finding.prototype.connections = $util.emptyArray; + Exfiltration.prototype.sources = $util.emptyArray; /** - * Finding muteInitiator. - * @member {string} muteInitiator - * @memberof google.cloud.securitycenter.v2.Finding + * Exfiltration targets. + * @member {Array.} targets + * @memberof google.cloud.securitycenter.v2.Exfiltration * @instance */ - Finding.prototype.muteInitiator = ""; + Exfiltration.prototype.targets = $util.emptyArray; /** - * Finding processes. - * @member {Array.} processes - * @memberof google.cloud.securitycenter.v2.Finding + * Exfiltration totalExfiltratedBytes. + * @member {number|Long} totalExfiltratedBytes + * @memberof google.cloud.securitycenter.v2.Exfiltration * @instance */ - Finding.prototype.processes = $util.emptyArray; + Exfiltration.prototype.totalExfiltratedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Finding contacts. - * @member {Object.} contacts - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates a new Exfiltration instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {google.cloud.securitycenter.v2.IExfiltration=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration instance */ - Finding.prototype.contacts = $util.emptyObject; + Exfiltration.create = function create(properties) { + return new Exfiltration(properties); + }; /** - * Finding compliances. - * @member {Array.} compliances - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {google.cloud.securitycenter.v2.IExfiltration} message Exfiltration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.compliances = $util.emptyArray; + Exfiltration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.securitycenter.v2.ExfilResource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.securitycenter.v2.ExfilResource.encode(message.targets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalExfiltratedBytes != null && Object.hasOwnProperty.call(message, "totalExfiltratedBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalExfiltratedBytes); + return writer; + }; /** - * Finding parentDisplayName. - * @member {string} parentDisplayName - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Exfiltration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {google.cloud.securitycenter.v2.IExfiltration} message Exfiltration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Finding.prototype.parentDisplayName = ""; + Exfiltration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Finding description. - * @member {string} description - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Decodes an Exfiltration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.prototype.description = ""; + Exfiltration.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.cloud.securitycenter.v2.Exfiltration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.securitycenter.v2.ExfilResource.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.securitycenter.v2.ExfilResource.decode(reader, reader.uint32())); + break; + } + case 3: { + message.totalExfiltratedBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Finding exfiltration. - * @member {google.cloud.securitycenter.v2.IExfiltration|null|undefined} exfiltration - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.prototype.exfiltration = null; + Exfiltration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Finding iamBindings. - * @member {Array.} iamBindings - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Verifies an Exfiltration message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.prototype.iamBindings = $util.emptyArray; + Exfiltration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.ExfilResource.verify(message.sources[i]); + if (error) + return "sources." + 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.cloud.securitycenter.v2.ExfilResource.verify(message.targets[i]); + if (error) + return "targets." + error; + } + } + if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) + if (!$util.isInteger(message.totalExfiltratedBytes) && !(message.totalExfiltratedBytes && $util.isInteger(message.totalExfiltratedBytes.low) && $util.isInteger(message.totalExfiltratedBytes.high))) + return "totalExfiltratedBytes: integer|Long expected"; + return null; + }; /** - * Finding nextSteps. - * @member {string} nextSteps - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates an Exfiltration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Exfiltration} Exfiltration */ - Finding.prototype.nextSteps = ""; + Exfiltration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Exfiltration) + return object; + var message = new $root.google.cloud.securitycenter.v2.Exfiltration(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.sources: object expected"); + message.sources[i] = $root.google.cloud.securitycenter.v2.ExfilResource.fromObject(object.sources[i]); + } + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Exfiltration.targets: object expected"); + message.targets[i] = $root.google.cloud.securitycenter.v2.ExfilResource.fromObject(object.targets[i]); + } + } + if (object.totalExfiltratedBytes != null) + if ($util.Long) + (message.totalExfiltratedBytes = $util.Long.fromValue(object.totalExfiltratedBytes)).unsigned = false; + else if (typeof object.totalExfiltratedBytes === "string") + message.totalExfiltratedBytes = parseInt(object.totalExfiltratedBytes, 10); + else if (typeof object.totalExfiltratedBytes === "number") + message.totalExfiltratedBytes = object.totalExfiltratedBytes; + else if (typeof object.totalExfiltratedBytes === "object") + message.totalExfiltratedBytes = new $util.LongBits(object.totalExfiltratedBytes.low >>> 0, object.totalExfiltratedBytes.high >>> 0).toNumber(); + return message; + }; /** - * Finding moduleName. - * @member {string} moduleName - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {google.cloud.securitycenter.v2.Exfiltration} message Exfiltration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Finding.prototype.moduleName = ""; - - /** - * Finding containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v2.Finding + Exfiltration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sources = []; + object.targets = []; + } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalExfiltratedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalExfiltratedBytes = options.longs === String ? "0" : 0; + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.securitycenter.v2.ExfilResource.toObject(message.sources[j], options); + } + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.securitycenter.v2.ExfilResource.toObject(message.targets[j], options); + } + if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) + if (typeof message.totalExfiltratedBytes === "number") + object.totalExfiltratedBytes = options.longs === String ? String(message.totalExfiltratedBytes) : message.totalExfiltratedBytes; + else + object.totalExfiltratedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalExfiltratedBytes) : options.longs === Number ? new $util.LongBits(message.totalExfiltratedBytes.low >>> 0, message.totalExfiltratedBytes.high >>> 0).toNumber() : message.totalExfiltratedBytes; + return object; + }; + + /** + * Converts this Exfiltration to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Exfiltration * @instance + * @returns {Object.} JSON object */ - Finding.prototype.containers = $util.emptyArray; + Exfiltration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Finding kubernetes. - * @member {google.cloud.securitycenter.v2.IKubernetes|null|undefined} kubernetes - * @memberof google.cloud.securitycenter.v2.Finding - * @instance + * Gets the default type url for Exfiltration + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Exfiltration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Finding.prototype.kubernetes = null; + Exfiltration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Exfiltration"; + }; + + return Exfiltration; + })(); + + v2.ExfilResource = (function() { /** - * Finding database. - * @member {google.cloud.securitycenter.v2.IDatabase|null|undefined} database - * @memberof google.cloud.securitycenter.v2.Finding + * Properties of an ExfilResource. + * @memberof google.cloud.securitycenter.v2 + * @interface IExfilResource + * @property {string|null} [name] ExfilResource name + * @property {Array.|null} [components] ExfilResource components + */ + + /** + * Constructs a new ExfilResource. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an ExfilResource. + * @implements IExfilResource + * @constructor + * @param {google.cloud.securitycenter.v2.IExfilResource=} [properties] Properties to set + */ + function ExfilResource(properties) { + this.components = []; + 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]]; + } + + /** + * ExfilResource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.ExfilResource * @instance */ - Finding.prototype.database = null; + ExfilResource.prototype.name = ""; /** - * Finding attackExposure. - * @member {google.cloud.securitycenter.v2.IAttackExposure|null|undefined} attackExposure - * @memberof google.cloud.securitycenter.v2.Finding + * ExfilResource components. + * @member {Array.} components + * @memberof google.cloud.securitycenter.v2.ExfilResource * @instance */ - Finding.prototype.attackExposure = null; + ExfilResource.prototype.components = $util.emptyArray; /** - * Finding files. - * @member {Array.} files - * @memberof google.cloud.securitycenter.v2.Finding + * Creates a new ExfilResource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {google.cloud.securitycenter.v2.IExfilResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource instance + */ + ExfilResource.create = function create(properties) { + return new ExfilResource(properties); + }; + + /** + * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {google.cloud.securitycenter.v2.IExfilResource} message ExfilResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExfilResource.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.components != null && message.components.length) + for (var i = 0; i < message.components.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.components[i]); + return writer; + }; + + /** + * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExfilResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {google.cloud.securitycenter.v2.IExfilResource} message ExfilResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExfilResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExfilResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExfilResource.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.cloud.securitycenter.v2.ExfilResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExfilResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExfilResource message. + * @function verify + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExfilResource.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.components != null && message.hasOwnProperty("components")) { + if (!Array.isArray(message.components)) + return "components: array expected"; + for (var i = 0; i < message.components.length; ++i) + if (!$util.isString(message.components[i])) + return "components: string[] expected"; + } + return null; + }; + + /** + * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.ExfilResource} ExfilResource + */ + ExfilResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ExfilResource) + return object; + var message = new $root.google.cloud.securitycenter.v2.ExfilResource(); + if (object.name != null) + message.name = String(object.name); + if (object.components) { + if (!Array.isArray(object.components)) + throw TypeError(".google.cloud.securitycenter.v2.ExfilResource.components: array expected"); + message.components = []; + for (var i = 0; i < object.components.length; ++i) + message.components[i] = String(object.components[i]); + } + return message; + }; + + /** + * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {google.cloud.securitycenter.v2.ExfilResource} message ExfilResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExfilResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.components = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.components && message.components.length) { + object.components = []; + for (var j = 0; j < message.components.length; ++j) + object.components[j] = message.components[j]; + } + return object; + }; + + /** + * Converts this ExfilResource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.ExfilResource * @instance + * @returns {Object.} JSON object */ - Finding.prototype.files = $util.emptyArray; + ExfilResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Finding cloudDlpInspection. - * @member {google.cloud.securitycenter.v2.ICloudDlpInspection|null|undefined} cloudDlpInspection - * @memberof google.cloud.securitycenter.v2.Finding + * Gets the default type url for ExfilResource + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.ExfilResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExfilResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExfilResource"; + }; + + return ExfilResource; + })(); + + v2.ExternalSystem = (function() { + + /** + * Properties of an ExternalSystem. + * @memberof google.cloud.securitycenter.v2 + * @interface IExternalSystem + * @property {string|null} [name] ExternalSystem name + * @property {Array.|null} [assignees] ExternalSystem assignees + * @property {string|null} [externalUid] ExternalSystem externalUid + * @property {string|null} [status] ExternalSystem status + * @property {google.protobuf.ITimestamp|null} [externalSystemUpdateTime] ExternalSystem externalSystemUpdateTime + * @property {string|null} [caseUri] ExternalSystem caseUri + * @property {string|null} [casePriority] ExternalSystem casePriority + * @property {google.protobuf.ITimestamp|null} [caseSla] ExternalSystem caseSla + * @property {google.protobuf.ITimestamp|null} [caseCreateTime] ExternalSystem caseCreateTime + * @property {google.protobuf.ITimestamp|null} [caseCloseTime] ExternalSystem caseCloseTime + * @property {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null} [ticketInfo] ExternalSystem ticketInfo + */ + + /** + * Constructs a new ExternalSystem. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an ExternalSystem. + * @implements IExternalSystem + * @constructor + * @param {google.cloud.securitycenter.v2.IExternalSystem=} [properties] Properties to set + */ + function ExternalSystem(properties) { + this.assignees = []; + 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]]; + } + + /** + * ExternalSystem name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.cloudDlpInspection = null; + ExternalSystem.prototype.name = ""; /** - * Finding cloudDlpDataProfile. - * @member {google.cloud.securitycenter.v2.ICloudDlpDataProfile|null|undefined} cloudDlpDataProfile - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem assignees. + * @member {Array.} assignees + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.cloudDlpDataProfile = null; + ExternalSystem.prototype.assignees = $util.emptyArray; /** - * Finding kernelRootkit. - * @member {google.cloud.securitycenter.v2.IKernelRootkit|null|undefined} kernelRootkit - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem externalUid. + * @member {string} externalUid + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.kernelRootkit = null; + ExternalSystem.prototype.externalUid = ""; /** - * Finding orgPolicies. - * @member {Array.} orgPolicies - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem status. + * @member {string} status + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.orgPolicies = $util.emptyArray; + ExternalSystem.prototype.status = ""; /** - * Finding application. - * @member {google.cloud.securitycenter.v2.IApplication|null|undefined} application - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem externalSystemUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} externalSystemUpdateTime + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.application = null; + ExternalSystem.prototype.externalSystemUpdateTime = null; /** - * Finding backupDisasterRecovery. - * @member {google.cloud.securitycenter.v2.IBackupDisasterRecovery|null|undefined} backupDisasterRecovery - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem caseUri. + * @member {string} caseUri + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.backupDisasterRecovery = null; + ExternalSystem.prototype.caseUri = ""; /** - * Finding securityPosture. - * @member {google.cloud.securitycenter.v2.ISecurityPosture|null|undefined} securityPosture - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem casePriority. + * @member {string} casePriority + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.securityPosture = null; + ExternalSystem.prototype.casePriority = ""; /** - * Finding logEntries. - * @member {Array.} logEntries - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem caseSla. + * @member {google.protobuf.ITimestamp|null|undefined} caseSla + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.logEntries = $util.emptyArray; + ExternalSystem.prototype.caseSla = null; /** - * Finding loadBalancers. - * @member {Array.} loadBalancers - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem caseCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} caseCreateTime + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.loadBalancers = $util.emptyArray; + ExternalSystem.prototype.caseCreateTime = null; /** - * Finding toxicCombination. - * @member {google.cloud.securitycenter.v2.IToxicCombination|null|undefined} toxicCombination - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem caseCloseTime. + * @member {google.protobuf.ITimestamp|null|undefined} caseCloseTime + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.toxicCombination = null; + ExternalSystem.prototype.caseCloseTime = null; /** - * Finding groupMemberships. - * @member {Array.} groupMemberships - * @memberof google.cloud.securitycenter.v2.Finding + * ExternalSystem ticketInfo. + * @member {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo|null|undefined} ticketInfo + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @instance */ - Finding.prototype.groupMemberships = $util.emptyArray; + ExternalSystem.prototype.ticketInfo = null; /** - * Creates a new Finding instance using the specified properties. + * Creates a new ExternalSystem instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static - * @param {google.cloud.securitycenter.v2.IFinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Finding} Finding instance + * @param {google.cloud.securitycenter.v2.IExternalSystem=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem instance */ - Finding.create = function create(properties) { - return new Finding(properties); + ExternalSystem.create = function create(properties) { + return new ExternalSystem(properties); }; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static - * @param {google.cloud.securitycenter.v2.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v2.IExternalSystem} message ExternalSystem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encode = function encode(message, writer) { + ExternalSystem.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.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.canonicalName); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.category); - if (message.externalUri != null && Object.hasOwnProperty.call(message, "externalUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.externalUri); - if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) - for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) - $root.google.cloud.securitycenter.v2.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.severity); - if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mute); - if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.findingClass); - if (message.indicator != null && Object.hasOwnProperty.call(message, "indicator")) - $root.google.cloud.securitycenter.v2.Indicator.encode(message.indicator, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) - $root.google.cloud.securitycenter.v2.Vulnerability.encode(message.vulnerability, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.muteUpdateTime != null && Object.hasOwnProperty.call(message, "muteUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.muteUpdateTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.externalSystems != null && Object.hasOwnProperty.call(message, "externalSystems")) - for (var keys = Object.keys(message.externalSystems), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.securitycenter.v2.ExternalSystem.encode(message.externalSystems[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mitreAttack != null && Object.hasOwnProperty.call(message, "mitreAttack")) - $root.google.cloud.securitycenter.v2.MitreAttack.encode(message.mitreAttack, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.access != null && Object.hasOwnProperty.call(message, "access")) - $root.google.cloud.securitycenter.v2.Access.encode(message.access, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.connections != null && message.connections.length) - for (var i = 0; i < message.connections.length; ++i) - $root.google.cloud.securitycenter.v2.Connection.encode(message.connections[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.muteInitiator != null && Object.hasOwnProperty.call(message, "muteInitiator")) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.muteInitiator); - if (message.processes != null && message.processes.length) - for (var i = 0; i < message.processes.length; ++i) - $root.google.cloud.securitycenter.v2.Process.encode(message.processes[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.contacts != null && Object.hasOwnProperty.call(message, "contacts")) - for (var keys = Object.keys(message.contacts), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 26, wireType 2 =*/210).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.securitycenter.v2.ContactDetails.encode(message.contacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.compliances != null && message.compliances.length) - for (var i = 0; i < message.compliances.length; ++i) - $root.google.cloud.securitycenter.v2.Compliance.encode(message.compliances[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.parentDisplayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.description); - if (message.exfiltration != null && Object.hasOwnProperty.call(message, "exfiltration")) - $root.google.cloud.securitycenter.v2.Exfiltration.encode(message.exfiltration, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.iamBindings != null && message.iamBindings.length) - for (var i = 0; i < message.iamBindings.length; ++i) - $root.google.cloud.securitycenter.v2.IamBinding.encode(message.iamBindings[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.nextSteps != null && Object.hasOwnProperty.call(message, "nextSteps")) - writer.uint32(/* id 33, wireType 2 =*/266).string(message.nextSteps); - if (message.moduleName != null && Object.hasOwnProperty.call(message, "moduleName")) - writer.uint32(/* id 34, wireType 2 =*/274).string(message.moduleName); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.kubernetes != null && Object.hasOwnProperty.call(message, "kubernetes")) - $root.google.cloud.securitycenter.v2.Kubernetes.encode(message.kubernetes, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - $root.google.cloud.securitycenter.v2.Database.encode(message.database, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.attackExposure != null && Object.hasOwnProperty.call(message, "attackExposure")) - $root.google.cloud.securitycenter.v2.AttackExposure.encode(message.attackExposure, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.files != null && message.files.length) - for (var i = 0; i < message.files.length; ++i) - $root.google.cloud.securitycenter.v2.File.encode(message.files[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.cloudDlpInspection != null && Object.hasOwnProperty.call(message, "cloudDlpInspection")) - $root.google.cloud.securitycenter.v2.CloudDlpInspection.encode(message.cloudDlpInspection, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.cloudDlpDataProfile != null && Object.hasOwnProperty.call(message, "cloudDlpDataProfile")) - $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.encode(message.cloudDlpDataProfile, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); - if (message.kernelRootkit != null && Object.hasOwnProperty.call(message, "kernelRootkit")) - $root.google.cloud.securitycenter.v2.KernelRootkit.encode(message.kernelRootkit, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.orgPolicies != null && message.orgPolicies.length) - for (var i = 0; i < message.orgPolicies.length; ++i) - $root.google.cloud.securitycenter.v2.OrgPolicy.encode(message.orgPolicies[i], writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.application != null && Object.hasOwnProperty.call(message, "application")) - $root.google.cloud.securitycenter.v2.Application.encode(message.application, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.backupDisasterRecovery != null && Object.hasOwnProperty.call(message, "backupDisasterRecovery")) - $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.encode(message.backupDisasterRecovery, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.securityPosture != null && Object.hasOwnProperty.call(message, "securityPosture")) - $root.google.cloud.securitycenter.v2.SecurityPosture.encode(message.securityPosture, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.logEntries != null && message.logEntries.length) - for (var i = 0; i < message.logEntries.length; ++i) - $root.google.cloud.securitycenter.v2.LogEntry.encode(message.logEntries[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.loadBalancers != null && message.loadBalancers.length) - for (var i = 0; i < message.loadBalancers.length; ++i) - $root.google.cloud.securitycenter.v2.LoadBalancer.encode(message.loadBalancers[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.toxicCombination != null && Object.hasOwnProperty.call(message, "toxicCombination")) - $root.google.cloud.securitycenter.v2.ToxicCombination.encode(message.toxicCombination, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); - if (message.groupMemberships != null && message.groupMemberships.length) - for (var i = 0; i < message.groupMemberships.length; ++i) - $root.google.cloud.securitycenter.v2.GroupMembership.encode(message.groupMemberships[i], writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); + if (message.assignees != null && message.assignees.length) + for (var i = 0; i < message.assignees.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignees[i]); + if (message.externalUid != null && Object.hasOwnProperty.call(message, "externalUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalUid); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.status); + if (message.externalSystemUpdateTime != null && Object.hasOwnProperty.call(message, "externalSystemUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.externalSystemUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.caseUri != null && Object.hasOwnProperty.call(message, "caseUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.caseUri); + if (message.casePriority != null && Object.hasOwnProperty.call(message, "casePriority")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.casePriority); + if (message.ticketInfo != null && Object.hasOwnProperty.call(message, "ticketInfo")) + $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.encode(message.ticketInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.caseSla != null && Object.hasOwnProperty.call(message, "caseSla")) + $root.google.protobuf.Timestamp.encode(message.caseSla, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.caseCreateTime != null && Object.hasOwnProperty.call(message, "caseCreateTime")) + $root.google.protobuf.Timestamp.encode(message.caseCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.caseCloseTime != null && Object.hasOwnProperty.call(message, "caseCloseTime")) + $root.google.protobuf.Timestamp.encode(message.caseCloseTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static - * @param {google.cloud.securitycenter.v2.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v2.IExternalSystem} message ExternalSystem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encodeDelimited = function encodeDelimited(message, writer) { + ExternalSystem.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes an ExternalSystem message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Finding} Finding + * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decode = function decode(reader, length) { + ExternalSystem.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.cloud.securitycenter.v2.Finding(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.ExternalSystem(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -75788,264 +75280,45 @@ break; } case 2: { - message.canonicalName = reader.string(); + if (!(message.assignees && message.assignees.length)) + message.assignees = []; + message.assignees.push(reader.string()); break; } case 3: { - message.parent = reader.string(); + message.externalUid = reader.string(); break; } case 4: { - message.resourceName = reader.string(); + message.status = reader.string(); break; } - case 6: { - message.state = reader.int32(); + case 5: { + message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 7: { - message.category = reader.string(); + case 6: { + message.caseUri = reader.string(); break; } - case 8: { - message.externalUri = reader.string(); + case 7: { + message.casePriority = reader.string(); break; } case 9: { - if (message.sourceProperties === $util.emptyObject) - message.sourceProperties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.sourceProperties[key] = value; + message.caseSla = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 10: { - message.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.decode(reader, reader.uint32()); + message.caseCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 11: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 14: { - message.severity = reader.int32(); - break; - } - case 15: { - message.mute = reader.int32(); - break; - } - case 16: { - message.findingClass = reader.int32(); - break; - } - case 17: { - message.indicator = $root.google.cloud.securitycenter.v2.Indicator.decode(reader, reader.uint32()); - break; - } - case 18: { - message.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.decode(reader, reader.uint32()); - break; - } - case 19: { - message.muteUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - if (message.externalSystems === $util.emptyObject) - message.externalSystems = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.securitycenter.v2.ExternalSystem.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.externalSystems[key] = value; - break; - } - case 21: { - message.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.decode(reader, reader.uint32()); - break; - } - case 22: { - message.access = $root.google.cloud.securitycenter.v2.Access.decode(reader, reader.uint32()); - break; - } - case 23: { - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.google.cloud.securitycenter.v2.Connection.decode(reader, reader.uint32())); - break; - } - case 24: { - message.muteInitiator = reader.string(); - break; - } - case 25: { - if (!(message.processes && message.processes.length)) - message.processes = []; - message.processes.push($root.google.cloud.securitycenter.v2.Process.decode(reader, reader.uint32())); - break; - } - case 26: { - if (message.contacts === $util.emptyObject) - message.contacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.securitycenter.v2.ContactDetails.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.contacts[key] = value; - break; - } - case 27: { - if (!(message.compliances && message.compliances.length)) - message.compliances = []; - message.compliances.push($root.google.cloud.securitycenter.v2.Compliance.decode(reader, reader.uint32())); - break; - } - case 29: { - message.parentDisplayName = reader.string(); - break; - } - case 30: { - message.description = reader.string(); - break; - } - case 31: { - message.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.decode(reader, reader.uint32()); - break; - } - case 32: { - if (!(message.iamBindings && message.iamBindings.length)) - message.iamBindings = []; - message.iamBindings.push($root.google.cloud.securitycenter.v2.IamBinding.decode(reader, reader.uint32())); - break; - } - case 33: { - message.nextSteps = reader.string(); - break; - } - case 34: { - message.moduleName = reader.string(); - break; - } - case 35: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); - break; - } - case 36: { - message.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.decode(reader, reader.uint32()); - break; - } - case 37: { - message.database = $root.google.cloud.securitycenter.v2.Database.decode(reader, reader.uint32()); - break; - } - case 38: { - message.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.decode(reader, reader.uint32()); - break; - } - case 39: { - if (!(message.files && message.files.length)) - message.files = []; - message.files.push($root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32())); - break; - } - case 40: { - message.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.decode(reader, reader.uint32()); - break; - } - case 41: { - message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.decode(reader, reader.uint32()); - break; - } - case 42: { - message.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.decode(reader, reader.uint32()); - break; - } - case 43: { - if (!(message.orgPolicies && message.orgPolicies.length)) - message.orgPolicies = []; - message.orgPolicies.push($root.google.cloud.securitycenter.v2.OrgPolicy.decode(reader, reader.uint32())); - break; - } - case 45: { - message.application = $root.google.cloud.securitycenter.v2.Application.decode(reader, reader.uint32()); - break; - } - case 47: { - message.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.decode(reader, reader.uint32()); - break; - } - case 48: { - message.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.decode(reader, reader.uint32()); - break; - } - case 49: { - if (!(message.logEntries && message.logEntries.length)) - message.logEntries = []; - message.logEntries.push($root.google.cloud.securitycenter.v2.LogEntry.decode(reader, reader.uint32())); - break; - } - case 50: { - if (!(message.loadBalancers && message.loadBalancers.length)) - message.loadBalancers = []; - message.loadBalancers.push($root.google.cloud.securitycenter.v2.LoadBalancer.decode(reader, reader.uint32())); - break; - } - case 56: { - message.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.decode(reader, reader.uint32()); + message.caseCloseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 57: { - if (!(message.groupMemberships && message.groupMemberships.length)) - message.groupMemberships = []; - message.groupMemberships.push($root.google.cloud.securitycenter.v2.GroupMembership.decode(reader, reader.uint32())); + case 8: { + message.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.decode(reader, reader.uint32()); break; } default: @@ -76057,1032 +75330,571 @@ }; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Finding} Finding + * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decodeDelimited = function decodeDelimited(reader) { + ExternalSystem.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Finding message. + * Verifies an ExternalSystem message. * @function verify - * @memberof google.cloud.securitycenter.v2.Finding + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.verify = function verify(message) { + ExternalSystem.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.canonicalName != null && message.hasOwnProperty("canonicalName")) - if (!$util.isString(message.canonicalName)) - return "canonicalName: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - if (!$util.isString(message.externalUri)) - return "externalUri: string expected"; - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { - if (!$util.isObject(message.sourceProperties)) - return "sourceProperties: object expected"; - var key = Object.keys(message.sourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); - if (error) - return "sourceProperties." + error; - } + if (message.assignees != null && message.hasOwnProperty("assignees")) { + if (!Array.isArray(message.assignees)) + return "assignees: array expected"; + for (var i = 0; i < message.assignees.length; ++i) + if (!$util.isString(message.assignees[i])) + return "assignees: string[] expected"; } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v2.SecurityMarks.verify(message.securityMarks); + if (message.externalUid != null && message.hasOwnProperty("externalUid")) + if (!$util.isString(message.externalUid)) + return "externalUid: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.externalSystemUpdateTime); if (error) - return "securityMarks." + error; + return "externalSystemUpdateTime." + error; } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (message.caseUri != null && message.hasOwnProperty("caseUri")) + if (!$util.isString(message.caseUri)) + return "caseUri: string expected"; + if (message.casePriority != null && message.hasOwnProperty("casePriority")) + if (!$util.isString(message.casePriority)) + return "casePriority: string expected"; + if (message.caseSla != null && message.hasOwnProperty("caseSla")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseSla); if (error) - return "eventTime." + error; + return "caseSla." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseCreateTime); if (error) - return "createTime." + error; + return "caseCreateTime." + error; } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.mute != null && message.hasOwnProperty("mute")) - switch (message.mute) { - default: - return "mute: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - switch (message.findingClass) { - default: - return "findingClass: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.indicator != null && message.hasOwnProperty("indicator")) { - var error = $root.google.cloud.securitycenter.v2.Indicator.verify(message.indicator); + if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseCloseTime); if (error) - return "indicator." + error; + return "caseCloseTime." + error; } - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - var error = $root.google.cloud.securitycenter.v2.Vulnerability.verify(message.vulnerability); + if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) { + var error = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify(message.ticketInfo); if (error) - return "vulnerability." + error; + return "ticketInfo." + error; } - if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.muteUpdateTime); - if (error) - return "muteUpdateTime." + error; + return null; + }; + + /** + * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.ExternalSystem} ExternalSystem + */ + ExternalSystem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ExternalSystem) + return object; + var message = new $root.google.cloud.securitycenter.v2.ExternalSystem(); + if (object.name != null) + message.name = String(object.name); + if (object.assignees) { + if (!Array.isArray(object.assignees)) + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.assignees: array expected"); + message.assignees = []; + for (var i = 0; i < object.assignees.length; ++i) + message.assignees[i] = String(object.assignees[i]); } - if (message.externalSystems != null && message.hasOwnProperty("externalSystems")) { - if (!$util.isObject(message.externalSystems)) - return "externalSystems: object expected"; - var key = Object.keys(message.externalSystems); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.ExternalSystem.verify(message.externalSystems[key[i]]); - if (error) - return "externalSystems." + error; - } + if (object.externalUid != null) + message.externalUid = String(object.externalUid); + if (object.status != null) + message.status = String(object.status); + if (object.externalSystemUpdateTime != null) { + if (typeof object.externalSystemUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.externalSystemUpdateTime: object expected"); + message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.externalSystemUpdateTime); } - if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) { - var error = $root.google.cloud.securitycenter.v2.MitreAttack.verify(message.mitreAttack); - if (error) - return "mitreAttack." + error; - } - if (message.access != null && message.hasOwnProperty("access")) { - var error = $root.google.cloud.securitycenter.v2.Access.verify(message.access); - if (error) - return "access." + error; - } - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (var i = 0; i < message.connections.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Connection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) - if (!$util.isString(message.muteInitiator)) - return "muteInitiator: string expected"; - if (message.processes != null && message.hasOwnProperty("processes")) { - if (!Array.isArray(message.processes)) - return "processes: array expected"; - for (var i = 0; i < message.processes.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Process.verify(message.processes[i]); - if (error) - return "processes." + error; - } - } - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!$util.isObject(message.contacts)) - return "contacts: object expected"; - var key = Object.keys(message.contacts); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.ContactDetails.verify(message.contacts[key[i]]); - if (error) - return "contacts." + error; - } - } - if (message.compliances != null && message.hasOwnProperty("compliances")) { - if (!Array.isArray(message.compliances)) - return "compliances: array expected"; - for (var i = 0; i < message.compliances.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Compliance.verify(message.compliances[i]); - if (error) - return "compliances." + error; - } - } - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - if (!$util.isString(message.parentDisplayName)) - return "parentDisplayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) { - var error = $root.google.cloud.securitycenter.v2.Exfiltration.verify(message.exfiltration); - if (error) - return "exfiltration." + error; - } - if (message.iamBindings != null && message.hasOwnProperty("iamBindings")) { - if (!Array.isArray(message.iamBindings)) - return "iamBindings: array expected"; - for (var i = 0; i < message.iamBindings.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.IamBinding.verify(message.iamBindings[i]); - if (error) - return "iamBindings." + error; - } - } - if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) - if (!$util.isString(message.nextSteps)) - return "nextSteps: string expected"; - if (message.moduleName != null && message.hasOwnProperty("moduleName")) - if (!$util.isString(message.moduleName)) - return "moduleName: string expected"; - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } - } - if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.verify(message.kubernetes); - if (error) - return "kubernetes." + error; - } - if (message.database != null && message.hasOwnProperty("database")) { - var error = $root.google.cloud.securitycenter.v2.Database.verify(message.database); - if (error) - return "database." + error; - } - if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) { - var error = $root.google.cloud.securitycenter.v2.AttackExposure.verify(message.attackExposure); - if (error) - return "attackExposure." + error; - } - if (message.files != null && message.hasOwnProperty("files")) { - if (!Array.isArray(message.files)) - return "files: array expected"; - for (var i = 0; i < message.files.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.File.verify(message.files[i]); - if (error) - return "files." + error; - } - } - if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) { - var error = $root.google.cloud.securitycenter.v2.CloudDlpInspection.verify(message.cloudDlpInspection); - if (error) - return "cloudDlpInspection." + error; - } - if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) { - var error = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.verify(message.cloudDlpDataProfile); - if (error) - return "cloudDlpDataProfile." + error; - } - if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) { - var error = $root.google.cloud.securitycenter.v2.KernelRootkit.verify(message.kernelRootkit); - if (error) - return "kernelRootkit." + error; - } - if (message.orgPolicies != null && message.hasOwnProperty("orgPolicies")) { - if (!Array.isArray(message.orgPolicies)) - return "orgPolicies: array expected"; - for (var i = 0; i < message.orgPolicies.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.OrgPolicy.verify(message.orgPolicies[i]); - if (error) - return "orgPolicies." + error; - } - } - if (message.application != null && message.hasOwnProperty("application")) { - var error = $root.google.cloud.securitycenter.v2.Application.verify(message.application); - if (error) - return "application." + error; - } - if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) { - var error = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.verify(message.backupDisasterRecovery); - if (error) - return "backupDisasterRecovery." + error; - } - if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) { - var error = $root.google.cloud.securitycenter.v2.SecurityPosture.verify(message.securityPosture); - if (error) - return "securityPosture." + error; - } - if (message.logEntries != null && message.hasOwnProperty("logEntries")) { - if (!Array.isArray(message.logEntries)) - return "logEntries: array expected"; - for (var i = 0; i < message.logEntries.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.LogEntry.verify(message.logEntries[i]); - if (error) - return "logEntries." + error; - } + if (object.caseUri != null) + message.caseUri = String(object.caseUri); + if (object.casePriority != null) + message.casePriority = String(object.casePriority); + if (object.caseSla != null) { + if (typeof object.caseSla !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseSla: object expected"); + message.caseSla = $root.google.protobuf.Timestamp.fromObject(object.caseSla); } - if (message.loadBalancers != null && message.hasOwnProperty("loadBalancers")) { - if (!Array.isArray(message.loadBalancers)) - return "loadBalancers: array expected"; - for (var i = 0; i < message.loadBalancers.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.LoadBalancer.verify(message.loadBalancers[i]); - if (error) - return "loadBalancers." + error; - } + if (object.caseCreateTime != null) { + if (typeof object.caseCreateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseCreateTime: object expected"); + message.caseCreateTime = $root.google.protobuf.Timestamp.fromObject(object.caseCreateTime); } - if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) { - var error = $root.google.cloud.securitycenter.v2.ToxicCombination.verify(message.toxicCombination); - if (error) - return "toxicCombination." + error; + if (object.caseCloseTime != null) { + if (typeof object.caseCloseTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.caseCloseTime: object expected"); + message.caseCloseTime = $root.google.protobuf.Timestamp.fromObject(object.caseCloseTime); } - if (message.groupMemberships != null && message.hasOwnProperty("groupMemberships")) { - if (!Array.isArray(message.groupMemberships)) - return "groupMemberships: array expected"; - for (var i = 0; i < message.groupMemberships.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.GroupMembership.verify(message.groupMemberships[i]); - if (error) - return "groupMemberships." + error; - } + if (object.ticketInfo != null) { + if (typeof object.ticketInfo !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.ticketInfo: object expected"); + message.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.fromObject(object.ticketInfo); } - return null; + return message; }; /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Finding + * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.ExternalSystem * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Finding} Finding + * @param {google.cloud.securitycenter.v2.ExternalSystem} message ExternalSystem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Finding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Finding) - return object; - var message = new $root.google.cloud.securitycenter.v2.Finding(); - if (object.name != null) - message.name = String(object.name); - if (object.canonicalName != null) - message.canonicalName = String(object.canonicalName); - if (object.parent != null) - message.parent = String(object.parent); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.category != null) - message.category = String(object.category); - if (object.externalUri != null) - message.externalUri = String(object.externalUri); - if (object.sourceProperties) { - if (typeof object.sourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.sourceProperties: object expected"); - message.sourceProperties = {}; - for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.sourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.sourceProperties: object expected"); - message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); - } - } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.fromObject(object.securityMarks); - } - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - switch (object.mute) { - default: - if (typeof object.mute === "number") { - message.mute = object.mute; - break; - } - break; - case "MUTE_UNSPECIFIED": - case 0: - message.mute = 0; - break; - case "MUTED": - case 1: - message.mute = 1; - break; - case "UNMUTED": - case 2: - message.mute = 2; - break; - case "UNDEFINED": - case 3: - message.mute = 3; - break; - } - switch (object.findingClass) { - default: - if (typeof object.findingClass === "number") { - message.findingClass = object.findingClass; - break; - } - break; - case "FINDING_CLASS_UNSPECIFIED": - case 0: - message.findingClass = 0; - break; - case "THREAT": - case 1: - message.findingClass = 1; - break; - case "VULNERABILITY": - case 2: - message.findingClass = 2; - break; - case "MISCONFIGURATION": - case 3: - message.findingClass = 3; - break; - case "OBSERVATION": - case 4: - message.findingClass = 4; - break; - case "SCC_ERROR": - case 5: - message.findingClass = 5; - break; - case "POSTURE_VIOLATION": - case 6: - message.findingClass = 6; - break; - case "TOXIC_COMBINATION": - case 7: - message.findingClass = 7; - break; - } - if (object.indicator != null) { - if (typeof object.indicator !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.indicator: object expected"); - message.indicator = $root.google.cloud.securitycenter.v2.Indicator.fromObject(object.indicator); - } - if (object.vulnerability != null) { - if (typeof object.vulnerability !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.vulnerability: object expected"); - message.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.fromObject(object.vulnerability); - } - if (object.muteUpdateTime != null) { - if (typeof object.muteUpdateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.muteUpdateTime: object expected"); - message.muteUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.muteUpdateTime); - } - if (object.externalSystems) { - if (typeof object.externalSystems !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.externalSystems: object expected"); - message.externalSystems = {}; - for (var keys = Object.keys(object.externalSystems), i = 0; i < keys.length; ++i) { - if (typeof object.externalSystems[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.externalSystems: object expected"); - message.externalSystems[keys[i]] = $root.google.cloud.securitycenter.v2.ExternalSystem.fromObject(object.externalSystems[keys[i]]); - } - } - if (object.mitreAttack != null) { - if (typeof object.mitreAttack !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.mitreAttack: object expected"); - message.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.fromObject(object.mitreAttack); + ExternalSystem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assignees = []; + if (options.defaults) { + object.name = ""; + object.externalUid = ""; + object.status = ""; + object.externalSystemUpdateTime = null; + object.caseUri = ""; + object.casePriority = ""; + object.ticketInfo = null; + object.caseSla = null; + object.caseCreateTime = null; + object.caseCloseTime = null; } - if (object.access != null) { - if (typeof object.access !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.access: object expected"); - message.access = $root.google.cloud.securitycenter.v2.Access.fromObject(object.access); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assignees && message.assignees.length) { + object.assignees = []; + for (var j = 0; j < message.assignees.length; ++j) + object.assignees[j] = message.assignees[j]; } - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.connections: array expected"); - message.connections = []; - for (var i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.connections: object expected"); - message.connections[i] = $root.google.cloud.securitycenter.v2.Connection.fromObject(object.connections[i]); - } + if (message.externalUid != null && message.hasOwnProperty("externalUid")) + object.externalUid = message.externalUid; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) + object.externalSystemUpdateTime = $root.google.protobuf.Timestamp.toObject(message.externalSystemUpdateTime, options); + if (message.caseUri != null && message.hasOwnProperty("caseUri")) + object.caseUri = message.caseUri; + if (message.casePriority != null && message.hasOwnProperty("casePriority")) + object.casePriority = message.casePriority; + if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) + object.ticketInfo = $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.toObject(message.ticketInfo, options); + if (message.caseSla != null && message.hasOwnProperty("caseSla")) + object.caseSla = $root.google.protobuf.Timestamp.toObject(message.caseSla, options); + if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) + object.caseCreateTime = $root.google.protobuf.Timestamp.toObject(message.caseCreateTime, options); + if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) + object.caseCloseTime = $root.google.protobuf.Timestamp.toObject(message.caseCloseTime, options); + return object; + }; + + /** + * Converts this ExternalSystem to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @instance + * @returns {Object.} JSON object + */ + ExternalSystem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExternalSystem + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.muteInitiator != null) - message.muteInitiator = String(object.muteInitiator); - if (object.processes) { - if (!Array.isArray(object.processes)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.processes: array expected"); - message.processes = []; - for (var i = 0; i < object.processes.length; ++i) { - if (typeof object.processes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.processes: object expected"); - message.processes[i] = $root.google.cloud.securitycenter.v2.Process.fromObject(object.processes[i]); - } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExternalSystem"; + }; + + ExternalSystem.TicketInfo = (function() { + + /** + * Properties of a TicketInfo. + * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @interface ITicketInfo + * @property {string|null} [id] TicketInfo id + * @property {string|null} [assignee] TicketInfo assignee + * @property {string|null} [description] TicketInfo description + * @property {string|null} [uri] TicketInfo uri + * @property {string|null} [status] TicketInfo status + * @property {google.protobuf.ITimestamp|null} [updateTime] TicketInfo updateTime + */ + + /** + * Constructs a new TicketInfo. + * @memberof google.cloud.securitycenter.v2.ExternalSystem + * @classdesc Represents a TicketInfo. + * @implements ITicketInfo + * @constructor + * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo=} [properties] Properties to set + */ + function TicketInfo(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 (object.contacts) { - if (typeof object.contacts !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.contacts: object expected"); - message.contacts = {}; - for (var keys = Object.keys(object.contacts), i = 0; i < keys.length; ++i) { - if (typeof object.contacts[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.contacts: object expected"); - message.contacts[keys[i]] = $root.google.cloud.securitycenter.v2.ContactDetails.fromObject(object.contacts[keys[i]]); - } - } - if (object.compliances) { - if (!Array.isArray(object.compliances)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.compliances: array expected"); - message.compliances = []; - for (var i = 0; i < object.compliances.length; ++i) { - if (typeof object.compliances[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.compliances: object expected"); - message.compliances[i] = $root.google.cloud.securitycenter.v2.Compliance.fromObject(object.compliances[i]); - } - } - if (object.parentDisplayName != null) - message.parentDisplayName = String(object.parentDisplayName); - if (object.description != null) - message.description = String(object.description); - if (object.exfiltration != null) { - if (typeof object.exfiltration !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.exfiltration: object expected"); - message.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.fromObject(object.exfiltration); - } - if (object.iamBindings) { - if (!Array.isArray(object.iamBindings)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.iamBindings: array expected"); - message.iamBindings = []; - for (var i = 0; i < object.iamBindings.length; ++i) { - if (typeof object.iamBindings[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.iamBindings: object expected"); - message.iamBindings[i] = $root.google.cloud.securitycenter.v2.IamBinding.fromObject(object.iamBindings[i]); - } - } - if (object.nextSteps != null) - message.nextSteps = String(object.nextSteps); - if (object.moduleName != null) - message.moduleName = String(object.moduleName); - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); - } - } - if (object.kubernetes != null) { - if (typeof object.kubernetes !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.kubernetes: object expected"); - message.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.fromObject(object.kubernetes); - } - if (object.database != null) { - if (typeof object.database !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.database: object expected"); - message.database = $root.google.cloud.securitycenter.v2.Database.fromObject(object.database); - } - if (object.attackExposure != null) { - if (typeof object.attackExposure !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.attackExposure: object expected"); - message.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.fromObject(object.attackExposure); - } - if (object.files) { - if (!Array.isArray(object.files)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.files: array expected"); - message.files = []; - for (var i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.files: object expected"); - message.files[i] = $root.google.cloud.securitycenter.v2.File.fromObject(object.files[i]); - } - } - if (object.cloudDlpInspection != null) { - if (typeof object.cloudDlpInspection !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.cloudDlpInspection: object expected"); - message.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.fromObject(object.cloudDlpInspection); - } - if (object.cloudDlpDataProfile != null) { - if (typeof object.cloudDlpDataProfile !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.cloudDlpDataProfile: object expected"); - message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.fromObject(object.cloudDlpDataProfile); - } - if (object.kernelRootkit != null) { - if (typeof object.kernelRootkit !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.kernelRootkit: object expected"); - message.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.fromObject(object.kernelRootkit); - } - if (object.orgPolicies) { - if (!Array.isArray(object.orgPolicies)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.orgPolicies: array expected"); - message.orgPolicies = []; - for (var i = 0; i < object.orgPolicies.length; ++i) { - if (typeof object.orgPolicies[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.orgPolicies: object expected"); - message.orgPolicies[i] = $root.google.cloud.securitycenter.v2.OrgPolicy.fromObject(object.orgPolicies[i]); - } - } - if (object.application != null) { - if (typeof object.application !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.application: object expected"); - message.application = $root.google.cloud.securitycenter.v2.Application.fromObject(object.application); - } - if (object.backupDisasterRecovery != null) { - if (typeof object.backupDisasterRecovery !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.backupDisasterRecovery: object expected"); - message.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.fromObject(object.backupDisasterRecovery); - } - if (object.securityPosture != null) { - if (typeof object.securityPosture !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.securityPosture: object expected"); - message.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.fromObject(object.securityPosture); - } - if (object.logEntries) { - if (!Array.isArray(object.logEntries)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.logEntries: array expected"); - message.logEntries = []; - for (var i = 0; i < object.logEntries.length; ++i) { - if (typeof object.logEntries[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.logEntries: object expected"); - message.logEntries[i] = $root.google.cloud.securitycenter.v2.LogEntry.fromObject(object.logEntries[i]); - } - } - if (object.loadBalancers) { - if (!Array.isArray(object.loadBalancers)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.loadBalancers: array expected"); - message.loadBalancers = []; - for (var i = 0; i < object.loadBalancers.length; ++i) { - if (typeof object.loadBalancers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.loadBalancers: object expected"); - message.loadBalancers[i] = $root.google.cloud.securitycenter.v2.LoadBalancer.fromObject(object.loadBalancers[i]); - } - } - if (object.toxicCombination != null) { - if (typeof object.toxicCombination !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.toxicCombination: object expected"); - message.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.fromObject(object.toxicCombination); - } - if (object.groupMemberships) { - if (!Array.isArray(object.groupMemberships)) - throw TypeError(".google.cloud.securitycenter.v2.Finding.groupMemberships: array expected"); - message.groupMemberships = []; - for (var i = 0; i < object.groupMemberships.length; ++i) { - if (typeof object.groupMemberships[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Finding.groupMemberships: object expected"); - message.groupMemberships[i] = $root.google.cloud.securitycenter.v2.GroupMembership.fromObject(object.groupMemberships[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Finding - * @static - * @param {google.cloud.securitycenter.v2.Finding} message Finding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Finding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.connections = []; - object.processes = []; - object.compliances = []; - object.iamBindings = []; - object.containers = []; - object.files = []; - object.orgPolicies = []; - object.logEntries = []; - object.loadBalancers = []; - object.groupMemberships = []; - } - if (options.objects || options.defaults) { - object.sourceProperties = {}; - object.externalSystems = {}; - object.contacts = {}; - } - if (options.defaults) { - object.name = ""; - object.canonicalName = ""; - object.parent = ""; - object.resourceName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.category = ""; - object.externalUri = ""; - object.securityMarks = null; - object.eventTime = null; - object.createTime = null; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; - object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; - object.indicator = null; - object.vulnerability = null; - object.muteUpdateTime = null; - object.mitreAttack = null; - object.access = null; - object.muteInitiator = ""; - object.parentDisplayName = ""; - object.description = ""; - object.exfiltration = null; - object.nextSteps = ""; - object.moduleName = ""; - object.kubernetes = null; - object.database = null; - object.attackExposure = null; - object.cloudDlpInspection = null; - object.cloudDlpDataProfile = null; - object.kernelRootkit = null; - object.application = null; - object.backupDisasterRecovery = null; - object.securityPosture = null; - object.toxicCombination = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) - object.canonicalName = message.canonicalName; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v2.Finding.State[message.state] : message.state; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - object.externalUri = message.externalUri; - var keys2; - if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { - object.sourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.toObject(message.securityMarks, options); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v2.Finding.Severity[message.severity] : message.severity; - if (message.mute != null && message.hasOwnProperty("mute")) - object.mute = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v2.Finding.Mute[message.mute] : message.mute; - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - object.findingClass = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycenter.v2.Finding.FindingClass[message.findingClass] : message.findingClass; - if (message.indicator != null && message.hasOwnProperty("indicator")) - object.indicator = $root.google.cloud.securitycenter.v2.Indicator.toObject(message.indicator, options); - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) - object.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.toObject(message.vulnerability, options); - if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) - object.muteUpdateTime = $root.google.protobuf.Timestamp.toObject(message.muteUpdateTime, options); - if (message.externalSystems && (keys2 = Object.keys(message.externalSystems)).length) { - object.externalSystems = {}; - for (var j = 0; j < keys2.length; ++j) - object.externalSystems[keys2[j]] = $root.google.cloud.securitycenter.v2.ExternalSystem.toObject(message.externalSystems[keys2[j]], options); - } - if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) - object.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.toObject(message.mitreAttack, options); - if (message.access != null && message.hasOwnProperty("access")) - object.access = $root.google.cloud.securitycenter.v2.Access.toObject(message.access, options); - if (message.connections && message.connections.length) { - object.connections = []; - for (var j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.google.cloud.securitycenter.v2.Connection.toObject(message.connections[j], options); - } - if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) - object.muteInitiator = message.muteInitiator; - if (message.processes && message.processes.length) { - object.processes = []; - for (var j = 0; j < message.processes.length; ++j) - object.processes[j] = $root.google.cloud.securitycenter.v2.Process.toObject(message.processes[j], options); - } - if (message.contacts && (keys2 = Object.keys(message.contacts)).length) { - object.contacts = {}; - for (var j = 0; j < keys2.length; ++j) - object.contacts[keys2[j]] = $root.google.cloud.securitycenter.v2.ContactDetails.toObject(message.contacts[keys2[j]], options); - } - if (message.compliances && message.compliances.length) { - object.compliances = []; - for (var j = 0; j < message.compliances.length; ++j) - object.compliances[j] = $root.google.cloud.securitycenter.v2.Compliance.toObject(message.compliances[j], options); - } - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - object.parentDisplayName = message.parentDisplayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) - object.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.toObject(message.exfiltration, options); - if (message.iamBindings && message.iamBindings.length) { - object.iamBindings = []; - for (var j = 0; j < message.iamBindings.length; ++j) - object.iamBindings[j] = $root.google.cloud.securitycenter.v2.IamBinding.toObject(message.iamBindings[j], options); - } - if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) - object.nextSteps = message.nextSteps; - if (message.moduleName != null && message.hasOwnProperty("moduleName")) - object.moduleName = message.moduleName; - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); - } - if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) - object.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.toObject(message.kubernetes, options); - if (message.database != null && message.hasOwnProperty("database")) - object.database = $root.google.cloud.securitycenter.v2.Database.toObject(message.database, options); - if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) - object.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.toObject(message.attackExposure, options); - if (message.files && message.files.length) { - object.files = []; - for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.cloud.securitycenter.v2.File.toObject(message.files[j], options); - } - if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) - object.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.toObject(message.cloudDlpInspection, options); - if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) - object.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.toObject(message.cloudDlpDataProfile, options); - if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) - object.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.toObject(message.kernelRootkit, options); - if (message.orgPolicies && message.orgPolicies.length) { - object.orgPolicies = []; - for (var j = 0; j < message.orgPolicies.length; ++j) - object.orgPolicies[j] = $root.google.cloud.securitycenter.v2.OrgPolicy.toObject(message.orgPolicies[j], options); - } - if (message.application != null && message.hasOwnProperty("application")) - object.application = $root.google.cloud.securitycenter.v2.Application.toObject(message.application, options); - if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) - object.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.toObject(message.backupDisasterRecovery, options); - if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) - object.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.toObject(message.securityPosture, options); - if (message.logEntries && message.logEntries.length) { - object.logEntries = []; - for (var j = 0; j < message.logEntries.length; ++j) - object.logEntries[j] = $root.google.cloud.securitycenter.v2.LogEntry.toObject(message.logEntries[j], options); - } - if (message.loadBalancers && message.loadBalancers.length) { - object.loadBalancers = []; - for (var j = 0; j < message.loadBalancers.length; ++j) - object.loadBalancers[j] = $root.google.cloud.securitycenter.v2.LoadBalancer.toObject(message.loadBalancers[j], options); - } - if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) - object.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.toObject(message.toxicCombination, options); - if (message.groupMemberships && message.groupMemberships.length) { - object.groupMemberships = []; - for (var j = 0; j < message.groupMemberships.length; ++j) - object.groupMemberships[j] = $root.google.cloud.securitycenter.v2.GroupMembership.toObject(message.groupMemberships[j], options); - } - return object; - }; - /** - * Converts this Finding to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Finding - * @instance - * @returns {Object.} JSON object - */ - Finding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * TicketInfo id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.id = ""; - /** - * Gets the default type url for Finding - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Finding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Finding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Finding"; - }; + /** + * TicketInfo assignee. + * @member {string} assignee + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.assignee = ""; - /** - * State enum. - * @name google.cloud.securitycenter.v2.Finding.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - Finding.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); + /** + * TicketInfo description. + * @member {string} description + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.description = ""; - /** - * Severity enum. - * @name google.cloud.securitycenter.v2.Finding.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - Finding.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); + /** + * TicketInfo uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.uri = ""; - /** - * Mute enum. - * @name google.cloud.securitycenter.v2.Finding.Mute - * @enum {number} - * @property {number} MUTE_UNSPECIFIED=0 MUTE_UNSPECIFIED value - * @property {number} MUTED=1 MUTED value - * @property {number} UNMUTED=2 UNMUTED value - * @property {number} UNDEFINED=3 UNDEFINED value - */ - Finding.Mute = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MUTE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MUTED"] = 1; - values[valuesById[2] = "UNMUTED"] = 2; - values[valuesById[3] = "UNDEFINED"] = 3; - return values; - })(); + /** + * TicketInfo status. + * @member {string} status + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.status = ""; - /** - * FindingClass enum. - * @name google.cloud.securitycenter.v2.Finding.FindingClass - * @enum {number} - * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value - * @property {number} THREAT=1 THREAT value - * @property {number} VULNERABILITY=2 VULNERABILITY value - * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value - * @property {number} OBSERVATION=4 OBSERVATION value - * @property {number} SCC_ERROR=5 SCC_ERROR value - * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value - * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value - */ - Finding.FindingClass = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; - values[valuesById[1] = "THREAT"] = 1; - values[valuesById[2] = "VULNERABILITY"] = 2; - values[valuesById[3] = "MISCONFIGURATION"] = 3; - values[valuesById[4] = "OBSERVATION"] = 4; - values[valuesById[5] = "SCC_ERROR"] = 5; - values[valuesById[6] = "POSTURE_VIOLATION"] = 6; - values[valuesById[7] = "TOXIC_COMBINATION"] = 7; - return values; - })(); + /** + * TicketInfo updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.updateTime = null; - return Finding; - })(); + /** + * Creates a new TicketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo instance + */ + TicketInfo.create = function create(properties) { + return new TicketInfo(properties); + }; - v2.GroupMembership = (function() { + /** + * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TicketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.assignee != null && Object.hasOwnProperty.call(message, "assignee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignee); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.status); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v2.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TicketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TicketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TicketInfo.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.cloud.securitycenter.v2.ExternalSystem.TicketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.assignee = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.uri = reader.string(); + break; + } + case 5: { + message.status = reader.string(); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TicketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TicketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TicketInfo message. + * @function verify + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TicketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.assignee != null && message.hasOwnProperty("assignee")) + if (!$util.isString(message.assignee)) + return "assignee: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a TicketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} TicketInfo + */ + TicketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo) + return object; + var message = new $root.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.assignee != null) + message.assignee = String(object.assignee); + if (object.description != null) + message.description = String(object.description); + if (object.uri != null) + message.uri = String(object.uri); + if (object.status != null) + message.status = String(object.status); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ExternalSystem.TicketInfo.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v2.ExternalSystem.TicketInfo} message TicketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TicketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.assignee = ""; + object.description = ""; + object.uri = ""; + object.status = ""; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.assignee != null && message.hasOwnProperty("assignee")) + object.assignee = message.assignee; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this TicketInfo to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @instance + * @returns {Object.} JSON object + */ + TicketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TicketInfo + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.ExternalSystem.TicketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TicketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ExternalSystem.TicketInfo"; + }; + + return TicketInfo; + })(); + + return ExternalSystem; + })(); + + v2.File = (function() { /** - * Properties of a GroupMembership. + * Properties of a File. * @memberof google.cloud.securitycenter.v2 - * @interface IGroupMembership - * @property {google.cloud.securitycenter.v2.GroupMembership.GroupType|null} [groupType] GroupMembership groupType - * @property {string|null} [groupId] GroupMembership groupId + * @interface IFile + * @property {string|null} [path] File path + * @property {number|Long|null} [size] File size + * @property {string|null} [sha256] File sha256 + * @property {number|Long|null} [hashedSize] File hashedSize + * @property {boolean|null} [partiallyHashed] File partiallyHashed + * @property {string|null} [contents] File contents + * @property {google.cloud.securitycenter.v2.File.IDiskPath|null} [diskPath] File diskPath */ /** - * Constructs a new GroupMembership. + * Constructs a new File. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a GroupMembership. - * @implements IGroupMembership + * @classdesc Represents a File. + * @implements IFile * @constructor - * @param {google.cloud.securitycenter.v2.IGroupMembership=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IFile=} [properties] Properties to set */ - function GroupMembership(properties) { + function File(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77090,89 +75902,159 @@ } /** - * GroupMembership groupType. - * @member {google.cloud.securitycenter.v2.GroupMembership.GroupType} groupType - * @memberof google.cloud.securitycenter.v2.GroupMembership + * File path. + * @member {string} path + * @memberof google.cloud.securitycenter.v2.File * @instance */ - GroupMembership.prototype.groupType = 0; + File.prototype.path = ""; /** - * GroupMembership groupId. - * @member {string} groupId - * @memberof google.cloud.securitycenter.v2.GroupMembership + * File size. + * @member {number|Long} size + * @memberof google.cloud.securitycenter.v2.File * @instance */ - GroupMembership.prototype.groupId = ""; + File.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GroupMembership instance using the specified properties. + * File sha256. + * @member {string} sha256 + * @memberof google.cloud.securitycenter.v2.File + * @instance + */ + File.prototype.sha256 = ""; + + /** + * File hashedSize. + * @member {number|Long} hashedSize + * @memberof google.cloud.securitycenter.v2.File + * @instance + */ + File.prototype.hashedSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * File partiallyHashed. + * @member {boolean} partiallyHashed + * @memberof google.cloud.securitycenter.v2.File + * @instance + */ + File.prototype.partiallyHashed = false; + + /** + * File contents. + * @member {string} contents + * @memberof google.cloud.securitycenter.v2.File + * @instance + */ + File.prototype.contents = ""; + + /** + * File diskPath. + * @member {google.cloud.securitycenter.v2.File.IDiskPath|null|undefined} diskPath + * @memberof google.cloud.securitycenter.v2.File + * @instance + */ + File.prototype.diskPath = null; + + /** + * Creates a new File instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static - * @param {google.cloud.securitycenter.v2.IGroupMembership=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership instance + * @param {google.cloud.securitycenter.v2.IFile=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.File} File instance */ - GroupMembership.create = function create(properties) { - return new GroupMembership(properties); + File.create = function create(properties) { + return new File(properties); }; /** - * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static - * @param {google.cloud.securitycenter.v2.IGroupMembership} message GroupMembership message or plain object to encode + * @param {google.cloud.securitycenter.v2.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupMembership.encode = function encode(message, writer) { + File.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.groupType); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupId); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.size != null && Object.hasOwnProperty.call(message, "size")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.size); + if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sha256); + if (message.hashedSize != null && Object.hasOwnProperty.call(message, "hashedSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.hashedSize); + if (message.partiallyHashed != null && Object.hasOwnProperty.call(message, "partiallyHashed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partiallyHashed); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.contents); + if (message.diskPath != null && Object.hasOwnProperty.call(message, "diskPath")) + $root.google.cloud.securitycenter.v2.File.DiskPath.encode(message.diskPath, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static - * @param {google.cloud.securitycenter.v2.IGroupMembership} message GroupMembership message or plain object to encode + * @param {google.cloud.securitycenter.v2.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupMembership.encodeDelimited = function encodeDelimited(message, writer) { + File.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupMembership message from the specified reader or buffer. + * Decodes a File message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v2.File} File * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupMembership.decode = function decode(reader, length) { + File.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.cloud.securitycenter.v2.GroupMembership(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.File(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.groupType = reader.int32(); + message.path = reader.string(); break; } case 2: { - message.groupId = reader.string(); + message.size = reader.int64(); + break; + } + case 3: { + message.sha256 = reader.string(); + break; + } + case 4: { + message.hashedSize = reader.int64(); + break; + } + case 5: { + message.partiallyHashed = reader.bool(); + break; + } + case 6: { + message.contents = reader.string(); + break; + } + case 7: { + message.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.decode(reader, reader.uint32()); break; } default: @@ -77184,166 +76066,492 @@ }; /** - * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v2.File} File * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupMembership.decodeDelimited = function decodeDelimited(reader) { + File.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupMembership message. + * Verifies a File message. * @function verify - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupMembership.verify = function verify(message) { + File.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupType != null && message.hasOwnProperty("groupType")) - switch (message.groupType) { - default: - return "groupType: enum value expected"; - case 0: - case 1: - break; - } - if (message.groupId != null && message.hasOwnProperty("groupId")) - if (!$util.isString(message.groupId)) - return "groupId: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.size != null && message.hasOwnProperty("size")) + if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high))) + return "size: integer|Long expected"; + if (message.sha256 != null && message.hasOwnProperty("sha256")) + if (!$util.isString(message.sha256)) + return "sha256: string expected"; + if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) + if (!$util.isInteger(message.hashedSize) && !(message.hashedSize && $util.isInteger(message.hashedSize.low) && $util.isInteger(message.hashedSize.high))) + return "hashedSize: integer|Long expected"; + if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) + if (typeof message.partiallyHashed !== "boolean") + return "partiallyHashed: boolean expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!$util.isString(message.contents)) + return "contents: string expected"; + if (message.diskPath != null && message.hasOwnProperty("diskPath")) { + var error = $root.google.cloud.securitycenter.v2.File.DiskPath.verify(message.diskPath); + if (error) + return "diskPath." + error; + } return null; }; /** - * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v2.File} File */ - GroupMembership.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.GroupMembership) + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.File) return object; - var message = new $root.google.cloud.securitycenter.v2.GroupMembership(); - switch (object.groupType) { - default: - if (typeof object.groupType === "number") { - message.groupType = object.groupType; - break; - } - break; - case "GROUP_TYPE_UNSPECIFIED": - case 0: - message.groupType = 0; - break; - case "GROUP_TYPE_TOXIC_COMBINATION": - case 1: - message.groupType = 1; - break; + var message = new $root.google.cloud.securitycenter.v2.File(); + if (object.path != null) + message.path = String(object.path); + if (object.size != null) + if ($util.Long) + (message.size = $util.Long.fromValue(object.size)).unsigned = false; + else if (typeof object.size === "string") + message.size = parseInt(object.size, 10); + else if (typeof object.size === "number") + message.size = object.size; + else if (typeof object.size === "object") + message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(); + if (object.sha256 != null) + message.sha256 = String(object.sha256); + if (object.hashedSize != null) + if ($util.Long) + (message.hashedSize = $util.Long.fromValue(object.hashedSize)).unsigned = false; + else if (typeof object.hashedSize === "string") + message.hashedSize = parseInt(object.hashedSize, 10); + else if (typeof object.hashedSize === "number") + message.hashedSize = object.hashedSize; + else if (typeof object.hashedSize === "object") + message.hashedSize = new $util.LongBits(object.hashedSize.low >>> 0, object.hashedSize.high >>> 0).toNumber(); + if (object.partiallyHashed != null) + message.partiallyHashed = Boolean(object.partiallyHashed); + if (object.contents != null) + message.contents = String(object.contents); + if (object.diskPath != null) { + if (typeof object.diskPath !== "object") + throw TypeError(".google.cloud.securitycenter.v2.File.diskPath: object expected"); + message.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.fromObject(object.diskPath); } - if (object.groupId != null) - message.groupId = String(object.groupId); return message; }; /** - * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. + * Creates a plain object from a File message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static - * @param {google.cloud.securitycenter.v2.GroupMembership} message GroupMembership + * @param {google.cloud.securitycenter.v2.File} message File * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupMembership.toObject = function toObject(message, options) { + File.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.groupType = options.enums === String ? "GROUP_TYPE_UNSPECIFIED" : 0; - object.groupId = ""; + object.path = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.size = options.longs === String ? "0" : 0; + object.sha256 = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hashedSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hashedSize = options.longs === String ? "0" : 0; + object.partiallyHashed = false; + object.contents = ""; + object.diskPath = null; } - if (message.groupType != null && message.hasOwnProperty("groupType")) - object.groupType = options.enums === String ? $root.google.cloud.securitycenter.v2.GroupMembership.GroupType[message.groupType] === undefined ? message.groupType : $root.google.cloud.securitycenter.v2.GroupMembership.GroupType[message.groupType] : message.groupType; - if (message.groupId != null && message.hasOwnProperty("groupId")) - object.groupId = message.groupId; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.size != null && message.hasOwnProperty("size")) + if (typeof message.size === "number") + object.size = options.longs === String ? String(message.size) : message.size; + else + object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber() : message.size; + if (message.sha256 != null && message.hasOwnProperty("sha256")) + object.sha256 = message.sha256; + if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) + if (typeof message.hashedSize === "number") + object.hashedSize = options.longs === String ? String(message.hashedSize) : message.hashedSize; + else + object.hashedSize = options.longs === String ? $util.Long.prototype.toString.call(message.hashedSize) : options.longs === Number ? new $util.LongBits(message.hashedSize.low >>> 0, message.hashedSize.high >>> 0).toNumber() : message.hashedSize; + if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) + object.partiallyHashed = message.partiallyHashed; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = message.contents; + if (message.diskPath != null && message.hasOwnProperty("diskPath")) + object.diskPath = $root.google.cloud.securitycenter.v2.File.DiskPath.toObject(message.diskPath, options); return object; }; /** - * Converts this GroupMembership to JSON. + * Converts this File to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @instance * @returns {Object.} JSON object */ - GroupMembership.prototype.toJSON = function toJSON() { + File.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupMembership + * Gets the default type url for File * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.GroupMembership + * @memberof google.cloud.securitycenter.v2.File * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.GroupMembership"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.File"; }; - /** - * GroupType enum. - * @name google.cloud.securitycenter.v2.GroupMembership.GroupType - * @enum {number} - * @property {number} GROUP_TYPE_UNSPECIFIED=0 GROUP_TYPE_UNSPECIFIED value - * @property {number} GROUP_TYPE_TOXIC_COMBINATION=1 GROUP_TYPE_TOXIC_COMBINATION value - */ - GroupMembership.GroupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GROUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GROUP_TYPE_TOXIC_COMBINATION"] = 1; - return values; + File.DiskPath = (function() { + + /** + * Properties of a DiskPath. + * @memberof google.cloud.securitycenter.v2.File + * @interface IDiskPath + * @property {string|null} [partitionUuid] DiskPath partitionUuid + * @property {string|null} [relativePath] DiskPath relativePath + */ + + /** + * Constructs a new DiskPath. + * @memberof google.cloud.securitycenter.v2.File + * @classdesc Represents a DiskPath. + * @implements IDiskPath + * @constructor + * @param {google.cloud.securitycenter.v2.File.IDiskPath=} [properties] Properties to set + */ + function DiskPath(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]]; + } + + /** + * DiskPath partitionUuid. + * @member {string} partitionUuid + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @instance + */ + DiskPath.prototype.partitionUuid = ""; + + /** + * DiskPath relativePath. + * @member {string} relativePath + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @instance + */ + DiskPath.prototype.relativePath = ""; + + /** + * Creates a new DiskPath instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v2.File.IDiskPath=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath instance + */ + DiskPath.create = function create(properties) { + return new DiskPath(properties); + }; + + /** + * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v2.File.IDiskPath} message DiskPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiskPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitionUuid != null && Object.hasOwnProperty.call(message, "partitionUuid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partitionUuid); + if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePath); + return writer; + }; + + /** + * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.File.DiskPath.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v2.File.IDiskPath} message DiskPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiskPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiskPath message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiskPath.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.cloud.securitycenter.v2.File.DiskPath(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partitionUuid = reader.string(); + break; + } + case 2: { + message.relativePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiskPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiskPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiskPath message. + * @function verify + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiskPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) + if (!$util.isString(message.partitionUuid)) + return "partitionUuid: string expected"; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; + return null; + }; + + /** + * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.File.DiskPath} DiskPath + */ + DiskPath.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.File.DiskPath) + return object; + var message = new $root.google.cloud.securitycenter.v2.File.DiskPath(); + if (object.partitionUuid != null) + message.partitionUuid = String(object.partitionUuid); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); + return message; + }; + + /** + * Creates a plain object from a DiskPath message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v2.File.DiskPath} message DiskPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiskPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partitionUuid = ""; + object.relativePath = ""; + } + if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) + object.partitionUuid = message.partitionUuid; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + return object; + }; + + /** + * Converts this DiskPath to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @instance + * @returns {Object.} JSON object + */ + DiskPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiskPath + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.File.DiskPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiskPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.File.DiskPath"; + }; + + return DiskPath; })(); - return GroupMembership; + return File; })(); - v2.IamBinding = (function() { + v2.Finding = (function() { /** - * Properties of an IamBinding. + * Properties of a Finding. * @memberof google.cloud.securitycenter.v2 - * @interface IIamBinding - * @property {google.cloud.securitycenter.v2.IamBinding.Action|null} [action] IamBinding action - * @property {string|null} [role] IamBinding role - * @property {string|null} [member] IamBinding member + * @interface IFinding + * @property {string|null} [name] Finding name + * @property {string|null} [canonicalName] Finding canonicalName + * @property {string|null} [parent] Finding parent + * @property {string|null} [resourceName] Finding resourceName + * @property {google.cloud.securitycenter.v2.Finding.State|null} [state] Finding state + * @property {string|null} [category] Finding category + * @property {string|null} [externalUri] Finding externalUri + * @property {Object.|null} [sourceProperties] Finding sourceProperties + * @property {google.cloud.securitycenter.v2.ISecurityMarks|null} [securityMarks] Finding securityMarks + * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime + * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime + * @property {google.cloud.securitycenter.v2.Finding.Severity|null} [severity] Finding severity + * @property {google.cloud.securitycenter.v2.Finding.Mute|null} [mute] Finding mute + * @property {google.cloud.securitycenter.v2.Finding.FindingClass|null} [findingClass] Finding findingClass + * @property {google.cloud.securitycenter.v2.IIndicator|null} [indicator] Finding indicator + * @property {google.cloud.securitycenter.v2.IVulnerability|null} [vulnerability] Finding vulnerability + * @property {google.protobuf.ITimestamp|null} [muteUpdateTime] Finding muteUpdateTime + * @property {Object.|null} [externalSystems] Finding externalSystems + * @property {google.cloud.securitycenter.v2.IMitreAttack|null} [mitreAttack] Finding mitreAttack + * @property {google.cloud.securitycenter.v2.IAccess|null} [access] Finding access + * @property {Array.|null} [connections] Finding connections + * @property {string|null} [muteInitiator] Finding muteInitiator + * @property {Array.|null} [processes] Finding processes + * @property {Object.|null} [contacts] Finding contacts + * @property {Array.|null} [compliances] Finding compliances + * @property {string|null} [parentDisplayName] Finding parentDisplayName + * @property {string|null} [description] Finding description + * @property {google.cloud.securitycenter.v2.IExfiltration|null} [exfiltration] Finding exfiltration + * @property {Array.|null} [iamBindings] Finding iamBindings + * @property {string|null} [nextSteps] Finding nextSteps + * @property {string|null} [moduleName] Finding moduleName + * @property {Array.|null} [containers] Finding containers + * @property {google.cloud.securitycenter.v2.IKubernetes|null} [kubernetes] Finding kubernetes + * @property {google.cloud.securitycenter.v2.IDatabase|null} [database] Finding database + * @property {google.cloud.securitycenter.v2.IAttackExposure|null} [attackExposure] Finding attackExposure + * @property {Array.|null} [files] Finding files + * @property {google.cloud.securitycenter.v2.ICloudDlpInspection|null} [cloudDlpInspection] Finding cloudDlpInspection + * @property {google.cloud.securitycenter.v2.ICloudDlpDataProfile|null} [cloudDlpDataProfile] Finding cloudDlpDataProfile + * @property {google.cloud.securitycenter.v2.IKernelRootkit|null} [kernelRootkit] Finding kernelRootkit + * @property {Array.|null} [orgPolicies] Finding orgPolicies + * @property {google.cloud.securitycenter.v2.IApplication|null} [application] Finding application + * @property {google.cloud.securitycenter.v2.IBackupDisasterRecovery|null} [backupDisasterRecovery] Finding backupDisasterRecovery + * @property {google.cloud.securitycenter.v2.ISecurityPosture|null} [securityPosture] Finding securityPosture + * @property {Array.|null} [logEntries] Finding logEntries + * @property {Array.|null} [loadBalancers] Finding loadBalancers + * @property {google.cloud.securitycenter.v2.ICloudArmor|null} [cloudArmor] Finding cloudArmor + * @property {google.cloud.securitycenter.v2.INotebook|null} [notebook] Finding notebook + * @property {google.cloud.securitycenter.v2.IToxicCombination|null} [toxicCombination] Finding toxicCombination + * @property {Array.|null} [groupMemberships] Finding groupMemberships */ /** - * Constructs a new IamBinding. + * Constructs a new Finding. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an IamBinding. - * @implements IIamBinding + * @classdesc Represents a Finding. + * @implements IFinding * @constructor - * @param {google.cloud.securitycenter.v2.IIamBinding=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IFinding=} [properties] Properties to set */ - function IamBinding(properties) { + function Finding(properties) { + this.sourceProperties = {}; + this.externalSystems = {}; + this.connections = []; + this.processes = []; + this.contacts = {}; + this.compliances = []; + this.iamBindings = []; + this.containers = []; + this.files = []; + this.orgPolicies = []; + this.logEntries = []; + this.loadBalancers = []; + this.groupMemberships = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77351,3867 +76559,2796 @@ } /** - * IamBinding action. - * @member {google.cloud.securitycenter.v2.IamBinding.Action} action - * @memberof google.cloud.securitycenter.v2.IamBinding + * Finding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - IamBinding.prototype.action = 0; + Finding.prototype.name = ""; /** - * IamBinding role. - * @member {string} role - * @memberof google.cloud.securitycenter.v2.IamBinding + * Finding canonicalName. + * @member {string} canonicalName + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - IamBinding.prototype.role = ""; + Finding.prototype.canonicalName = ""; /** - * IamBinding member. - * @member {string} member - * @memberof google.cloud.securitycenter.v2.IamBinding + * Finding parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - IamBinding.prototype.member = ""; + Finding.prototype.parent = ""; /** - * Creates a new IamBinding instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {google.cloud.securitycenter.v2.IIamBinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding instance + * Finding resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.create = function create(properties) { - return new IamBinding(properties); - }; + Finding.prototype.resourceName = ""; /** - * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {google.cloud.securitycenter.v2.IIamBinding} message IamBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding state. + * @member {google.cloud.securitycenter.v2.Finding.State} state + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - return writer; - }; + Finding.prototype.state = 0; /** - * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {google.cloud.securitycenter.v2.IIamBinding} message IamBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding category. + * @member {string} category + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Finding.prototype.category = ""; /** - * Decodes an IamBinding message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding externalUri. + * @member {string} externalUri + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.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.cloud.securitycenter.v2.IamBinding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Finding.prototype.externalUri = ""; /** - * Decodes an IamBinding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding sourceProperties. + * @member {Object.} sourceProperties + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Finding.prototype.sourceProperties = $util.emptyObject; /** - * Verifies an IamBinding message. - * @function verify - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Finding securityMarks. + * @member {google.cloud.securitycenter.v2.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - return null; - }; + Finding.prototype.securityMarks = null; /** - * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding + * Finding eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.IamBinding) - return object; - var message = new $root.google.cloud.securitycenter.v2.IamBinding(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - return message; - }; + Finding.prototype.eventTime = null; /** - * Creates a plain object from an IamBinding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {google.cloud.securitycenter.v2.IamBinding} message IamBinding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Finding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.cloud.securitycenter.v2.IamBinding.Action[message.action] === undefined ? message.action : $root.google.cloud.securitycenter.v2.IamBinding.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - return object; - }; + Finding.prototype.createTime = null; /** - * Converts this IamBinding to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.IamBinding + * Finding severity. + * @member {google.cloud.securitycenter.v2.Finding.Severity} severity + * @memberof google.cloud.securitycenter.v2.Finding * @instance - * @returns {Object.} JSON object */ - IamBinding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Finding.prototype.severity = 0; /** - * Gets the default type url for IamBinding - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.IamBinding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Finding mute. + * @member {google.cloud.securitycenter.v2.Finding.Mute} mute + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.IamBinding"; - }; + Finding.prototype.mute = 0; /** - * Action enum. - * @name google.cloud.securitycenter.v2.IamBinding.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value + * Finding findingClass. + * @member {google.cloud.securitycenter.v2.Finding.FindingClass} findingClass + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - IamBinding.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); + Finding.prototype.findingClass = 0; - return IamBinding; - })(); + /** + * Finding indicator. + * @member {google.cloud.securitycenter.v2.IIndicator|null|undefined} indicator + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.indicator = null; - v2.Indicator = (function() { + /** + * Finding vulnerability. + * @member {google.cloud.securitycenter.v2.IVulnerability|null|undefined} vulnerability + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.vulnerability = null; /** - * Properties of an Indicator. - * @memberof google.cloud.securitycenter.v2 - * @interface IIndicator - * @property {Array.|null} [ipAddresses] Indicator ipAddresses - * @property {Array.|null} [domains] Indicator domains - * @property {Array.|null} [signatures] Indicator signatures - * @property {Array.|null} [uris] Indicator uris + * Finding muteUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} muteUpdateTime + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ + Finding.prototype.muteUpdateTime = null; /** - * Constructs a new Indicator. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an Indicator. - * @implements IIndicator - * @constructor - * @param {google.cloud.securitycenter.v2.IIndicator=} [properties] Properties to set + * Finding externalSystems. + * @member {Object.} externalSystems + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - function Indicator(properties) { - this.ipAddresses = []; - this.domains = []; - this.signatures = []; - this.uris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Finding.prototype.externalSystems = $util.emptyObject; /** - * Indicator ipAddresses. - * @member {Array.} ipAddresses - * @memberof google.cloud.securitycenter.v2.Indicator + * Finding mitreAttack. + * @member {google.cloud.securitycenter.v2.IMitreAttack|null|undefined} mitreAttack + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - Indicator.prototype.ipAddresses = $util.emptyArray; + Finding.prototype.mitreAttack = null; /** - * Indicator domains. - * @member {Array.} domains - * @memberof google.cloud.securitycenter.v2.Indicator + * Finding access. + * @member {google.cloud.securitycenter.v2.IAccess|null|undefined} access + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - Indicator.prototype.domains = $util.emptyArray; + Finding.prototype.access = null; /** - * Indicator signatures. - * @member {Array.} signatures - * @memberof google.cloud.securitycenter.v2.Indicator + * Finding connections. + * @member {Array.} connections + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - Indicator.prototype.signatures = $util.emptyArray; + Finding.prototype.connections = $util.emptyArray; /** - * Indicator uris. - * @member {Array.} uris - * @memberof google.cloud.securitycenter.v2.Indicator + * Finding muteInitiator. + * @member {string} muteInitiator + * @memberof google.cloud.securitycenter.v2.Finding * @instance */ - Indicator.prototype.uris = $util.emptyArray; + Finding.prototype.muteInitiator = ""; /** - * Creates a new Indicator instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {google.cloud.securitycenter.v2.IIndicator=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Indicator} Indicator instance + * Finding processes. + * @member {Array.} processes + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.create = function create(properties) { - return new Indicator(properties); - }; + Finding.prototype.processes = $util.emptyArray; /** - * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {google.cloud.securitycenter.v2.IIndicator} message Indicator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding contacts. + * @member {Object.} contacts + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipAddresses != null && message.ipAddresses.length) - for (var i = 0; i < message.ipAddresses.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddresses[i]); - if (message.domains != null && message.domains.length) - for (var i = 0; i < message.domains.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.domains[i]); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.uris != null && message.uris.length) - for (var i = 0; i < message.uris.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.uris[i]); - return writer; - }; + Finding.prototype.contacts = $util.emptyObject; /** - * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {google.cloud.securitycenter.v2.IIndicator} message Indicator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding compliances. + * @member {Array.} compliances + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Finding.prototype.compliances = $util.emptyArray; /** - * Decodes an Indicator message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Indicator} Indicator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.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.cloud.securitycenter.v2.Indicator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.ipAddresses && message.ipAddresses.length)) - message.ipAddresses = []; - message.ipAddresses.push(reader.string()); - break; - } - case 2: { - if (!(message.domains && message.domains.length)) - message.domains = []; - message.domains.push(reader.string()); - break; - } - case 3: { - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Finding.prototype.parentDisplayName = ""; /** - * Decodes an Indicator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Indicator} Indicator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding description. + * @member {string} description + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Finding.prototype.description = ""; /** - * Verifies an Indicator message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Finding exfiltration. + * @member {google.cloud.securitycenter.v2.IExfiltration|null|undefined} exfiltration + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { - if (!Array.isArray(message.ipAddresses)) - return "ipAddresses: array expected"; - for (var i = 0; i < message.ipAddresses.length; ++i) - if (!$util.isString(message.ipAddresses[i])) - return "ipAddresses: string[] expected"; - } - if (message.domains != null && message.hasOwnProperty("domains")) { - if (!Array.isArray(message.domains)) - return "domains: array expected"; - for (var i = 0; i < message.domains.length; ++i) - if (!$util.isString(message.domains[i])) - return "domains: string[] expected"; - } - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (var i = 0; i < message.signatures.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify(message.signatures[i]); - if (error) - return "signatures." + error; - } - } - if (message.uris != null && message.hasOwnProperty("uris")) { - if (!Array.isArray(message.uris)) - return "uris: array expected"; - for (var i = 0; i < message.uris.length; ++i) - if (!$util.isString(message.uris[i])) - return "uris: string[] expected"; - } - return null; - }; + Finding.prototype.exfiltration = null; /** - * Creates an Indicator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Indicator} Indicator + * Finding iamBindings. + * @member {Array.} iamBindings + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Indicator) - return object; - var message = new $root.google.cloud.securitycenter.v2.Indicator(); - if (object.ipAddresses) { - if (!Array.isArray(object.ipAddresses)) - throw TypeError(".google.cloud.securitycenter.v2.Indicator.ipAddresses: array expected"); - message.ipAddresses = []; - for (var i = 0; i < object.ipAddresses.length; ++i) - message.ipAddresses[i] = String(object.ipAddresses[i]); - } - if (object.domains) { - if (!Array.isArray(object.domains)) - throw TypeError(".google.cloud.securitycenter.v2.Indicator.domains: array expected"); - message.domains = []; - for (var i = 0; i < object.domains.length; ++i) - message.domains[i] = String(object.domains[i]); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".google.cloud.securitycenter.v2.Indicator.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Indicator.signatures: object expected"); - message.signatures[i] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.fromObject(object.signatures[i]); - } - } - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.cloud.securitycenter.v2.Indicator.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); - } - return message; - }; + Finding.prototype.iamBindings = $util.emptyArray; /** - * Creates a plain object from an Indicator message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {google.cloud.securitycenter.v2.Indicator} message Indicator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Finding nextSteps. + * @member {string} nextSteps + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ipAddresses = []; - object.domains = []; - object.signatures = []; - object.uris = []; - } - if (message.ipAddresses && message.ipAddresses.length) { - object.ipAddresses = []; - for (var j = 0; j < message.ipAddresses.length; ++j) - object.ipAddresses[j] = message.ipAddresses[j]; - } - if (message.domains && message.domains.length) { - object.domains = []; - for (var j = 0; j < message.domains.length; ++j) - object.domains[j] = message.domains[j]; - } - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.toObject(message.signatures[j], options); - } - if (message.uris && message.uris.length) { - object.uris = []; - for (var j = 0; j < message.uris.length; ++j) - object.uris[j] = message.uris[j]; - } - return object; - }; + Finding.prototype.nextSteps = ""; /** - * Converts this Indicator to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Indicator + * Finding moduleName. + * @member {string} moduleName + * @memberof google.cloud.securitycenter.v2.Finding * @instance - * @returns {Object.} JSON object */ - Indicator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Finding.prototype.moduleName = ""; /** - * Gets the default type url for Indicator - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Indicator - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Finding containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v2.Finding + * @instance */ - Indicator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator"; - }; - - Indicator.ProcessSignature = (function() { - - /** - * Properties of a ProcessSignature. - * @memberof google.cloud.securitycenter.v2.Indicator - * @interface IProcessSignature - * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null} [memoryHashSignature] ProcessSignature memoryHashSignature - * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null} [yaraRuleSignature] ProcessSignature yaraRuleSignature - * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|null} [signatureType] ProcessSignature signatureType - */ + Finding.prototype.containers = $util.emptyArray; - /** - * Constructs a new ProcessSignature. - * @memberof google.cloud.securitycenter.v2.Indicator - * @classdesc Represents a ProcessSignature. - * @implements IProcessSignature - * @constructor - * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature=} [properties] Properties to set - */ - function ProcessSignature(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]]; - } + /** + * Finding kubernetes. + * @member {google.cloud.securitycenter.v2.IKubernetes|null|undefined} kubernetes + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.kubernetes = null; - /** - * ProcessSignature memoryHashSignature. - * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null|undefined} memoryHashSignature - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.memoryHashSignature = null; + /** + * Finding database. + * @member {google.cloud.securitycenter.v2.IDatabase|null|undefined} database + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.database = null; - /** - * ProcessSignature yaraRuleSignature. - * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null|undefined} yaraRuleSignature - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.yaraRuleSignature = null; + /** + * Finding attackExposure. + * @member {google.cloud.securitycenter.v2.IAttackExposure|null|undefined} attackExposure + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.attackExposure = null; - /** - * ProcessSignature signatureType. - * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType} signatureType - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.signatureType = 0; + /** + * Finding files. + * @member {Array.} files + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.files = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Finding cloudDlpInspection. + * @member {google.cloud.securitycenter.v2.ICloudDlpInspection|null|undefined} cloudDlpInspection + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.cloudDlpInspection = null; - /** - * ProcessSignature signature. - * @member {"memoryHashSignature"|"yaraRuleSignature"|undefined} signature - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @instance - */ - Object.defineProperty(ProcessSignature.prototype, "signature", { - get: $util.oneOfGetter($oneOfFields = ["memoryHashSignature", "yaraRuleSignature"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Finding cloudDlpDataProfile. + * @member {google.cloud.securitycenter.v2.ICloudDlpDataProfile|null|undefined} cloudDlpDataProfile + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.cloudDlpDataProfile = null; - /** - * Creates a new ProcessSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature instance - */ - ProcessSignature.create = function create(properties) { - return new ProcessSignature(properties); - }; + /** + * Finding kernelRootkit. + * @member {google.cloud.securitycenter.v2.IKernelRootkit|null|undefined} kernelRootkit + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.kernelRootkit = null; - /** - * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProcessSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.memoryHashSignature != null && Object.hasOwnProperty.call(message, "memoryHashSignature")) - $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.encode(message.memoryHashSignature, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yaraRuleSignature != null && Object.hasOwnProperty.call(message, "yaraRuleSignature")) - $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.encode(message.yaraRuleSignature, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signatureType); - return writer; - }; + /** + * Finding orgPolicies. + * @member {Array.} orgPolicies + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.orgPolicies = $util.emptyArray; - /** - * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProcessSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Finding application. + * @member {google.cloud.securitycenter.v2.IApplication|null|undefined} application + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.application = null; - /** - * Decodes a ProcessSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProcessSignature.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.cloud.securitycenter.v2.Indicator.ProcessSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.decode(reader, reader.uint32()); - break; - } - case 7: { - message.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.decode(reader, reader.uint32()); - break; - } - case 8: { - message.signatureType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Finding backupDisasterRecovery. + * @member {google.cloud.securitycenter.v2.IBackupDisasterRecovery|null|undefined} backupDisasterRecovery + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.backupDisasterRecovery = null; - /** - * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProcessSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Finding securityPosture. + * @member {google.cloud.securitycenter.v2.ISecurityPosture|null|undefined} securityPosture + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.securityPosture = null; - /** - * Verifies a ProcessSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProcessSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { - properties.signature = 1; - { - var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify(message.memoryHashSignature); - if (error) - return "memoryHashSignature." + error; - } - } - if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { - if (properties.signature === 1) - return "signature: multiple values"; - properties.signature = 1; - { - var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify(message.yaraRuleSignature); - if (error) - return "yaraRuleSignature." + error; - } - } - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - switch (message.signatureType) { - default: - return "signatureType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Finding logEntries. + * @member {Array.} logEntries + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.logEntries = $util.emptyArray; - /** - * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature - */ - ProcessSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature) - return object; - var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature(); - if (object.memoryHashSignature != null) { - if (typeof object.memoryHashSignature !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.memoryHashSignature: object expected"); - message.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.fromObject(object.memoryHashSignature); - } - if (object.yaraRuleSignature != null) { - if (typeof object.yaraRuleSignature !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.yaraRuleSignature: object expected"); - message.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.fromObject(object.yaraRuleSignature); - } - switch (object.signatureType) { - default: - if (typeof object.signatureType === "number") { - message.signatureType = object.signatureType; - break; - } - break; - case "SIGNATURE_TYPE_UNSPECIFIED": - case 0: - message.signatureType = 0; - break; - case "SIGNATURE_TYPE_PROCESS": - case 1: - message.signatureType = 1; - break; - case "SIGNATURE_TYPE_FILE": - case 2: - message.signatureType = 2; - break; - } - return message; - }; + /** + * Finding loadBalancers. + * @member {Array.} loadBalancers + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.loadBalancers = $util.emptyArray; - /** - * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature} message ProcessSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProcessSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.signatureType = options.enums === String ? "SIGNATURE_TYPE_UNSPECIFIED" : 0; - if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { - object.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.toObject(message.memoryHashSignature, options); - if (options.oneofs) - object.signature = "memoryHashSignature"; - } - if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { - object.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.toObject(message.yaraRuleSignature, options); - if (options.oneofs) - object.signature = "yaraRuleSignature"; - } - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - object.signatureType = options.enums === String ? $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType[message.signatureType] : message.signatureType; - return object; - }; + /** + * Finding cloudArmor. + * @member {google.cloud.securitycenter.v2.ICloudArmor|null|undefined} cloudArmor + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.cloudArmor = null; - /** - * Converts this ProcessSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @instance - * @returns {Object.} JSON object - */ - ProcessSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Finding notebook. + * @member {google.cloud.securitycenter.v2.INotebook|null|undefined} notebook + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.notebook = null; - /** - * Gets the default type url for ProcessSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProcessSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature"; - }; + /** + * Finding toxicCombination. + * @member {google.cloud.securitycenter.v2.IToxicCombination|null|undefined} toxicCombination + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.toxicCombination = null; - ProcessSignature.MemoryHashSignature = (function() { + /** + * Finding groupMemberships. + * @member {Array.} groupMemberships + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + */ + Finding.prototype.groupMemberships = $util.emptyArray; - /** - * Properties of a MemoryHashSignature. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @interface IMemoryHashSignature - * @property {string|null} [binaryFamily] MemoryHashSignature binaryFamily - * @property {Array.|null} [detections] MemoryHashSignature detections - */ + /** + * Creates a new Finding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {google.cloud.securitycenter.v2.IFinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Finding} Finding instance + */ + Finding.create = function create(properties) { + return new Finding(properties); + }; - /** - * Constructs a new MemoryHashSignature. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @classdesc Represents a MemoryHashSignature. - * @implements IMemoryHashSignature - * @constructor - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set - */ - function MemoryHashSignature(properties) { - this.detections = []; - 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 Finding message. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {google.cloud.securitycenter.v2.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.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.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.canonicalName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.category); + if (message.externalUri != null && Object.hasOwnProperty.call(message, "externalUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.externalUri); + if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) + for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } + if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) + $root.google.cloud.securitycenter.v2.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.severity); + if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mute); + if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.findingClass); + if (message.indicator != null && Object.hasOwnProperty.call(message, "indicator")) + $root.google.cloud.securitycenter.v2.Indicator.encode(message.indicator, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) + $root.google.cloud.securitycenter.v2.Vulnerability.encode(message.vulnerability, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.muteUpdateTime != null && Object.hasOwnProperty.call(message, "muteUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.muteUpdateTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.externalSystems != null && Object.hasOwnProperty.call(message, "externalSystems")) + for (var keys = Object.keys(message.externalSystems), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.securitycenter.v2.ExternalSystem.encode(message.externalSystems[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mitreAttack != null && Object.hasOwnProperty.call(message, "mitreAttack")) + $root.google.cloud.securitycenter.v2.MitreAttack.encode(message.mitreAttack, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + $root.google.cloud.securitycenter.v2.Access.encode(message.access, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.connections != null && message.connections.length) + for (var i = 0; i < message.connections.length; ++i) + $root.google.cloud.securitycenter.v2.Connection.encode(message.connections[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.muteInitiator != null && Object.hasOwnProperty.call(message, "muteInitiator")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.muteInitiator); + if (message.processes != null && message.processes.length) + for (var i = 0; i < message.processes.length; ++i) + $root.google.cloud.securitycenter.v2.Process.encode(message.processes[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.contacts != null && Object.hasOwnProperty.call(message, "contacts")) + for (var keys = Object.keys(message.contacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 26, wireType 2 =*/210).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.securitycenter.v2.ContactDetails.encode(message.contacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.compliances != null && message.compliances.length) + for (var i = 0; i < message.compliances.length; ++i) + $root.google.cloud.securitycenter.v2.Compliance.encode(message.compliances[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.parentDisplayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.description); + if (message.exfiltration != null && Object.hasOwnProperty.call(message, "exfiltration")) + $root.google.cloud.securitycenter.v2.Exfiltration.encode(message.exfiltration, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.iamBindings != null && message.iamBindings.length) + for (var i = 0; i < message.iamBindings.length; ++i) + $root.google.cloud.securitycenter.v2.IamBinding.encode(message.iamBindings[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.nextSteps != null && Object.hasOwnProperty.call(message, "nextSteps")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.nextSteps); + if (message.moduleName != null && Object.hasOwnProperty.call(message, "moduleName")) + writer.uint32(/* id 34, wireType 2 =*/274).string(message.moduleName); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.kubernetes != null && Object.hasOwnProperty.call(message, "kubernetes")) + $root.google.cloud.securitycenter.v2.Kubernetes.encode(message.kubernetes, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + $root.google.cloud.securitycenter.v2.Database.encode(message.database, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.attackExposure != null && Object.hasOwnProperty.call(message, "attackExposure")) + $root.google.cloud.securitycenter.v2.AttackExposure.encode(message.attackExposure, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.cloud.securitycenter.v2.File.encode(message.files[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.cloudDlpInspection != null && Object.hasOwnProperty.call(message, "cloudDlpInspection")) + $root.google.cloud.securitycenter.v2.CloudDlpInspection.encode(message.cloudDlpInspection, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.cloudDlpDataProfile != null && Object.hasOwnProperty.call(message, "cloudDlpDataProfile")) + $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.encode(message.cloudDlpDataProfile, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.kernelRootkit != null && Object.hasOwnProperty.call(message, "kernelRootkit")) + $root.google.cloud.securitycenter.v2.KernelRootkit.encode(message.kernelRootkit, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.orgPolicies != null && message.orgPolicies.length) + for (var i = 0; i < message.orgPolicies.length; ++i) + $root.google.cloud.securitycenter.v2.OrgPolicy.encode(message.orgPolicies[i], writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.application != null && Object.hasOwnProperty.call(message, "application")) + $root.google.cloud.securitycenter.v2.Application.encode(message.application, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.backupDisasterRecovery != null && Object.hasOwnProperty.call(message, "backupDisasterRecovery")) + $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.encode(message.backupDisasterRecovery, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.securityPosture != null && Object.hasOwnProperty.call(message, "securityPosture")) + $root.google.cloud.securitycenter.v2.SecurityPosture.encode(message.securityPosture, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.logEntries != null && message.logEntries.length) + for (var i = 0; i < message.logEntries.length; ++i) + $root.google.cloud.securitycenter.v2.LogEntry.encode(message.logEntries[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.loadBalancers != null && message.loadBalancers.length) + for (var i = 0; i < message.loadBalancers.length; ++i) + $root.google.cloud.securitycenter.v2.LoadBalancer.encode(message.loadBalancers[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.cloudArmor != null && Object.hasOwnProperty.call(message, "cloudArmor")) + $root.google.cloud.securitycenter.v2.CloudArmor.encode(message.cloudArmor, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.securitycenter.v2.Notebook.encode(message.notebook, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.toxicCombination != null && Object.hasOwnProperty.call(message, "toxicCombination")) + $root.google.cloud.securitycenter.v2.ToxicCombination.encode(message.toxicCombination, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); + if (message.groupMemberships != null && message.groupMemberships.length) + for (var i = 0; i < message.groupMemberships.length; ++i) + $root.google.cloud.securitycenter.v2.GroupMembership.encode(message.groupMemberships[i], writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); + return writer; + }; - /** - * MemoryHashSignature binaryFamily. - * @member {string} binaryFamily - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @instance - */ - MemoryHashSignature.prototype.binaryFamily = ""; - - /** - * MemoryHashSignature detections. - * @member {Array.} detections - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @instance - */ - MemoryHashSignature.prototype.detections = $util.emptyArray; - - /** - * Creates a new MemoryHashSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature instance - */ - MemoryHashSignature.create = function create(properties) { - return new MemoryHashSignature(properties); - }; - - /** - * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryHashSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binaryFamily != null && Object.hasOwnProperty.call(message, "binaryFamily")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.binaryFamily); - if (message.detections != null && message.detections.length) - for (var i = 0; i < message.detections.length; ++i) - $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.encode(message.detections[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryHashSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Finding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {google.cloud.securitycenter.v2.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryHashSignature.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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.binaryFamily = reader.string(); + /** + * Decodes a Finding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Finding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.canonicalName = reader.string(); + break; + } + case 3: { + message.parent = reader.string(); + break; + } + case 4: { + message.resourceName = reader.string(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.category = reader.string(); + break; + } + case 8: { + message.externalUri = reader.string(); + break; + } + case 9: { + if (message.sourceProperties === $util.emptyObject) + message.sourceProperties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); break; - } - case 4: { - if (!(message.detections && message.detections.length)) - message.detections = []; - message.detections.push($root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.decode(reader, reader.uint32())); + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); break; } - default: - reader.skipType(tag & 7); - break; } + message.sourceProperties[key] = value; + break; } - return message; - }; - - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryHashSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MemoryHashSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MemoryHashSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) - if (!$util.isString(message.binaryFamily)) - return "binaryFamily: string expected"; - if (message.detections != null && message.hasOwnProperty("detections")) { - if (!Array.isArray(message.detections)) - return "detections: array expected"; - for (var i = 0; i < message.detections.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify(message.detections[i]); - if (error) - return "detections." + error; - } + case 10: { + message.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.decode(reader, reader.uint32()); + break; } - return null; - }; - - /** - * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - */ - MemoryHashSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) - return object; - var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature(); - if (object.binaryFamily != null) - message.binaryFamily = String(object.binaryFamily); - if (object.detections) { - if (!Array.isArray(object.detections)) - throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.detections: array expected"); - message.detections = []; - for (var i = 0; i < object.detections.length; ++i) { - if (typeof object.detections[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.detections: object expected"); - message.detections[i] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.fromObject(object.detections[i]); - } + case 11: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; } - return message; - }; - - /** - * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} message MemoryHashSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MemoryHashSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.detections = []; - if (options.defaults) - object.binaryFamily = ""; - if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) - object.binaryFamily = message.binaryFamily; - if (message.detections && message.detections.length) { - object.detections = []; - for (var j = 0; j < message.detections.length; ++j) - object.detections[j] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.toObject(message.detections[j], options); + case 12: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; } - return object; - }; - - /** - * Converts this MemoryHashSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @instance - * @returns {Object.} JSON object - */ - MemoryHashSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MemoryHashSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MemoryHashSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + case 14: { + message.severity = reader.int32(); + break; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature"; - }; - - MemoryHashSignature.Detection = (function() { - - /** - * Properties of a Detection. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @interface IDetection - * @property {string|null} [binary] Detection binary - * @property {number|null} [percentPagesMatched] Detection percentPagesMatched - */ - - /** - * Constructs a new Detection. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature - * @classdesc Represents a Detection. - * @implements IDetection - * @constructor - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set - */ - function Detection(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]]; + case 15: { + message.mute = reader.int32(); + break; } - - /** - * Detection binary. - * @member {string} binary - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - */ - Detection.prototype.binary = ""; - - /** - * Detection percentPagesMatched. - * @member {number} percentPagesMatched - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - */ - Detection.prototype.percentPagesMatched = 0; - - /** - * Creates a new Detection instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection instance - */ - Detection.create = function create(properties) { - return new Detection(properties); - }; - - /** - * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detection.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.binary); - if (message.percentPagesMatched != null && Object.hasOwnProperty.call(message, "percentPagesMatched")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.percentPagesMatched); - return writer; - }; - - /** - * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Detection message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detection.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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.binary = reader.string(); - break; - } - case 3: { - message.percentPagesMatched = reader.double(); - break; - } + case 16: { + message.findingClass = reader.int32(); + break; + } + case 17: { + message.indicator = $root.google.cloud.securitycenter.v2.Indicator.decode(reader, reader.uint32()); + break; + } + case 18: { + message.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.decode(reader, reader.uint32()); + break; + } + case 19: { + message.muteUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + if (message.externalSystems === $util.emptyObject) + message.externalSystems = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.securitycenter.v2.ExternalSystem.decode(reader, reader.uint32()); + break; default: - reader.skipType(tag & 7); + reader.skipType(tag2 & 7); break; } } - return message; - }; - - /** - * Decodes a Detection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Detection message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Detection.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binary != null && message.hasOwnProperty("binary")) - if (!$util.isString(message.binary)) - return "binary: string expected"; - if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) - if (typeof message.percentPagesMatched !== "number") - return "percentPagesMatched: number expected"; - return null; - }; - - /** - * Creates a Detection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - */ - Detection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) - return object; - var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection(); - if (object.binary != null) - message.binary = String(object.binary); - if (object.percentPagesMatched != null) - message.percentPagesMatched = Number(object.percentPagesMatched); - return message; - }; - - /** - * Creates a plain object from a Detection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} message Detection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Detection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.binary = ""; - object.percentPagesMatched = 0; - } - if (message.binary != null && message.hasOwnProperty("binary")) - object.binary = message.binary; - if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) - object.percentPagesMatched = options.json && !isFinite(message.percentPagesMatched) ? String(message.percentPagesMatched) : message.percentPagesMatched; - return object; - }; - - /** - * Converts this Detection to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - * @returns {Object.} JSON object - */ - Detection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Detection - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Detection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection"; - }; - - return Detection; - })(); - - return MemoryHashSignature; - })(); - - ProcessSignature.YaraRuleSignature = (function() { - - /** - * Properties of a YaraRuleSignature. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @interface IYaraRuleSignature - * @property {string|null} [yaraRule] YaraRuleSignature yaraRule - */ - - /** - * Constructs a new YaraRuleSignature. - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature - * @classdesc Represents a YaraRuleSignature. - * @implements IYaraRuleSignature - * @constructor - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set - */ - function YaraRuleSignature(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]]; - } - - /** - * YaraRuleSignature yaraRule. - * @member {string} yaraRule - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @instance - */ - YaraRuleSignature.prototype.yaraRule = ""; - - /** - * Creates a new YaraRuleSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature instance - */ - YaraRuleSignature.create = function create(properties) { - return new YaraRuleSignature(properties); - }; - - /** - * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YaraRuleSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yaraRule != null && Object.hasOwnProperty.call(message, "yaraRule")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.yaraRule); - return writer; - }; - - /** - * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YaraRuleSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YaraRuleSignature.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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.yaraRule = reader.string(); + message.externalSystems[key] = value; + break; + } + case 21: { + message.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.decode(reader, reader.uint32()); + break; + } + case 22: { + message.access = $root.google.cloud.securitycenter.v2.Access.decode(reader, reader.uint32()); + break; + } + case 23: { + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.google.cloud.securitycenter.v2.Connection.decode(reader, reader.uint32())); + break; + } + case 24: { + message.muteInitiator = reader.string(); + break; + } + case 25: { + if (!(message.processes && message.processes.length)) + message.processes = []; + message.processes.push($root.google.cloud.securitycenter.v2.Process.decode(reader, reader.uint32())); + break; + } + case 26: { + if (message.contacts === $util.emptyObject) + message.contacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.securitycenter.v2.ContactDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); break; } - default: - reader.skipType(tag & 7); - break; } + message.contacts[key] = value; + break; } - return message; - }; - - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YaraRuleSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a YaraRuleSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YaraRuleSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) - if (!$util.isString(message.yaraRule)) - return "yaraRule: string expected"; - return null; - }; - - /** - * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - */ - YaraRuleSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) - return object; - var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature(); - if (object.yaraRule != null) - message.yaraRule = String(object.yaraRule); - return message; - }; - - /** - * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} message YaraRuleSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YaraRuleSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.yaraRule = ""; - if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) - object.yaraRule = message.yaraRule; - return object; - }; - - /** - * Converts this YaraRuleSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @instance - * @returns {Object.} JSON object - */ - YaraRuleSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for YaraRuleSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - YaraRuleSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + case 27: { + if (!(message.compliances && message.compliances.length)) + message.compliances = []; + message.compliances.push($root.google.cloud.securitycenter.v2.Compliance.decode(reader, reader.uint32())); + break; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature"; - }; - - return YaraRuleSignature; - })(); - - /** - * SignatureType enum. - * @name google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType - * @enum {number} - * @property {number} SIGNATURE_TYPE_UNSPECIFIED=0 SIGNATURE_TYPE_UNSPECIFIED value - * @property {number} SIGNATURE_TYPE_PROCESS=1 SIGNATURE_TYPE_PROCESS value - * @property {number} SIGNATURE_TYPE_FILE=2 SIGNATURE_TYPE_FILE value - */ - ProcessSignature.SignatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIGNATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SIGNATURE_TYPE_PROCESS"] = 1; - values[valuesById[2] = "SIGNATURE_TYPE_FILE"] = 2; - return values; - })(); - - return ProcessSignature; - })(); - - return Indicator; - })(); + case 29: { + message.parentDisplayName = reader.string(); + break; + } + case 30: { + message.description = reader.string(); + break; + } + case 31: { + message.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.decode(reader, reader.uint32()); + break; + } + case 32: { + if (!(message.iamBindings && message.iamBindings.length)) + message.iamBindings = []; + message.iamBindings.push($root.google.cloud.securitycenter.v2.IamBinding.decode(reader, reader.uint32())); + break; + } + case 33: { + message.nextSteps = reader.string(); + break; + } + case 34: { + message.moduleName = reader.string(); + break; + } + case 35: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); + break; + } + case 36: { + message.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.decode(reader, reader.uint32()); + break; + } + case 37: { + message.database = $root.google.cloud.securitycenter.v2.Database.decode(reader, reader.uint32()); + break; + } + case 38: { + message.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.decode(reader, reader.uint32()); + break; + } + case 39: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32())); + break; + } + case 40: { + message.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.decode(reader, reader.uint32()); + break; + } + case 41: { + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.decode(reader, reader.uint32()); + break; + } + case 42: { + message.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.decode(reader, reader.uint32()); + break; + } + case 43: { + if (!(message.orgPolicies && message.orgPolicies.length)) + message.orgPolicies = []; + message.orgPolicies.push($root.google.cloud.securitycenter.v2.OrgPolicy.decode(reader, reader.uint32())); + break; + } + case 45: { + message.application = $root.google.cloud.securitycenter.v2.Application.decode(reader, reader.uint32()); + break; + } + case 47: { + message.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.decode(reader, reader.uint32()); + break; + } + case 48: { + message.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.decode(reader, reader.uint32()); + break; + } + case 49: { + if (!(message.logEntries && message.logEntries.length)) + message.logEntries = []; + message.logEntries.push($root.google.cloud.securitycenter.v2.LogEntry.decode(reader, reader.uint32())); + break; + } + case 50: { + if (!(message.loadBalancers && message.loadBalancers.length)) + message.loadBalancers = []; + message.loadBalancers.push($root.google.cloud.securitycenter.v2.LoadBalancer.decode(reader, reader.uint32())); + break; + } + case 51: { + message.cloudArmor = $root.google.cloud.securitycenter.v2.CloudArmor.decode(reader, reader.uint32()); + break; + } + case 55: { + message.notebook = $root.google.cloud.securitycenter.v2.Notebook.decode(reader, reader.uint32()); + break; + } + case 56: { + message.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.decode(reader, reader.uint32()); + break; + } + case 57: { + if (!(message.groupMemberships && message.groupMemberships.length)) + message.groupMemberships = []; + message.groupMemberships.push($root.google.cloud.securitycenter.v2.GroupMembership.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v2.KernelRootkit = (function() { + /** + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Properties of a KernelRootkit. - * @memberof google.cloud.securitycenter.v2 - * @interface IKernelRootkit - * @property {string|null} [name] KernelRootkit name - * @property {boolean|null} [unexpectedCodeModification] KernelRootkit unexpectedCodeModification - * @property {boolean|null} [unexpectedReadOnlyDataModification] KernelRootkit unexpectedReadOnlyDataModification - * @property {boolean|null} [unexpectedFtraceHandler] KernelRootkit unexpectedFtraceHandler - * @property {boolean|null} [unexpectedKprobeHandler] KernelRootkit unexpectedKprobeHandler - * @property {boolean|null} [unexpectedKernelCodePages] KernelRootkit unexpectedKernelCodePages - * @property {boolean|null} [unexpectedSystemCallHandler] KernelRootkit unexpectedSystemCallHandler - * @property {boolean|null} [unexpectedInterruptHandler] KernelRootkit unexpectedInterruptHandler - * @property {boolean|null} [unexpectedProcessesInRunqueue] KernelRootkit unexpectedProcessesInRunqueue - */ - - /** - * Constructs a new KernelRootkit. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a KernelRootkit. - * @implements IKernelRootkit - * @constructor - * @param {google.cloud.securitycenter.v2.IKernelRootkit=} [properties] Properties to set - */ - function KernelRootkit(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]]; - } - - /** - * KernelRootkit name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.name = ""; - - /** - * KernelRootkit unexpectedCodeModification. - * @member {boolean} unexpectedCodeModification - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedCodeModification = false; - - /** - * KernelRootkit unexpectedReadOnlyDataModification. - * @member {boolean} unexpectedReadOnlyDataModification - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedReadOnlyDataModification = false; - - /** - * KernelRootkit unexpectedFtraceHandler. - * @member {boolean} unexpectedFtraceHandler - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedFtraceHandler = false; - - /** - * KernelRootkit unexpectedKprobeHandler. - * @member {boolean} unexpectedKprobeHandler - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedKprobeHandler = false; - - /** - * KernelRootkit unexpectedKernelCodePages. - * @member {boolean} unexpectedKernelCodePages - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedKernelCodePages = false; - - /** - * KernelRootkit unexpectedSystemCallHandler. - * @member {boolean} unexpectedSystemCallHandler - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedSystemCallHandler = false; - - /** - * KernelRootkit unexpectedInterruptHandler. - * @member {boolean} unexpectedInterruptHandler - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedInterruptHandler = false; - - /** - * KernelRootkit unexpectedProcessesInRunqueue. - * @member {boolean} unexpectedProcessesInRunqueue - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedProcessesInRunqueue = false; - - /** - * Creates a new KernelRootkit instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {google.cloud.securitycenter.v2.IKernelRootkit=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit instance - */ - KernelRootkit.create = function create(properties) { - return new KernelRootkit(properties); - }; - - /** - * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {google.cloud.securitycenter.v2.IKernelRootkit} message KernelRootkit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KernelRootkit.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.unexpectedCodeModification != null && Object.hasOwnProperty.call(message, "unexpectedCodeModification")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.unexpectedCodeModification); - if (message.unexpectedReadOnlyDataModification != null && Object.hasOwnProperty.call(message, "unexpectedReadOnlyDataModification")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unexpectedReadOnlyDataModification); - if (message.unexpectedFtraceHandler != null && Object.hasOwnProperty.call(message, "unexpectedFtraceHandler")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unexpectedFtraceHandler); - if (message.unexpectedKprobeHandler != null && Object.hasOwnProperty.call(message, "unexpectedKprobeHandler")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unexpectedKprobeHandler); - if (message.unexpectedKernelCodePages != null && Object.hasOwnProperty.call(message, "unexpectedKernelCodePages")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.unexpectedKernelCodePages); - if (message.unexpectedSystemCallHandler != null && Object.hasOwnProperty.call(message, "unexpectedSystemCallHandler")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.unexpectedSystemCallHandler); - if (message.unexpectedInterruptHandler != null && Object.hasOwnProperty.call(message, "unexpectedInterruptHandler")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.unexpectedInterruptHandler); - if (message.unexpectedProcessesInRunqueue != null && Object.hasOwnProperty.call(message, "unexpectedProcessesInRunqueue")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.unexpectedProcessesInRunqueue); - return writer; - }; - - /** - * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {google.cloud.securitycenter.v2.IKernelRootkit} message KernelRootkit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KernelRootkit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KernelRootkit message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KernelRootkit.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.cloud.securitycenter.v2.KernelRootkit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.unexpectedCodeModification = reader.bool(); - break; - } - case 3: { - message.unexpectedReadOnlyDataModification = reader.bool(); - break; - } - case 4: { - message.unexpectedFtraceHandler = reader.bool(); - break; - } - case 5: { - message.unexpectedKprobeHandler = reader.bool(); - break; - } - case 6: { - message.unexpectedKernelCodePages = reader.bool(); - break; - } - case 7: { - message.unexpectedSystemCallHandler = reader.bool(); - break; - } - case 8: { - message.unexpectedInterruptHandler = reader.bool(); - break; - } - case 9: { - message.unexpectedProcessesInRunqueue = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KernelRootkit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KernelRootkit message. + * Verifies a Finding message. * @function verify - * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @memberof google.cloud.securitycenter.v2.Finding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KernelRootkit.verify = function verify(message) { + Finding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) - if (typeof message.unexpectedCodeModification !== "boolean") - return "unexpectedCodeModification: boolean expected"; - if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) - if (typeof message.unexpectedReadOnlyDataModification !== "boolean") - return "unexpectedReadOnlyDataModification: boolean expected"; - if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) - if (typeof message.unexpectedFtraceHandler !== "boolean") - return "unexpectedFtraceHandler: boolean expected"; - if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) - if (typeof message.unexpectedKprobeHandler !== "boolean") - return "unexpectedKprobeHandler: boolean expected"; - if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) - if (typeof message.unexpectedKernelCodePages !== "boolean") - return "unexpectedKernelCodePages: boolean expected"; - if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) - if (typeof message.unexpectedSystemCallHandler !== "boolean") - return "unexpectedSystemCallHandler: boolean expected"; - if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) - if (typeof message.unexpectedInterruptHandler !== "boolean") - return "unexpectedInterruptHandler: boolean expected"; - if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) - if (typeof message.unexpectedProcessesInRunqueue !== "boolean") - return "unexpectedProcessesInRunqueue: boolean expected"; - return null; - }; - - /** - * Creates a KernelRootkit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit - */ - KernelRootkit.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.KernelRootkit) - return object; - var message = new $root.google.cloud.securitycenter.v2.KernelRootkit(); - if (object.name != null) - message.name = String(object.name); - if (object.unexpectedCodeModification != null) - message.unexpectedCodeModification = Boolean(object.unexpectedCodeModification); - if (object.unexpectedReadOnlyDataModification != null) - message.unexpectedReadOnlyDataModification = Boolean(object.unexpectedReadOnlyDataModification); - if (object.unexpectedFtraceHandler != null) - message.unexpectedFtraceHandler = Boolean(object.unexpectedFtraceHandler); - if (object.unexpectedKprobeHandler != null) - message.unexpectedKprobeHandler = Boolean(object.unexpectedKprobeHandler); - if (object.unexpectedKernelCodePages != null) - message.unexpectedKernelCodePages = Boolean(object.unexpectedKernelCodePages); - if (object.unexpectedSystemCallHandler != null) - message.unexpectedSystemCallHandler = Boolean(object.unexpectedSystemCallHandler); - if (object.unexpectedInterruptHandler != null) - message.unexpectedInterruptHandler = Boolean(object.unexpectedInterruptHandler); - if (object.unexpectedProcessesInRunqueue != null) - message.unexpectedProcessesInRunqueue = Boolean(object.unexpectedProcessesInRunqueue); - return message; - }; - - /** - * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {google.cloud.securitycenter.v2.KernelRootkit} message KernelRootkit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KernelRootkit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.unexpectedCodeModification = false; - object.unexpectedReadOnlyDataModification = false; - object.unexpectedFtraceHandler = false; - object.unexpectedKprobeHandler = false; - object.unexpectedKernelCodePages = false; - object.unexpectedSystemCallHandler = false; - object.unexpectedInterruptHandler = false; - object.unexpectedProcessesInRunqueue = false; + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + if (!$util.isString(message.canonicalName)) + return "canonicalName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + if (!$util.isString(message.externalUri)) + return "externalUri: string expected"; + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { + if (!$util.isObject(message.sourceProperties)) + return "sourceProperties: object expected"; + var key = Object.keys(message.sourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (error) + return "sourceProperties." + error; + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) - object.unexpectedCodeModification = message.unexpectedCodeModification; - if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) - object.unexpectedReadOnlyDataModification = message.unexpectedReadOnlyDataModification; - if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) - object.unexpectedFtraceHandler = message.unexpectedFtraceHandler; - if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) - object.unexpectedKprobeHandler = message.unexpectedKprobeHandler; - if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) - object.unexpectedKernelCodePages = message.unexpectedKernelCodePages; - if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) - object.unexpectedSystemCallHandler = message.unexpectedSystemCallHandler; - if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) - object.unexpectedInterruptHandler = message.unexpectedInterruptHandler; - if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) - object.unexpectedProcessesInRunqueue = message.unexpectedProcessesInRunqueue; - return object; - }; - - /** - * Converts this KernelRootkit to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @instance - * @returns {Object.} JSON object - */ - KernelRootkit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KernelRootkit - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.KernelRootkit - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KernelRootkit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v2.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.KernelRootkit"; - }; - - return KernelRootkit; - })(); - - v2.Kubernetes = (function() { - - /** - * Properties of a Kubernetes. - * @memberof google.cloud.securitycenter.v2 - * @interface IKubernetes - * @property {Array.|null} [pods] Kubernetes pods - * @property {Array.|null} [nodes] Kubernetes nodes - * @property {Array.|null} [nodePools] Kubernetes nodePools - * @property {Array.|null} [roles] Kubernetes roles - * @property {Array.|null} [bindings] Kubernetes bindings - * @property {Array.|null} [accessReviews] Kubernetes accessReviews - * @property {Array.|null} [objects] Kubernetes objects - */ - - /** - * Constructs a new Kubernetes. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Kubernetes. - * @implements IKubernetes - * @constructor - * @param {google.cloud.securitycenter.v2.IKubernetes=} [properties] Properties to set - */ - function Kubernetes(properties) { - this.pods = []; - this.nodes = []; - this.nodePools = []; - this.roles = []; - this.bindings = []; - this.accessReviews = []; - this.objects = []; - 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]]; - } - - /** - * Kubernetes pods. - * @member {Array.} pods - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.pods = $util.emptyArray; - - /** - * Kubernetes nodes. - * @member {Array.} nodes - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.nodes = $util.emptyArray; - - /** - * Kubernetes nodePools. - * @member {Array.} nodePools - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.nodePools = $util.emptyArray; - - /** - * Kubernetes roles. - * @member {Array.} roles - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.roles = $util.emptyArray; - - /** - * Kubernetes bindings. - * @member {Array.} bindings - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.bindings = $util.emptyArray; - - /** - * Kubernetes accessReviews. - * @member {Array.} accessReviews - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.accessReviews = $util.emptyArray; - - /** - * Kubernetes objects. - * @member {Array.} objects - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - */ - Kubernetes.prototype.objects = $util.emptyArray; - - /** - * Creates a new Kubernetes instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {google.cloud.securitycenter.v2.IKubernetes=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes instance - */ - Kubernetes.create = function create(properties) { - return new Kubernetes(properties); - }; - - /** - * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {google.cloud.securitycenter.v2.IKubernetes} message Kubernetes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Kubernetes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pods != null && message.pods.length) - for (var i = 0; i < message.pods.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Pod.encode(message.pods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nodes != null && message.nodes.length) - for (var i = 0; i < message.nodes.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.encode(message.nodePools[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.roles != null && message.roles.length) - for (var i = 0; i < message.roles.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Role.encode(message.roles[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Binding.encode(message.bindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.accessReviews != null && message.accessReviews.length) - for (var i = 0; i < message.accessReviews.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.encode(message.accessReviews[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.objects != null && message.objects.length) - for (var i = 0; i < message.objects.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Object.encode(message.objects[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {google.cloud.securitycenter.v2.IKubernetes} message Kubernetes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Kubernetes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Kubernetes message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Kubernetes.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.cloud.securitycenter.v2.Kubernetes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.pods && message.pods.length)) - message.pods = []; - message.pods.push($root.google.cloud.securitycenter.v2.Kubernetes.Pod.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.nodes && message.nodes.length)) - message.nodes = []; - message.nodes.push($root.google.cloud.securitycenter.v2.Kubernetes.Node.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.cloud.securitycenter.v2.Kubernetes.NodePool.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.roles && message.roles.length)) - message.roles = []; - message.roles.push($root.google.cloud.securitycenter.v2.Kubernetes.Role.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.cloud.securitycenter.v2.Kubernetes.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.accessReviews && message.accessReviews.length)) - message.accessReviews = []; - message.accessReviews.push($root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.objects && message.objects.length)) - message.objects = []; - message.objects.push($root.google.cloud.securitycenter.v2.Kubernetes.Object.decode(reader, reader.uint32())); - break; - } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { default: - reader.skipType(tag & 7); + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.mute != null && message.hasOwnProperty("mute")) + switch (message.mute) { + default: + return "mute: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + switch (message.findingClass) { + default: + return "findingClass: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: break; } + if (message.indicator != null && message.hasOwnProperty("indicator")) { + var error = $root.google.cloud.securitycenter.v2.Indicator.verify(message.indicator); + if (error) + return "indicator." + error; } - return message; - }; - - /** - * Decodes a Kubernetes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Kubernetes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Kubernetes message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Kubernetes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pods != null && message.hasOwnProperty("pods")) { - if (!Array.isArray(message.pods)) - return "pods: array expected"; - for (var i = 0; i < message.pods.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.verify(message.pods[i]); + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + var error = $root.google.cloud.securitycenter.v2.Vulnerability.verify(message.vulnerability); + if (error) + return "vulnerability." + error; + } + if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.muteUpdateTime); + if (error) + return "muteUpdateTime." + error; + } + if (message.externalSystems != null && message.hasOwnProperty("externalSystems")) { + if (!$util.isObject(message.externalSystems)) + return "externalSystems: object expected"; + var key = Object.keys(message.externalSystems); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.ExternalSystem.verify(message.externalSystems[key[i]]); if (error) - return "pods." + error; + return "externalSystems." + error; } } - if (message.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) - return "nodes: array expected"; - for (var i = 0; i < message.nodes.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Node.verify(message.nodes[i]); + if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) { + var error = $root.google.cloud.securitycenter.v2.MitreAttack.verify(message.mitreAttack); + if (error) + return "mitreAttack." + error; + } + if (message.access != null && message.hasOwnProperty("access")) { + var error = $root.google.cloud.securitycenter.v2.Access.verify(message.access); + if (error) + return "access." + error; + } + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (var i = 0; i < message.connections.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Connection.verify(message.connections[i]); if (error) - return "nodes." + error; + return "connections." + error; } } - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.verify(message.nodePools[i]); + if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) + if (!$util.isString(message.muteInitiator)) + return "muteInitiator: string expected"; + if (message.processes != null && message.hasOwnProperty("processes")) { + if (!Array.isArray(message.processes)) + return "processes: array expected"; + for (var i = 0; i < message.processes.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Process.verify(message.processes[i]); if (error) - return "nodePools." + error; + return "processes." + error; } } - if (message.roles != null && message.hasOwnProperty("roles")) { - if (!Array.isArray(message.roles)) - return "roles: array expected"; - for (var i = 0; i < message.roles.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Role.verify(message.roles[i]); + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!$util.isObject(message.contacts)) + return "contacts: object expected"; + var key = Object.keys(message.contacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.ContactDetails.verify(message.contacts[key[i]]); if (error) - return "roles." + error; + return "contacts." + error; } } - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.verify(message.bindings[i]); + if (message.compliances != null && message.hasOwnProperty("compliances")) { + if (!Array.isArray(message.compliances)) + return "compliances: array expected"; + for (var i = 0; i < message.compliances.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Compliance.verify(message.compliances[i]); if (error) - return "bindings." + error; + return "compliances." + error; } } - if (message.accessReviews != null && message.hasOwnProperty("accessReviews")) { - if (!Array.isArray(message.accessReviews)) - return "accessReviews: array expected"; - for (var i = 0; i < message.accessReviews.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify(message.accessReviews[i]); + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) { + var error = $root.google.cloud.securitycenter.v2.Exfiltration.verify(message.exfiltration); + if (error) + return "exfiltration." + error; + } + if (message.iamBindings != null && message.hasOwnProperty("iamBindings")) { + if (!Array.isArray(message.iamBindings)) + return "iamBindings: array expected"; + for (var i = 0; i < message.iamBindings.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.IamBinding.verify(message.iamBindings[i]); if (error) - return "accessReviews." + error; + return "iamBindings." + error; } } - if (message.objects != null && message.hasOwnProperty("objects")) { - if (!Array.isArray(message.objects)) - return "objects: array expected"; - for (var i = 0; i < message.objects.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Object.verify(message.objects[i]); + if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) + if (!$util.isString(message.nextSteps)) + return "nextSteps: string expected"; + if (message.moduleName != null && message.hasOwnProperty("moduleName")) + if (!$util.isString(message.moduleName)) + return "moduleName: string expected"; + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); if (error) - return "objects." + error; + return "containers." + error; } } - return null; - }; - - /** - * Creates a Kubernetes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes - */ - Kubernetes.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes(); - if (object.pods) { - if (!Array.isArray(object.pods)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.pods: array expected"); - message.pods = []; - for (var i = 0; i < object.pods.length; ++i) { - if (typeof object.pods[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.pods: object expected"); - message.pods[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.fromObject(object.pods[i]); - } + if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.verify(message.kubernetes); + if (error) + return "kubernetes." + error; } - if (object.nodes) { - if (!Array.isArray(object.nodes)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodes: array expected"); - message.nodes = []; - for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodes: object expected"); - message.nodes[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.fromObject(object.nodes[i]); - } + if (message.database != null && message.hasOwnProperty("database")) { + var error = $root.google.cloud.securitycenter.v2.Database.verify(message.database); + if (error) + return "database." + error; } - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodePools: object expected"); - message.nodePools[i] = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.fromObject(object.nodePools[i]); + if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) { + var error = $root.google.cloud.securitycenter.v2.AttackExposure.verify(message.attackExposure); + if (error) + return "attackExposure." + error; + } + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.File.verify(message.files[i]); + if (error) + return "files." + error; } } - if (object.roles) { - if (!Array.isArray(object.roles)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.roles: array expected"); - message.roles = []; - for (var i = 0; i < object.roles.length; ++i) { - if (typeof object.roles[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.roles: object expected"); - message.roles[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Role.fromObject(object.roles[i]); + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) { + var error = $root.google.cloud.securitycenter.v2.CloudDlpInspection.verify(message.cloudDlpInspection); + if (error) + return "cloudDlpInspection." + error; + } + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) { + var error = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.verify(message.cloudDlpDataProfile); + if (error) + return "cloudDlpDataProfile." + error; + } + if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) { + var error = $root.google.cloud.securitycenter.v2.KernelRootkit.verify(message.kernelRootkit); + if (error) + return "kernelRootkit." + error; + } + if (message.orgPolicies != null && message.hasOwnProperty("orgPolicies")) { + if (!Array.isArray(message.orgPolicies)) + return "orgPolicies: array expected"; + for (var i = 0; i < message.orgPolicies.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.OrgPolicy.verify(message.orgPolicies[i]); + if (error) + return "orgPolicies." + error; } } - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.bindings: object expected"); - message.bindings[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.fromObject(object.bindings[i]); + if (message.application != null && message.hasOwnProperty("application")) { + var error = $root.google.cloud.securitycenter.v2.Application.verify(message.application); + if (error) + return "application." + error; + } + if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) { + var error = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.verify(message.backupDisasterRecovery); + if (error) + return "backupDisasterRecovery." + error; + } + if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) { + var error = $root.google.cloud.securitycenter.v2.SecurityPosture.verify(message.securityPosture); + if (error) + return "securityPosture." + error; + } + if (message.logEntries != null && message.hasOwnProperty("logEntries")) { + if (!Array.isArray(message.logEntries)) + return "logEntries: array expected"; + for (var i = 0; i < message.logEntries.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.LogEntry.verify(message.logEntries[i]); + if (error) + return "logEntries." + error; } } - if (object.accessReviews) { - if (!Array.isArray(object.accessReviews)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.accessReviews: array expected"); - message.accessReviews = []; - for (var i = 0; i < object.accessReviews.length; ++i) { - if (typeof object.accessReviews[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.accessReviews: object expected"); - message.accessReviews[i] = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.fromObject(object.accessReviews[i]); + if (message.loadBalancers != null && message.hasOwnProperty("loadBalancers")) { + if (!Array.isArray(message.loadBalancers)) + return "loadBalancers: array expected"; + for (var i = 0; i < message.loadBalancers.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.LoadBalancer.verify(message.loadBalancers[i]); + if (error) + return "loadBalancers." + error; } } - if (object.objects) { - if (!Array.isArray(object.objects)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.objects: array expected"); - message.objects = []; - for (var i = 0; i < object.objects.length; ++i) { - if (typeof object.objects[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.objects: object expected"); - message.objects[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Object.fromObject(object.objects[i]); + if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) { + var error = $root.google.cloud.securitycenter.v2.CloudArmor.verify(message.cloudArmor); + if (error) + return "cloudArmor." + error; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + var error = $root.google.cloud.securitycenter.v2.Notebook.verify(message.notebook); + if (error) + return "notebook." + error; + } + if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) { + var error = $root.google.cloud.securitycenter.v2.ToxicCombination.verify(message.toxicCombination); + if (error) + return "toxicCombination." + error; + } + if (message.groupMemberships != null && message.hasOwnProperty("groupMemberships")) { + if (!Array.isArray(message.groupMemberships)) + return "groupMemberships: array expected"; + for (var i = 0; i < message.groupMemberships.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.GroupMembership.verify(message.groupMemberships[i]); + if (error) + return "groupMemberships." + error; } } - return message; + return null; }; /** - * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Finding * @static - * @param {google.cloud.securitycenter.v2.Kubernetes} message Kubernetes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Finding} Finding */ - Kubernetes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pods = []; - object.nodes = []; - object.nodePools = []; - object.roles = []; - object.bindings = []; - object.accessReviews = []; - object.objects = []; - } - if (message.pods && message.pods.length) { - object.pods = []; - for (var j = 0; j < message.pods.length; ++j) - object.pods[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.toObject(message.pods[j], options); - } - if (message.nodes && message.nodes.length) { - object.nodes = []; - for (var j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.toObject(message.nodes[j], options); + Finding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Finding) + return object; + var message = new $root.google.cloud.securitycenter.v2.Finding(); + if (object.name != null) + message.name = String(object.name); + if (object.canonicalName != null) + message.canonicalName = String(object.canonicalName); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; } - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.toObject(message.nodePools[j], options); + if (object.category != null) + message.category = String(object.category); + if (object.externalUri != null) + message.externalUri = String(object.externalUri); + if (object.sourceProperties) { + if (typeof object.sourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.sourceProperties: object expected"); + message.sourceProperties = {}; + for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.sourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.sourceProperties: object expected"); + message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + } } - if (message.roles && message.roles.length) { - object.roles = []; - for (var j = 0; j < message.roles.length; ++j) - object.roles[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Role.toObject(message.roles[j], options); + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.fromObject(object.securityMarks); } - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.toObject(message.bindings[j], options); + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); } - if (message.accessReviews && message.accessReviews.length) { - object.accessReviews = []; - for (var j = 0; j < message.accessReviews.length; ++j) - object.accessReviews[j] = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.toObject(message.accessReviews[j], options); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (message.objects && message.objects.length) { - object.objects = []; - for (var j = 0; j < message.objects.length; ++j) - object.objects[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Object.toObject(message.objects[j], options); + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; } - return object; - }; - - /** - * Converts this Kubernetes to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @instance - * @returns {Object.} JSON object - */ - Kubernetes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Kubernetes - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Kubernetes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + switch (object.mute) { + default: + if (typeof object.mute === "number") { + message.mute = object.mute; + break; + } + break; + case "MUTE_UNSPECIFIED": + case 0: + message.mute = 0; + break; + case "MUTED": + case 1: + message.mute = 1; + break; + case "UNMUTED": + case 2: + message.mute = 2; + break; + case "UNDEFINED": + case 3: + message.mute = 3; + break; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes"; - }; - - Kubernetes.Pod = (function() { - - /** - * Properties of a Pod. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface IPod - * @property {string|null} [ns] Pod ns - * @property {string|null} [name] Pod name - * @property {Array.|null} [labels] Pod labels - * @property {Array.|null} [containers] Pod containers - */ - - /** - * Constructs a new Pod. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a Pod. - * @implements IPod - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.IPod=} [properties] Properties to set - */ - function Pod(properties) { - this.labels = []; - this.containers = []; - 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]]; + switch (object.findingClass) { + default: + if (typeof object.findingClass === "number") { + message.findingClass = object.findingClass; + break; + } + break; + case "FINDING_CLASS_UNSPECIFIED": + case 0: + message.findingClass = 0; + break; + case "THREAT": + case 1: + message.findingClass = 1; + break; + case "VULNERABILITY": + case 2: + message.findingClass = 2; + break; + case "MISCONFIGURATION": + case 3: + message.findingClass = 3; + break; + case "OBSERVATION": + case 4: + message.findingClass = 4; + break; + case "SCC_ERROR": + case 5: + message.findingClass = 5; + break; + case "POSTURE_VIOLATION": + case 6: + message.findingClass = 6; + break; + case "TOXIC_COMBINATION": + case 7: + message.findingClass = 7; + break; } - - /** - * Pod ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @instance - */ - Pod.prototype.ns = ""; - - /** - * Pod name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @instance - */ - Pod.prototype.name = ""; - - /** - * Pod labels. - * @member {Array.} labels - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @instance - */ - Pod.prototype.labels = $util.emptyArray; - - /** - * Pod containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @instance - */ - Pod.prototype.containers = $util.emptyArray; - - /** - * Creates a new Pod instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IPod=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod instance - */ - Pod.create = function create(properties) { - return new Pod(properties); - }; - - /** - * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IPod} message Pod message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pod.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.cloud.securitycenter.v2.Label.encode(message.labels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IPod} message Pod message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pod.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pod message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pod.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.cloud.securitycenter.v2.Kubernetes.Pod(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ns = reader.string(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.cloud.securitycenter.v2.Label.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (object.indicator != null) { + if (typeof object.indicator !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.indicator: object expected"); + message.indicator = $root.google.cloud.securitycenter.v2.Indicator.fromObject(object.indicator); + } + if (object.vulnerability != null) { + if (typeof object.vulnerability !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.vulnerability: object expected"); + message.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.fromObject(object.vulnerability); + } + if (object.muteUpdateTime != null) { + if (typeof object.muteUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.muteUpdateTime: object expected"); + message.muteUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.muteUpdateTime); + } + if (object.externalSystems) { + if (typeof object.externalSystems !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.externalSystems: object expected"); + message.externalSystems = {}; + for (var keys = Object.keys(object.externalSystems), i = 0; i < keys.length; ++i) { + if (typeof object.externalSystems[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.externalSystems: object expected"); + message.externalSystems[keys[i]] = $root.google.cloud.securitycenter.v2.ExternalSystem.fromObject(object.externalSystems[keys[i]]); } - return message; - }; - - /** - * Decodes a Pod message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pod.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pod message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pod.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Label.verify(message.labels[i]); - if (error) - return "labels." + error; - } + } + if (object.mitreAttack != null) { + if (typeof object.mitreAttack !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.mitreAttack: object expected"); + message.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.fromObject(object.mitreAttack); + } + if (object.access != null) { + if (typeof object.access !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.access: object expected"); + message.access = $root.google.cloud.securitycenter.v2.Access.fromObject(object.access); + } + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.connections: array expected"); + message.connections = []; + for (var i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.connections: object expected"); + message.connections[i] = $root.google.cloud.securitycenter.v2.Connection.fromObject(object.connections[i]); } - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } + } + if (object.muteInitiator != null) + message.muteInitiator = String(object.muteInitiator); + if (object.processes) { + if (!Array.isArray(object.processes)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.processes: array expected"); + message.processes = []; + for (var i = 0; i < object.processes.length; ++i) { + if (typeof object.processes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.processes: object expected"); + message.processes[i] = $root.google.cloud.securitycenter.v2.Process.fromObject(object.processes[i]); } - return null; - }; - - /** - * Creates a Pod message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod - */ - Pod.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Pod) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Pod(); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.labels: object expected"); - message.labels[i] = $root.google.cloud.securitycenter.v2.Label.fromObject(object.labels[i]); - } + } + if (object.contacts) { + if (typeof object.contacts !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.contacts: object expected"); + message.contacts = {}; + for (var keys = Object.keys(object.contacts), i = 0; i < keys.length; ++i) { + if (typeof object.contacts[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.contacts: object expected"); + message.contacts[keys[i]] = $root.google.cloud.securitycenter.v2.ContactDetails.fromObject(object.contacts[keys[i]]); } - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); - } + } + if (object.compliances) { + if (!Array.isArray(object.compliances)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.compliances: array expected"); + message.compliances = []; + for (var i = 0; i < object.compliances.length; ++i) { + if (typeof object.compliances[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.compliances: object expected"); + message.compliances[i] = $root.google.cloud.securitycenter.v2.Compliance.fromObject(object.compliances[i]); } - return message; - }; - - /** - * Creates a plain object from a Pod message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Pod} message Pod - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pod.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.containers = []; + } + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + if (object.description != null) + message.description = String(object.description); + if (object.exfiltration != null) { + if (typeof object.exfiltration !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.exfiltration: object expected"); + message.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.fromObject(object.exfiltration); + } + if (object.iamBindings) { + if (!Array.isArray(object.iamBindings)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.iamBindings: array expected"); + message.iamBindings = []; + for (var i = 0; i < object.iamBindings.length; ++i) { + if (typeof object.iamBindings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.iamBindings: object expected"); + message.iamBindings[i] = $root.google.cloud.securitycenter.v2.IamBinding.fromObject(object.iamBindings[i]); } - if (options.defaults) { - object.ns = ""; - object.name = ""; + } + if (object.nextSteps != null) + message.nextSteps = String(object.nextSteps); + if (object.moduleName != null) + message.moduleName = String(object.moduleName); + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); } - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.cloud.securitycenter.v2.Label.toObject(message.labels[j], options); + } + if (object.kubernetes != null) { + if (typeof object.kubernetes !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.kubernetes: object expected"); + message.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.fromObject(object.kubernetes); + } + if (object.database != null) { + if (typeof object.database !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.database: object expected"); + message.database = $root.google.cloud.securitycenter.v2.Database.fromObject(object.database); + } + if (object.attackExposure != null) { + if (typeof object.attackExposure !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.attackExposure: object expected"); + message.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.fromObject(object.attackExposure); + } + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.files: object expected"); + message.files[i] = $root.google.cloud.securitycenter.v2.File.fromObject(object.files[i]); } - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); + } + if (object.cloudDlpInspection != null) { + if (typeof object.cloudDlpInspection !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.cloudDlpInspection: object expected"); + message.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.fromObject(object.cloudDlpInspection); + } + if (object.cloudDlpDataProfile != null) { + if (typeof object.cloudDlpDataProfile !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.cloudDlpDataProfile: object expected"); + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.fromObject(object.cloudDlpDataProfile); + } + if (object.kernelRootkit != null) { + if (typeof object.kernelRootkit !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.kernelRootkit: object expected"); + message.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.fromObject(object.kernelRootkit); + } + if (object.orgPolicies) { + if (!Array.isArray(object.orgPolicies)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.orgPolicies: array expected"); + message.orgPolicies = []; + for (var i = 0; i < object.orgPolicies.length; ++i) { + if (typeof object.orgPolicies[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.orgPolicies: object expected"); + message.orgPolicies[i] = $root.google.cloud.securitycenter.v2.OrgPolicy.fromObject(object.orgPolicies[i]); } - return object; - }; - - /** - * Converts this Pod to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @instance - * @returns {Object.} JSON object - */ - Pod.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Pod - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Pod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (object.application != null) { + if (typeof object.application !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.application: object expected"); + message.application = $root.google.cloud.securitycenter.v2.Application.fromObject(object.application); + } + if (object.backupDisasterRecovery != null) { + if (typeof object.backupDisasterRecovery !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.backupDisasterRecovery: object expected"); + message.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.fromObject(object.backupDisasterRecovery); + } + if (object.securityPosture != null) { + if (typeof object.securityPosture !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.securityPosture: object expected"); + message.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.fromObject(object.securityPosture); + } + if (object.logEntries) { + if (!Array.isArray(object.logEntries)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.logEntries: array expected"); + message.logEntries = []; + for (var i = 0; i < object.logEntries.length; ++i) { + if (typeof object.logEntries[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.logEntries: object expected"); + message.logEntries[i] = $root.google.cloud.securitycenter.v2.LogEntry.fromObject(object.logEntries[i]); } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Pod"; - }; - - return Pod; - })(); + } + if (object.loadBalancers) { + if (!Array.isArray(object.loadBalancers)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.loadBalancers: array expected"); + message.loadBalancers = []; + for (var i = 0; i < object.loadBalancers.length; ++i) { + if (typeof object.loadBalancers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.loadBalancers: object expected"); + message.loadBalancers[i] = $root.google.cloud.securitycenter.v2.LoadBalancer.fromObject(object.loadBalancers[i]); + } + } + if (object.cloudArmor != null) { + if (typeof object.cloudArmor !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.cloudArmor: object expected"); + message.cloudArmor = $root.google.cloud.securitycenter.v2.CloudArmor.fromObject(object.cloudArmor); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.notebook: object expected"); + message.notebook = $root.google.cloud.securitycenter.v2.Notebook.fromObject(object.notebook); + } + if (object.toxicCombination != null) { + if (typeof object.toxicCombination !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.toxicCombination: object expected"); + message.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.fromObject(object.toxicCombination); + } + if (object.groupMemberships) { + if (!Array.isArray(object.groupMemberships)) + throw TypeError(".google.cloud.securitycenter.v2.Finding.groupMemberships: array expected"); + message.groupMemberships = []; + for (var i = 0; i < object.groupMemberships.length; ++i) { + if (typeof object.groupMemberships[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Finding.groupMemberships: object expected"); + message.groupMemberships[i] = $root.google.cloud.securitycenter.v2.GroupMembership.fromObject(object.groupMemberships[i]); + } + } + return message; + }; - Kubernetes.Node = (function() { + /** + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {google.cloud.securitycenter.v2.Finding} message Finding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Finding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.connections = []; + object.processes = []; + object.compliances = []; + object.iamBindings = []; + object.containers = []; + object.files = []; + object.orgPolicies = []; + object.logEntries = []; + object.loadBalancers = []; + object.groupMemberships = []; + } + if (options.objects || options.defaults) { + object.sourceProperties = {}; + object.externalSystems = {}; + object.contacts = {}; + } + if (options.defaults) { + object.name = ""; + object.canonicalName = ""; + object.parent = ""; + object.resourceName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.category = ""; + object.externalUri = ""; + object.securityMarks = null; + object.eventTime = null; + object.createTime = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; + object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; + object.indicator = null; + object.vulnerability = null; + object.muteUpdateTime = null; + object.mitreAttack = null; + object.access = null; + object.muteInitiator = ""; + object.parentDisplayName = ""; + object.description = ""; + object.exfiltration = null; + object.nextSteps = ""; + object.moduleName = ""; + object.kubernetes = null; + object.database = null; + object.attackExposure = null; + object.cloudDlpInspection = null; + object.cloudDlpDataProfile = null; + object.kernelRootkit = null; + object.application = null; + object.backupDisasterRecovery = null; + object.securityPosture = null; + object.cloudArmor = null; + object.notebook = null; + object.toxicCombination = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + object.canonicalName = message.canonicalName; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v2.Finding.State[message.state] : message.state; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + object.externalUri = message.externalUri; + var keys2; + if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { + object.sourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v2.SecurityMarks.toObject(message.securityMarks, options); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v2.Finding.Severity[message.severity] : message.severity; + if (message.mute != null && message.hasOwnProperty("mute")) + object.mute = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v2.Finding.Mute[message.mute] : message.mute; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + object.findingClass = options.enums === String ? $root.google.cloud.securitycenter.v2.Finding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycenter.v2.Finding.FindingClass[message.findingClass] : message.findingClass; + if (message.indicator != null && message.hasOwnProperty("indicator")) + object.indicator = $root.google.cloud.securitycenter.v2.Indicator.toObject(message.indicator, options); + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) + object.vulnerability = $root.google.cloud.securitycenter.v2.Vulnerability.toObject(message.vulnerability, options); + if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) + object.muteUpdateTime = $root.google.protobuf.Timestamp.toObject(message.muteUpdateTime, options); + if (message.externalSystems && (keys2 = Object.keys(message.externalSystems)).length) { + object.externalSystems = {}; + for (var j = 0; j < keys2.length; ++j) + object.externalSystems[keys2[j]] = $root.google.cloud.securitycenter.v2.ExternalSystem.toObject(message.externalSystems[keys2[j]], options); + } + if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) + object.mitreAttack = $root.google.cloud.securitycenter.v2.MitreAttack.toObject(message.mitreAttack, options); + if (message.access != null && message.hasOwnProperty("access")) + object.access = $root.google.cloud.securitycenter.v2.Access.toObject(message.access, options); + if (message.connections && message.connections.length) { + object.connections = []; + for (var j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.google.cloud.securitycenter.v2.Connection.toObject(message.connections[j], options); + } + if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) + object.muteInitiator = message.muteInitiator; + if (message.processes && message.processes.length) { + object.processes = []; + for (var j = 0; j < message.processes.length; ++j) + object.processes[j] = $root.google.cloud.securitycenter.v2.Process.toObject(message.processes[j], options); + } + if (message.contacts && (keys2 = Object.keys(message.contacts)).length) { + object.contacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.contacts[keys2[j]] = $root.google.cloud.securitycenter.v2.ContactDetails.toObject(message.contacts[keys2[j]], options); + } + if (message.compliances && message.compliances.length) { + object.compliances = []; + for (var j = 0; j < message.compliances.length; ++j) + object.compliances[j] = $root.google.cloud.securitycenter.v2.Compliance.toObject(message.compliances[j], options); + } + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) + object.exfiltration = $root.google.cloud.securitycenter.v2.Exfiltration.toObject(message.exfiltration, options); + if (message.iamBindings && message.iamBindings.length) { + object.iamBindings = []; + for (var j = 0; j < message.iamBindings.length; ++j) + object.iamBindings[j] = $root.google.cloud.securitycenter.v2.IamBinding.toObject(message.iamBindings[j], options); + } + if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) + object.nextSteps = message.nextSteps; + if (message.moduleName != null && message.hasOwnProperty("moduleName")) + object.moduleName = message.moduleName; + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); + } + if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) + object.kubernetes = $root.google.cloud.securitycenter.v2.Kubernetes.toObject(message.kubernetes, options); + if (message.database != null && message.hasOwnProperty("database")) + object.database = $root.google.cloud.securitycenter.v2.Database.toObject(message.database, options); + if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) + object.attackExposure = $root.google.cloud.securitycenter.v2.AttackExposure.toObject(message.attackExposure, options); + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.cloud.securitycenter.v2.File.toObject(message.files[j], options); + } + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) + object.cloudDlpInspection = $root.google.cloud.securitycenter.v2.CloudDlpInspection.toObject(message.cloudDlpInspection, options); + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) + object.cloudDlpDataProfile = $root.google.cloud.securitycenter.v2.CloudDlpDataProfile.toObject(message.cloudDlpDataProfile, options); + if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) + object.kernelRootkit = $root.google.cloud.securitycenter.v2.KernelRootkit.toObject(message.kernelRootkit, options); + if (message.orgPolicies && message.orgPolicies.length) { + object.orgPolicies = []; + for (var j = 0; j < message.orgPolicies.length; ++j) + object.orgPolicies[j] = $root.google.cloud.securitycenter.v2.OrgPolicy.toObject(message.orgPolicies[j], options); + } + if (message.application != null && message.hasOwnProperty("application")) + object.application = $root.google.cloud.securitycenter.v2.Application.toObject(message.application, options); + if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) + object.backupDisasterRecovery = $root.google.cloud.securitycenter.v2.BackupDisasterRecovery.toObject(message.backupDisasterRecovery, options); + if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) + object.securityPosture = $root.google.cloud.securitycenter.v2.SecurityPosture.toObject(message.securityPosture, options); + if (message.logEntries && message.logEntries.length) { + object.logEntries = []; + for (var j = 0; j < message.logEntries.length; ++j) + object.logEntries[j] = $root.google.cloud.securitycenter.v2.LogEntry.toObject(message.logEntries[j], options); + } + if (message.loadBalancers && message.loadBalancers.length) { + object.loadBalancers = []; + for (var j = 0; j < message.loadBalancers.length; ++j) + object.loadBalancers[j] = $root.google.cloud.securitycenter.v2.LoadBalancer.toObject(message.loadBalancers[j], options); + } + if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) + object.cloudArmor = $root.google.cloud.securitycenter.v2.CloudArmor.toObject(message.cloudArmor, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = $root.google.cloud.securitycenter.v2.Notebook.toObject(message.notebook, options); + if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) + object.toxicCombination = $root.google.cloud.securitycenter.v2.ToxicCombination.toObject(message.toxicCombination, options); + if (message.groupMemberships && message.groupMemberships.length) { + object.groupMemberships = []; + for (var j = 0; j < message.groupMemberships.length; ++j) + object.groupMemberships[j] = $root.google.cloud.securitycenter.v2.GroupMembership.toObject(message.groupMemberships[j], options); + } + return object; + }; - /** - * Properties of a Node. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface INode - * @property {string|null} [name] Node name - */ + /** + * Converts this Finding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Finding + * @instance + * @returns {Object.} JSON object + */ + Finding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Node. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a Node. - * @implements INode - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.INode=} [properties] Properties to set - */ - function Node(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]]; + /** + * Gets the default type url for Finding + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Finding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Finding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Finding"; + }; - /** - * Node name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @instance - */ - Node.prototype.name = ""; + /** + * State enum. + * @name google.cloud.securitycenter.v2.Finding.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + Finding.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); - /** - * Creates a new Node instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INode=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node instance - */ - Node.create = function create(properties) { - return new Node(properties); - }; + /** + * Severity enum. + * @name google.cloud.securitycenter.v2.Finding.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value + */ + Finding.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); - /** - * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.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); - return writer; - }; + /** + * Mute enum. + * @name google.cloud.securitycenter.v2.Finding.Mute + * @enum {number} + * @property {number} MUTE_UNSPECIFIED=0 MUTE_UNSPECIFIED value + * @property {number} MUTED=1 MUTED value + * @property {number} UNMUTED=2 UNMUTED value + * @property {number} UNDEFINED=3 UNDEFINED value + */ + Finding.Mute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MUTED"] = 1; + values[valuesById[2] = "UNMUTED"] = 2; + values[valuesById[3] = "UNDEFINED"] = 3; + return values; + })(); - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FindingClass enum. + * @name google.cloud.securitycenter.v2.Finding.FindingClass + * @enum {number} + * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value + * @property {number} THREAT=1 THREAT value + * @property {number} VULNERABILITY=2 VULNERABILITY value + * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value + * @property {number} OBSERVATION=4 OBSERVATION value + * @property {number} SCC_ERROR=5 SCC_ERROR value + * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value + * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value + */ + Finding.FindingClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; + values[valuesById[1] = "THREAT"] = 1; + values[valuesById[2] = "VULNERABILITY"] = 2; + values[valuesById[3] = "MISCONFIGURATION"] = 3; + values[valuesById[4] = "OBSERVATION"] = 4; + values[valuesById[5] = "SCC_ERROR"] = 5; + values[valuesById[6] = "POSTURE_VIOLATION"] = 6; + values[valuesById[7] = "TOXIC_COMBINATION"] = 7; + return values; + })(); - /** - * Decodes a Node message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.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.cloud.securitycenter.v2.Kubernetes.Node(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return Finding; + })(); - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v2.GroupMembership = (function() { - /** - * Verifies a Node message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Node.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + /** + * Properties of a GroupMembership. + * @memberof google.cloud.securitycenter.v2 + * @interface IGroupMembership + * @property {google.cloud.securitycenter.v2.GroupMembership.GroupType|null} [groupType] GroupMembership groupType + * @property {string|null} [groupId] GroupMembership groupId + */ - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node - */ - Node.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Node) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Node(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Constructs a new GroupMembership. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a GroupMembership. + * @implements IGroupMembership + * @constructor + * @param {google.cloud.securitycenter.v2.IGroupMembership=} [properties] Properties to set + */ + function GroupMembership(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 plain object from a Node message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Node} message Node - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Node.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * GroupMembership groupType. + * @member {google.cloud.securitycenter.v2.GroupMembership.GroupType} groupType + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @instance + */ + GroupMembership.prototype.groupType = 0; - /** - * Converts this Node to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @instance - * @returns {Object.} JSON object - */ - Node.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GroupMembership groupId. + * @member {string} groupId + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @instance + */ + GroupMembership.prototype.groupId = ""; - /** - * Gets the default type url for Node - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Node - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Node.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates a new GroupMembership instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {google.cloud.securitycenter.v2.IGroupMembership=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership instance + */ + GroupMembership.create = function create(properties) { + return new GroupMembership(properties); + }; + + /** + * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {google.cloud.securitycenter.v2.IGroupMembership} message GroupMembership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMembership.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.groupType); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupId); + return writer; + }; + + /** + * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GroupMembership.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {google.cloud.securitycenter.v2.IGroupMembership} message GroupMembership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMembership.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupMembership message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMembership.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.cloud.securitycenter.v2.GroupMembership(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.groupType = reader.int32(); + break; + } + case 2: { + message.groupId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Node"; - }; + } + return message; + }; - return Node; - })(); + /** + * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMembership.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Kubernetes.NodePool = (function() { + /** + * Verifies a GroupMembership message. + * @function verify + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupMembership.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupType != null && message.hasOwnProperty("groupType")) + switch (message.groupType) { + default: + return "groupType: enum value expected"; + case 0: + case 1: + break; + } + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + return null; + }; - /** - * Properties of a NodePool. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface INodePool - * @property {string|null} [name] NodePool name - * @property {Array.|null} [nodes] NodePool nodes - */ + /** + * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.GroupMembership} GroupMembership + */ + GroupMembership.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.GroupMembership) + return object; + var message = new $root.google.cloud.securitycenter.v2.GroupMembership(); + switch (object.groupType) { + default: + if (typeof object.groupType === "number") { + message.groupType = object.groupType; + break; + } + break; + case "GROUP_TYPE_UNSPECIFIED": + case 0: + message.groupType = 0; + break; + case "GROUP_TYPE_TOXIC_COMBINATION": + case 1: + message.groupType = 1; + break; + } + if (object.groupId != null) + message.groupId = String(object.groupId); + return message; + }; - /** - * Constructs a new NodePool. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a NodePool. - * @implements INodePool - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool=} [properties] Properties to set - */ - function NodePool(properties) { - this.nodes = []; - 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 plain object from a GroupMembership message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {google.cloud.securitycenter.v2.GroupMembership} message GroupMembership + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupMembership.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.groupType = options.enums === String ? "GROUP_TYPE_UNSPECIFIED" : 0; + object.groupId = ""; } + if (message.groupType != null && message.hasOwnProperty("groupType")) + object.groupType = options.enums === String ? $root.google.cloud.securitycenter.v2.GroupMembership.GroupType[message.groupType] === undefined ? message.groupType : $root.google.cloud.securitycenter.v2.GroupMembership.GroupType[message.groupType] : message.groupType; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + return object; + }; - /** - * NodePool name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @instance - */ - NodePool.prototype.name = ""; + /** + * Converts this GroupMembership to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @instance + * @returns {Object.} JSON object + */ + GroupMembership.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * NodePool nodes. - * @member {Array.} nodes - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @instance - */ - NodePool.prototype.nodes = $util.emptyArray; + /** + * Gets the default type url for GroupMembership + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.GroupMembership + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroupMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.GroupMembership"; + }; - /** - * Creates a new NodePool instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool instance - */ - NodePool.create = function create(properties) { - return new NodePool(properties); - }; + /** + * GroupType enum. + * @name google.cloud.securitycenter.v2.GroupMembership.GroupType + * @enum {number} + * @property {number} GROUP_TYPE_UNSPECIFIED=0 GROUP_TYPE_UNSPECIFIED value + * @property {number} GROUP_TYPE_TOXIC_COMBINATION=1 GROUP_TYPE_TOXIC_COMBINATION value + */ + GroupMembership.GroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GROUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GROUP_TYPE_TOXIC_COMBINATION"] = 1; + return values; + })(); - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.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.nodes != null && message.nodes.length) - for (var i = 0; i < message.nodes.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + return GroupMembership; + })(); - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2.IamBinding = (function() { - /** - * Decodes a NodePool message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.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.cloud.securitycenter.v2.Kubernetes.NodePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.nodes && message.nodes.length)) - message.nodes = []; - message.nodes.push($root.google.cloud.securitycenter.v2.Kubernetes.Node.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePool message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePool.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.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) - return "nodes: array expected"; - for (var i = 0; i < message.nodes.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Node.verify(message.nodes[i]); - if (error) - return "nodes." + error; - } - } - return null; - }; - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool - */ - NodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.NodePool) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.NodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.nodes) { - if (!Array.isArray(object.nodes)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.NodePool.nodes: array expected"); - message.nodes = []; - for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.NodePool.nodes: object expected"); - message.nodes[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.fromObject(object.nodes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.NodePool} message NodePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodes = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.nodes && message.nodes.length) { - object.nodes = []; - for (var j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.toObject(message.nodes[j], options); - } - return object; - }; - - /** - * Converts this NodePool to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @instance - * @returns {Object.} JSON object - */ - NodePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePool - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.NodePool"; - }; - - return NodePool; - })(); - - Kubernetes.Role = (function() { - - /** - * Properties of a Role. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface IRole - * @property {google.cloud.securitycenter.v2.Kubernetes.Role.Kind|null} [kind] Role kind - * @property {string|null} [ns] Role ns - * @property {string|null} [name] Role name - */ + /** + * Properties of an IamBinding. + * @memberof google.cloud.securitycenter.v2 + * @interface IIamBinding + * @property {google.cloud.securitycenter.v2.IamBinding.Action|null} [action] IamBinding action + * @property {string|null} [role] IamBinding role + * @property {string|null} [member] IamBinding member + */ - /** - * Constructs a new Role. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a Role. - * @implements IRole - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.IRole=} [properties] Properties to set - */ - function Role(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 IamBinding. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an IamBinding. + * @implements IIamBinding + * @constructor + * @param {google.cloud.securitycenter.v2.IIamBinding=} [properties] Properties to set + */ + function IamBinding(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]]; + } - /** - * Role kind. - * @member {google.cloud.securitycenter.v2.Kubernetes.Role.Kind} kind - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @instance - */ - Role.prototype.kind = 0; + /** + * IamBinding action. + * @member {google.cloud.securitycenter.v2.IamBinding.Action} action + * @memberof google.cloud.securitycenter.v2.IamBinding + * @instance + */ + IamBinding.prototype.action = 0; - /** - * Role ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @instance - */ - Role.prototype.ns = ""; + /** + * IamBinding role. + * @member {string} role + * @memberof google.cloud.securitycenter.v2.IamBinding + * @instance + */ + IamBinding.prototype.role = ""; - /** - * Role name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @instance - */ - Role.prototype.name = ""; + /** + * IamBinding member. + * @member {string} member + * @memberof google.cloud.securitycenter.v2.IamBinding + * @instance + */ + IamBinding.prototype.member = ""; - /** - * Creates a new Role instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IRole=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role instance - */ - Role.create = function create(properties) { - return new Role(properties); - }; + /** + * Creates a new IamBinding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {google.cloud.securitycenter.v2.IIamBinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding instance + */ + IamBinding.create = function create(properties) { + return new IamBinding(properties); + }; - /** - * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IRole} message Role message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Role.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; + /** + * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {google.cloud.securitycenter.v2.IIamBinding} message IamBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IamBinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + return writer; + }; - /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IRole} message Role message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Role.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.IamBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {google.cloud.securitycenter.v2.IIamBinding} message IamBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IamBinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Role message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Role.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.cloud.securitycenter.v2.Kubernetes.Role(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.int32(); - break; - } - case 2: { - message.ns = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes an IamBinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IamBinding.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.cloud.securitycenter.v2.IamBinding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); break; } - } - return message; - }; - - /** - * Decodes a Role message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Role.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Role message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Role.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + message.role = reader.string(); break; } - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Role message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role - */ - Role.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Role) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Role(); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; + case 3: { + message.member = reader.string(); break; } + default: + reader.skipType(tag & 7); break; - case "KIND_UNSPECIFIED": + } + } + return message; + }; + + /** + * Decodes an IamBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IamBinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IamBinding message. + * @function verify + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IamBinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; case 0: - message.kind = 0; - break; - case "ROLE": case 1: - message.kind = 1; - break; - case "CLUSTER_ROLE": case 2: - message.kind = 2; break; } - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - return message; - }; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + return null; + }; - /** - * Creates a plain object from a Role message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Role} message Role - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Role.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.ns = ""; - object.name = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.securitycenter.v2.Kubernetes.Role.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v2.Kubernetes.Role.Kind[message.kind] : message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + /** + * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.IamBinding} IamBinding + */ + IamBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.IamBinding) return object; - }; + var message = new $root.google.cloud.securitycenter.v2.IamBinding(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + return message; + }; - /** - * Converts this Role to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @instance - * @returns {Object.} JSON object - */ - Role.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an IamBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {google.cloud.securitycenter.v2.IamBinding} message IamBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IamBinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.cloud.securitycenter.v2.IamBinding.Action[message.action] === undefined ? message.action : $root.google.cloud.securitycenter.v2.IamBinding.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + return object; + }; - /** - * Gets the default type url for Role - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Role - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Role"; - }; + /** + * Converts this IamBinding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.IamBinding + * @instance + * @returns {Object.} JSON object + */ + IamBinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Kind enum. - * @name google.cloud.securitycenter.v2.Kubernetes.Role.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} ROLE=1 ROLE value - * @property {number} CLUSTER_ROLE=2 CLUSTER_ROLE value - */ - Role.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROLE"] = 1; - values[valuesById[2] = "CLUSTER_ROLE"] = 2; - return values; - })(); + /** + * Gets the default type url for IamBinding + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.IamBinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IamBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.IamBinding"; + }; - return Role; + /** + * Action enum. + * @name google.cloud.securitycenter.v2.IamBinding.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + IamBinding.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; })(); - Kubernetes.Binding = (function() { + return IamBinding; + })(); - /** - * Properties of a Binding. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface IBinding - * @property {string|null} [ns] Binding ns - * @property {string|null} [name] Binding name - * @property {google.cloud.securitycenter.v2.Kubernetes.IRole|null} [role] Binding role - * @property {Array.|null} [subjects] Binding subjects - */ + v2.Indicator = (function() { - /** - * Constructs a new Binding. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.subjects = []; - 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 an Indicator. + * @memberof google.cloud.securitycenter.v2 + * @interface IIndicator + * @property {Array.|null} [ipAddresses] Indicator ipAddresses + * @property {Array.|null} [domains] Indicator domains + * @property {Array.|null} [signatures] Indicator signatures + * @property {Array.|null} [uris] Indicator uris + */ - /** - * Binding ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @instance - */ - Binding.prototype.ns = ""; + /** + * Constructs a new Indicator. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an Indicator. + * @implements IIndicator + * @constructor + * @param {google.cloud.securitycenter.v2.IIndicator=} [properties] Properties to set + */ + function Indicator(properties) { + this.ipAddresses = []; + this.domains = []; + this.signatures = []; + this.uris = []; + 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]]; + } - /** - * Binding name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @instance - */ - Binding.prototype.name = ""; + /** + * Indicator ipAddresses. + * @member {Array.} ipAddresses + * @memberof google.cloud.securitycenter.v2.Indicator + * @instance + */ + Indicator.prototype.ipAddresses = $util.emptyArray; - /** - * Binding role. - * @member {google.cloud.securitycenter.v2.Kubernetes.IRole|null|undefined} role - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @instance - */ - Binding.prototype.role = null; + /** + * Indicator domains. + * @member {Array.} domains + * @memberof google.cloud.securitycenter.v2.Indicator + * @instance + */ + Indicator.prototype.domains = $util.emptyArray; - /** - * Binding subjects. - * @member {Array.} subjects - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @instance - */ - Binding.prototype.subjects = $util.emptyArray; + /** + * Indicator signatures. + * @member {Array.} signatures + * @memberof google.cloud.securitycenter.v2.Indicator + * @instance + */ + Indicator.prototype.signatures = $util.emptyArray; - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; + /** + * Indicator uris. + * @member {Array.} uris + * @memberof google.cloud.securitycenter.v2.Indicator + * @instance + */ + Indicator.prototype.uris = $util.emptyArray; - /** - * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - $root.google.cloud.securitycenter.v2.Kubernetes.Role.encode(message.role, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.subjects != null && message.subjects.length) - for (var i = 0; i < message.subjects.length; ++i) - $root.google.cloud.securitycenter.v2.Kubernetes.Subject.encode(message.subjects[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Creates a new Indicator instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {google.cloud.securitycenter.v2.IIndicator=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Indicator} Indicator instance + */ + Indicator.create = function create(properties) { + return new Indicator(properties); + }; - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {google.cloud.securitycenter.v2.IIndicator} message Indicator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Indicator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipAddresses != null && message.ipAddresses.length) + for (var i = 0; i < message.ipAddresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddresses[i]); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domains[i]); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.uris[i]); + return writer; + }; - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.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.cloud.securitycenter.v2.Kubernetes.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ns = reader.string(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.subjects && message.subjects.length)) - message.subjects = []; - message.subjects.push($root.google.cloud.securitycenter.v2.Kubernetes.Subject.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {google.cloud.securitycenter.v2.IIndicator} message Indicator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Indicator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Indicator message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Indicator} Indicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Indicator.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.cloud.securitycenter.v2.Indicator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); break; } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.role != null && message.hasOwnProperty("role")) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Role.verify(message.role); - if (error) - return "role." + error; - } - if (message.subjects != null && message.hasOwnProperty("subjects")) { - if (!Array.isArray(message.subjects)) - return "subjects: array expected"; - for (var i = 0; i < message.subjects.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.verify(message.subjects[i]); - if (error) - return "subjects." + error; + case 2: { + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push(reader.string()); + break; + } + case 3: { + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; } + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Binding) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Binding(); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.role != null) { - if (typeof object.role !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.role: object expected"); - message.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.fromObject(object.role); - } - if (object.subjects) { - if (!Array.isArray(object.subjects)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.subjects: array expected"); - message.subjects = []; - for (var i = 0; i < object.subjects.length; ++i) { - if (typeof object.subjects[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.subjects: object expected"); - message.subjects[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.fromObject(object.subjects[i]); - } - } - return message; - }; + /** + * Decodes an Indicator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Indicator} Indicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Indicator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subjects = []; - if (options.defaults) { - object.ns = ""; - object.name = ""; - object.role = null; - } - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.role != null && message.hasOwnProperty("role")) - object.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.toObject(message.role, options); - if (message.subjects && message.subjects.length) { - object.subjects = []; - for (var j = 0; j < message.subjects.length; ++j) - object.subjects[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.toObject(message.subjects[j], options); + /** + * Verifies an Indicator message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Indicator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { + if (!Array.isArray(message.ipAddresses)) + return "ipAddresses: array expected"; + for (var i = 0; i < message.ipAddresses.length; ++i) + if (!$util.isString(message.ipAddresses[i])) + return "ipAddresses: string[] expected"; + } + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) + if (!$util.isString(message.domains[i])) + return "domains: string[] expected"; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify(message.signatures[i]); + if (error) + return "signatures." + error; } + } + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + return null; + }; + + /** + * Creates an Indicator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Indicator} Indicator + */ + Indicator.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Indicator) return object; - }; + var message = new $root.google.cloud.securitycenter.v2.Indicator(); + if (object.ipAddresses) { + if (!Array.isArray(object.ipAddresses)) + throw TypeError(".google.cloud.securitycenter.v2.Indicator.ipAddresses: array expected"); + message.ipAddresses = []; + for (var i = 0; i < object.ipAddresses.length; ++i) + message.ipAddresses[i] = String(object.ipAddresses[i]); + } + if (object.domains) { + if (!Array.isArray(object.domains)) + throw TypeError(".google.cloud.securitycenter.v2.Indicator.domains: array expected"); + message.domains = []; + for (var i = 0; i < object.domains.length; ++i) + message.domains[i] = String(object.domains[i]); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".google.cloud.securitycenter.v2.Indicator.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Indicator.signatures: object expected"); + message.signatures[i] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.fromObject(object.signatures[i]); + } + } + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.securitycenter.v2.Indicator.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + return message; + }; - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Indicator message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {google.cloud.securitycenter.v2.Indicator} message Indicator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Indicator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ipAddresses = []; + object.domains = []; + object.signatures = []; + object.uris = []; + } + if (message.ipAddresses && message.ipAddresses.length) { + object.ipAddresses = []; + for (var j = 0; j < message.ipAddresses.length; ++j) + object.ipAddresses[j] = message.ipAddresses[j]; + } + if (message.domains && message.domains.length) { + object.domains = []; + for (var j = 0; j < message.domains.length; ++j) + object.domains[j] = message.domains[j]; + } + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.toObject(message.signatures[j], options); + } + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + return object; + }; - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Binding"; - }; + /** + * Converts this Indicator to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Indicator + * @instance + * @returns {Object.} JSON object + */ + Indicator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Binding; - })(); + /** + * Gets the default type url for Indicator + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Indicator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Indicator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator"; + }; - Kubernetes.Subject = (function() { + Indicator.ProcessSignature = (function() { /** - * Properties of a Subject. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface ISubject - * @property {google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|null} [kind] Subject kind - * @property {string|null} [ns] Subject ns - * @property {string|null} [name] Subject name + * Properties of a ProcessSignature. + * @memberof google.cloud.securitycenter.v2.Indicator + * @interface IProcessSignature + * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null} [memoryHashSignature] ProcessSignature memoryHashSignature + * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null} [yaraRuleSignature] ProcessSignature yaraRuleSignature + * @property {google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType|null} [signatureType] ProcessSignature signatureType */ /** - * Constructs a new Subject. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents a Subject. - * @implements ISubject + * Constructs a new ProcessSignature. + * @memberof google.cloud.securitycenter.v2.Indicator + * @classdesc Represents a ProcessSignature. + * @implements IProcessSignature * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature=} [properties] Properties to set */ - function Subject(properties) { + function ProcessSignature(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81219,103 +79356,117 @@ } /** - * Subject kind. - * @member {google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType} kind - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * ProcessSignature memoryHashSignature. + * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature|null|undefined} memoryHashSignature + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @instance */ - Subject.prototype.kind = 0; + ProcessSignature.prototype.memoryHashSignature = null; /** - * Subject ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * ProcessSignature yaraRuleSignature. + * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature|null|undefined} yaraRuleSignature + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @instance */ - Subject.prototype.ns = ""; + ProcessSignature.prototype.yaraRuleSignature = null; /** - * Subject name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * ProcessSignature signatureType. + * @member {google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType} signatureType + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @instance */ - Subject.prototype.name = ""; + ProcessSignature.prototype.signatureType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new Subject instance using the specified properties. + * ProcessSignature signature. + * @member {"memoryHashSignature"|"yaraRuleSignature"|undefined} signature + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature + * @instance + */ + Object.defineProperty(ProcessSignature.prototype, "signature", { + get: $util.oneOfGetter($oneOfFields = ["memoryHashSignature", "yaraRuleSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProcessSignature instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject instance + * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature instance */ - Subject.create = function create(properties) { - return new Subject(properties); + ProcessSignature.create = function create(properties) { + return new ProcessSignature(properties); }; /** - * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subject.encode = function encode(message, writer) { + ProcessSignature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.memoryHashSignature != null && Object.hasOwnProperty.call(message, "memoryHashSignature")) + $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.encode(message.memoryHashSignature, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yaraRuleSignature != null && Object.hasOwnProperty.call(message, "yaraRuleSignature")) + $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.encode(message.yaraRuleSignature, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signatureType); return writer; }; /** - * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {google.cloud.securitycenter.v2.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subject.encodeDelimited = function encodeDelimited(message, writer) { + ProcessSignature.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Subject message from the specified reader or buffer. + * Decodes a ProcessSignature message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subject.decode = function decode(reader, length) { + ProcessSignature.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.cloud.securitycenter.v2.Kubernetes.Subject(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.kind = reader.int32(); + case 6: { + message.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.decode(reader, reader.uint32()); break; } - case 2: { - message.ns = reader.string(); + case 7: { + message.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.decode(reader, reader.uint32()); break; } - case 3: { - message.name = reader.string(); + case 8: { + message.signatureType = reader.int32(); break; } default: @@ -81327,849 +79478,890 @@ }; /** - * Decodes a Subject message from the specified reader or buffer, length delimited. + * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subject.decodeDelimited = function decodeDelimited(reader) { + ProcessSignature.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Subject message. + * Verifies a ProcessSignature message. * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Subject.verify = function verify(message) { + ProcessSignature.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { + var properties = {}; + if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { + properties.signature = 1; + { + var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify(message.memoryHashSignature); + if (error) + return "memoryHashSignature." + error; + } + } + if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { + if (properties.signature === 1) + return "signature: multiple values"; + properties.signature = 1; + { + var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify(message.yaraRuleSignature); + if (error) + return "yaraRuleSignature." + error; + } + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + switch (message.signatureType) { default: - return "kind: enum value expected"; + return "signatureType: enum value expected"; case 0: case 1: case 2: - case 3: break; } - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; return null; }; /** - * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature} ProcessSignature */ - Subject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Subject) + ProcessSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature) return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Subject(); - switch (object.kind) { + var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature(); + if (object.memoryHashSignature != null) { + if (typeof object.memoryHashSignature !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.memoryHashSignature: object expected"); + message.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.fromObject(object.memoryHashSignature); + } + if (object.yaraRuleSignature != null) { + if (typeof object.yaraRuleSignature !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.yaraRuleSignature: object expected"); + message.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.fromObject(object.yaraRuleSignature); + } + switch (object.signatureType) { default: - if (typeof object.kind === "number") { - message.kind = object.kind; + if (typeof object.signatureType === "number") { + message.signatureType = object.signatureType; break; } break; - case "AUTH_TYPE_UNSPECIFIED": + case "SIGNATURE_TYPE_UNSPECIFIED": case 0: - message.kind = 0; + message.signatureType = 0; break; - case "USER": + case "SIGNATURE_TYPE_PROCESS": case 1: - message.kind = 1; + message.signatureType = 1; break; - case "SERVICEACCOUNT": + case "SIGNATURE_TYPE_FILE": case 2: - message.kind = 2; - break; - case "GROUP": - case 3: - message.kind = 3; + message.signatureType = 2; break; } - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); return message; }; /** - * Creates a plain object from a Subject message. Also converts values to other types if specified. + * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Subject} message Subject + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature} message ProcessSignature * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Subject.toObject = function toObject(message, options) { + ProcessSignature.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = options.enums === String ? "AUTH_TYPE_UNSPECIFIED" : 0; - object.ns = ""; - object.name = ""; + if (options.defaults) + object.signatureType = options.enums === String ? "SIGNATURE_TYPE_UNSPECIFIED" : 0; + if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { + object.memoryHashSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.toObject(message.memoryHashSignature, options); + if (options.oneofs) + object.signature = "memoryHashSignature"; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType[message.kind] : message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { + object.yaraRuleSignature = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.toObject(message.yaraRuleSignature, options); + if (options.oneofs) + object.signature = "yaraRuleSignature"; + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + object.signatureType = options.enums === String ? $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType[message.signatureType] : message.signatureType; return object; }; /** - * Converts this Subject to JSON. + * Converts this ProcessSignature to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @instance * @returns {Object.} JSON object */ - Subject.prototype.toJSON = function toJSON() { + ProcessSignature.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Subject + * Gets the default type url for ProcessSignature * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ProcessSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Subject"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature"; }; - /** - * AuthType enum. - * @name google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType - * @enum {number} - * @property {number} AUTH_TYPE_UNSPECIFIED=0 AUTH_TYPE_UNSPECIFIED value - * @property {number} USER=1 USER value - * @property {number} SERVICEACCOUNT=2 SERVICEACCOUNT value - * @property {number} GROUP=3 GROUP value - */ - Subject.AuthType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER"] = 1; - values[valuesById[2] = "SERVICEACCOUNT"] = 2; - values[valuesById[3] = "GROUP"] = 3; - return values; - })(); + ProcessSignature.MemoryHashSignature = (function() { - return Subject; - })(); + /** + * Properties of a MemoryHashSignature. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature + * @interface IMemoryHashSignature + * @property {string|null} [binaryFamily] MemoryHashSignature binaryFamily + * @property {Array.|null} [detections] MemoryHashSignature detections + */ - Kubernetes.AccessReview = (function() { + /** + * Constructs a new MemoryHashSignature. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature + * @classdesc Represents a MemoryHashSignature. + * @implements IMemoryHashSignature + * @constructor + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set + */ + function MemoryHashSignature(properties) { + this.detections = []; + 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 an AccessReview. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface IAccessReview - * @property {string|null} [group] AccessReview group - * @property {string|null} [ns] AccessReview ns - * @property {string|null} [name] AccessReview name - * @property {string|null} [resource] AccessReview resource - * @property {string|null} [subresource] AccessReview subresource - * @property {string|null} [verb] AccessReview verb - * @property {string|null} [version] AccessReview version - */ + /** + * MemoryHashSignature binaryFamily. + * @member {string} binaryFamily + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @instance + */ + MemoryHashSignature.prototype.binaryFamily = ""; - /** - * Constructs a new AccessReview. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents an AccessReview. - * @implements IAccessReview - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview=} [properties] Properties to set - */ - function AccessReview(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]]; - } + /** + * MemoryHashSignature detections. + * @member {Array.} detections + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @instance + */ + MemoryHashSignature.prototype.detections = $util.emptyArray; - /** - * AccessReview group. - * @member {string} group - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.group = ""; + /** + * Creates a new MemoryHashSignature instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature instance + */ + MemoryHashSignature.create = function create(properties) { + return new MemoryHashSignature(properties); + }; - /** - * AccessReview ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.ns = ""; + /** + * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryHashSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binaryFamily != null && Object.hasOwnProperty.call(message, "binaryFamily")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.binaryFamily); + if (message.detections != null && message.detections.length) + for (var i = 0; i < message.detections.length; ++i) + $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.encode(message.detections[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * AccessReview name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.name = ""; + /** + * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryHashSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * AccessReview resource. - * @member {string} resource - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.resource = ""; + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryHashSignature.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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.binaryFamily = reader.string(); + break; + } + case 4: { + if (!(message.detections && message.detections.length)) + message.detections = []; + message.detections.push($root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * AccessReview subresource. - * @member {string} subresource - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.subresource = ""; + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryHashSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * AccessReview verb. - * @member {string} verb - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.verb = ""; + /** + * Verifies a MemoryHashSignature message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MemoryHashSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) + if (!$util.isString(message.binaryFamily)) + return "binaryFamily: string expected"; + if (message.detections != null && message.hasOwnProperty("detections")) { + if (!Array.isArray(message.detections)) + return "detections: array expected"; + for (var i = 0; i < message.detections.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify(message.detections[i]); + if (error) + return "detections." + error; + } + } + return null; + }; - /** - * AccessReview version. - * @member {string} version - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.version = ""; + /** + * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + */ + MemoryHashSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature) + return object; + var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature(); + if (object.binaryFamily != null) + message.binaryFamily = String(object.binaryFamily); + if (object.detections) { + if (!Array.isArray(object.detections)) + throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.detections: array expected"); + message.detections = []; + for (var i = 0; i < object.detections.length; ++i) { + if (typeof object.detections[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.detections: object expected"); + message.detections[i] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.fromObject(object.detections[i]); + } + } + return message; + }; - /** - * Creates a new AccessReview instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview instance - */ - AccessReview.create = function create(properties) { - return new AccessReview(properties); - }; + /** + * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature} message MemoryHashSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MemoryHashSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.detections = []; + if (options.defaults) + object.binaryFamily = ""; + if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) + object.binaryFamily = message.binaryFamily; + if (message.detections && message.detections.length) { + object.detections = []; + for (var j = 0; j < message.detections.length; ++j) + object.detections[j] = $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.toObject(message.detections[j], options); + } + return object; + }; - /** - * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview} message AccessReview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessReview.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); - if (message.subresource != null && Object.hasOwnProperty.call(message, "subresource")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.subresource); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.verb); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); - return writer; - }; + /** + * Converts this MemoryHashSignature to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @instance + * @returns {Object.} JSON object + */ + MemoryHashSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview} message AccessReview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessReview.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Gets the default type url for MemoryHashSignature + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MemoryHashSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature"; + }; - /** - * Decodes an AccessReview message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessReview.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.cloud.securitycenter.v2.Kubernetes.AccessReview(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.group = reader.string(); - break; - } - case 2: { - message.ns = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - case 4: { - message.resource = reader.string(); - break; - } - case 5: { - message.subresource = reader.string(); - break; - } - case 6: { - message.verb = reader.string(); - break; - } - case 7: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; + MemoryHashSignature.Detection = (function() { + + /** + * Properties of a Detection. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @interface IDetection + * @property {string|null} [binary] Detection binary + * @property {number|null} [percentPagesMatched] Detection percentPagesMatched + */ + + /** + * Constructs a new Detection. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature + * @classdesc Represents a Detection. + * @implements IDetection + * @constructor + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set + */ + function Detection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes an AccessReview message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessReview.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Detection binary. + * @member {string} binary + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + */ + Detection.prototype.binary = ""; - /** - * Verifies an AccessReview message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessReview.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) - if (!$util.isString(message.group)) - return "group: string expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.subresource != null && message.hasOwnProperty("subresource")) - if (!$util.isString(message.subresource)) - return "subresource: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; + /** + * Detection percentPagesMatched. + * @member {number} percentPagesMatched + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + */ + Detection.prototype.percentPagesMatched = 0; - /** - * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview - */ - AccessReview.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview) - return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview(); - if (object.group != null) - message.group = String(object.group); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.resource != null) - message.resource = String(object.resource); - if (object.subresource != null) - message.subresource = String(object.subresource); - if (object.verb != null) - message.verb = String(object.verb); - if (object.version != null) - message.version = String(object.version); - return message; - }; + /** + * Creates a new Detection instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection instance + */ + Detection.create = function create(properties) { + return new Detection(properties); + }; - /** - * Creates a plain object from an AccessReview message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.AccessReview} message AccessReview - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessReview.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.group = ""; - object.ns = ""; - object.name = ""; - object.resource = ""; - object.subresource = ""; - object.verb = ""; - object.version = ""; - } - if (message.group != null && message.hasOwnProperty("group")) - object.group = message.group; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.subresource != null && message.hasOwnProperty("subresource")) - object.subresource = message.subresource; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; + /** + * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.binary); + if (message.percentPagesMatched != null && Object.hasOwnProperty.call(message, "percentPagesMatched")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.percentPagesMatched); + return writer; + }; - /** - * Converts this AccessReview to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @instance - * @returns {Object.} JSON object - */ - AccessReview.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for AccessReview - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessReview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.AccessReview"; - }; + /** + * Decodes a Detection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detection.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.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.binary = reader.string(); + break; + } + case 3: { + message.percentPagesMatched = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return AccessReview; - })(); + /** + * Decodes a Detection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Kubernetes.Object = (function() { + /** + * Verifies a Detection message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Detection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.binary != null && message.hasOwnProperty("binary")) + if (!$util.isString(message.binary)) + return "binary: string expected"; + if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) + if (typeof message.percentPagesMatched !== "number") + return "percentPagesMatched: number expected"; + return null; + }; - /** - * Properties of an Object. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @interface IObject - * @property {string|null} [group] Object group - * @property {string|null} [kind] Object kind - * @property {string|null} [ns] Object ns - * @property {string|null} [name] Object name - * @property {Array.|null} [containers] Object containers - */ + /** + * Creates a Detection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + */ + Detection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection) + return object; + var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection(); + if (object.binary != null) + message.binary = String(object.binary); + if (object.percentPagesMatched != null) + message.percentPagesMatched = Number(object.percentPagesMatched); + return message; + }; - /** - * Constructs a new Object. - * @memberof google.cloud.securitycenter.v2.Kubernetes - * @classdesc Represents an Object. - * @implements IObject - * @constructor - * @param {google.cloud.securitycenter.v2.Kubernetes.IObject=} [properties] Properties to set - */ - function Object(properties) { - this.containers = []; - 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 plain object from a Detection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection} message Detection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Detection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.binary = ""; + object.percentPagesMatched = 0; + } + if (message.binary != null && message.hasOwnProperty("binary")) + object.binary = message.binary; + if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) + object.percentPagesMatched = options.json && !isFinite(message.percentPagesMatched) ? String(message.percentPagesMatched) : message.percentPagesMatched; + return object; + }; - /** - * Object group. - * @member {string} group - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - */ - Object.prototype.group = ""; + /** + * Converts this Detection to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + * @returns {Object.} JSON object + */ + Detection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Object kind. - * @member {string} kind - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - */ - Object.prototype.kind = ""; + /** + * Gets the default type url for Detection + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Detection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection"; + }; - /** - * Object ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - */ - Object.prototype.ns = ""; + return Detection; + })(); - /** - * Object name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - */ - Object.prototype.name = ""; + return MemoryHashSignature; + })(); - /** - * Object containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - */ - Object.prototype.containers = $util.emptyArray; + ProcessSignature.YaraRuleSignature = (function() { - /** - * Creates a new Object instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IObject=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object instance - */ - Object.create = function create(properties) { - return new Object(properties); - }; + /** + * Properties of a YaraRuleSignature. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature + * @interface IYaraRuleSignature + * @property {string|null} [yaraRule] YaraRuleSignature yaraRule + */ - /** - * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IObject} message Object message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Object.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new YaraRuleSignature. + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature + * @classdesc Represents a YaraRuleSignature. + * @implements IYaraRuleSignature + * @constructor + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set + */ + function YaraRuleSignature(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 Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.IObject} message Object message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Object.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * YaraRuleSignature yaraRule. + * @member {string} yaraRule + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @instance + */ + YaraRuleSignature.prototype.yaraRule = ""; - /** - * Decodes an Object message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Object.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.cloud.securitycenter.v2.Kubernetes.Object(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.group = reader.string(); - break; - } - case 2: { - message.kind = reader.string(); - break; - } - case 3: { - message.ns = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - case 5: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); + /** + * Creates a new YaraRuleSignature instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature instance + */ + YaraRuleSignature.create = function create(properties) { + return new YaraRuleSignature(properties); + }; + + /** + * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YaraRuleSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yaraRule != null && Object.hasOwnProperty.call(message, "yaraRule")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.yaraRule); + return writer; + }; + + /** + * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YaraRuleSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YaraRuleSignature.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.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.yaraRule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Object message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Object.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YaraRuleSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Object message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Object.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) - if (!$util.isString(message.group)) - return "group: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } - } - return null; - }; + /** + * Verifies a YaraRuleSignature message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YaraRuleSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) + if (!$util.isString(message.yaraRule)) + return "yaraRule: string expected"; + return null; + }; - /** - * Creates an Object message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object - */ - Object.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Object) + /** + * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + */ + YaraRuleSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature) + return object; + var message = new $root.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature(); + if (object.yaraRule != null) + message.yaraRule = String(object.yaraRule); + return message; + }; + + /** + * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature} message YaraRuleSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YaraRuleSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.yaraRule = ""; + if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) + object.yaraRule = message.yaraRule; return object; - var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Object(); - if (object.group != null) - message.group = String(object.group); - if (object.kind != null) - message.kind = String(object.kind); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Object.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Object.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); - } - } - return message; - }; + }; - /** - * Creates a plain object from an Object message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v2.Kubernetes.Object} message Object - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Object.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.containers = []; - if (options.defaults) { - object.group = ""; - object.kind = ""; - object.ns = ""; - object.name = ""; - } - if (message.group != null && message.hasOwnProperty("group")) - object.group = message.group; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); - } - return object; - }; + /** + * Converts this YaraRuleSignature to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @instance + * @returns {Object.} JSON object + */ + YaraRuleSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Object to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @instance - * @returns {Object.} JSON object - */ - Object.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for YaraRuleSignature + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YaraRuleSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature"; + }; + + return YaraRuleSignature; + })(); /** - * Gets the default type url for Object - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Kubernetes.Object - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * SignatureType enum. + * @name google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType + * @enum {number} + * @property {number} SIGNATURE_TYPE_UNSPECIFIED=0 SIGNATURE_TYPE_UNSPECIFIED value + * @property {number} SIGNATURE_TYPE_PROCESS=1 SIGNATURE_TYPE_PROCESS value + * @property {number} SIGNATURE_TYPE_FILE=2 SIGNATURE_TYPE_FILE value */ - Object.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Object"; - }; + ProcessSignature.SignatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SIGNATURE_TYPE_PROCESS"] = 1; + values[valuesById[2] = "SIGNATURE_TYPE_FILE"] = 2; + return values; + })(); - return Object; + return ProcessSignature; })(); - return Kubernetes; + return Indicator; })(); - v2.LoadBalancer = (function() { + v2.KernelRootkit = (function() { /** - * Properties of a LoadBalancer. + * Properties of a KernelRootkit. * @memberof google.cloud.securitycenter.v2 - * @interface ILoadBalancer - * @property {string|null} [name] LoadBalancer name + * @interface IKernelRootkit + * @property {string|null} [name] KernelRootkit name + * @property {boolean|null} [unexpectedCodeModification] KernelRootkit unexpectedCodeModification + * @property {boolean|null} [unexpectedReadOnlyDataModification] KernelRootkit unexpectedReadOnlyDataModification + * @property {boolean|null} [unexpectedFtraceHandler] KernelRootkit unexpectedFtraceHandler + * @property {boolean|null} [unexpectedKprobeHandler] KernelRootkit unexpectedKprobeHandler + * @property {boolean|null} [unexpectedKernelCodePages] KernelRootkit unexpectedKernelCodePages + * @property {boolean|null} [unexpectedSystemCallHandler] KernelRootkit unexpectedSystemCallHandler + * @property {boolean|null} [unexpectedInterruptHandler] KernelRootkit unexpectedInterruptHandler + * @property {boolean|null} [unexpectedProcessesInRunqueue] KernelRootkit unexpectedProcessesInRunqueue */ /** - * Constructs a new LoadBalancer. + * Constructs a new KernelRootkit. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a LoadBalancer. - * @implements ILoadBalancer + * @classdesc Represents a KernelRootkit. + * @implements IKernelRootkit * @constructor - * @param {google.cloud.securitycenter.v2.ILoadBalancer=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IKernelRootkit=} [properties] Properties to set */ - function LoadBalancer(properties) { + function KernelRootkit(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82177,70 +80369,150 @@ } /** - * LoadBalancer name. + * KernelRootkit name. * @member {string} name - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @instance */ - LoadBalancer.prototype.name = ""; + KernelRootkit.prototype.name = ""; /** - * Creates a new LoadBalancer instance using the specified properties. + * KernelRootkit unexpectedCodeModification. + * @member {boolean} unexpectedCodeModification + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedCodeModification = false; + + /** + * KernelRootkit unexpectedReadOnlyDataModification. + * @member {boolean} unexpectedReadOnlyDataModification + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedReadOnlyDataModification = false; + + /** + * KernelRootkit unexpectedFtraceHandler. + * @member {boolean} unexpectedFtraceHandler + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedFtraceHandler = false; + + /** + * KernelRootkit unexpectedKprobeHandler. + * @member {boolean} unexpectedKprobeHandler + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedKprobeHandler = false; + + /** + * KernelRootkit unexpectedKernelCodePages. + * @member {boolean} unexpectedKernelCodePages + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedKernelCodePages = false; + + /** + * KernelRootkit unexpectedSystemCallHandler. + * @member {boolean} unexpectedSystemCallHandler + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedSystemCallHandler = false; + + /** + * KernelRootkit unexpectedInterruptHandler. + * @member {boolean} unexpectedInterruptHandler + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedInterruptHandler = false; + + /** + * KernelRootkit unexpectedProcessesInRunqueue. + * @member {boolean} unexpectedProcessesInRunqueue + * @memberof google.cloud.securitycenter.v2.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedProcessesInRunqueue = false; + + /** + * Creates a new KernelRootkit instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static - * @param {google.cloud.securitycenter.v2.ILoadBalancer=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer instance + * @param {google.cloud.securitycenter.v2.IKernelRootkit=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit instance */ - LoadBalancer.create = function create(properties) { - return new LoadBalancer(properties); + KernelRootkit.create = function create(properties) { + return new KernelRootkit(properties); }; /** - * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static - * @param {google.cloud.securitycenter.v2.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {google.cloud.securitycenter.v2.IKernelRootkit} message KernelRootkit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoadBalancer.encode = function encode(message, writer) { + KernelRootkit.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.unexpectedCodeModification != null && Object.hasOwnProperty.call(message, "unexpectedCodeModification")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.unexpectedCodeModification); + if (message.unexpectedReadOnlyDataModification != null && Object.hasOwnProperty.call(message, "unexpectedReadOnlyDataModification")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unexpectedReadOnlyDataModification); + if (message.unexpectedFtraceHandler != null && Object.hasOwnProperty.call(message, "unexpectedFtraceHandler")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unexpectedFtraceHandler); + if (message.unexpectedKprobeHandler != null && Object.hasOwnProperty.call(message, "unexpectedKprobeHandler")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unexpectedKprobeHandler); + if (message.unexpectedKernelCodePages != null && Object.hasOwnProperty.call(message, "unexpectedKernelCodePages")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.unexpectedKernelCodePages); + if (message.unexpectedSystemCallHandler != null && Object.hasOwnProperty.call(message, "unexpectedSystemCallHandler")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.unexpectedSystemCallHandler); + if (message.unexpectedInterruptHandler != null && Object.hasOwnProperty.call(message, "unexpectedInterruptHandler")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.unexpectedInterruptHandler); + if (message.unexpectedProcessesInRunqueue != null && Object.hasOwnProperty.call(message, "unexpectedProcessesInRunqueue")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.unexpectedProcessesInRunqueue); return writer; }; /** - * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.KernelRootkit.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static - * @param {google.cloud.securitycenter.v2.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {google.cloud.securitycenter.v2.IKernelRootkit} message KernelRootkit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoadBalancer.encodeDelimited = function encodeDelimited(message, writer) { + KernelRootkit.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoadBalancer message from the specified reader or buffer. + * Decodes a KernelRootkit message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoadBalancer.decode = function decode(reader, length) { + KernelRootkit.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.cloud.securitycenter.v2.LoadBalancer(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.KernelRootkit(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -82248,6 +80520,38 @@ message.name = reader.string(); break; } + case 2: { + message.unexpectedCodeModification = reader.bool(); + break; + } + case 3: { + message.unexpectedReadOnlyDataModification = reader.bool(); + break; + } + case 4: { + message.unexpectedFtraceHandler = reader.bool(); + break; + } + case 5: { + message.unexpectedKprobeHandler = reader.bool(); + break; + } + case 6: { + message.unexpectedKernelCodePages = reader.bool(); + break; + } + case 7: { + message.unexpectedSystemCallHandler = reader.bool(); + break; + } + case 8: { + message.unexpectedInterruptHandler = reader.bool(); + break; + } + case 9: { + message.unexpectedProcessesInRunqueue = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -82257,122 +80561,200 @@ }; /** - * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoadBalancer.decodeDelimited = function decodeDelimited(reader) { + KernelRootkit.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoadBalancer message. + * Verifies a KernelRootkit message. * @function verify - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoadBalancer.verify = function verify(message) { + KernelRootkit.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.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) + if (typeof message.unexpectedCodeModification !== "boolean") + return "unexpectedCodeModification: boolean expected"; + if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) + if (typeof message.unexpectedReadOnlyDataModification !== "boolean") + return "unexpectedReadOnlyDataModification: boolean expected"; + if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) + if (typeof message.unexpectedFtraceHandler !== "boolean") + return "unexpectedFtraceHandler: boolean expected"; + if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) + if (typeof message.unexpectedKprobeHandler !== "boolean") + return "unexpectedKprobeHandler: boolean expected"; + if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) + if (typeof message.unexpectedKernelCodePages !== "boolean") + return "unexpectedKernelCodePages: boolean expected"; + if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) + if (typeof message.unexpectedSystemCallHandler !== "boolean") + return "unexpectedSystemCallHandler: boolean expected"; + if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) + if (typeof message.unexpectedInterruptHandler !== "boolean") + return "unexpectedInterruptHandler: boolean expected"; + if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) + if (typeof message.unexpectedProcessesInRunqueue !== "boolean") + return "unexpectedProcessesInRunqueue: boolean expected"; return null; }; /** - * Creates a LoadBalancer message from a plain object. Also converts values to their respective internal types. + * Creates a KernelRootkit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + * @returns {google.cloud.securitycenter.v2.KernelRootkit} KernelRootkit */ - LoadBalancer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.LoadBalancer) + KernelRootkit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.KernelRootkit) return object; - var message = new $root.google.cloud.securitycenter.v2.LoadBalancer(); + var message = new $root.google.cloud.securitycenter.v2.KernelRootkit(); if (object.name != null) message.name = String(object.name); + if (object.unexpectedCodeModification != null) + message.unexpectedCodeModification = Boolean(object.unexpectedCodeModification); + if (object.unexpectedReadOnlyDataModification != null) + message.unexpectedReadOnlyDataModification = Boolean(object.unexpectedReadOnlyDataModification); + if (object.unexpectedFtraceHandler != null) + message.unexpectedFtraceHandler = Boolean(object.unexpectedFtraceHandler); + if (object.unexpectedKprobeHandler != null) + message.unexpectedKprobeHandler = Boolean(object.unexpectedKprobeHandler); + if (object.unexpectedKernelCodePages != null) + message.unexpectedKernelCodePages = Boolean(object.unexpectedKernelCodePages); + if (object.unexpectedSystemCallHandler != null) + message.unexpectedSystemCallHandler = Boolean(object.unexpectedSystemCallHandler); + if (object.unexpectedInterruptHandler != null) + message.unexpectedInterruptHandler = Boolean(object.unexpectedInterruptHandler); + if (object.unexpectedProcessesInRunqueue != null) + message.unexpectedProcessesInRunqueue = Boolean(object.unexpectedProcessesInRunqueue); return message; }; /** - * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. + * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static - * @param {google.cloud.securitycenter.v2.LoadBalancer} message LoadBalancer + * @param {google.cloud.securitycenter.v2.KernelRootkit} message KernelRootkit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoadBalancer.toObject = function toObject(message, options) { + KernelRootkit.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.unexpectedCodeModification = false; + object.unexpectedReadOnlyDataModification = false; + object.unexpectedFtraceHandler = false; + object.unexpectedKprobeHandler = false; + object.unexpectedKernelCodePages = false; + object.unexpectedSystemCallHandler = false; + object.unexpectedInterruptHandler = false; + object.unexpectedProcessesInRunqueue = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) + object.unexpectedCodeModification = message.unexpectedCodeModification; + if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) + object.unexpectedReadOnlyDataModification = message.unexpectedReadOnlyDataModification; + if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) + object.unexpectedFtraceHandler = message.unexpectedFtraceHandler; + if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) + object.unexpectedKprobeHandler = message.unexpectedKprobeHandler; + if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) + object.unexpectedKernelCodePages = message.unexpectedKernelCodePages; + if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) + object.unexpectedSystemCallHandler = message.unexpectedSystemCallHandler; + if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) + object.unexpectedInterruptHandler = message.unexpectedInterruptHandler; + if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) + object.unexpectedProcessesInRunqueue = message.unexpectedProcessesInRunqueue; return object; }; /** - * Converts this LoadBalancer to JSON. + * Converts this KernelRootkit to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @instance * @returns {Object.} JSON object */ - LoadBalancer.prototype.toJSON = function toJSON() { + KernelRootkit.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LoadBalancer + * Gets the default type url for KernelRootkit * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @memberof google.cloud.securitycenter.v2.KernelRootkit * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LoadBalancer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KernelRootkit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.LoadBalancer"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.KernelRootkit"; }; - return LoadBalancer; + return KernelRootkit; })(); - v2.LogEntry = (function() { + v2.Kubernetes = (function() { /** - * Properties of a LogEntry. + * Properties of a Kubernetes. * @memberof google.cloud.securitycenter.v2 - * @interface ILogEntry - * @property {google.cloud.securitycenter.v2.ICloudLoggingEntry|null} [cloudLoggingEntry] LogEntry cloudLoggingEntry + * @interface IKubernetes + * @property {Array.|null} [pods] Kubernetes pods + * @property {Array.|null} [nodes] Kubernetes nodes + * @property {Array.|null} [nodePools] Kubernetes nodePools + * @property {Array.|null} [roles] Kubernetes roles + * @property {Array.|null} [bindings] Kubernetes bindings + * @property {Array.|null} [accessReviews] Kubernetes accessReviews + * @property {Array.|null} [objects] Kubernetes objects */ /** - * Constructs a new LogEntry. + * Constructs a new Kubernetes. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a LogEntry. - * @implements ILogEntry + * @classdesc Represents a Kubernetes. + * @implements IKubernetes * @constructor - * @param {google.cloud.securitycenter.v2.ILogEntry=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IKubernetes=} [properties] Properties to set */ - function LogEntry(properties) { + function Kubernetes(properties) { + this.pods = []; + this.nodes = []; + this.nodePools = []; + this.roles = []; + this.bindings = []; + this.accessReviews = []; + this.objects = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82380,89 +80762,180 @@ } /** - * LogEntry cloudLoggingEntry. - * @member {google.cloud.securitycenter.v2.ICloudLoggingEntry|null|undefined} cloudLoggingEntry - * @memberof google.cloud.securitycenter.v2.LogEntry + * Kubernetes pods. + * @member {Array.} pods + * @memberof google.cloud.securitycenter.v2.Kubernetes * @instance */ - LogEntry.prototype.cloudLoggingEntry = null; + Kubernetes.prototype.pods = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Kubernetes nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @instance + */ + Kubernetes.prototype.nodes = $util.emptyArray; /** - * LogEntry logEntry. - * @member {"cloudLoggingEntry"|undefined} logEntry - * @memberof google.cloud.securitycenter.v2.LogEntry + * Kubernetes nodePools. + * @member {Array.} nodePools + * @memberof google.cloud.securitycenter.v2.Kubernetes * @instance */ - Object.defineProperty(LogEntry.prototype, "logEntry", { - get: $util.oneOfGetter($oneOfFields = ["cloudLoggingEntry"]), - set: $util.oneOfSetter($oneOfFields) - }); + Kubernetes.prototype.nodePools = $util.emptyArray; /** - * Creates a new LogEntry instance using the specified properties. + * Kubernetes roles. + * @member {Array.} roles + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @instance + */ + Kubernetes.prototype.roles = $util.emptyArray; + + /** + * Kubernetes bindings. + * @member {Array.} bindings + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @instance + */ + Kubernetes.prototype.bindings = $util.emptyArray; + + /** + * Kubernetes accessReviews. + * @member {Array.} accessReviews + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @instance + */ + Kubernetes.prototype.accessReviews = $util.emptyArray; + + /** + * Kubernetes objects. + * @member {Array.} objects + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @instance + */ + Kubernetes.prototype.objects = $util.emptyArray; + + /** + * Creates a new Kubernetes instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static - * @param {google.cloud.securitycenter.v2.ILogEntry=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry instance + * @param {google.cloud.securitycenter.v2.IKubernetes=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes instance */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); + Kubernetes.create = function create(properties) { + return new Kubernetes(properties); }; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static - * @param {google.cloud.securitycenter.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.cloud.securitycenter.v2.IKubernetes} message Kubernetes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encode = function encode(message, writer) { + Kubernetes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudLoggingEntry != null && Object.hasOwnProperty.call(message, "cloudLoggingEntry")) - $root.google.cloud.securitycenter.v2.CloudLoggingEntry.encode(message.cloudLoggingEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pods != null && message.pods.length) + for (var i = 0; i < message.pods.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Pod.encode(message.pods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.encode(message.nodePools[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.roles != null && message.roles.length) + for (var i = 0; i < message.roles.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Role.encode(message.roles[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Binding.encode(message.bindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.accessReviews != null && message.accessReviews.length) + for (var i = 0; i < message.accessReviews.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.encode(message.accessReviews[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.objects != null && message.objects.length) + for (var i = 0; i < message.objects.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Object.encode(message.objects[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static - * @param {google.cloud.securitycenter.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {google.cloud.securitycenter.v2.IKubernetes} message Kubernetes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + Kubernetes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a Kubernetes message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decode = function decode(reader, length) { + Kubernetes.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.cloud.securitycenter.v2.LogEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Kubernetes(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.decode(reader, reader.uint32()); + if (!(message.pods && message.pods.length)) + message.pods = []; + message.pods.push($root.google.cloud.securitycenter.v2.Kubernetes.Pod.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v2.Kubernetes.Node.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.cloud.securitycenter.v2.Kubernetes.NodePool.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.roles && message.roles.length)) + message.roles = []; + message.roles.push($root.google.cloud.securitycenter.v2.Kubernetes.Role.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.cloud.securitycenter.v2.Kubernetes.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.accessReviews && message.accessReviews.length)) + message.accessReviews = []; + message.accessReviews.push($root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.objects && message.objects.length)) + message.objects = []; + message.objects.push($root.google.cloud.securitycenter.v2.Kubernetes.Object.decode(reader, reader.uint32())); break; } default: @@ -82474,830 +80947,3741 @@ }; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a Kubernetes message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { + Kubernetes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntry message. + * Verifies a Kubernetes message. * @function verify - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntry.verify = function verify(message) { + Kubernetes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { - properties.logEntry = 1; - { - var error = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.verify(message.cloudLoggingEntry); + if (message.pods != null && message.hasOwnProperty("pods")) { + if (!Array.isArray(message.pods)) + return "pods: array expected"; + for (var i = 0; i < message.pods.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.verify(message.pods[i]); if (error) - return "cloudLoggingEntry." + error; + return "pods." + error; + } + } + if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Node.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } + } + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + if (message.roles != null && message.hasOwnProperty("roles")) { + if (!Array.isArray(message.roles)) + return "roles: array expected"; + for (var i = 0; i < message.roles.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Role.verify(message.roles[i]); + if (error) + return "roles." + error; + } + } + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.accessReviews != null && message.hasOwnProperty("accessReviews")) { + if (!Array.isArray(message.accessReviews)) + return "accessReviews: array expected"; + for (var i = 0; i < message.accessReviews.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify(message.accessReviews[i]); + if (error) + return "accessReviews." + error; + } + } + if (message.objects != null && message.hasOwnProperty("objects")) { + if (!Array.isArray(message.objects)) + return "objects: array expected"; + for (var i = 0; i < message.objects.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Object.verify(message.objects[i]); + if (error) + return "objects." + error; } } return null; }; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a Kubernetes message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v2.Kubernetes} Kubernetes */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.LogEntry) + Kubernetes.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes) return object; - var message = new $root.google.cloud.securitycenter.v2.LogEntry(); - if (object.cloudLoggingEntry != null) { - if (typeof object.cloudLoggingEntry !== "object") - throw TypeError(".google.cloud.securitycenter.v2.LogEntry.cloudLoggingEntry: object expected"); - message.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.fromObject(object.cloudLoggingEntry); + var message = new $root.google.cloud.securitycenter.v2.Kubernetes(); + if (object.pods) { + if (!Array.isArray(object.pods)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.pods: array expected"); + message.pods = []; + for (var i = 0; i < object.pods.length; ++i) { + if (typeof object.pods[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.pods: object expected"); + message.pods[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.fromObject(object.pods[i]); + } + } + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.fromObject(object.nodes[i]); + } + } + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.nodePools: object expected"); + message.nodePools[i] = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.fromObject(object.nodePools[i]); + } + } + if (object.roles) { + if (!Array.isArray(object.roles)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.roles: array expected"); + message.roles = []; + for (var i = 0; i < object.roles.length; ++i) { + if (typeof object.roles[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.roles: object expected"); + message.roles[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Role.fromObject(object.roles[i]); + } + } + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.bindings: object expected"); + message.bindings[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.fromObject(object.bindings[i]); + } + } + if (object.accessReviews) { + if (!Array.isArray(object.accessReviews)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.accessReviews: array expected"); + message.accessReviews = []; + for (var i = 0; i < object.accessReviews.length; ++i) { + if (typeof object.accessReviews[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.accessReviews: object expected"); + message.accessReviews[i] = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.fromObject(object.accessReviews[i]); + } + } + if (object.objects) { + if (!Array.isArray(object.objects)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.objects: array expected"); + message.objects = []; + for (var i = 0; i < object.objects.length; ++i) { + if (typeof object.objects[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.objects: object expected"); + message.objects[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Object.fromObject(object.objects[i]); + } } return message; }; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static - * @param {google.cloud.securitycenter.v2.LogEntry} message LogEntry + * @param {google.cloud.securitycenter.v2.Kubernetes} message Kubernetes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntry.toObject = function toObject(message, options) { + Kubernetes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { - object.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.toObject(message.cloudLoggingEntry, options); - if (options.oneofs) - object.logEntry = "cloudLoggingEntry"; + if (options.arrays || options.defaults) { + object.pods = []; + object.nodes = []; + object.nodePools = []; + object.roles = []; + object.bindings = []; + object.accessReviews = []; + object.objects = []; + } + if (message.pods && message.pods.length) { + object.pods = []; + for (var j = 0; j < message.pods.length; ++j) + object.pods[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Pod.toObject(message.pods[j], options); + } + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.toObject(message.nodes[j], options); + } + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.cloud.securitycenter.v2.Kubernetes.NodePool.toObject(message.nodePools[j], options); + } + if (message.roles && message.roles.length) { + object.roles = []; + for (var j = 0; j < message.roles.length; ++j) + object.roles[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Role.toObject(message.roles[j], options); + } + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Binding.toObject(message.bindings[j], options); + } + if (message.accessReviews && message.accessReviews.length) { + object.accessReviews = []; + for (var j = 0; j < message.accessReviews.length; ++j) + object.accessReviews[j] = $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview.toObject(message.accessReviews[j], options); + } + if (message.objects && message.objects.length) { + object.objects = []; + for (var j = 0; j < message.objects.length; ++j) + object.objects[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Object.toObject(message.objects[j], options); } return object; }; /** - * Converts this LogEntry to JSON. + * Converts this Kubernetes to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @instance * @returns {Object.} JSON object */ - LogEntry.prototype.toJSON = function toJSON() { + Kubernetes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LogEntry + * Gets the default type url for Kubernetes * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.LogEntry + * @memberof google.cloud.securitycenter.v2.Kubernetes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Kubernetes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.LogEntry"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes"; }; - return LogEntry; - })(); + Kubernetes.Pod = (function() { - v2.CloudLoggingEntry = (function() { + /** + * Properties of a Pod. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface IPod + * @property {string|null} [ns] Pod ns + * @property {string|null} [name] Pod name + * @property {Array.|null} [labels] Pod labels + * @property {Array.|null} [containers] Pod containers + */ - /** - * Properties of a CloudLoggingEntry. - * @memberof google.cloud.securitycenter.v2 - * @interface ICloudLoggingEntry - * @property {string|null} [insertId] CloudLoggingEntry insertId - * @property {string|null} [logId] CloudLoggingEntry logId - * @property {string|null} [resourceContainer] CloudLoggingEntry resourceContainer - * @property {google.protobuf.ITimestamp|null} [timestamp] CloudLoggingEntry timestamp - */ + /** + * Constructs a new Pod. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a Pod. + * @implements IPod + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.IPod=} [properties] Properties to set + */ + function Pod(properties) { + this.labels = []; + this.containers = []; + 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 CloudLoggingEntry. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a CloudLoggingEntry. - * @implements ICloudLoggingEntry - * @constructor - * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry=} [properties] Properties to set - */ - function CloudLoggingEntry(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]]; - } - - /** - * CloudLoggingEntry insertId. - * @member {string} insertId - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @instance - */ - CloudLoggingEntry.prototype.insertId = ""; + /** + * Pod ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @instance + */ + Pod.prototype.ns = ""; - /** - * CloudLoggingEntry logId. - * @member {string} logId - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @instance - */ - CloudLoggingEntry.prototype.logId = ""; + /** + * Pod name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @instance + */ + Pod.prototype.name = ""; - /** - * CloudLoggingEntry resourceContainer. - * @member {string} resourceContainer - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @instance - */ - CloudLoggingEntry.prototype.resourceContainer = ""; + /** + * Pod labels. + * @member {Array.} labels + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @instance + */ + Pod.prototype.labels = $util.emptyArray; - /** - * CloudLoggingEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @instance - */ - CloudLoggingEntry.prototype.timestamp = null; + /** + * Pod containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @instance + */ + Pod.prototype.containers = $util.emptyArray; - /** - * Creates a new CloudLoggingEntry instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry instance - */ - CloudLoggingEntry.create = function create(properties) { - return new CloudLoggingEntry(properties); - }; + /** + * Creates a new Pod instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IPod=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod instance + */ + Pod.create = function create(properties) { + return new Pod(properties); + }; - /** - * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudLoggingEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.insertId); - if (message.logId != null && Object.hasOwnProperty.call(message, "logId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.logId); - if (message.resourceContainer != null && Object.hasOwnProperty.call(message, "resourceContainer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceContainer); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IPod} message Pod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pod.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.cloud.securitycenter.v2.Label.encode(message.labels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudLoggingEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Pod.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IPod} message Pod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pod.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudLoggingEntry.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.cloud.securitycenter.v2.CloudLoggingEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.insertId = reader.string(); - break; - } - case 2: { - message.logId = reader.string(); + /** + * Decodes a Pod message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pod.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.cloud.securitycenter.v2.Kubernetes.Pod(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ns = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.cloud.securitycenter.v2.Label.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - case 3: { - message.resourceContainer = reader.string(); - break; + } + return message; + }; + + /** + * Decodes a Pod message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pod.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pod message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pod.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Label.verify(message.labels[i]); + if (error) + return "labels." + error; } - case 4: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + } + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); + if (error) + return "containers." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudLoggingEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies a CloudLoggingEntry message. - * @function verify - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudLoggingEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.logId != null && message.hasOwnProperty("logId")) - if (!$util.isString(message.logId)) - return "logId: string expected"; - if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) - if (!$util.isString(message.resourceContainer)) - return "resourceContainer: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - return null; - }; + /** + * Creates a Pod message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Pod} Pod + */ + Pod.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Pod) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Pod(); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.labels: object expected"); + message.labels[i] = $root.google.cloud.securitycenter.v2.Label.fromObject(object.labels[i]); + } + } + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Pod.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); + } + } + return message; + }; - /** - * Creates a CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry - */ - CloudLoggingEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.CloudLoggingEntry) + /** + * Creates a plain object from a Pod message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Pod} message Pod + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pod.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.containers = []; + } + if (options.defaults) { + object.ns = ""; + object.name = ""; + } + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.cloud.securitycenter.v2.Label.toObject(message.labels[j], options); + } + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); + } return object; - var message = new $root.google.cloud.securitycenter.v2.CloudLoggingEntry(); - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.logId != null) - message.logId = String(object.logId); - if (object.resourceContainer != null) - message.resourceContainer = String(object.resourceContainer); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.cloud.securitycenter.v2.CloudLoggingEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - return message; - }; + }; - /** - * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {google.cloud.securitycenter.v2.CloudLoggingEntry} message CloudLoggingEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudLoggingEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.insertId = ""; - object.logId = ""; - object.resourceContainer = ""; - object.timestamp = null; - } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.logId != null && message.hasOwnProperty("logId")) - object.logId = message.logId; - if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) - object.resourceContainer = message.resourceContainer; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - return object; - }; + /** + * Converts this Pod to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @instance + * @returns {Object.} JSON object + */ + Pod.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CloudLoggingEntry to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @instance - * @returns {Object.} JSON object - */ - CloudLoggingEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Pod + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Pod + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Pod"; + }; - /** - * Gets the default type url for CloudLoggingEntry - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudLoggingEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudLoggingEntry"; - }; + return Pod; + })(); - return CloudLoggingEntry; - })(); + Kubernetes.Node = (function() { - v2.MitreAttack = (function() { + /** + * Properties of a Node. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface INode + * @property {string|null} [name] Node name + */ - /** - * Properties of a MitreAttack. - * @memberof google.cloud.securitycenter.v2 - * @interface IMitreAttack - * @property {google.cloud.securitycenter.v2.MitreAttack.Tactic|null} [primaryTactic] MitreAttack primaryTactic - * @property {Array.|null} [primaryTechniques] MitreAttack primaryTechniques - * @property {Array.|null} [additionalTactics] MitreAttack additionalTactics - * @property {Array.|null} [additionalTechniques] MitreAttack additionalTechniques - * @property {string|null} [version] MitreAttack version - */ + /** + * Constructs a new Node. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a Node. + * @implements INode + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.INode=} [properties] Properties to set + */ + function Node(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 MitreAttack. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a MitreAttack. - * @implements IMitreAttack - * @constructor - * @param {google.cloud.securitycenter.v2.IMitreAttack=} [properties] Properties to set - */ - function MitreAttack(properties) { - this.primaryTechniques = []; - this.additionalTactics = []; - this.additionalTechniques = []; - 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]]; - } + /** + * Node name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @instance + */ + Node.prototype.name = ""; - /** - * MitreAttack primaryTactic. - * @member {google.cloud.securitycenter.v2.MitreAttack.Tactic} primaryTactic - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @instance - */ - MitreAttack.prototype.primaryTactic = 0; + /** + * Creates a new Node instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node instance + */ + Node.create = function create(properties) { + return new Node(properties); + }; - /** - * MitreAttack primaryTechniques. - * @member {Array.} primaryTechniques - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @instance - */ - MitreAttack.prototype.primaryTechniques = $util.emptyArray; + /** + * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INode} message Node message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Node.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); + return writer; + }; - /** - * MitreAttack additionalTactics. - * @member {Array.} additionalTactics - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @instance - */ - MitreAttack.prototype.additionalTactics = $util.emptyArray; + /** + * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Node.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INode} message Node message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Node.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MitreAttack additionalTechniques. - * @member {Array.} additionalTechniques - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @instance - */ - MitreAttack.prototype.additionalTechniques = $util.emptyArray; + /** + * Decodes a Node message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Node.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.cloud.securitycenter.v2.Kubernetes.Node(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MitreAttack version. - * @member {string} version - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @instance - */ - MitreAttack.prototype.version = ""; + /** + * Decodes a Node message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Node.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new MitreAttack instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {google.cloud.securitycenter.v2.IMitreAttack=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack instance - */ - MitreAttack.create = function create(properties) { - return new MitreAttack(properties); - }; + /** + * Verifies a Node message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Node.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {google.cloud.securitycenter.v2.IMitreAttack} message MitreAttack message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MitreAttack.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primaryTactic != null && Object.hasOwnProperty.call(message, "primaryTactic")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primaryTactic); - if (message.primaryTechniques != null && message.primaryTechniques.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.primaryTechniques.length; ++i) - writer.int32(message.primaryTechniques[i]); - writer.ldelim(); - } - if (message.additionalTactics != null && message.additionalTactics.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.additionalTactics.length; ++i) - writer.int32(message.additionalTactics[i]); - writer.ldelim(); - } - if (message.additionalTechniques != null && message.additionalTechniques.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.additionalTechniques.length; ++i) - writer.int32(message.additionalTechniques[i]); - writer.ldelim(); + /** + * Creates a Node message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Node} Node + */ + Node.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Node) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Node(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Node message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Node} message Node + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Node.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Node to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @instance + * @returns {Object.} JSON object + */ + Node.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Node + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Node + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Node.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Node"; + }; + + return Node; + })(); + + Kubernetes.NodePool = (function() { + + /** + * Properties of a NodePool. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface INodePool + * @property {string|null} [name] NodePool name + * @property {Array.|null} [nodes] NodePool nodes + */ + + /** + * Constructs a new NodePool. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a NodePool. + * @implements INodePool + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool=} [properties] Properties to set + */ + function NodePool(properties) { + this.nodes = []; + 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 (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - return writer; - }; - /** - * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {google.cloud.securitycenter.v2.IMitreAttack} message MitreAttack message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MitreAttack.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * NodePool name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @instance + */ + NodePool.prototype.name = ""; - /** - * Decodes a MitreAttack message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MitreAttack.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.cloud.securitycenter.v2.MitreAttack(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.primaryTactic = reader.int32(); - break; - } - case 2: { - if (!(message.primaryTechniques && message.primaryTechniques.length)) - message.primaryTechniques = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.primaryTechniques.push(reader.int32()); - } else - message.primaryTechniques.push(reader.int32()); - break; - } - case 3: { - if (!(message.additionalTactics && message.additionalTactics.length)) - message.additionalTactics = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.additionalTactics.push(reader.int32()); - } else - message.additionalTactics.push(reader.int32()); - break; - } - case 4: { - if (!(message.additionalTechniques && message.additionalTechniques.length)) - message.additionalTechniques = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.additionalTechniques.push(reader.int32()); - } else - message.additionalTechniques.push(reader.int32()); - break; - } - case 5: { - message.version = reader.string(); + /** + * NodePool nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @instance + */ + NodePool.prototype.nodes = $util.emptyArray; + + /** + * Creates a new NodePool instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool instance + */ + NodePool.create = function create(properties) { + return new NodePool(properties); + }; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.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.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.NodePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.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.cloud.securitycenter.v2.Kubernetes.NodePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v2.Kubernetes.Node.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a MitreAttack message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MitreAttack.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a MitreAttack message. - * @function verify - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MitreAttack.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) - switch (message.primaryTactic) { - default: - return "primaryTactic: enum value expected"; - case 0: - case 1: - case 2: - case 5: - case 3: - case 6: - case 8: - case 7: - case 9: - case 10: - case 11: - case 12: - case 4: - case 13: - case 14: - break; + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePool message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePool.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.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Node.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } } - if (message.primaryTechniques != null && message.hasOwnProperty("primaryTechniques")) { - if (!Array.isArray(message.primaryTechniques)) - return "primaryTechniques: array expected"; - for (var i = 0; i < message.primaryTechniques.length; ++i) - switch (message.primaryTechniques[i]) { - default: - return "primaryTechniques: enum value[] expected"; - case 0: - case 49: - case 50: - case 37: - case 38: - case 32: - case 56: - case 6: - case 7: - case 18: - case 19: - case 45: - case 46: - case 47: - case 14: - case 35: - case 15: - case 16: - case 9: - case 10: - case 11: - case 22: - case 40: - case 23: - case 58: - case 3: - case 4: - case 44: - case 5: - case 33: - case 39: - case 27: - case 30: - case 29: - case 52: - case 36: - case 8: - case 17: - case 48: - case 42: - case 51: - case 25: - case 24: - case 34: - case 13: - case 28: - case 31: - case 55: - case 20: - case 21: - case 12: - case 41: - case 26: - case 54: - case 53: - case 43: - case 1: - case 2: - case 57: - break; + return null; + }; + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.NodePool} NodePool + */ + NodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.NodePool) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.NodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.NodePool.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.NodePool.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.fromObject(object.nodes[i]); } + } + return message; + }; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.NodePool} message NodePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodes = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Node.toObject(message.nodes[j], options); + } + return object; + }; + + /** + * Converts this NodePool to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @instance + * @returns {Object.} JSON object + */ + NodePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePool + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.NodePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.NodePool"; + }; + + return NodePool; + })(); + + Kubernetes.Role = (function() { + + /** + * Properties of a Role. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface IRole + * @property {google.cloud.securitycenter.v2.Kubernetes.Role.Kind|null} [kind] Role kind + * @property {string|null} [ns] Role ns + * @property {string|null} [name] Role name + */ + + /** + * Constructs a new Role. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a Role. + * @implements IRole + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.IRole=} [properties] Properties to set + */ + function Role(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 (message.additionalTactics != null && message.hasOwnProperty("additionalTactics")) { - if (!Array.isArray(message.additionalTactics)) - return "additionalTactics: array expected"; - for (var i = 0; i < message.additionalTactics.length; ++i) - switch (message.additionalTactics[i]) { + + /** + * Role kind. + * @member {google.cloud.securitycenter.v2.Kubernetes.Role.Kind} kind + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @instance + */ + Role.prototype.kind = 0; + + /** + * Role ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @instance + */ + Role.prototype.ns = ""; + + /** + * Role name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @instance + */ + Role.prototype.name = ""; + + /** + * Creates a new Role instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IRole=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role instance + */ + Role.create = function create(properties) { + return new Role(properties); + }; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Role.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Role message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.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.cloud.securitycenter.v2.Kubernetes.Role(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.int32(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } default: - return "additionalTactics: enum value[] expected"; - case 0: - case 1: - case 2: - case 5: - case 3: - case 6: - case 8: - case 7: - case 9: - case 10: - case 11: - case 12: - case 4: - case 13: - case 14: + reader.skipType(tag & 7); break; } - } - if (message.additionalTechniques != null && message.hasOwnProperty("additionalTechniques")) { - if (!Array.isArray(message.additionalTechniques)) - return "additionalTechniques: array expected"; - for (var i = 0; i < message.additionalTechniques.length; ++i) - switch (message.additionalTechniques[i]) { + } + return message; + }; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Role message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Role.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { default: - return "additionalTechniques: enum value[] expected"; + return "kind: enum value expected"; case 0: - case 49: - case 50: - case 37: - case 38: - case 32: - case 56: - case 6: - case 7: - case 18: - case 19: - case 45: - case 46: - case 47: - case 14: - case 35: - case 15: - case 16: - case 9: - case 10: - case 11: - case 22: - case 40: - case 23: - case 58: - case 3: - case 4: - case 44: - case 5: - case 33: - case 39: - case 27: - case 30: - case 29: - case 52: - case 36: - case 8: - case 17: - case 48: - case 42: - case 51: - case 25: - case 24: - case 34: - case 13: - case 28: - case 31: - case 55: - case 20: - case 21: - case 12: - case 41: - case 26: - case 54: - case 53: - case 43: case 1: case 2: - case 57: break; } - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a MitreAttack message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.MitreAttack - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack - */ - MitreAttack.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.MitreAttack) - return object; - var message = new $root.google.cloud.securitycenter.v2.MitreAttack(); - switch (object.primaryTactic) { - default: - if (typeof object.primaryTactic === "number") { - message.primaryTactic = object.primaryTactic; + /** + * Creates a Role message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Role} Role + */ + Role.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Role) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Role(); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } break; - } - break; - case "TACTIC_UNSPECIFIED": - case 0: + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "ROLE": + case 1: + message.kind = 1; + break; + case "CLUSTER_ROLE": + case 2: + message.kind = 2; + break; + } + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Role} message Role + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Role.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.ns = ""; + object.name = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.securitycenter.v2.Kubernetes.Role.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v2.Kubernetes.Role.Kind[message.kind] : message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Role to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @instance + * @returns {Object.} JSON object + */ + Role.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Role + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Role + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Role"; + }; + + /** + * Kind enum. + * @name google.cloud.securitycenter.v2.Kubernetes.Role.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} ROLE=1 ROLE value + * @property {number} CLUSTER_ROLE=2 CLUSTER_ROLE value + */ + Role.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROLE"] = 1; + values[valuesById[2] = "CLUSTER_ROLE"] = 2; + return values; + })(); + + return Role; + })(); + + Kubernetes.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface IBinding + * @property {string|null} [ns] Binding ns + * @property {string|null} [name] Binding name + * @property {google.cloud.securitycenter.v2.Kubernetes.IRole|null} [role] Binding role + * @property {Array.|null} [subjects] Binding subjects + */ + + /** + * Constructs a new Binding. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.subjects = []; + 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]]; + } + + /** + * Binding ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @instance + */ + Binding.prototype.ns = ""; + + /** + * Binding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @instance + */ + Binding.prototype.name = ""; + + /** + * Binding role. + * @member {google.cloud.securitycenter.v2.Kubernetes.IRole|null|undefined} role + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @instance + */ + Binding.prototype.role = null; + + /** + * Binding subjects. + * @member {Array.} subjects + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @instance + */ + Binding.prototype.subjects = $util.emptyArray; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + $root.google.cloud.securitycenter.v2.Kubernetes.Role.encode(message.role, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.subjects != null && message.subjects.length) + for (var i = 0; i < message.subjects.length; ++i) + $root.google.cloud.securitycenter.v2.Kubernetes.Subject.encode(message.subjects[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.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.cloud.securitycenter.v2.Kubernetes.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ns = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.subjects && message.subjects.length)) + message.subjects = []; + message.subjects.push($root.google.cloud.securitycenter.v2.Kubernetes.Subject.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.role != null && message.hasOwnProperty("role")) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Role.verify(message.role); + if (error) + return "role." + error; + } + if (message.subjects != null && message.hasOwnProperty("subjects")) { + if (!Array.isArray(message.subjects)) + return "subjects: array expected"; + for (var i = 0; i < message.subjects.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.verify(message.subjects[i]); + if (error) + return "subjects." + error; + } + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Binding) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Binding(); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.role != null) { + if (typeof object.role !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.role: object expected"); + message.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.fromObject(object.role); + } + if (object.subjects) { + if (!Array.isArray(object.subjects)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.subjects: array expected"); + message.subjects = []; + for (var i = 0; i < object.subjects.length; ++i) { + if (typeof object.subjects[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Binding.subjects: object expected"); + message.subjects[i] = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.fromObject(object.subjects[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subjects = []; + if (options.defaults) { + object.ns = ""; + object.name = ""; + object.role = null; + } + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.role != null && message.hasOwnProperty("role")) + object.role = $root.google.cloud.securitycenter.v2.Kubernetes.Role.toObject(message.role, options); + if (message.subjects && message.subjects.length) { + object.subjects = []; + for (var j = 0; j < message.subjects.length; ++j) + object.subjects[j] = $root.google.cloud.securitycenter.v2.Kubernetes.Subject.toObject(message.subjects[j], options); + } + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Binding"; + }; + + return Binding; + })(); + + Kubernetes.Subject = (function() { + + /** + * Properties of a Subject. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface ISubject + * @property {google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType|null} [kind] Subject kind + * @property {string|null} [ns] Subject ns + * @property {string|null} [name] Subject name + */ + + /** + * Constructs a new Subject. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents a Subject. + * @implements ISubject + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject=} [properties] Properties to set + */ + function Subject(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]]; + } + + /** + * Subject kind. + * @member {google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType} kind + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @instance + */ + Subject.prototype.kind = 0; + + /** + * Subject ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @instance + */ + Subject.prototype.ns = ""; + + /** + * Subject name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @instance + */ + Subject.prototype.name = ""; + + /** + * Creates a new Subject instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject instance + */ + Subject.create = function create(properties) { + return new Subject(properties); + }; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Subject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.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.cloud.securitycenter.v2.Kubernetes.Subject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.int32(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subject message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Subject} Subject + */ + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Subject) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Subject(); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "AUTH_TYPE_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "USER": + case 1: + message.kind = 1; + break; + case "SERVICEACCOUNT": + case 2: + message.kind = 2; + break; + case "GROUP": + case 3: + message.kind = 3; + break; + } + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Subject} message Subject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "AUTH_TYPE_UNSPECIFIED" : 0; + object.ns = ""; + object.name = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType[message.kind] : message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Subject to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @instance + * @returns {Object.} JSON object + */ + Subject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Subject + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Subject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Subject"; + }; + + /** + * AuthType enum. + * @name google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType + * @enum {number} + * @property {number} AUTH_TYPE_UNSPECIFIED=0 AUTH_TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} SERVICEACCOUNT=2 SERVICEACCOUNT value + * @property {number} GROUP=3 GROUP value + */ + Subject.AuthType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "SERVICEACCOUNT"] = 2; + values[valuesById[3] = "GROUP"] = 3; + return values; + })(); + + return Subject; + })(); + + Kubernetes.AccessReview = (function() { + + /** + * Properties of an AccessReview. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface IAccessReview + * @property {string|null} [group] AccessReview group + * @property {string|null} [ns] AccessReview ns + * @property {string|null} [name] AccessReview name + * @property {string|null} [resource] AccessReview resource + * @property {string|null} [subresource] AccessReview subresource + * @property {string|null} [verb] AccessReview verb + * @property {string|null} [version] AccessReview version + */ + + /** + * Constructs a new AccessReview. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents an AccessReview. + * @implements IAccessReview + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview=} [properties] Properties to set + */ + function AccessReview(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]]; + } + + /** + * AccessReview group. + * @member {string} group + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.group = ""; + + /** + * AccessReview ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.ns = ""; + + /** + * AccessReview name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.name = ""; + + /** + * AccessReview resource. + * @member {string} resource + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.resource = ""; + + /** + * AccessReview subresource. + * @member {string} subresource + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.subresource = ""; + + /** + * AccessReview verb. + * @member {string} verb + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.verb = ""; + + /** + * AccessReview version. + * @member {string} version + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.version = ""; + + /** + * Creates a new AccessReview instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview instance + */ + AccessReview.create = function create(properties) { + return new AccessReview(properties); + }; + + /** + * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview} message AccessReview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessReview.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && Object.hasOwnProperty.call(message, "group")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); + if (message.subresource != null && Object.hasOwnProperty.call(message, "subresource")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.subresource); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.verb); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); + return writer; + }; + + /** + * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.AccessReview.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IAccessReview} message AccessReview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessReview.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessReview message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessReview.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.cloud.securitycenter.v2.Kubernetes.AccessReview(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.group = reader.string(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.resource = reader.string(); + break; + } + case 5: { + message.subresource = reader.string(); + break; + } + case 6: { + message.verb = reader.string(); + break; + } + case 7: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessReview message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessReview.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessReview message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessReview.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) + if (!$util.isString(message.group)) + return "group: string expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.subresource != null && message.hasOwnProperty("subresource")) + if (!$util.isString(message.subresource)) + return "subresource: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.AccessReview} AccessReview + */ + AccessReview.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.AccessReview(); + if (object.group != null) + message.group = String(object.group); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.resource != null) + message.resource = String(object.resource); + if (object.subresource != null) + message.subresource = String(object.subresource); + if (object.verb != null) + message.verb = String(object.verb); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from an AccessReview message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.AccessReview} message AccessReview + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessReview.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.group = ""; + object.ns = ""; + object.name = ""; + object.resource = ""; + object.subresource = ""; + object.verb = ""; + object.version = ""; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = message.group; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.subresource != null && message.hasOwnProperty("subresource")) + object.subresource = message.subresource; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this AccessReview to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @instance + * @returns {Object.} JSON object + */ + AccessReview.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessReview + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.AccessReview + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessReview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.AccessReview"; + }; + + return AccessReview; + })(); + + Kubernetes.Object = (function() { + + /** + * Properties of an Object. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @interface IObject + * @property {string|null} [group] Object group + * @property {string|null} [kind] Object kind + * @property {string|null} [ns] Object ns + * @property {string|null} [name] Object name + * @property {Array.|null} [containers] Object containers + */ + + /** + * Constructs a new Object. + * @memberof google.cloud.securitycenter.v2.Kubernetes + * @classdesc Represents an Object. + * @implements IObject + * @constructor + * @param {google.cloud.securitycenter.v2.Kubernetes.IObject=} [properties] Properties to set + */ + function Object(properties) { + this.containers = []; + 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]]; + } + + /** + * Object group. + * @member {string} group + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + */ + Object.prototype.group = ""; + + /** + * Object kind. + * @member {string} kind + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + */ + Object.prototype.kind = ""; + + /** + * Object ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + */ + Object.prototype.ns = ""; + + /** + * Object name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + */ + Object.prototype.name = ""; + + /** + * Object containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + */ + Object.prototype.containers = $util.emptyArray; + + /** + * Creates a new Object instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IObject=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object instance + */ + Object.create = function create(properties) { + return new Object(properties); + }; + + /** + * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IObject} message Object message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Object.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && Object.hasOwnProperty.call(message, "group")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v2.Container.encode(message.containers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Kubernetes.Object.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.IObject} message Object message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Object.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Object message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Object.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.cloud.securitycenter.v2.Kubernetes.Object(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.group = reader.string(); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + case 3: { + message.ns = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v2.Container.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Object message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Object.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Object message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Object.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) + if (!$util.isString(message.group)) + return "group: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Container.verify(message.containers[i]); + if (error) + return "containers." + error; + } + } + return null; + }; + + /** + * Creates an Object message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Kubernetes.Object} Object + */ + Object.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Kubernetes.Object) + return object; + var message = new $root.google.cloud.securitycenter.v2.Kubernetes.Object(); + if (object.group != null) + message.group = String(object.group); + if (object.kind != null) + message.kind = String(object.kind); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Object.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Kubernetes.Object.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v2.Container.fromObject(object.containers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Object message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v2.Kubernetes.Object} message Object + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Object.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.containers = []; + if (options.defaults) { + object.group = ""; + object.kind = ""; + object.ns = ""; + object.name = ""; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = message.group; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v2.Container.toObject(message.containers[j], options); + } + return object; + }; + + /** + * Converts this Object to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @instance + * @returns {Object.} JSON object + */ + Object.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Object + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Kubernetes.Object + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Object.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Kubernetes.Object"; + }; + + return Object; + })(); + + return Kubernetes; + })(); + + v2.LoadBalancer = (function() { + + /** + * Properties of a LoadBalancer. + * @memberof google.cloud.securitycenter.v2 + * @interface ILoadBalancer + * @property {string|null} [name] LoadBalancer name + */ + + /** + * Constructs a new LoadBalancer. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a LoadBalancer. + * @implements ILoadBalancer + * @constructor + * @param {google.cloud.securitycenter.v2.ILoadBalancer=} [properties] Properties to set + */ + function LoadBalancer(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]]; + } + + /** + * LoadBalancer name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @instance + */ + LoadBalancer.prototype.name = ""; + + /** + * Creates a new LoadBalancer instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v2.ILoadBalancer=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer instance + */ + LoadBalancer.create = function create(properties) { + return new LoadBalancer(properties); + }; + + /** + * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v2.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancer.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); + return writer; + }; + + /** + * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LoadBalancer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v2.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancer.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.cloud.securitycenter.v2.LoadBalancer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancer message. + * @function verify + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a LoadBalancer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.LoadBalancer} LoadBalancer + */ + LoadBalancer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.LoadBalancer) + return object; + var message = new $root.google.cloud.securitycenter.v2.LoadBalancer(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v2.LoadBalancer} message LoadBalancer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this LoadBalancer to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @instance + * @returns {Object.} JSON object + */ + LoadBalancer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancer + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.LoadBalancer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.LoadBalancer"; + }; + + return LoadBalancer; + })(); + + v2.LogEntry = (function() { + + /** + * Properties of a LogEntry. + * @memberof google.cloud.securitycenter.v2 + * @interface ILogEntry + * @property {google.cloud.securitycenter.v2.ICloudLoggingEntry|null} [cloudLoggingEntry] LogEntry cloudLoggingEntry + */ + + /** + * Constructs a new LogEntry. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a LogEntry. + * @implements ILogEntry + * @constructor + * @param {google.cloud.securitycenter.v2.ILogEntry=} [properties] Properties to set + */ + function LogEntry(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]]; + } + + /** + * LogEntry cloudLoggingEntry. + * @member {google.cloud.securitycenter.v2.ICloudLoggingEntry|null|undefined} cloudLoggingEntry + * @memberof google.cloud.securitycenter.v2.LogEntry + * @instance + */ + LogEntry.prototype.cloudLoggingEntry = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogEntry logEntry. + * @member {"cloudLoggingEntry"|undefined} logEntry + * @memberof google.cloud.securitycenter.v2.LogEntry + * @instance + */ + Object.defineProperty(LogEntry.prototype, "logEntry", { + get: $util.oneOfGetter($oneOfFields = ["cloudLoggingEntry"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogEntry instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {google.cloud.securitycenter.v2.ILogEntry=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry instance + */ + LogEntry.create = function create(properties) { + return new LogEntry(properties); + }; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {google.cloud.securitycenter.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudLoggingEntry != null && Object.hasOwnProperty.call(message, "cloudLoggingEntry")) + $root.google.cloud.securitycenter.v2.CloudLoggingEntry.encode(message.cloudLoggingEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.LogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {google.cloud.securitycenter.v2.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.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.cloud.securitycenter.v2.LogEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntry message. + * @function verify + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { + properties.logEntry = 1; + { + var error = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.verify(message.cloudLoggingEntry); + if (error) + return "cloudLoggingEntry." + error; + } + } + return null; + }; + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.LogEntry} LogEntry + */ + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.LogEntry) + return object; + var message = new $root.google.cloud.securitycenter.v2.LogEntry(); + if (object.cloudLoggingEntry != null) { + if (typeof object.cloudLoggingEntry !== "object") + throw TypeError(".google.cloud.securitycenter.v2.LogEntry.cloudLoggingEntry: object expected"); + message.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.fromObject(object.cloudLoggingEntry); + } + return message; + }; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {google.cloud.securitycenter.v2.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { + object.cloudLoggingEntry = $root.google.cloud.securitycenter.v2.CloudLoggingEntry.toObject(message.cloudLoggingEntry, options); + if (options.oneofs) + object.logEntry = "cloudLoggingEntry"; + } + return object; + }; + + /** + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.LogEntry + * @instance + * @returns {Object.} JSON object + */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LogEntry + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.LogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.LogEntry"; + }; + + return LogEntry; + })(); + + v2.CloudLoggingEntry = (function() { + + /** + * Properties of a CloudLoggingEntry. + * @memberof google.cloud.securitycenter.v2 + * @interface ICloudLoggingEntry + * @property {string|null} [insertId] CloudLoggingEntry insertId + * @property {string|null} [logId] CloudLoggingEntry logId + * @property {string|null} [resourceContainer] CloudLoggingEntry resourceContainer + * @property {google.protobuf.ITimestamp|null} [timestamp] CloudLoggingEntry timestamp + */ + + /** + * Constructs a new CloudLoggingEntry. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a CloudLoggingEntry. + * @implements ICloudLoggingEntry + * @constructor + * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry=} [properties] Properties to set + */ + function CloudLoggingEntry(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]]; + } + + /** + * CloudLoggingEntry insertId. + * @member {string} insertId + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.insertId = ""; + + /** + * CloudLoggingEntry logId. + * @member {string} logId + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.logId = ""; + + /** + * CloudLoggingEntry resourceContainer. + * @member {string} resourceContainer + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.resourceContainer = ""; + + /** + * CloudLoggingEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.timestamp = null; + + /** + * Creates a new CloudLoggingEntry instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry instance + */ + CloudLoggingEntry.create = function create(properties) { + return new CloudLoggingEntry(properties); + }; + + /** + * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudLoggingEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.insertId); + if (message.logId != null && Object.hasOwnProperty.call(message, "logId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.logId); + if (message.resourceContainer != null && Object.hasOwnProperty.call(message, "resourceContainer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceContainer); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.CloudLoggingEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v2.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudLoggingEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudLoggingEntry.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.cloud.securitycenter.v2.CloudLoggingEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.insertId = reader.string(); + break; + } + case 2: { + message.logId = reader.string(); + break; + } + case 3: { + message.resourceContainer = reader.string(); + break; + } + case 4: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudLoggingEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudLoggingEntry message. + * @function verify + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudLoggingEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.logId != null && message.hasOwnProperty("logId")) + if (!$util.isString(message.logId)) + return "logId: string expected"; + if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) + if (!$util.isString(message.resourceContainer)) + return "resourceContainer: string expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.CloudLoggingEntry} CloudLoggingEntry + */ + CloudLoggingEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.CloudLoggingEntry) + return object; + var message = new $root.google.cloud.securitycenter.v2.CloudLoggingEntry(); + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.logId != null) + message.logId = String(object.logId); + if (object.resourceContainer != null) + message.resourceContainer = String(object.resourceContainer); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.cloud.securitycenter.v2.CloudLoggingEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v2.CloudLoggingEntry} message CloudLoggingEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudLoggingEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.insertId = ""; + object.logId = ""; + object.resourceContainer = ""; + object.timestamp = null; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.logId != null && message.hasOwnProperty("logId")) + object.logId = message.logId; + if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) + object.resourceContainer = message.resourceContainer; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this CloudLoggingEntry to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @instance + * @returns {Object.} JSON object + */ + CloudLoggingEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudLoggingEntry + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.CloudLoggingEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudLoggingEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.CloudLoggingEntry"; + }; + + return CloudLoggingEntry; + })(); + + v2.MitreAttack = (function() { + + /** + * Properties of a MitreAttack. + * @memberof google.cloud.securitycenter.v2 + * @interface IMitreAttack + * @property {google.cloud.securitycenter.v2.MitreAttack.Tactic|null} [primaryTactic] MitreAttack primaryTactic + * @property {Array.|null} [primaryTechniques] MitreAttack primaryTechniques + * @property {Array.|null} [additionalTactics] MitreAttack additionalTactics + * @property {Array.|null} [additionalTechniques] MitreAttack additionalTechniques + * @property {string|null} [version] MitreAttack version + */ + + /** + * Constructs a new MitreAttack. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a MitreAttack. + * @implements IMitreAttack + * @constructor + * @param {google.cloud.securitycenter.v2.IMitreAttack=} [properties] Properties to set + */ + function MitreAttack(properties) { + this.primaryTechniques = []; + this.additionalTactics = []; + this.additionalTechniques = []; + 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]]; + } + + /** + * MitreAttack primaryTactic. + * @member {google.cloud.securitycenter.v2.MitreAttack.Tactic} primaryTactic + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + */ + MitreAttack.prototype.primaryTactic = 0; + + /** + * MitreAttack primaryTechniques. + * @member {Array.} primaryTechniques + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + */ + MitreAttack.prototype.primaryTechniques = $util.emptyArray; + + /** + * MitreAttack additionalTactics. + * @member {Array.} additionalTactics + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + */ + MitreAttack.prototype.additionalTactics = $util.emptyArray; + + /** + * MitreAttack additionalTechniques. + * @member {Array.} additionalTechniques + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + */ + MitreAttack.prototype.additionalTechniques = $util.emptyArray; + + /** + * MitreAttack version. + * @member {string} version + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + */ + MitreAttack.prototype.version = ""; + + /** + * Creates a new MitreAttack instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {google.cloud.securitycenter.v2.IMitreAttack=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack instance + */ + MitreAttack.create = function create(properties) { + return new MitreAttack(properties); + }; + + /** + * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {google.cloud.securitycenter.v2.IMitreAttack} message MitreAttack message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MitreAttack.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryTactic != null && Object.hasOwnProperty.call(message, "primaryTactic")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primaryTactic); + if (message.primaryTechniques != null && message.primaryTechniques.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.primaryTechniques.length; ++i) + writer.int32(message.primaryTechniques[i]); + writer.ldelim(); + } + if (message.additionalTactics != null && message.additionalTactics.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.additionalTactics.length; ++i) + writer.int32(message.additionalTactics[i]); + writer.ldelim(); + } + if (message.additionalTechniques != null && message.additionalTechniques.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.additionalTechniques.length; ++i) + writer.int32(message.additionalTechniques[i]); + writer.ldelim(); + } + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + return writer; + }; + + /** + * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MitreAttack.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {google.cloud.securitycenter.v2.IMitreAttack} message MitreAttack message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MitreAttack.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MitreAttack message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MitreAttack.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.cloud.securitycenter.v2.MitreAttack(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.primaryTactic = reader.int32(); + break; + } + case 2: { + if (!(message.primaryTechniques && message.primaryTechniques.length)) + message.primaryTechniques = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.primaryTechniques.push(reader.int32()); + } else + message.primaryTechniques.push(reader.int32()); + break; + } + case 3: { + if (!(message.additionalTactics && message.additionalTactics.length)) + message.additionalTactics = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.additionalTactics.push(reader.int32()); + } else + message.additionalTactics.push(reader.int32()); + break; + } + case 4: { + if (!(message.additionalTechniques && message.additionalTechniques.length)) + message.additionalTechniques = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.additionalTechniques.push(reader.int32()); + } else + message.additionalTechniques.push(reader.int32()); + break; + } + case 5: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MitreAttack.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MitreAttack message. + * @function verify + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MitreAttack.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) + switch (message.primaryTactic) { + default: + return "primaryTactic: enum value expected"; + case 0: + case 1: + case 2: + case 5: + case 3: + case 6: + case 8: + case 7: + case 9: + case 10: + case 11: + case 12: + case 4: + case 13: + case 14: + break; + } + if (message.primaryTechniques != null && message.hasOwnProperty("primaryTechniques")) { + if (!Array.isArray(message.primaryTechniques)) + return "primaryTechniques: array expected"; + for (var i = 0; i < message.primaryTechniques.length; ++i) + switch (message.primaryTechniques[i]) { + default: + return "primaryTechniques: enum value[] expected"; + case 0: + case 49: + case 50: + case 37: + case 38: + case 32: + case 56: + case 6: + case 7: + case 59: + case 18: + case 19: + case 45: + case 46: + case 47: + case 14: + case 35: + case 15: + case 16: + case 9: + case 10: + case 11: + case 22: + case 40: + case 23: + case 58: + case 3: + case 4: + case 44: + case 5: + case 33: + case 39: + case 27: + case 30: + case 29: + case 52: + case 36: + case 8: + case 17: + case 48: + case 42: + case 51: + case 25: + case 24: + case 34: + case 13: + case 28: + case 31: + case 55: + case 20: + case 21: + case 12: + case 41: + case 26: + case 54: + case 53: + case 43: + case 1: + case 2: + case 60: + case 61: + case 57: + case 62: + break; + } + } + if (message.additionalTactics != null && message.hasOwnProperty("additionalTactics")) { + if (!Array.isArray(message.additionalTactics)) + return "additionalTactics: array expected"; + for (var i = 0; i < message.additionalTactics.length; ++i) + switch (message.additionalTactics[i]) { + default: + return "additionalTactics: enum value[] expected"; + case 0: + case 1: + case 2: + case 5: + case 3: + case 6: + case 8: + case 7: + case 9: + case 10: + case 11: + case 12: + case 4: + case 13: + case 14: + break; + } + } + if (message.additionalTechniques != null && message.hasOwnProperty("additionalTechniques")) { + if (!Array.isArray(message.additionalTechniques)) + return "additionalTechniques: array expected"; + for (var i = 0; i < message.additionalTechniques.length; ++i) + switch (message.additionalTechniques[i]) { + default: + return "additionalTechniques: enum value[] expected"; + case 0: + case 49: + case 50: + case 37: + case 38: + case 32: + case 56: + case 6: + case 7: + case 59: + case 18: + case 19: + case 45: + case 46: + case 47: + case 14: + case 35: + case 15: + case 16: + case 9: + case 10: + case 11: + case 22: + case 40: + case 23: + case 58: + case 3: + case 4: + case 44: + case 5: + case 33: + case 39: + case 27: + case 30: + case 29: + case 52: + case 36: + case 8: + case 17: + case 48: + case 42: + case 51: + case 25: + case 24: + case 34: + case 13: + case 28: + case 31: + case 55: + case 20: + case 21: + case 12: + case 41: + case 26: + case 54: + case 53: + case 43: + case 1: + case 2: + case 60: + case 61: + case 57: + case 62: + break; + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a MitreAttack message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.MitreAttack} MitreAttack + */ + MitreAttack.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.MitreAttack) + return object; + var message = new $root.google.cloud.securitycenter.v2.MitreAttack(); + switch (object.primaryTactic) { + default: + if (typeof object.primaryTactic === "number") { + message.primaryTactic = object.primaryTactic; + break; + } + break; + case "TACTIC_UNSPECIFIED": + case 0: message.primaryTactic = 0; break; case "RECONNAISSANCE": @@ -83357,841 +84741,3267 @@ message.primaryTactic = 14; break; } - if (object.primaryTechniques) { - if (!Array.isArray(object.primaryTechniques)) - throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.primaryTechniques: array expected"); - message.primaryTechniques = []; - for (var i = 0; i < object.primaryTechniques.length; ++i) - switch (object.primaryTechniques[i]) { + if (object.primaryTechniques) { + if (!Array.isArray(object.primaryTechniques)) + throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.primaryTechniques: array expected"); + message.primaryTechniques = []; + for (var i = 0; i < object.primaryTechniques.length; ++i) + switch (object.primaryTechniques[i]) { + default: + if (typeof object.primaryTechniques[i] === "number") { + message.primaryTechniques[i] = object.primaryTechniques[i]; + break; + } + case "TECHNIQUE_UNSPECIFIED": + case 0: + message.primaryTechniques[i] = 0; + break; + case "MASQUERADING": + case 49: + message.primaryTechniques[i] = 49; + break; + case "MATCH_LEGITIMATE_NAME_OR_LOCATION": + case 50: + message.primaryTechniques[i] = 50; + break; + case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": + case 37: + message.primaryTechniques[i] = 37; + break; + case "STARTUP_ITEMS": + case 38: + message.primaryTechniques[i] = 38; + break; + case "NETWORK_SERVICE_DISCOVERY": + case 32: + message.primaryTechniques[i] = 32; + break; + case "PROCESS_DISCOVERY": + case 56: + message.primaryTechniques[i] = 56; + break; + case "COMMAND_AND_SCRIPTING_INTERPRETER": + case 6: + message.primaryTechniques[i] = 6; + break; + case "UNIX_SHELL": + case 7: + message.primaryTechniques[i] = 7; + break; + case "PYTHON": + case 59: + message.primaryTechniques[i] = 59; + break; + case "PERMISSION_GROUPS_DISCOVERY": + case 18: + message.primaryTechniques[i] = 18; + break; + case "CLOUD_GROUPS": + case 19: + message.primaryTechniques[i] = 19; + break; + case "APPLICATION_LAYER_PROTOCOL": + case 45: + message.primaryTechniques[i] = 45; + break; + case "DNS": + case 46: + message.primaryTechniques[i] = 46; + break; + case "SOFTWARE_DEPLOYMENT_TOOLS": + case 47: + message.primaryTechniques[i] = 47; + break; + case "VALID_ACCOUNTS": + case 14: + message.primaryTechniques[i] = 14; + break; + case "DEFAULT_ACCOUNTS": + case 35: + message.primaryTechniques[i] = 35; + break; + case "LOCAL_ACCOUNTS": + case 15: + message.primaryTechniques[i] = 15; + break; + case "CLOUD_ACCOUNTS": + case 16: + message.primaryTechniques[i] = 16; + break; + case "PROXY": + case 9: + message.primaryTechniques[i] = 9; + break; + case "EXTERNAL_PROXY": + case 10: + message.primaryTechniques[i] = 10; + break; + case "MULTI_HOP_PROXY": + case 11: + message.primaryTechniques[i] = 11; + break; + case "ACCOUNT_MANIPULATION": + case 22: + message.primaryTechniques[i] = 22; + break; + case "ADDITIONAL_CLOUD_CREDENTIALS": + case 40: + message.primaryTechniques[i] = 40; + break; + case "SSH_AUTHORIZED_KEYS": + case 23: + message.primaryTechniques[i] = 23; + break; + case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": + case 58: + message.primaryTechniques[i] = 58; + break; + case "INGRESS_TOOL_TRANSFER": + case 3: + message.primaryTechniques[i] = 3; + break; + case "NATIVE_API": + case 4: + message.primaryTechniques[i] = 4; + break; + case "BRUTE_FORCE": + case 44: + message.primaryTechniques[i] = 44; + break; + case "SHARED_MODULES": + case 5: + message.primaryTechniques[i] = 5; + break; + case "ACCESS_TOKEN_MANIPULATION": + case 33: + message.primaryTechniques[i] = 33; + break; + case "TOKEN_IMPERSONATION_OR_THEFT": + case 39: + message.primaryTechniques[i] = 39; + break; + case "EXPLOIT_PUBLIC_FACING_APPLICATION": + case 27: + message.primaryTechniques[i] = 27; + break; + case "DOMAIN_POLICY_MODIFICATION": + case 30: + message.primaryTechniques[i] = 30; + break; + case "DATA_DESTRUCTION": + case 29: + message.primaryTechniques[i] = 29; + break; + case "SERVICE_STOP": + case 52: + message.primaryTechniques[i] = 52; + break; + case "INHIBIT_SYSTEM_RECOVERY": + case 36: + message.primaryTechniques[i] = 36; + break; + case "RESOURCE_HIJACKING": + case 8: + message.primaryTechniques[i] = 8; + break; + case "NETWORK_DENIAL_OF_SERVICE": + case 17: + message.primaryTechniques[i] = 17; + break; + case "CLOUD_SERVICE_DISCOVERY": + case 48: + message.primaryTechniques[i] = 48; + break; + case "STEAL_APPLICATION_ACCESS_TOKEN": + case 42: + message.primaryTechniques[i] = 42; + break; + case "ACCOUNT_ACCESS_REMOVAL": + case 51: + message.primaryTechniques[i] = 51; + break; + case "STEAL_WEB_SESSION_COOKIE": + case 25: + message.primaryTechniques[i] = 25; + break; + case "CREATE_OR_MODIFY_SYSTEM_PROCESS": + case 24: + message.primaryTechniques[i] = 24; + break; + case "ABUSE_ELEVATION_CONTROL_MECHANISM": + case 34: + message.primaryTechniques[i] = 34; + break; + case "UNSECURED_CREDENTIALS": + case 13: + message.primaryTechniques[i] = 13; + break; + case "MODIFY_AUTHENTICATION_PROCESS": + case 28: + message.primaryTechniques[i] = 28; + break; + case "IMPAIR_DEFENSES": + case 31: + message.primaryTechniques[i] = 31; + break; + case "DISABLE_OR_MODIFY_TOOLS": + case 55: + message.primaryTechniques[i] = 55; + break; + case "EXFILTRATION_OVER_WEB_SERVICE": + case 20: + message.primaryTechniques[i] = 20; + break; + case "EXFILTRATION_TO_CLOUD_STORAGE": + case 21: + message.primaryTechniques[i] = 21; + break; + case "DYNAMIC_RESOLUTION": + case 12: + message.primaryTechniques[i] = 12; + break; + case "LATERAL_TOOL_TRANSFER": + case 41: + message.primaryTechniques[i] = 41; + break; + case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": + case 26: + message.primaryTechniques[i] = 26; + break; + case "CREATE_SNAPSHOT": + case 54: + message.primaryTechniques[i] = 54; + break; + case "CLOUD_INFRASTRUCTURE_DISCOVERY": + case 53: + message.primaryTechniques[i] = 53; + break; + case "OBTAIN_CAPABILITIES": + case 43: + message.primaryTechniques[i] = 43; + break; + case "ACTIVE_SCANNING": + case 1: + message.primaryTechniques[i] = 1; + break; + case "SCANNING_IP_BLOCKS": + case 2: + message.primaryTechniques[i] = 2; + break; + case "CONTAINER_ADMINISTRATION_COMMAND": + case 60: + message.primaryTechniques[i] = 60; + break; + case "ESCAPE_TO_HOST": + case 61: + message.primaryTechniques[i] = 61; + break; + case "CONTAINER_AND_RESOURCE_DISCOVERY": + case 57: + message.primaryTechniques[i] = 57; + break; + case "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": + case 62: + message.primaryTechniques[i] = 62; + break; + } + } + if (object.additionalTactics) { + if (!Array.isArray(object.additionalTactics)) + throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.additionalTactics: array expected"); + message.additionalTactics = []; + for (var i = 0; i < object.additionalTactics.length; ++i) + switch (object.additionalTactics[i]) { default: - if (typeof object.primaryTechniques[i] === "number") { - message.primaryTechniques[i] = object.primaryTechniques[i]; + if (typeof object.additionalTactics[i] === "number") { + message.additionalTactics[i] = object.additionalTactics[i]; + break; + } + case "TACTIC_UNSPECIFIED": + case 0: + message.additionalTactics[i] = 0; + break; + case "RECONNAISSANCE": + case 1: + message.additionalTactics[i] = 1; + break; + case "RESOURCE_DEVELOPMENT": + case 2: + message.additionalTactics[i] = 2; + break; + case "INITIAL_ACCESS": + case 5: + message.additionalTactics[i] = 5; + break; + case "EXECUTION": + case 3: + message.additionalTactics[i] = 3; + break; + case "PERSISTENCE": + case 6: + message.additionalTactics[i] = 6; + break; + case "PRIVILEGE_ESCALATION": + case 8: + message.additionalTactics[i] = 8; + break; + case "DEFENSE_EVASION": + case 7: + message.additionalTactics[i] = 7; + break; + case "CREDENTIAL_ACCESS": + case 9: + message.additionalTactics[i] = 9; + break; + case "DISCOVERY": + case 10: + message.additionalTactics[i] = 10; + break; + case "LATERAL_MOVEMENT": + case 11: + message.additionalTactics[i] = 11; + break; + case "COLLECTION": + case 12: + message.additionalTactics[i] = 12; + break; + case "COMMAND_AND_CONTROL": + case 4: + message.additionalTactics[i] = 4; + break; + case "EXFILTRATION": + case 13: + message.additionalTactics[i] = 13; + break; + case "IMPACT": + case 14: + message.additionalTactics[i] = 14; + break; + } + } + if (object.additionalTechniques) { + if (!Array.isArray(object.additionalTechniques)) + throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.additionalTechniques: array expected"); + message.additionalTechniques = []; + for (var i = 0; i < object.additionalTechniques.length; ++i) + switch (object.additionalTechniques[i]) { + default: + if (typeof object.additionalTechniques[i] === "number") { + message.additionalTechniques[i] = object.additionalTechniques[i]; break; } case "TECHNIQUE_UNSPECIFIED": case 0: - message.primaryTechniques[i] = 0; + message.additionalTechniques[i] = 0; break; case "MASQUERADING": case 49: - message.primaryTechniques[i] = 49; + message.additionalTechniques[i] = 49; break; case "MATCH_LEGITIMATE_NAME_OR_LOCATION": case 50: - message.primaryTechniques[i] = 50; + message.additionalTechniques[i] = 50; break; case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": case 37: - message.primaryTechniques[i] = 37; + message.additionalTechniques[i] = 37; break; case "STARTUP_ITEMS": case 38: - message.primaryTechniques[i] = 38; + message.additionalTechniques[i] = 38; break; case "NETWORK_SERVICE_DISCOVERY": case 32: - message.primaryTechniques[i] = 32; + message.additionalTechniques[i] = 32; break; case "PROCESS_DISCOVERY": case 56: - message.primaryTechniques[i] = 56; + message.additionalTechniques[i] = 56; break; case "COMMAND_AND_SCRIPTING_INTERPRETER": case 6: - message.primaryTechniques[i] = 6; + message.additionalTechniques[i] = 6; break; case "UNIX_SHELL": case 7: - message.primaryTechniques[i] = 7; + message.additionalTechniques[i] = 7; + break; + case "PYTHON": + case 59: + message.additionalTechniques[i] = 59; break; case "PERMISSION_GROUPS_DISCOVERY": case 18: - message.primaryTechniques[i] = 18; + message.additionalTechniques[i] = 18; break; case "CLOUD_GROUPS": case 19: - message.primaryTechniques[i] = 19; + message.additionalTechniques[i] = 19; break; case "APPLICATION_LAYER_PROTOCOL": case 45: - message.primaryTechniques[i] = 45; + message.additionalTechniques[i] = 45; break; case "DNS": case 46: - message.primaryTechniques[i] = 46; + message.additionalTechniques[i] = 46; break; case "SOFTWARE_DEPLOYMENT_TOOLS": case 47: - message.primaryTechniques[i] = 47; + message.additionalTechniques[i] = 47; break; case "VALID_ACCOUNTS": case 14: - message.primaryTechniques[i] = 14; + message.additionalTechniques[i] = 14; break; case "DEFAULT_ACCOUNTS": case 35: - message.primaryTechniques[i] = 35; + message.additionalTechniques[i] = 35; break; case "LOCAL_ACCOUNTS": case 15: - message.primaryTechniques[i] = 15; + message.additionalTechniques[i] = 15; break; case "CLOUD_ACCOUNTS": case 16: - message.primaryTechniques[i] = 16; + message.additionalTechniques[i] = 16; break; case "PROXY": case 9: - message.primaryTechniques[i] = 9; + message.additionalTechniques[i] = 9; break; case "EXTERNAL_PROXY": case 10: - message.primaryTechniques[i] = 10; + message.additionalTechniques[i] = 10; break; case "MULTI_HOP_PROXY": case 11: - message.primaryTechniques[i] = 11; + message.additionalTechniques[i] = 11; break; case "ACCOUNT_MANIPULATION": case 22: - message.primaryTechniques[i] = 22; + message.additionalTechniques[i] = 22; break; case "ADDITIONAL_CLOUD_CREDENTIALS": case 40: - message.primaryTechniques[i] = 40; + message.additionalTechniques[i] = 40; break; case "SSH_AUTHORIZED_KEYS": case 23: - message.primaryTechniques[i] = 23; + message.additionalTechniques[i] = 23; break; case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": case 58: - message.primaryTechniques[i] = 58; + message.additionalTechniques[i] = 58; break; case "INGRESS_TOOL_TRANSFER": case 3: - message.primaryTechniques[i] = 3; + message.additionalTechniques[i] = 3; break; case "NATIVE_API": case 4: - message.primaryTechniques[i] = 4; + message.additionalTechniques[i] = 4; break; case "BRUTE_FORCE": case 44: - message.primaryTechniques[i] = 44; + message.additionalTechniques[i] = 44; break; case "SHARED_MODULES": case 5: - message.primaryTechniques[i] = 5; + message.additionalTechniques[i] = 5; break; case "ACCESS_TOKEN_MANIPULATION": case 33: - message.primaryTechniques[i] = 33; + message.additionalTechniques[i] = 33; break; case "TOKEN_IMPERSONATION_OR_THEFT": case 39: - message.primaryTechniques[i] = 39; + message.additionalTechniques[i] = 39; break; case "EXPLOIT_PUBLIC_FACING_APPLICATION": case 27: - message.primaryTechniques[i] = 27; + message.additionalTechniques[i] = 27; + break; + case "DOMAIN_POLICY_MODIFICATION": + case 30: + message.additionalTechniques[i] = 30; + break; + case "DATA_DESTRUCTION": + case 29: + message.additionalTechniques[i] = 29; + break; + case "SERVICE_STOP": + case 52: + message.additionalTechniques[i] = 52; + break; + case "INHIBIT_SYSTEM_RECOVERY": + case 36: + message.additionalTechniques[i] = 36; + break; + case "RESOURCE_HIJACKING": + case 8: + message.additionalTechniques[i] = 8; + break; + case "NETWORK_DENIAL_OF_SERVICE": + case 17: + message.additionalTechniques[i] = 17; + break; + case "CLOUD_SERVICE_DISCOVERY": + case 48: + message.additionalTechniques[i] = 48; + break; + case "STEAL_APPLICATION_ACCESS_TOKEN": + case 42: + message.additionalTechniques[i] = 42; + break; + case "ACCOUNT_ACCESS_REMOVAL": + case 51: + message.additionalTechniques[i] = 51; + break; + case "STEAL_WEB_SESSION_COOKIE": + case 25: + message.additionalTechniques[i] = 25; + break; + case "CREATE_OR_MODIFY_SYSTEM_PROCESS": + case 24: + message.additionalTechniques[i] = 24; + break; + case "ABUSE_ELEVATION_CONTROL_MECHANISM": + case 34: + message.additionalTechniques[i] = 34; + break; + case "UNSECURED_CREDENTIALS": + case 13: + message.additionalTechniques[i] = 13; + break; + case "MODIFY_AUTHENTICATION_PROCESS": + case 28: + message.additionalTechniques[i] = 28; + break; + case "IMPAIR_DEFENSES": + case 31: + message.additionalTechniques[i] = 31; + break; + case "DISABLE_OR_MODIFY_TOOLS": + case 55: + message.additionalTechniques[i] = 55; + break; + case "EXFILTRATION_OVER_WEB_SERVICE": + case 20: + message.additionalTechniques[i] = 20; + break; + case "EXFILTRATION_TO_CLOUD_STORAGE": + case 21: + message.additionalTechniques[i] = 21; + break; + case "DYNAMIC_RESOLUTION": + case 12: + message.additionalTechniques[i] = 12; + break; + case "LATERAL_TOOL_TRANSFER": + case 41: + message.additionalTechniques[i] = 41; + break; + case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": + case 26: + message.additionalTechniques[i] = 26; + break; + case "CREATE_SNAPSHOT": + case 54: + message.additionalTechniques[i] = 54; + break; + case "CLOUD_INFRASTRUCTURE_DISCOVERY": + case 53: + message.additionalTechniques[i] = 53; + break; + case "OBTAIN_CAPABILITIES": + case 43: + message.additionalTechniques[i] = 43; + break; + case "ACTIVE_SCANNING": + case 1: + message.additionalTechniques[i] = 1; + break; + case "SCANNING_IP_BLOCKS": + case 2: + message.additionalTechniques[i] = 2; + break; + case "CONTAINER_ADMINISTRATION_COMMAND": + case 60: + message.additionalTechniques[i] = 60; + break; + case "ESCAPE_TO_HOST": + case 61: + message.additionalTechniques[i] = 61; + break; + case "CONTAINER_AND_RESOURCE_DISCOVERY": + case 57: + message.additionalTechniques[i] = 57; + break; + case "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": + case 62: + message.additionalTechniques[i] = 62; + break; + } + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {google.cloud.securitycenter.v2.MitreAttack} message MitreAttack + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MitreAttack.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.primaryTechniques = []; + object.additionalTactics = []; + object.additionalTechniques = []; + } + if (options.defaults) { + object.primaryTactic = options.enums === String ? "TACTIC_UNSPECIFIED" : 0; + object.version = ""; + } + if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) + object.primaryTactic = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.primaryTactic] === undefined ? message.primaryTactic : $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.primaryTactic] : message.primaryTactic; + if (message.primaryTechniques && message.primaryTechniques.length) { + object.primaryTechniques = []; + for (var j = 0; j < message.primaryTechniques.length; ++j) + object.primaryTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.primaryTechniques[j]] === undefined ? message.primaryTechniques[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.primaryTechniques[j]] : message.primaryTechniques[j]; + } + if (message.additionalTactics && message.additionalTactics.length) { + object.additionalTactics = []; + for (var j = 0; j < message.additionalTactics.length; ++j) + object.additionalTactics[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.additionalTactics[j]] === undefined ? message.additionalTactics[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.additionalTactics[j]] : message.additionalTactics[j]; + } + if (message.additionalTechniques && message.additionalTechniques.length) { + object.additionalTechniques = []; + for (var j = 0; j < message.additionalTechniques.length; ++j) + object.additionalTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.additionalTechniques[j]] === undefined ? message.additionalTechniques[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.additionalTechniques[j]] : message.additionalTechniques[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this MitreAttack to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @instance + * @returns {Object.} JSON object + */ + MitreAttack.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MitreAttack + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.MitreAttack + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MitreAttack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.MitreAttack"; + }; + + /** + * Tactic enum. + * @name google.cloud.securitycenter.v2.MitreAttack.Tactic + * @enum {number} + * @property {number} TACTIC_UNSPECIFIED=0 TACTIC_UNSPECIFIED value + * @property {number} RECONNAISSANCE=1 RECONNAISSANCE value + * @property {number} RESOURCE_DEVELOPMENT=2 RESOURCE_DEVELOPMENT value + * @property {number} INITIAL_ACCESS=5 INITIAL_ACCESS value + * @property {number} EXECUTION=3 EXECUTION value + * @property {number} PERSISTENCE=6 PERSISTENCE value + * @property {number} PRIVILEGE_ESCALATION=8 PRIVILEGE_ESCALATION value + * @property {number} DEFENSE_EVASION=7 DEFENSE_EVASION value + * @property {number} CREDENTIAL_ACCESS=9 CREDENTIAL_ACCESS value + * @property {number} DISCOVERY=10 DISCOVERY value + * @property {number} LATERAL_MOVEMENT=11 LATERAL_MOVEMENT value + * @property {number} COLLECTION=12 COLLECTION value + * @property {number} COMMAND_AND_CONTROL=4 COMMAND_AND_CONTROL value + * @property {number} EXFILTRATION=13 EXFILTRATION value + * @property {number} IMPACT=14 IMPACT value + */ + MitreAttack.Tactic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TACTIC_UNSPECIFIED"] = 0; + values[valuesById[1] = "RECONNAISSANCE"] = 1; + values[valuesById[2] = "RESOURCE_DEVELOPMENT"] = 2; + values[valuesById[5] = "INITIAL_ACCESS"] = 5; + values[valuesById[3] = "EXECUTION"] = 3; + values[valuesById[6] = "PERSISTENCE"] = 6; + values[valuesById[8] = "PRIVILEGE_ESCALATION"] = 8; + values[valuesById[7] = "DEFENSE_EVASION"] = 7; + values[valuesById[9] = "CREDENTIAL_ACCESS"] = 9; + values[valuesById[10] = "DISCOVERY"] = 10; + values[valuesById[11] = "LATERAL_MOVEMENT"] = 11; + values[valuesById[12] = "COLLECTION"] = 12; + values[valuesById[4] = "COMMAND_AND_CONTROL"] = 4; + values[valuesById[13] = "EXFILTRATION"] = 13; + values[valuesById[14] = "IMPACT"] = 14; + return values; + })(); + + /** + * Technique enum. + * @name google.cloud.securitycenter.v2.MitreAttack.Technique + * @enum {number} + * @property {number} TECHNIQUE_UNSPECIFIED=0 TECHNIQUE_UNSPECIFIED value + * @property {number} MASQUERADING=49 MASQUERADING value + * @property {number} MATCH_LEGITIMATE_NAME_OR_LOCATION=50 MATCH_LEGITIMATE_NAME_OR_LOCATION value + * @property {number} BOOT_OR_LOGON_INITIALIZATION_SCRIPTS=37 BOOT_OR_LOGON_INITIALIZATION_SCRIPTS value + * @property {number} STARTUP_ITEMS=38 STARTUP_ITEMS value + * @property {number} NETWORK_SERVICE_DISCOVERY=32 NETWORK_SERVICE_DISCOVERY value + * @property {number} PROCESS_DISCOVERY=56 PROCESS_DISCOVERY value + * @property {number} COMMAND_AND_SCRIPTING_INTERPRETER=6 COMMAND_AND_SCRIPTING_INTERPRETER value + * @property {number} UNIX_SHELL=7 UNIX_SHELL value + * @property {number} PYTHON=59 PYTHON value + * @property {number} PERMISSION_GROUPS_DISCOVERY=18 PERMISSION_GROUPS_DISCOVERY value + * @property {number} CLOUD_GROUPS=19 CLOUD_GROUPS value + * @property {number} APPLICATION_LAYER_PROTOCOL=45 APPLICATION_LAYER_PROTOCOL value + * @property {number} DNS=46 DNS value + * @property {number} SOFTWARE_DEPLOYMENT_TOOLS=47 SOFTWARE_DEPLOYMENT_TOOLS value + * @property {number} VALID_ACCOUNTS=14 VALID_ACCOUNTS value + * @property {number} DEFAULT_ACCOUNTS=35 DEFAULT_ACCOUNTS value + * @property {number} LOCAL_ACCOUNTS=15 LOCAL_ACCOUNTS value + * @property {number} CLOUD_ACCOUNTS=16 CLOUD_ACCOUNTS value + * @property {number} PROXY=9 PROXY value + * @property {number} EXTERNAL_PROXY=10 EXTERNAL_PROXY value + * @property {number} MULTI_HOP_PROXY=11 MULTI_HOP_PROXY value + * @property {number} ACCOUNT_MANIPULATION=22 ACCOUNT_MANIPULATION value + * @property {number} ADDITIONAL_CLOUD_CREDENTIALS=40 ADDITIONAL_CLOUD_CREDENTIALS value + * @property {number} SSH_AUTHORIZED_KEYS=23 SSH_AUTHORIZED_KEYS value + * @property {number} ADDITIONAL_CONTAINER_CLUSTER_ROLES=58 ADDITIONAL_CONTAINER_CLUSTER_ROLES value + * @property {number} INGRESS_TOOL_TRANSFER=3 INGRESS_TOOL_TRANSFER value + * @property {number} NATIVE_API=4 NATIVE_API value + * @property {number} BRUTE_FORCE=44 BRUTE_FORCE value + * @property {number} SHARED_MODULES=5 SHARED_MODULES value + * @property {number} ACCESS_TOKEN_MANIPULATION=33 ACCESS_TOKEN_MANIPULATION value + * @property {number} TOKEN_IMPERSONATION_OR_THEFT=39 TOKEN_IMPERSONATION_OR_THEFT value + * @property {number} EXPLOIT_PUBLIC_FACING_APPLICATION=27 EXPLOIT_PUBLIC_FACING_APPLICATION value + * @property {number} DOMAIN_POLICY_MODIFICATION=30 DOMAIN_POLICY_MODIFICATION value + * @property {number} DATA_DESTRUCTION=29 DATA_DESTRUCTION value + * @property {number} SERVICE_STOP=52 SERVICE_STOP value + * @property {number} INHIBIT_SYSTEM_RECOVERY=36 INHIBIT_SYSTEM_RECOVERY value + * @property {number} RESOURCE_HIJACKING=8 RESOURCE_HIJACKING value + * @property {number} NETWORK_DENIAL_OF_SERVICE=17 NETWORK_DENIAL_OF_SERVICE value + * @property {number} CLOUD_SERVICE_DISCOVERY=48 CLOUD_SERVICE_DISCOVERY value + * @property {number} STEAL_APPLICATION_ACCESS_TOKEN=42 STEAL_APPLICATION_ACCESS_TOKEN value + * @property {number} ACCOUNT_ACCESS_REMOVAL=51 ACCOUNT_ACCESS_REMOVAL value + * @property {number} STEAL_WEB_SESSION_COOKIE=25 STEAL_WEB_SESSION_COOKIE value + * @property {number} CREATE_OR_MODIFY_SYSTEM_PROCESS=24 CREATE_OR_MODIFY_SYSTEM_PROCESS value + * @property {number} ABUSE_ELEVATION_CONTROL_MECHANISM=34 ABUSE_ELEVATION_CONTROL_MECHANISM value + * @property {number} UNSECURED_CREDENTIALS=13 UNSECURED_CREDENTIALS value + * @property {number} MODIFY_AUTHENTICATION_PROCESS=28 MODIFY_AUTHENTICATION_PROCESS value + * @property {number} IMPAIR_DEFENSES=31 IMPAIR_DEFENSES value + * @property {number} DISABLE_OR_MODIFY_TOOLS=55 DISABLE_OR_MODIFY_TOOLS value + * @property {number} EXFILTRATION_OVER_WEB_SERVICE=20 EXFILTRATION_OVER_WEB_SERVICE value + * @property {number} EXFILTRATION_TO_CLOUD_STORAGE=21 EXFILTRATION_TO_CLOUD_STORAGE value + * @property {number} DYNAMIC_RESOLUTION=12 DYNAMIC_RESOLUTION value + * @property {number} LATERAL_TOOL_TRANSFER=41 LATERAL_TOOL_TRANSFER value + * @property {number} MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE=26 MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE value + * @property {number} CREATE_SNAPSHOT=54 CREATE_SNAPSHOT value + * @property {number} CLOUD_INFRASTRUCTURE_DISCOVERY=53 CLOUD_INFRASTRUCTURE_DISCOVERY value + * @property {number} OBTAIN_CAPABILITIES=43 OBTAIN_CAPABILITIES value + * @property {number} ACTIVE_SCANNING=1 ACTIVE_SCANNING value + * @property {number} SCANNING_IP_BLOCKS=2 SCANNING_IP_BLOCKS value + * @property {number} CONTAINER_ADMINISTRATION_COMMAND=60 CONTAINER_ADMINISTRATION_COMMAND value + * @property {number} ESCAPE_TO_HOST=61 ESCAPE_TO_HOST value + * @property {number} CONTAINER_AND_RESOURCE_DISCOVERY=57 CONTAINER_AND_RESOURCE_DISCOVERY value + * @property {number} STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES=62 STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES value + */ + MitreAttack.Technique = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TECHNIQUE_UNSPECIFIED"] = 0; + values[valuesById[49] = "MASQUERADING"] = 49; + values[valuesById[50] = "MATCH_LEGITIMATE_NAME_OR_LOCATION"] = 50; + values[valuesById[37] = "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS"] = 37; + values[valuesById[38] = "STARTUP_ITEMS"] = 38; + values[valuesById[32] = "NETWORK_SERVICE_DISCOVERY"] = 32; + values[valuesById[56] = "PROCESS_DISCOVERY"] = 56; + values[valuesById[6] = "COMMAND_AND_SCRIPTING_INTERPRETER"] = 6; + values[valuesById[7] = "UNIX_SHELL"] = 7; + values[valuesById[59] = "PYTHON"] = 59; + values[valuesById[18] = "PERMISSION_GROUPS_DISCOVERY"] = 18; + values[valuesById[19] = "CLOUD_GROUPS"] = 19; + values[valuesById[45] = "APPLICATION_LAYER_PROTOCOL"] = 45; + values[valuesById[46] = "DNS"] = 46; + values[valuesById[47] = "SOFTWARE_DEPLOYMENT_TOOLS"] = 47; + values[valuesById[14] = "VALID_ACCOUNTS"] = 14; + values[valuesById[35] = "DEFAULT_ACCOUNTS"] = 35; + values[valuesById[15] = "LOCAL_ACCOUNTS"] = 15; + values[valuesById[16] = "CLOUD_ACCOUNTS"] = 16; + values[valuesById[9] = "PROXY"] = 9; + values[valuesById[10] = "EXTERNAL_PROXY"] = 10; + values[valuesById[11] = "MULTI_HOP_PROXY"] = 11; + values[valuesById[22] = "ACCOUNT_MANIPULATION"] = 22; + values[valuesById[40] = "ADDITIONAL_CLOUD_CREDENTIALS"] = 40; + values[valuesById[23] = "SSH_AUTHORIZED_KEYS"] = 23; + values[valuesById[58] = "ADDITIONAL_CONTAINER_CLUSTER_ROLES"] = 58; + values[valuesById[3] = "INGRESS_TOOL_TRANSFER"] = 3; + values[valuesById[4] = "NATIVE_API"] = 4; + values[valuesById[44] = "BRUTE_FORCE"] = 44; + values[valuesById[5] = "SHARED_MODULES"] = 5; + values[valuesById[33] = "ACCESS_TOKEN_MANIPULATION"] = 33; + values[valuesById[39] = "TOKEN_IMPERSONATION_OR_THEFT"] = 39; + values[valuesById[27] = "EXPLOIT_PUBLIC_FACING_APPLICATION"] = 27; + values[valuesById[30] = "DOMAIN_POLICY_MODIFICATION"] = 30; + values[valuesById[29] = "DATA_DESTRUCTION"] = 29; + values[valuesById[52] = "SERVICE_STOP"] = 52; + values[valuesById[36] = "INHIBIT_SYSTEM_RECOVERY"] = 36; + values[valuesById[8] = "RESOURCE_HIJACKING"] = 8; + values[valuesById[17] = "NETWORK_DENIAL_OF_SERVICE"] = 17; + values[valuesById[48] = "CLOUD_SERVICE_DISCOVERY"] = 48; + values[valuesById[42] = "STEAL_APPLICATION_ACCESS_TOKEN"] = 42; + values[valuesById[51] = "ACCOUNT_ACCESS_REMOVAL"] = 51; + values[valuesById[25] = "STEAL_WEB_SESSION_COOKIE"] = 25; + values[valuesById[24] = "CREATE_OR_MODIFY_SYSTEM_PROCESS"] = 24; + values[valuesById[34] = "ABUSE_ELEVATION_CONTROL_MECHANISM"] = 34; + values[valuesById[13] = "UNSECURED_CREDENTIALS"] = 13; + values[valuesById[28] = "MODIFY_AUTHENTICATION_PROCESS"] = 28; + values[valuesById[31] = "IMPAIR_DEFENSES"] = 31; + values[valuesById[55] = "DISABLE_OR_MODIFY_TOOLS"] = 55; + values[valuesById[20] = "EXFILTRATION_OVER_WEB_SERVICE"] = 20; + values[valuesById[21] = "EXFILTRATION_TO_CLOUD_STORAGE"] = 21; + values[valuesById[12] = "DYNAMIC_RESOLUTION"] = 12; + values[valuesById[41] = "LATERAL_TOOL_TRANSFER"] = 41; + values[valuesById[26] = "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE"] = 26; + values[valuesById[54] = "CREATE_SNAPSHOT"] = 54; + values[valuesById[53] = "CLOUD_INFRASTRUCTURE_DISCOVERY"] = 53; + values[valuesById[43] = "OBTAIN_CAPABILITIES"] = 43; + values[valuesById[1] = "ACTIVE_SCANNING"] = 1; + values[valuesById[2] = "SCANNING_IP_BLOCKS"] = 2; + values[valuesById[60] = "CONTAINER_ADMINISTRATION_COMMAND"] = 60; + values[valuesById[61] = "ESCAPE_TO_HOST"] = 61; + values[valuesById[57] = "CONTAINER_AND_RESOURCE_DISCOVERY"] = 57; + values[valuesById[62] = "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"] = 62; + return values; + })(); + + return MitreAttack; + })(); + + v2.Notebook = (function() { + + /** + * Properties of a Notebook. + * @memberof google.cloud.securitycenter.v2 + * @interface INotebook + * @property {string|null} [name] Notebook name + * @property {string|null} [service] Notebook service + * @property {string|null} [lastAuthor] Notebook lastAuthor + * @property {google.protobuf.ITimestamp|null} [notebookUpdateTime] Notebook notebookUpdateTime + */ + + /** + * Constructs a new Notebook. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a Notebook. + * @implements INotebook + * @constructor + * @param {google.cloud.securitycenter.v2.INotebook=} [properties] Properties to set + */ + function Notebook(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]]; + } + + /** + * Notebook name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Notebook + * @instance + */ + Notebook.prototype.name = ""; + + /** + * Notebook service. + * @member {string} service + * @memberof google.cloud.securitycenter.v2.Notebook + * @instance + */ + Notebook.prototype.service = ""; + + /** + * Notebook lastAuthor. + * @member {string} lastAuthor + * @memberof google.cloud.securitycenter.v2.Notebook + * @instance + */ + Notebook.prototype.lastAuthor = ""; + + /** + * Notebook notebookUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} notebookUpdateTime + * @memberof google.cloud.securitycenter.v2.Notebook + * @instance + */ + Notebook.prototype.notebookUpdateTime = null; + + /** + * Creates a new Notebook instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {google.cloud.securitycenter.v2.INotebook=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Notebook} Notebook instance + */ + Notebook.create = function create(properties) { + return new Notebook(properties); + }; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v2.Notebook.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {google.cloud.securitycenter.v2.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.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.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.lastAuthor != null && Object.hasOwnProperty.call(message, "lastAuthor")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAuthor); + if (message.notebookUpdateTime != null && Object.hasOwnProperty.call(message, "notebookUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.notebookUpdateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Notebook.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {google.cloud.securitycenter.v2.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.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.cloud.securitycenter.v2.Notebook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "DOMAIN_POLICY_MODIFICATION": - case 30: - message.primaryTechniques[i] = 30; + } + case 2: { + message.service = reader.string(); break; - case "DATA_DESTRUCTION": - case 29: - message.primaryTechniques[i] = 29; + } + case 3: { + message.lastAuthor = reader.string(); break; - case "SERVICE_STOP": - case 52: - message.primaryTechniques[i] = 52; + } + case 4: { + message.notebookUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "INHIBIT_SYSTEM_RECOVERY": - case 36: - message.primaryTechniques[i] = 36; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Notebook message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Notebook.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.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) + if (!$util.isString(message.lastAuthor)) + return "lastAuthor: string expected"; + if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notebookUpdateTime); + if (error) + return "notebookUpdateTime." + error; + } + return null; + }; + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Notebook} Notebook + */ + Notebook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Notebook) + return object; + var message = new $root.google.cloud.securitycenter.v2.Notebook(); + if (object.name != null) + message.name = String(object.name); + if (object.service != null) + message.service = String(object.service); + if (object.lastAuthor != null) + message.lastAuthor = String(object.lastAuthor); + if (object.notebookUpdateTime != null) { + if (typeof object.notebookUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Notebook.notebookUpdateTime: object expected"); + message.notebookUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.notebookUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {google.cloud.securitycenter.v2.Notebook} message Notebook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Notebook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.service = ""; + object.lastAuthor = ""; + object.notebookUpdateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) + object.lastAuthor = message.lastAuthor; + if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) + object.notebookUpdateTime = $root.google.protobuf.Timestamp.toObject(message.notebookUpdateTime, options); + return object; + }; + + /** + * Converts this Notebook to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Notebook + * @instance + * @returns {Object.} JSON object + */ + Notebook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Notebook + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Notebook + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Notebook"; + }; + + return Notebook; + })(); + + v2.OrgPolicy = (function() { + + /** + * Properties of an OrgPolicy. + * @memberof google.cloud.securitycenter.v2 + * @interface IOrgPolicy + * @property {string|null} [name] OrgPolicy name + */ + + /** + * Constructs a new OrgPolicy. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an OrgPolicy. + * @implements IOrgPolicy + * @constructor + * @param {google.cloud.securitycenter.v2.IOrgPolicy=} [properties] Properties to set + */ + function OrgPolicy(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]]; + } + + /** + * OrgPolicy name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @instance + */ + OrgPolicy.prototype.name = ""; + + /** + * Creates a new OrgPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v2.IOrgPolicy=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy instance + */ + OrgPolicy.create = function create(properties) { + return new OrgPolicy(properties); + }; + + /** + * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v2.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgPolicy.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); + return writer; + }; + + /** + * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v2.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgPolicy.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.cloud.securitycenter.v2.OrgPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "RESOURCE_HIJACKING": - case 8: - message.primaryTechniques[i] = 8; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrgPolicy message. + * @function verify + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrgPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an OrgPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + */ + OrgPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.OrgPolicy) + return object; + var message = new $root.google.cloud.securitycenter.v2.OrgPolicy(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v2.OrgPolicy} message OrgPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrgPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this OrgPolicy to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @instance + * @returns {Object.} JSON object + */ + OrgPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrgPolicy + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrgPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.OrgPolicy"; + }; + + return OrgPolicy; + })(); + + v2.Process = (function() { + + /** + * Properties of a Process. + * @memberof google.cloud.securitycenter.v2 + * @interface IProcess + * @property {string|null} [name] Process name + * @property {google.cloud.securitycenter.v2.IFile|null} [binary] Process binary + * @property {Array.|null} [libraries] Process libraries + * @property {google.cloud.securitycenter.v2.IFile|null} [script] Process script + * @property {Array.|null} [args] Process args + * @property {boolean|null} [argumentsTruncated] Process argumentsTruncated + * @property {Array.|null} [envVariables] Process envVariables + * @property {boolean|null} [envVariablesTruncated] Process envVariablesTruncated + * @property {number|Long|null} [pid] Process pid + * @property {number|Long|null} [parentPid] Process parentPid + */ + + /** + * Constructs a new Process. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a Process. + * @implements IProcess + * @constructor + * @param {google.cloud.securitycenter.v2.IProcess=} [properties] Properties to set + */ + function Process(properties) { + this.libraries = []; + this.args = []; + this.envVariables = []; + 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]]; + } + + /** + * Process name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.name = ""; + + /** + * Process binary. + * @member {google.cloud.securitycenter.v2.IFile|null|undefined} binary + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.binary = null; + + /** + * Process libraries. + * @member {Array.} libraries + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.libraries = $util.emptyArray; + + /** + * Process script. + * @member {google.cloud.securitycenter.v2.IFile|null|undefined} script + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.script = null; + + /** + * Process args. + * @member {Array.} args + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.args = $util.emptyArray; + + /** + * Process argumentsTruncated. + * @member {boolean} argumentsTruncated + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.argumentsTruncated = false; + + /** + * Process envVariables. + * @member {Array.} envVariables + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.envVariables = $util.emptyArray; + + /** + * Process envVariablesTruncated. + * @member {boolean} envVariablesTruncated + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.envVariablesTruncated = false; + + /** + * Process pid. + * @member {number|Long} pid + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Process parentPid. + * @member {number|Long} parentPid + * @memberof google.cloud.securitycenter.v2.Process + * @instance + */ + Process.prototype.parentPid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Process instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {google.cloud.securitycenter.v2.IProcess=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Process} Process instance + */ + Process.create = function create(properties) { + return new Process(properties); + }; + + /** + * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {google.cloud.securitycenter.v2.IProcess} message Process message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Process.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.binary != null && Object.hasOwnProperty.call(message, "binary")) + $root.google.cloud.securitycenter.v2.File.encode(message.binary, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.libraries != null && message.libraries.length) + for (var i = 0; i < message.libraries.length; ++i) + $root.google.cloud.securitycenter.v2.File.encode(message.libraries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + $root.google.cloud.securitycenter.v2.File.encode(message.script, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.args[i]); + if (message.argumentsTruncated != null && Object.hasOwnProperty.call(message, "argumentsTruncated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.argumentsTruncated); + if (message.envVariables != null && message.envVariables.length) + for (var i = 0; i < message.envVariables.length; ++i) + $root.google.cloud.securitycenter.v2.EnvironmentVariable.encode(message.envVariables[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.envVariablesTruncated != null && Object.hasOwnProperty.call(message, "envVariablesTruncated")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.envVariablesTruncated); + if (message.pid != null && Object.hasOwnProperty.call(message, "pid")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.pid); + if (message.parentPid != null && Object.hasOwnProperty.call(message, "parentPid")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.parentPid); + return writer; + }; + + /** + * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {google.cloud.securitycenter.v2.IProcess} message Process message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Process.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Process message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.Process} Process + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Process.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.cloud.securitycenter.v2.Process(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "NETWORK_DENIAL_OF_SERVICE": - case 17: - message.primaryTechniques[i] = 17; + } + case 2: { + message.binary = $root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32()); break; - case "CLOUD_SERVICE_DISCOVERY": - case 48: - message.primaryTechniques[i] = 48; + } + case 3: { + if (!(message.libraries && message.libraries.length)) + message.libraries = []; + message.libraries.push($root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32())); break; - case "STEAL_APPLICATION_ACCESS_TOKEN": - case 42: - message.primaryTechniques[i] = 42; + } + case 4: { + message.script = $root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32()); break; - case "ACCOUNT_ACCESS_REMOVAL": - case 51: - message.primaryTechniques[i] = 51; + } + case 5: { + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); break; - case "STEAL_WEB_SESSION_COOKIE": - case 25: - message.primaryTechniques[i] = 25; + } + case 6: { + message.argumentsTruncated = reader.bool(); break; - case "CREATE_OR_MODIFY_SYSTEM_PROCESS": - case 24: - message.primaryTechniques[i] = 24; + } + case 7: { + if (!(message.envVariables && message.envVariables.length)) + message.envVariables = []; + message.envVariables.push($root.google.cloud.securitycenter.v2.EnvironmentVariable.decode(reader, reader.uint32())); break; - case "ABUSE_ELEVATION_CONTROL_MECHANISM": - case 34: - message.primaryTechniques[i] = 34; + } + case 8: { + message.envVariablesTruncated = reader.bool(); break; - case "UNSECURED_CREDENTIALS": - case 13: - message.primaryTechniques[i] = 13; + } + case 9: { + message.pid = reader.int64(); break; - case "MODIFY_AUTHENTICATION_PROCESS": - case 28: - message.primaryTechniques[i] = 28; + } + case 10: { + message.parentPid = reader.int64(); break; - case "IMPAIR_DEFENSES": - case 31: - message.primaryTechniques[i] = 31; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Process message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Process} Process + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Process.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Process message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Process.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.binary != null && message.hasOwnProperty("binary")) { + var error = $root.google.cloud.securitycenter.v2.File.verify(message.binary); + if (error) + return "binary." + error; + } + if (message.libraries != null && message.hasOwnProperty("libraries")) { + if (!Array.isArray(message.libraries)) + return "libraries: array expected"; + for (var i = 0; i < message.libraries.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.File.verify(message.libraries[i]); + if (error) + return "libraries." + error; + } + } + if (message.script != null && message.hasOwnProperty("script")) { + var error = $root.google.cloud.securitycenter.v2.File.verify(message.script); + if (error) + return "script." + error; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) + if (typeof message.argumentsTruncated !== "boolean") + return "argumentsTruncated: boolean expected"; + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!Array.isArray(message.envVariables)) + return "envVariables: array expected"; + for (var i = 0; i < message.envVariables.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.EnvironmentVariable.verify(message.envVariables[i]); + if (error) + return "envVariables." + error; + } + } + if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) + if (typeof message.envVariablesTruncated !== "boolean") + return "envVariablesTruncated: boolean expected"; + if (message.pid != null && message.hasOwnProperty("pid")) + if (!$util.isInteger(message.pid) && !(message.pid && $util.isInteger(message.pid.low) && $util.isInteger(message.pid.high))) + return "pid: integer|Long expected"; + if (message.parentPid != null && message.hasOwnProperty("parentPid")) + if (!$util.isInteger(message.parentPid) && !(message.parentPid && $util.isInteger(message.parentPid.low) && $util.isInteger(message.parentPid.high))) + return "parentPid: integer|Long expected"; + return null; + }; + + /** + * Creates a Process message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Process} Process + */ + Process.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Process) + return object; + var message = new $root.google.cloud.securitycenter.v2.Process(); + if (object.name != null) + message.name = String(object.name); + if (object.binary != null) { + if (typeof object.binary !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Process.binary: object expected"); + message.binary = $root.google.cloud.securitycenter.v2.File.fromObject(object.binary); + } + if (object.libraries) { + if (!Array.isArray(object.libraries)) + throw TypeError(".google.cloud.securitycenter.v2.Process.libraries: array expected"); + message.libraries = []; + for (var i = 0; i < object.libraries.length; ++i) { + if (typeof object.libraries[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Process.libraries: object expected"); + message.libraries[i] = $root.google.cloud.securitycenter.v2.File.fromObject(object.libraries[i]); + } + } + if (object.script != null) { + if (typeof object.script !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Process.script: object expected"); + message.script = $root.google.cloud.securitycenter.v2.File.fromObject(object.script); + } + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.securitycenter.v2.Process.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + if (object.argumentsTruncated != null) + message.argumentsTruncated = Boolean(object.argumentsTruncated); + if (object.envVariables) { + if (!Array.isArray(object.envVariables)) + throw TypeError(".google.cloud.securitycenter.v2.Process.envVariables: array expected"); + message.envVariables = []; + for (var i = 0; i < object.envVariables.length; ++i) { + if (typeof object.envVariables[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Process.envVariables: object expected"); + message.envVariables[i] = $root.google.cloud.securitycenter.v2.EnvironmentVariable.fromObject(object.envVariables[i]); + } + } + if (object.envVariablesTruncated != null) + message.envVariablesTruncated = Boolean(object.envVariablesTruncated); + if (object.pid != null) + if ($util.Long) + (message.pid = $util.Long.fromValue(object.pid)).unsigned = false; + else if (typeof object.pid === "string") + message.pid = parseInt(object.pid, 10); + else if (typeof object.pid === "number") + message.pid = object.pid; + else if (typeof object.pid === "object") + message.pid = new $util.LongBits(object.pid.low >>> 0, object.pid.high >>> 0).toNumber(); + if (object.parentPid != null) + if ($util.Long) + (message.parentPid = $util.Long.fromValue(object.parentPid)).unsigned = false; + else if (typeof object.parentPid === "string") + message.parentPid = parseInt(object.parentPid, 10); + else if (typeof object.parentPid === "number") + message.parentPid = object.parentPid; + else if (typeof object.parentPid === "object") + message.parentPid = new $util.LongBits(object.parentPid.low >>> 0, object.parentPid.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Process message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {google.cloud.securitycenter.v2.Process} message Process + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Process.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.libraries = []; + object.args = []; + object.envVariables = []; + } + if (options.defaults) { + object.name = ""; + object.binary = null; + object.script = null; + object.argumentsTruncated = false; + object.envVariablesTruncated = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pid = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.parentPid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.parentPid = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.binary != null && message.hasOwnProperty("binary")) + object.binary = $root.google.cloud.securitycenter.v2.File.toObject(message.binary, options); + if (message.libraries && message.libraries.length) { + object.libraries = []; + for (var j = 0; j < message.libraries.length; ++j) + object.libraries[j] = $root.google.cloud.securitycenter.v2.File.toObject(message.libraries[j], options); + } + if (message.script != null && message.hasOwnProperty("script")) + object.script = $root.google.cloud.securitycenter.v2.File.toObject(message.script, options); + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) + object.argumentsTruncated = message.argumentsTruncated; + if (message.envVariables && message.envVariables.length) { + object.envVariables = []; + for (var j = 0; j < message.envVariables.length; ++j) + object.envVariables[j] = $root.google.cloud.securitycenter.v2.EnvironmentVariable.toObject(message.envVariables[j], options); + } + if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) + object.envVariablesTruncated = message.envVariablesTruncated; + if (message.pid != null && message.hasOwnProperty("pid")) + if (typeof message.pid === "number") + object.pid = options.longs === String ? String(message.pid) : message.pid; + else + object.pid = options.longs === String ? $util.Long.prototype.toString.call(message.pid) : options.longs === Number ? new $util.LongBits(message.pid.low >>> 0, message.pid.high >>> 0).toNumber() : message.pid; + if (message.parentPid != null && message.hasOwnProperty("parentPid")) + if (typeof message.parentPid === "number") + object.parentPid = options.longs === String ? String(message.parentPid) : message.parentPid; + else + object.parentPid = options.longs === String ? $util.Long.prototype.toString.call(message.parentPid) : options.longs === Number ? new $util.LongBits(message.parentPid.low >>> 0, message.parentPid.high >>> 0).toNumber() : message.parentPid; + return object; + }; + + /** + * Converts this Process to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Process + * @instance + * @returns {Object.} JSON object + */ + Process.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Process + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Process + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Process.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Process"; + }; + + return Process; + })(); + + v2.EnvironmentVariable = (function() { + + /** + * Properties of an EnvironmentVariable. + * @memberof google.cloud.securitycenter.v2 + * @interface IEnvironmentVariable + * @property {string|null} [name] EnvironmentVariable name + * @property {string|null} [val] EnvironmentVariable val + */ + + /** + * Constructs a new EnvironmentVariable. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents an EnvironmentVariable. + * @implements IEnvironmentVariable + * @constructor + * @param {google.cloud.securitycenter.v2.IEnvironmentVariable=} [properties] Properties to set + */ + function EnvironmentVariable(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]]; + } + + /** + * EnvironmentVariable name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @instance + */ + EnvironmentVariable.prototype.name = ""; + + /** + * EnvironmentVariable val. + * @member {string} val + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @instance + */ + EnvironmentVariable.prototype.val = ""; + + /** + * Creates a new EnvironmentVariable instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v2.IEnvironmentVariable=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable instance + */ + EnvironmentVariable.create = function create(properties) { + return new EnvironmentVariable(properties); + }; + + /** + * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v2.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentVariable.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.val != null && Object.hasOwnProperty.call(message, "val")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.val); + return writer; + }; + + /** + * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v2.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentVariable.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.cloud.securitycenter.v2.EnvironmentVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "DISABLE_OR_MODIFY_TOOLS": - case 55: - message.primaryTechniques[i] = 55; + } + case 2: { + message.val = reader.string(); break; - case "EXFILTRATION_OVER_WEB_SERVICE": - case 20: - message.primaryTechniques[i] = 20; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentVariable message. + * @function verify + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentVariable.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.val != null && message.hasOwnProperty("val")) + if (!$util.isString(message.val)) + return "val: string expected"; + return null; + }; + + /** + * Creates an EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + */ + EnvironmentVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.EnvironmentVariable) + return object; + var message = new $root.google.cloud.securitycenter.v2.EnvironmentVariable(); + if (object.name != null) + message.name = String(object.name); + if (object.val != null) + message.val = String(object.val); + return message; + }; + + /** + * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v2.EnvironmentVariable} message EnvironmentVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.val = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.val != null && message.hasOwnProperty("val")) + object.val = message.val; + return object; + }; + + /** + * Converts this EnvironmentVariable to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @instance + * @returns {Object.} JSON object + */ + EnvironmentVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnvironmentVariable + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.EnvironmentVariable"; + }; + + return EnvironmentVariable; + })(); + + v2.SecurityMarks = (function() { + + /** + * Properties of a SecurityMarks. + * @memberof google.cloud.securitycenter.v2 + * @interface ISecurityMarks + * @property {string|null} [name] SecurityMarks name + * @property {Object.|null} [marks] SecurityMarks marks + * @property {string|null} [canonicalName] SecurityMarks canonicalName + */ + + /** + * Constructs a new SecurityMarks. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a SecurityMarks. + * @implements ISecurityMarks + * @constructor + * @param {google.cloud.securitycenter.v2.ISecurityMarks=} [properties] Properties to set + */ + function SecurityMarks(properties) { + this.marks = {}; + 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]]; + } + + /** + * SecurityMarks name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @instance + */ + SecurityMarks.prototype.name = ""; + + /** + * SecurityMarks marks. + * @member {Object.} marks + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @instance + */ + SecurityMarks.prototype.marks = $util.emptyObject; + + /** + * SecurityMarks canonicalName. + * @member {string} canonicalName + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @instance + */ + SecurityMarks.prototype.canonicalName = ""; + + /** + * Creates a new SecurityMarks instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v2.ISecurityMarks=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks instance + */ + SecurityMarks.create = function create(properties) { + return new SecurityMarks(properties); + }; + + /** + * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v2.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityMarks.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.marks != null && Object.hasOwnProperty.call(message, "marks")) + for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); + if (message.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalName); + return writer; + }; + + /** + * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v2.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityMarks message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityMarks.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.cloud.securitycenter.v2.SecurityMarks(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "EXFILTRATION_TO_CLOUD_STORAGE": - case 21: - message.primaryTechniques[i] = 21; + } + case 2: { + if (message.marks === $util.emptyObject) + message.marks = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.marks[key] = value; break; - case "DYNAMIC_RESOLUTION": - case 12: - message.primaryTechniques[i] = 12; + } + case 3: { + message.canonicalName = reader.string(); break; - case "LATERAL_TOOL_TRANSFER": - case 41: - message.primaryTechniques[i] = 41; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityMarks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityMarks message. + * @function verify + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityMarks.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.marks != null && message.hasOwnProperty("marks")) { + if (!$util.isObject(message.marks)) + return "marks: object expected"; + var key = Object.keys(message.marks); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.marks[key[i]])) + return "marks: string{k:string} expected"; + } + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + if (!$util.isString(message.canonicalName)) + return "canonicalName: string expected"; + return null; + }; + + /** + * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + */ + SecurityMarks.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.SecurityMarks) + return object; + var message = new $root.google.cloud.securitycenter.v2.SecurityMarks(); + if (object.name != null) + message.name = String(object.name); + if (object.marks) { + if (typeof object.marks !== "object") + throw TypeError(".google.cloud.securitycenter.v2.SecurityMarks.marks: object expected"); + message.marks = {}; + for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) + message.marks[keys[i]] = String(object.marks[keys[i]]); + } + if (object.canonicalName != null) + message.canonicalName = String(object.canonicalName); + return message; + }; + + /** + * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {google.cloud.securitycenter.v2.SecurityMarks} message SecurityMarks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityMarks.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.marks = {}; + if (options.defaults) { + object.name = ""; + object.canonicalName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.marks && (keys2 = Object.keys(message.marks)).length) { + object.marks = {}; + for (var j = 0; j < keys2.length; ++j) + object.marks[keys2[j]] = message.marks[keys2[j]]; + } + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + object.canonicalName = message.canonicalName; + return object; + }; + + /** + * Converts this SecurityMarks to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @instance + * @returns {Object.} JSON object + */ + SecurityMarks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityMarks + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityMarks.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityMarks"; + }; + + return SecurityMarks; + })(); + + v2.SecurityPosture = (function() { + + /** + * Properties of a SecurityPosture. + * @memberof google.cloud.securitycenter.v2 + * @interface ISecurityPosture + * @property {string|null} [name] SecurityPosture name + * @property {string|null} [revisionId] SecurityPosture revisionId + * @property {string|null} [postureDeploymentResource] SecurityPosture postureDeploymentResource + * @property {string|null} [postureDeployment] SecurityPosture postureDeployment + * @property {string|null} [changedPolicy] SecurityPosture changedPolicy + * @property {string|null} [policySet] SecurityPosture policySet + * @property {string|null} [policy] SecurityPosture policy + * @property {Array.|null} [policyDriftDetails] SecurityPosture policyDriftDetails + */ + + /** + * Constructs a new SecurityPosture. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a SecurityPosture. + * @implements ISecurityPosture + * @constructor + * @param {google.cloud.securitycenter.v2.ISecurityPosture=} [properties] Properties to set + */ + function SecurityPosture(properties) { + this.policyDriftDetails = []; + 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]]; + } + + /** + * SecurityPosture name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.name = ""; + + /** + * SecurityPosture revisionId. + * @member {string} revisionId + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.revisionId = ""; + + /** + * SecurityPosture postureDeploymentResource. + * @member {string} postureDeploymentResource + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.postureDeploymentResource = ""; + + /** + * SecurityPosture postureDeployment. + * @member {string} postureDeployment + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.postureDeployment = ""; + + /** + * SecurityPosture changedPolicy. + * @member {string} changedPolicy + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.changedPolicy = ""; + + /** + * SecurityPosture policySet. + * @member {string} policySet + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policySet = ""; + + /** + * SecurityPosture policy. + * @member {string} policy + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policy = ""; + + /** + * SecurityPosture policyDriftDetails. + * @member {Array.} policyDriftDetails + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policyDriftDetails = $util.emptyArray; + + /** + * Creates a new SecurityPosture instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v2.ISecurityPosture=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture instance + */ + SecurityPosture.create = function create(properties) { + return new SecurityPosture(properties); + }; + + /** + * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v2.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPosture.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + if (message.postureDeploymentResource != null && Object.hasOwnProperty.call(message, "postureDeploymentResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.postureDeploymentResource); + if (message.postureDeployment != null && Object.hasOwnProperty.call(message, "postureDeployment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.postureDeployment); + if (message.changedPolicy != null && Object.hasOwnProperty.call(message, "changedPolicy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.changedPolicy); + if (message.policySet != null && Object.hasOwnProperty.call(message, "policySet")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.policySet); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.policy); + if (message.policyDriftDetails != null && message.policyDriftDetails.length) + for (var i = 0; i < message.policyDriftDetails.length; ++i) + $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.encode(message.policyDriftDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v2.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPosture.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPosture.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.cloud.securitycenter.v2.SecurityPosture(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; - case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": - case 26: - message.primaryTechniques[i] = 26; + } + case 2: { + message.revisionId = reader.string(); break; - case "CREATE_SNAPSHOT": - case 54: - message.primaryTechniques[i] = 54; + } + case 3: { + message.postureDeploymentResource = reader.string(); break; - case "CLOUD_INFRASTRUCTURE_DISCOVERY": - case 53: - message.primaryTechniques[i] = 53; + } + case 4: { + message.postureDeployment = reader.string(); break; - case "OBTAIN_CAPABILITIES": - case 43: - message.primaryTechniques[i] = 43; + } + case 5: { + message.changedPolicy = reader.string(); break; - case "ACTIVE_SCANNING": - case 1: - message.primaryTechniques[i] = 1; + } + case 6: { + message.policySet = reader.string(); break; - case "SCANNING_IP_BLOCKS": - case 2: - message.primaryTechniques[i] = 2; + } + case 7: { + message.policy = reader.string(); break; - case "CONTAINER_AND_RESOURCE_DISCOVERY": - case 57: - message.primaryTechniques[i] = 57; + } + case 8: { + if (!(message.policyDriftDetails && message.policyDriftDetails.length)) + message.policyDriftDetails = []; + message.policyDriftDetails.push($root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; + } } - if (object.additionalTactics) { - if (!Array.isArray(object.additionalTactics)) - throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.additionalTactics: array expected"); - message.additionalTactics = []; - for (var i = 0; i < object.additionalTactics.length; ++i) - switch (object.additionalTactics[i]) { - default: - if (typeof object.additionalTactics[i] === "number") { - message.additionalTactics[i] = object.additionalTactics[i]; + return message; + }; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPosture.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityPosture message. + * @function verify + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityPosture.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) + if (!$util.isString(message.postureDeploymentResource)) + return "postureDeploymentResource: string expected"; + if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) + if (!$util.isString(message.postureDeployment)) + return "postureDeployment: string expected"; + if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) + if (!$util.isString(message.changedPolicy)) + return "changedPolicy: string expected"; + if (message.policySet != null && message.hasOwnProperty("policySet")) + if (!$util.isString(message.policySet)) + return "policySet: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyDriftDetails != null && message.hasOwnProperty("policyDriftDetails")) { + if (!Array.isArray(message.policyDriftDetails)) + return "policyDriftDetails: array expected"; + for (var i = 0; i < message.policyDriftDetails.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify(message.policyDriftDetails[i]); + if (error) + return "policyDriftDetails." + error; + } + } + return null; + }; + + /** + * Creates a SecurityPosture message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture + */ + SecurityPosture.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.SecurityPosture) + return object; + var message = new $root.google.cloud.securitycenter.v2.SecurityPosture(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.postureDeploymentResource != null) + message.postureDeploymentResource = String(object.postureDeploymentResource); + if (object.postureDeployment != null) + message.postureDeployment = String(object.postureDeployment); + if (object.changedPolicy != null) + message.changedPolicy = String(object.changedPolicy); + if (object.policySet != null) + message.policySet = String(object.policySet); + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyDriftDetails) { + if (!Array.isArray(object.policyDriftDetails)) + throw TypeError(".google.cloud.securitycenter.v2.SecurityPosture.policyDriftDetails: array expected"); + message.policyDriftDetails = []; + for (var i = 0; i < object.policyDriftDetails.length; ++i) { + if (typeof object.policyDriftDetails[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.SecurityPosture.policyDriftDetails: object expected"); + message.policyDriftDetails[i] = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.fromObject(object.policyDriftDetails[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v2.SecurityPosture} message SecurityPosture + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityPosture.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.policyDriftDetails = []; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + object.postureDeploymentResource = ""; + object.postureDeployment = ""; + object.changedPolicy = ""; + object.policySet = ""; + object.policy = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) + object.postureDeploymentResource = message.postureDeploymentResource; + if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) + object.postureDeployment = message.postureDeployment; + if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) + object.changedPolicy = message.changedPolicy; + if (message.policySet != null && message.hasOwnProperty("policySet")) + object.policySet = message.policySet; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.policyDriftDetails && message.policyDriftDetails.length) { + object.policyDriftDetails = []; + for (var j = 0; j < message.policyDriftDetails.length; ++j) + object.policyDriftDetails[j] = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.toObject(message.policyDriftDetails[j], options); + } + return object; + }; + + /** + * Converts this SecurityPosture to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @instance + * @returns {Object.} JSON object + */ + SecurityPosture.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityPosture + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityPosture.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityPosture"; + }; + + SecurityPosture.PolicyDriftDetails = (function() { + + /** + * Properties of a PolicyDriftDetails. + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @interface IPolicyDriftDetails + * @property {string|null} [field] PolicyDriftDetails field + * @property {string|null} [expectedValue] PolicyDriftDetails expectedValue + * @property {string|null} [detectedValue] PolicyDriftDetails detectedValue + */ + + /** + * Constructs a new PolicyDriftDetails. + * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @classdesc Represents a PolicyDriftDetails. + * @implements IPolicyDriftDetails + * @constructor + * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set + */ + function PolicyDriftDetails(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]]; + } + + /** + * PolicyDriftDetails field. + * @member {string} field + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.field = ""; + + /** + * PolicyDriftDetails expectedValue. + * @member {string} expectedValue + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.expectedValue = ""; + + /** + * PolicyDriftDetails detectedValue. + * @member {string} detectedValue + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.detectedValue = ""; + + /** + * Creates a new PolicyDriftDetails instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails instance + */ + PolicyDriftDetails.create = function create(properties) { + return new PolicyDriftDetails(properties); + }; + + /** + * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDriftDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); + if (message.detectedValue != null && Object.hasOwnProperty.call(message, "detectedValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.detectedValue); + return writer; + }; + + /** + * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDriftDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDriftDetails.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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); break; } - case "TACTIC_UNSPECIFIED": - case 0: - message.additionalTactics[i] = 0; - break; - case "RECONNAISSANCE": - case 1: - message.additionalTactics[i] = 1; - break; - case "RESOURCE_DEVELOPMENT": - case 2: - message.additionalTactics[i] = 2; - break; - case "INITIAL_ACCESS": - case 5: - message.additionalTactics[i] = 5; - break; - case "EXECUTION": - case 3: - message.additionalTactics[i] = 3; - break; - case "PERSISTENCE": - case 6: - message.additionalTactics[i] = 6; - break; - case "PRIVILEGE_ESCALATION": - case 8: - message.additionalTactics[i] = 8; - break; - case "DEFENSE_EVASION": - case 7: - message.additionalTactics[i] = 7; - break; - case "CREDENTIAL_ACCESS": - case 9: - message.additionalTactics[i] = 9; - break; - case "DISCOVERY": - case 10: - message.additionalTactics[i] = 10; - break; - case "LATERAL_MOVEMENT": - case 11: - message.additionalTactics[i] = 11; - break; - case "COLLECTION": - case 12: - message.additionalTactics[i] = 12; - break; - case "COMMAND_AND_CONTROL": - case 4: - message.additionalTactics[i] = 4; - break; - case "EXFILTRATION": - case 13: - message.additionalTactics[i] = 13; - break; - case "IMPACT": - case 14: - message.additionalTactics[i] = 14; - break; - } - } - if (object.additionalTechniques) { - if (!Array.isArray(object.additionalTechniques)) - throw TypeError(".google.cloud.securitycenter.v2.MitreAttack.additionalTechniques: array expected"); - message.additionalTechniques = []; - for (var i = 0; i < object.additionalTechniques.length; ++i) - switch (object.additionalTechniques[i]) { - default: - if (typeof object.additionalTechniques[i] === "number") { - message.additionalTechniques[i] = object.additionalTechniques[i]; + case 2: { + message.expectedValue = reader.string(); break; } - case "TECHNIQUE_UNSPECIFIED": - case 0: - message.additionalTechniques[i] = 0; - break; - case "MASQUERADING": - case 49: - message.additionalTechniques[i] = 49; - break; - case "MATCH_LEGITIMATE_NAME_OR_LOCATION": - case 50: - message.additionalTechniques[i] = 50; - break; - case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": - case 37: - message.additionalTechniques[i] = 37; - break; - case "STARTUP_ITEMS": - case 38: - message.additionalTechniques[i] = 38; - break; - case "NETWORK_SERVICE_DISCOVERY": - case 32: - message.additionalTechniques[i] = 32; - break; - case "PROCESS_DISCOVERY": - case 56: - message.additionalTechniques[i] = 56; - break; - case "COMMAND_AND_SCRIPTING_INTERPRETER": - case 6: - message.additionalTechniques[i] = 6; - break; - case "UNIX_SHELL": - case 7: - message.additionalTechniques[i] = 7; - break; - case "PERMISSION_GROUPS_DISCOVERY": - case 18: - message.additionalTechniques[i] = 18; - break; - case "CLOUD_GROUPS": - case 19: - message.additionalTechniques[i] = 19; - break; - case "APPLICATION_LAYER_PROTOCOL": - case 45: - message.additionalTechniques[i] = 45; - break; - case "DNS": - case 46: - message.additionalTechniques[i] = 46; - break; - case "SOFTWARE_DEPLOYMENT_TOOLS": - case 47: - message.additionalTechniques[i] = 47; - break; - case "VALID_ACCOUNTS": - case 14: - message.additionalTechniques[i] = 14; - break; - case "DEFAULT_ACCOUNTS": - case 35: - message.additionalTechniques[i] = 35; - break; - case "LOCAL_ACCOUNTS": - case 15: - message.additionalTechniques[i] = 15; - break; - case "CLOUD_ACCOUNTS": - case 16: - message.additionalTechniques[i] = 16; - break; - case "PROXY": - case 9: - message.additionalTechniques[i] = 9; - break; - case "EXTERNAL_PROXY": - case 10: - message.additionalTechniques[i] = 10; - break; - case "MULTI_HOP_PROXY": - case 11: - message.additionalTechniques[i] = 11; - break; - case "ACCOUNT_MANIPULATION": - case 22: - message.additionalTechniques[i] = 22; - break; - case "ADDITIONAL_CLOUD_CREDENTIALS": - case 40: - message.additionalTechniques[i] = 40; - break; - case "SSH_AUTHORIZED_KEYS": - case 23: - message.additionalTechniques[i] = 23; - break; - case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": - case 58: - message.additionalTechniques[i] = 58; - break; - case "INGRESS_TOOL_TRANSFER": - case 3: - message.additionalTechniques[i] = 3; - break; - case "NATIVE_API": - case 4: - message.additionalTechniques[i] = 4; - break; - case "BRUTE_FORCE": - case 44: - message.additionalTechniques[i] = 44; - break; - case "SHARED_MODULES": - case 5: - message.additionalTechniques[i] = 5; - break; - case "ACCESS_TOKEN_MANIPULATION": - case 33: - message.additionalTechniques[i] = 33; - break; - case "TOKEN_IMPERSONATION_OR_THEFT": - case 39: - message.additionalTechniques[i] = 39; - break; - case "EXPLOIT_PUBLIC_FACING_APPLICATION": - case 27: - message.additionalTechniques[i] = 27; - break; - case "DOMAIN_POLICY_MODIFICATION": - case 30: - message.additionalTechniques[i] = 30; - break; - case "DATA_DESTRUCTION": - case 29: - message.additionalTechniques[i] = 29; - break; - case "SERVICE_STOP": - case 52: - message.additionalTechniques[i] = 52; - break; - case "INHIBIT_SYSTEM_RECOVERY": - case 36: - message.additionalTechniques[i] = 36; - break; - case "RESOURCE_HIJACKING": - case 8: - message.additionalTechniques[i] = 8; - break; - case "NETWORK_DENIAL_OF_SERVICE": - case 17: - message.additionalTechniques[i] = 17; - break; - case "CLOUD_SERVICE_DISCOVERY": - case 48: - message.additionalTechniques[i] = 48; - break; - case "STEAL_APPLICATION_ACCESS_TOKEN": - case 42: - message.additionalTechniques[i] = 42; - break; - case "ACCOUNT_ACCESS_REMOVAL": - case 51: - message.additionalTechniques[i] = 51; - break; - case "STEAL_WEB_SESSION_COOKIE": - case 25: - message.additionalTechniques[i] = 25; - break; - case "CREATE_OR_MODIFY_SYSTEM_PROCESS": - case 24: - message.additionalTechniques[i] = 24; - break; - case "ABUSE_ELEVATION_CONTROL_MECHANISM": - case 34: - message.additionalTechniques[i] = 34; - break; - case "UNSECURED_CREDENTIALS": - case 13: - message.additionalTechniques[i] = 13; - break; - case "MODIFY_AUTHENTICATION_PROCESS": - case 28: - message.additionalTechniques[i] = 28; - break; - case "IMPAIR_DEFENSES": - case 31: - message.additionalTechniques[i] = 31; - break; - case "DISABLE_OR_MODIFY_TOOLS": - case 55: - message.additionalTechniques[i] = 55; - break; - case "EXFILTRATION_OVER_WEB_SERVICE": - case 20: - message.additionalTechniques[i] = 20; - break; - case "EXFILTRATION_TO_CLOUD_STORAGE": - case 21: - message.additionalTechniques[i] = 21; - break; - case "DYNAMIC_RESOLUTION": - case 12: - message.additionalTechniques[i] = 12; - break; - case "LATERAL_TOOL_TRANSFER": - case 41: - message.additionalTechniques[i] = 41; - break; - case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": - case 26: - message.additionalTechniques[i] = 26; - break; - case "CREATE_SNAPSHOT": - case 54: - message.additionalTechniques[i] = 54; - break; - case "CLOUD_INFRASTRUCTURE_DISCOVERY": - case 53: - message.additionalTechniques[i] = 53; - break; - case "OBTAIN_CAPABILITIES": - case 43: - message.additionalTechniques[i] = 43; - break; - case "ACTIVE_SCANNING": - case 1: - message.additionalTechniques[i] = 1; + case 3: { + message.detectedValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; - case "SCANNING_IP_BLOCKS": - case 2: - message.additionalTechniques[i] = 2; + } + } + return message; + }; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDriftDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDriftDetails message. + * @function verify + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDriftDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + if (!$util.isString(message.expectedValue)) + return "expectedValue: string expected"; + if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) + if (!$util.isString(message.detectedValue)) + return "detectedValue: string expected"; + return null; + }; + + /** + * Creates a PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + */ + PolicyDriftDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails) + return object; + var message = new $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails(); + if (object.field != null) + message.field = String(object.field); + if (object.expectedValue != null) + message.expectedValue = String(object.expectedValue); + if (object.detectedValue != null) + message.detectedValue = String(object.detectedValue); + return message; + }; + + /** + * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} message PolicyDriftDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDriftDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.expectedValue = ""; + object.detectedValue = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + object.expectedValue = message.expectedValue; + if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) + object.detectedValue = message.detectedValue; + return object; + }; + + /** + * Converts this PolicyDriftDetails to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @instance + * @returns {Object.} JSON object + */ + PolicyDriftDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDriftDetails + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDriftDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails"; + }; + + return PolicyDriftDetails; + })(); + + return SecurityPosture; + })(); + + v2.ToxicCombination = (function() { + + /** + * Properties of a ToxicCombination. + * @memberof google.cloud.securitycenter.v2 + * @interface IToxicCombination + * @property {number|null} [attackExposureScore] ToxicCombination attackExposureScore + * @property {Array.|null} [relatedFindings] ToxicCombination relatedFindings + */ + + /** + * Constructs a new ToxicCombination. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a ToxicCombination. + * @implements IToxicCombination + * @constructor + * @param {google.cloud.securitycenter.v2.IToxicCombination=} [properties] Properties to set + */ + function ToxicCombination(properties) { + this.relatedFindings = []; + 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]]; + } + + /** + * ToxicCombination attackExposureScore. + * @member {number} attackExposureScore + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @instance + */ + ToxicCombination.prototype.attackExposureScore = 0; + + /** + * ToxicCombination relatedFindings. + * @member {Array.} relatedFindings + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @instance + */ + ToxicCombination.prototype.relatedFindings = $util.emptyArray; + + /** + * Creates a new ToxicCombination instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v2.IToxicCombination=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination instance + */ + ToxicCombination.create = function create(properties) { + return new ToxicCombination(properties); + }; + + /** + * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v2.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToxicCombination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attackExposureScore != null && Object.hasOwnProperty.call(message, "attackExposureScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.attackExposureScore); + if (message.relatedFindings != null && message.relatedFindings.length) + for (var i = 0; i < message.relatedFindings.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relatedFindings[i]); + return writer; + }; + + /** + * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v2.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToxicCombination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToxicCombination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToxicCombination.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.cloud.securitycenter.v2.ToxicCombination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.attackExposureScore = reader.double(); break; - case "CONTAINER_AND_RESOURCE_DISCOVERY": - case 57: - message.additionalTechniques[i] = 57; + } + case 2: { + if (!(message.relatedFindings && message.relatedFindings.length)) + message.relatedFindings = []; + message.relatedFindings.push(reader.string()); break; } + default: + reader.skipType(tag & 7); + break; + } } - if (object.version != null) - message.version = String(object.version); return message; }; /** - * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. + * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToxicCombination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToxicCombination message. + * @function verify + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToxicCombination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) + if (typeof message.attackExposureScore !== "number") + return "attackExposureScore: number expected"; + if (message.relatedFindings != null && message.hasOwnProperty("relatedFindings")) { + if (!Array.isArray(message.relatedFindings)) + return "relatedFindings: array expected"; + for (var i = 0; i < message.relatedFindings.length; ++i) + if (!$util.isString(message.relatedFindings[i])) + return "relatedFindings: string[] expected"; + } + return null; + }; + + /** + * Creates a ToxicCombination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + */ + ToxicCombination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ToxicCombination) + return object; + var message = new $root.google.cloud.securitycenter.v2.ToxicCombination(); + if (object.attackExposureScore != null) + message.attackExposureScore = Number(object.attackExposureScore); + if (object.relatedFindings) { + if (!Array.isArray(object.relatedFindings)) + throw TypeError(".google.cloud.securitycenter.v2.ToxicCombination.relatedFindings: array expected"); + message.relatedFindings = []; + for (var i = 0; i < object.relatedFindings.length; ++i) + message.relatedFindings[i] = String(object.relatedFindings[i]); + } + return message; + }; + + /** + * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.MitreAttack + * @memberof google.cloud.securitycenter.v2.ToxicCombination * @static - * @param {google.cloud.securitycenter.v2.MitreAttack} message MitreAttack + * @param {google.cloud.securitycenter.v2.ToxicCombination} message ToxicCombination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MitreAttack.toObject = function toObject(message, options) { + ToxicCombination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.primaryTechniques = []; - object.additionalTactics = []; - object.additionalTechniques = []; - } - if (options.defaults) { - object.primaryTactic = options.enums === String ? "TACTIC_UNSPECIFIED" : 0; - object.version = ""; - } - if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) - object.primaryTactic = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.primaryTactic] === undefined ? message.primaryTactic : $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.primaryTactic] : message.primaryTactic; - if (message.primaryTechniques && message.primaryTechniques.length) { - object.primaryTechniques = []; - for (var j = 0; j < message.primaryTechniques.length; ++j) - object.primaryTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.primaryTechniques[j]] === undefined ? message.primaryTechniques[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.primaryTechniques[j]] : message.primaryTechniques[j]; - } - if (message.additionalTactics && message.additionalTactics.length) { - object.additionalTactics = []; - for (var j = 0; j < message.additionalTactics.length; ++j) - object.additionalTactics[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.additionalTactics[j]] === undefined ? message.additionalTactics[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Tactic[message.additionalTactics[j]] : message.additionalTactics[j]; - } - if (message.additionalTechniques && message.additionalTechniques.length) { - object.additionalTechniques = []; - for (var j = 0; j < message.additionalTechniques.length; ++j) - object.additionalTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.additionalTechniques[j]] === undefined ? message.additionalTechniques[j] : $root.google.cloud.securitycenter.v2.MitreAttack.Technique[message.additionalTechniques[j]] : message.additionalTechniques[j]; + if (options.arrays || options.defaults) + object.relatedFindings = []; + if (options.defaults) + object.attackExposureScore = 0; + if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) + object.attackExposureScore = options.json && !isFinite(message.attackExposureScore) ? String(message.attackExposureScore) : message.attackExposureScore; + if (message.relatedFindings && message.relatedFindings.length) { + object.relatedFindings = []; + for (var j = 0; j < message.relatedFindings.length; ++j) + object.relatedFindings[j] = message.relatedFindings[j]; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; return object; }; /** - * Converts this MitreAttack to JSON. + * Converts this ToxicCombination to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.MitreAttack + * @memberof google.cloud.securitycenter.v2.ToxicCombination * @instance * @returns {Object.} JSON object */ - MitreAttack.prototype.toJSON = function toJSON() { + ToxicCombination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MitreAttack + * Gets the default type url for ToxicCombination * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.MitreAttack + * @memberof google.cloud.securitycenter.v2.ToxicCombination * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MitreAttack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ToxicCombination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.MitreAttack"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ToxicCombination"; }; - /** - * Tactic enum. - * @name google.cloud.securitycenter.v2.MitreAttack.Tactic - * @enum {number} - * @property {number} TACTIC_UNSPECIFIED=0 TACTIC_UNSPECIFIED value - * @property {number} RECONNAISSANCE=1 RECONNAISSANCE value - * @property {number} RESOURCE_DEVELOPMENT=2 RESOURCE_DEVELOPMENT value - * @property {number} INITIAL_ACCESS=5 INITIAL_ACCESS value - * @property {number} EXECUTION=3 EXECUTION value - * @property {number} PERSISTENCE=6 PERSISTENCE value - * @property {number} PRIVILEGE_ESCALATION=8 PRIVILEGE_ESCALATION value - * @property {number} DEFENSE_EVASION=7 DEFENSE_EVASION value - * @property {number} CREDENTIAL_ACCESS=9 CREDENTIAL_ACCESS value - * @property {number} DISCOVERY=10 DISCOVERY value - * @property {number} LATERAL_MOVEMENT=11 LATERAL_MOVEMENT value - * @property {number} COLLECTION=12 COLLECTION value - * @property {number} COMMAND_AND_CONTROL=4 COMMAND_AND_CONTROL value - * @property {number} EXFILTRATION=13 EXFILTRATION value - * @property {number} IMPACT=14 IMPACT value - */ - MitreAttack.Tactic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TACTIC_UNSPECIFIED"] = 0; - values[valuesById[1] = "RECONNAISSANCE"] = 1; - values[valuesById[2] = "RESOURCE_DEVELOPMENT"] = 2; - values[valuesById[5] = "INITIAL_ACCESS"] = 5; - values[valuesById[3] = "EXECUTION"] = 3; - values[valuesById[6] = "PERSISTENCE"] = 6; - values[valuesById[8] = "PRIVILEGE_ESCALATION"] = 8; - values[valuesById[7] = "DEFENSE_EVASION"] = 7; - values[valuesById[9] = "CREDENTIAL_ACCESS"] = 9; - values[valuesById[10] = "DISCOVERY"] = 10; - values[valuesById[11] = "LATERAL_MOVEMENT"] = 11; - values[valuesById[12] = "COLLECTION"] = 12; - values[valuesById[4] = "COMMAND_AND_CONTROL"] = 4; - values[valuesById[13] = "EXFILTRATION"] = 13; - values[valuesById[14] = "IMPACT"] = 14; - return values; - })(); - - /** - * Technique enum. - * @name google.cloud.securitycenter.v2.MitreAttack.Technique - * @enum {number} - * @property {number} TECHNIQUE_UNSPECIFIED=0 TECHNIQUE_UNSPECIFIED value - * @property {number} MASQUERADING=49 MASQUERADING value - * @property {number} MATCH_LEGITIMATE_NAME_OR_LOCATION=50 MATCH_LEGITIMATE_NAME_OR_LOCATION value - * @property {number} BOOT_OR_LOGON_INITIALIZATION_SCRIPTS=37 BOOT_OR_LOGON_INITIALIZATION_SCRIPTS value - * @property {number} STARTUP_ITEMS=38 STARTUP_ITEMS value - * @property {number} NETWORK_SERVICE_DISCOVERY=32 NETWORK_SERVICE_DISCOVERY value - * @property {number} PROCESS_DISCOVERY=56 PROCESS_DISCOVERY value - * @property {number} COMMAND_AND_SCRIPTING_INTERPRETER=6 COMMAND_AND_SCRIPTING_INTERPRETER value - * @property {number} UNIX_SHELL=7 UNIX_SHELL value - * @property {number} PERMISSION_GROUPS_DISCOVERY=18 PERMISSION_GROUPS_DISCOVERY value - * @property {number} CLOUD_GROUPS=19 CLOUD_GROUPS value - * @property {number} APPLICATION_LAYER_PROTOCOL=45 APPLICATION_LAYER_PROTOCOL value - * @property {number} DNS=46 DNS value - * @property {number} SOFTWARE_DEPLOYMENT_TOOLS=47 SOFTWARE_DEPLOYMENT_TOOLS value - * @property {number} VALID_ACCOUNTS=14 VALID_ACCOUNTS value - * @property {number} DEFAULT_ACCOUNTS=35 DEFAULT_ACCOUNTS value - * @property {number} LOCAL_ACCOUNTS=15 LOCAL_ACCOUNTS value - * @property {number} CLOUD_ACCOUNTS=16 CLOUD_ACCOUNTS value - * @property {number} PROXY=9 PROXY value - * @property {number} EXTERNAL_PROXY=10 EXTERNAL_PROXY value - * @property {number} MULTI_HOP_PROXY=11 MULTI_HOP_PROXY value - * @property {number} ACCOUNT_MANIPULATION=22 ACCOUNT_MANIPULATION value - * @property {number} ADDITIONAL_CLOUD_CREDENTIALS=40 ADDITIONAL_CLOUD_CREDENTIALS value - * @property {number} SSH_AUTHORIZED_KEYS=23 SSH_AUTHORIZED_KEYS value - * @property {number} ADDITIONAL_CONTAINER_CLUSTER_ROLES=58 ADDITIONAL_CONTAINER_CLUSTER_ROLES value - * @property {number} INGRESS_TOOL_TRANSFER=3 INGRESS_TOOL_TRANSFER value - * @property {number} NATIVE_API=4 NATIVE_API value - * @property {number} BRUTE_FORCE=44 BRUTE_FORCE value - * @property {number} SHARED_MODULES=5 SHARED_MODULES value - * @property {number} ACCESS_TOKEN_MANIPULATION=33 ACCESS_TOKEN_MANIPULATION value - * @property {number} TOKEN_IMPERSONATION_OR_THEFT=39 TOKEN_IMPERSONATION_OR_THEFT value - * @property {number} EXPLOIT_PUBLIC_FACING_APPLICATION=27 EXPLOIT_PUBLIC_FACING_APPLICATION value - * @property {number} DOMAIN_POLICY_MODIFICATION=30 DOMAIN_POLICY_MODIFICATION value - * @property {number} DATA_DESTRUCTION=29 DATA_DESTRUCTION value - * @property {number} SERVICE_STOP=52 SERVICE_STOP value - * @property {number} INHIBIT_SYSTEM_RECOVERY=36 INHIBIT_SYSTEM_RECOVERY value - * @property {number} RESOURCE_HIJACKING=8 RESOURCE_HIJACKING value - * @property {number} NETWORK_DENIAL_OF_SERVICE=17 NETWORK_DENIAL_OF_SERVICE value - * @property {number} CLOUD_SERVICE_DISCOVERY=48 CLOUD_SERVICE_DISCOVERY value - * @property {number} STEAL_APPLICATION_ACCESS_TOKEN=42 STEAL_APPLICATION_ACCESS_TOKEN value - * @property {number} ACCOUNT_ACCESS_REMOVAL=51 ACCOUNT_ACCESS_REMOVAL value - * @property {number} STEAL_WEB_SESSION_COOKIE=25 STEAL_WEB_SESSION_COOKIE value - * @property {number} CREATE_OR_MODIFY_SYSTEM_PROCESS=24 CREATE_OR_MODIFY_SYSTEM_PROCESS value - * @property {number} ABUSE_ELEVATION_CONTROL_MECHANISM=34 ABUSE_ELEVATION_CONTROL_MECHANISM value - * @property {number} UNSECURED_CREDENTIALS=13 UNSECURED_CREDENTIALS value - * @property {number} MODIFY_AUTHENTICATION_PROCESS=28 MODIFY_AUTHENTICATION_PROCESS value - * @property {number} IMPAIR_DEFENSES=31 IMPAIR_DEFENSES value - * @property {number} DISABLE_OR_MODIFY_TOOLS=55 DISABLE_OR_MODIFY_TOOLS value - * @property {number} EXFILTRATION_OVER_WEB_SERVICE=20 EXFILTRATION_OVER_WEB_SERVICE value - * @property {number} EXFILTRATION_TO_CLOUD_STORAGE=21 EXFILTRATION_TO_CLOUD_STORAGE value - * @property {number} DYNAMIC_RESOLUTION=12 DYNAMIC_RESOLUTION value - * @property {number} LATERAL_TOOL_TRANSFER=41 LATERAL_TOOL_TRANSFER value - * @property {number} MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE=26 MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE value - * @property {number} CREATE_SNAPSHOT=54 CREATE_SNAPSHOT value - * @property {number} CLOUD_INFRASTRUCTURE_DISCOVERY=53 CLOUD_INFRASTRUCTURE_DISCOVERY value - * @property {number} OBTAIN_CAPABILITIES=43 OBTAIN_CAPABILITIES value - * @property {number} ACTIVE_SCANNING=1 ACTIVE_SCANNING value - * @property {number} SCANNING_IP_BLOCKS=2 SCANNING_IP_BLOCKS value - * @property {number} CONTAINER_AND_RESOURCE_DISCOVERY=57 CONTAINER_AND_RESOURCE_DISCOVERY value - */ - MitreAttack.Technique = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TECHNIQUE_UNSPECIFIED"] = 0; - values[valuesById[49] = "MASQUERADING"] = 49; - values[valuesById[50] = "MATCH_LEGITIMATE_NAME_OR_LOCATION"] = 50; - values[valuesById[37] = "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS"] = 37; - values[valuesById[38] = "STARTUP_ITEMS"] = 38; - values[valuesById[32] = "NETWORK_SERVICE_DISCOVERY"] = 32; - values[valuesById[56] = "PROCESS_DISCOVERY"] = 56; - values[valuesById[6] = "COMMAND_AND_SCRIPTING_INTERPRETER"] = 6; - values[valuesById[7] = "UNIX_SHELL"] = 7; - values[valuesById[18] = "PERMISSION_GROUPS_DISCOVERY"] = 18; - values[valuesById[19] = "CLOUD_GROUPS"] = 19; - values[valuesById[45] = "APPLICATION_LAYER_PROTOCOL"] = 45; - values[valuesById[46] = "DNS"] = 46; - values[valuesById[47] = "SOFTWARE_DEPLOYMENT_TOOLS"] = 47; - values[valuesById[14] = "VALID_ACCOUNTS"] = 14; - values[valuesById[35] = "DEFAULT_ACCOUNTS"] = 35; - values[valuesById[15] = "LOCAL_ACCOUNTS"] = 15; - values[valuesById[16] = "CLOUD_ACCOUNTS"] = 16; - values[valuesById[9] = "PROXY"] = 9; - values[valuesById[10] = "EXTERNAL_PROXY"] = 10; - values[valuesById[11] = "MULTI_HOP_PROXY"] = 11; - values[valuesById[22] = "ACCOUNT_MANIPULATION"] = 22; - values[valuesById[40] = "ADDITIONAL_CLOUD_CREDENTIALS"] = 40; - values[valuesById[23] = "SSH_AUTHORIZED_KEYS"] = 23; - values[valuesById[58] = "ADDITIONAL_CONTAINER_CLUSTER_ROLES"] = 58; - values[valuesById[3] = "INGRESS_TOOL_TRANSFER"] = 3; - values[valuesById[4] = "NATIVE_API"] = 4; - values[valuesById[44] = "BRUTE_FORCE"] = 44; - values[valuesById[5] = "SHARED_MODULES"] = 5; - values[valuesById[33] = "ACCESS_TOKEN_MANIPULATION"] = 33; - values[valuesById[39] = "TOKEN_IMPERSONATION_OR_THEFT"] = 39; - values[valuesById[27] = "EXPLOIT_PUBLIC_FACING_APPLICATION"] = 27; - values[valuesById[30] = "DOMAIN_POLICY_MODIFICATION"] = 30; - values[valuesById[29] = "DATA_DESTRUCTION"] = 29; - values[valuesById[52] = "SERVICE_STOP"] = 52; - values[valuesById[36] = "INHIBIT_SYSTEM_RECOVERY"] = 36; - values[valuesById[8] = "RESOURCE_HIJACKING"] = 8; - values[valuesById[17] = "NETWORK_DENIAL_OF_SERVICE"] = 17; - values[valuesById[48] = "CLOUD_SERVICE_DISCOVERY"] = 48; - values[valuesById[42] = "STEAL_APPLICATION_ACCESS_TOKEN"] = 42; - values[valuesById[51] = "ACCOUNT_ACCESS_REMOVAL"] = 51; - values[valuesById[25] = "STEAL_WEB_SESSION_COOKIE"] = 25; - values[valuesById[24] = "CREATE_OR_MODIFY_SYSTEM_PROCESS"] = 24; - values[valuesById[34] = "ABUSE_ELEVATION_CONTROL_MECHANISM"] = 34; - values[valuesById[13] = "UNSECURED_CREDENTIALS"] = 13; - values[valuesById[28] = "MODIFY_AUTHENTICATION_PROCESS"] = 28; - values[valuesById[31] = "IMPAIR_DEFENSES"] = 31; - values[valuesById[55] = "DISABLE_OR_MODIFY_TOOLS"] = 55; - values[valuesById[20] = "EXFILTRATION_OVER_WEB_SERVICE"] = 20; - values[valuesById[21] = "EXFILTRATION_TO_CLOUD_STORAGE"] = 21; - values[valuesById[12] = "DYNAMIC_RESOLUTION"] = 12; - values[valuesById[41] = "LATERAL_TOOL_TRANSFER"] = 41; - values[valuesById[26] = "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE"] = 26; - values[valuesById[54] = "CREATE_SNAPSHOT"] = 54; - values[valuesById[53] = "CLOUD_INFRASTRUCTURE_DISCOVERY"] = 53; - values[valuesById[43] = "OBTAIN_CAPABILITIES"] = 43; - values[valuesById[1] = "ACTIVE_SCANNING"] = 1; - values[valuesById[2] = "SCANNING_IP_BLOCKS"] = 2; - values[valuesById[57] = "CONTAINER_AND_RESOURCE_DISCOVERY"] = 57; - return values; - })(); - - return MitreAttack; + return ToxicCombination; })(); - v2.OrgPolicy = (function() { + v2.Vulnerability = (function() { /** - * Properties of an OrgPolicy. + * Properties of a Vulnerability. * @memberof google.cloud.securitycenter.v2 - * @interface IOrgPolicy - * @property {string|null} [name] OrgPolicy name + * @interface IVulnerability + * @property {google.cloud.securitycenter.v2.ICve|null} [cve] Vulnerability cve + * @property {google.cloud.securitycenter.v2.IPackage|null} [offendingPackage] Vulnerability offendingPackage + * @property {google.cloud.securitycenter.v2.IPackage|null} [fixedPackage] Vulnerability fixedPackage + * @property {google.cloud.securitycenter.v2.ISecurityBulletin|null} [securityBulletin] Vulnerability securityBulletin */ /** - * Constructs a new OrgPolicy. + * Constructs a new Vulnerability. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an OrgPolicy. - * @implements IOrgPolicy + * @classdesc Represents a Vulnerability. + * @implements IVulnerability * @constructor - * @param {google.cloud.securitycenter.v2.IOrgPolicy=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IVulnerability=} [properties] Properties to set */ - function OrgPolicy(properties) { + function Vulnerability(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84199,75 +88009,117 @@ } /** - * OrgPolicy name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * Vulnerability cve. + * @member {google.cloud.securitycenter.v2.ICve|null|undefined} cve + * @memberof google.cloud.securitycenter.v2.Vulnerability * @instance */ - OrgPolicy.prototype.name = ""; + Vulnerability.prototype.cve = null; /** - * Creates a new OrgPolicy instance using the specified properties. + * Vulnerability offendingPackage. + * @member {google.cloud.securitycenter.v2.IPackage|null|undefined} offendingPackage + * @memberof google.cloud.securitycenter.v2.Vulnerability + * @instance + */ + Vulnerability.prototype.offendingPackage = null; + + /** + * Vulnerability fixedPackage. + * @member {google.cloud.securitycenter.v2.IPackage|null|undefined} fixedPackage + * @memberof google.cloud.securitycenter.v2.Vulnerability + * @instance + */ + Vulnerability.prototype.fixedPackage = null; + + /** + * Vulnerability securityBulletin. + * @member {google.cloud.securitycenter.v2.ISecurityBulletin|null|undefined} securityBulletin + * @memberof google.cloud.securitycenter.v2.Vulnerability + * @instance + */ + Vulnerability.prototype.securityBulletin = null; + + /** + * Creates a new Vulnerability instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static - * @param {google.cloud.securitycenter.v2.IOrgPolicy=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy instance + * @param {google.cloud.securitycenter.v2.IVulnerability=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability instance */ - OrgPolicy.create = function create(properties) { - return new OrgPolicy(properties); + Vulnerability.create = function create(properties) { + return new Vulnerability(properties); }; /** - * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static - * @param {google.cloud.securitycenter.v2.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {google.cloud.securitycenter.v2.IVulnerability} message Vulnerability message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrgPolicy.encode = function encode(message, writer) { + Vulnerability.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.cve != null && Object.hasOwnProperty.call(message, "cve")) + $root.google.cloud.securitycenter.v2.Cve.encode(message.cve, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.offendingPackage != null && Object.hasOwnProperty.call(message, "offendingPackage")) + $root.google.cloud.securitycenter.v2.Package.encode(message.offendingPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) + $root.google.cloud.securitycenter.v2.Package.encode(message.fixedPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.securityBulletin != null && Object.hasOwnProperty.call(message, "securityBulletin")) + $root.google.cloud.securitycenter.v2.SecurityBulletin.encode(message.securityBulletin, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.OrgPolicy.verify|verify} messages. + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static - * @param {google.cloud.securitycenter.v2.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {google.cloud.securitycenter.v2.IVulnerability} message Vulnerability message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrgPolicy.encodeDelimited = function encodeDelimited(message, writer) { + Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OrgPolicy message from the specified reader or buffer. + * Decodes a Vulnerability message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrgPolicy.decode = function decode(reader, length) { + Vulnerability.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.cloud.securitycenter.v2.OrgPolicy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Vulnerability(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.cve = $root.google.cloud.securitycenter.v2.Cve.decode(reader, reader.uint32()); + break; + } + case 2: { + message.offendingPackage = $root.google.cloud.securitycenter.v2.Package.decode(reader, reader.uint32()); + break; + } + case 3: { + message.fixedPackage = $root.google.cloud.securitycenter.v2.Package.decode(reader, reader.uint32()); + break; + } + case 4: { + message.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.decode(reader, reader.uint32()); break; } default: @@ -84279,134 +88131,175 @@ }; /** - * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrgPolicy.decodeDelimited = function decodeDelimited(reader) { + Vulnerability.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrgPolicy message. + * Verifies a Vulnerability message. * @function verify - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrgPolicy.verify = function verify(message) { + Vulnerability.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.cve != null && message.hasOwnProperty("cve")) { + var error = $root.google.cloud.securitycenter.v2.Cve.verify(message.cve); + if (error) + return "cve." + error; + } + if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) { + var error = $root.google.cloud.securitycenter.v2.Package.verify(message.offendingPackage); + if (error) + return "offendingPackage." + error; + } + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) { + var error = $root.google.cloud.securitycenter.v2.Package.verify(message.fixedPackage); + if (error) + return "fixedPackage." + error; + } + if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) { + var error = $root.google.cloud.securitycenter.v2.SecurityBulletin.verify(message.securityBulletin); + if (error) + return "securityBulletin." + error; + } return null; }; /** - * Creates an OrgPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.OrgPolicy} OrgPolicy + * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability */ - OrgPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.OrgPolicy) + Vulnerability.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Vulnerability) return object; - var message = new $root.google.cloud.securitycenter.v2.OrgPolicy(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v2.Vulnerability(); + if (object.cve != null) { + if (typeof object.cve !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.cve: object expected"); + message.cve = $root.google.cloud.securitycenter.v2.Cve.fromObject(object.cve); + } + if (object.offendingPackage != null) { + if (typeof object.offendingPackage !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.offendingPackage: object expected"); + message.offendingPackage = $root.google.cloud.securitycenter.v2.Package.fromObject(object.offendingPackage); + } + if (object.fixedPackage != null) { + if (typeof object.fixedPackage !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.fixedPackage: object expected"); + message.fixedPackage = $root.google.cloud.securitycenter.v2.Package.fromObject(object.fixedPackage); + } + if (object.securityBulletin != null) { + if (typeof object.securityBulletin !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.securityBulletin: object expected"); + message.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.fromObject(object.securityBulletin); + } return message; }; /** - * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static - * @param {google.cloud.securitycenter.v2.OrgPolicy} message OrgPolicy + * @param {google.cloud.securitycenter.v2.Vulnerability} message Vulnerability * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrgPolicy.toObject = function toObject(message, options) { + Vulnerability.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.cve = null; + object.offendingPackage = null; + object.fixedPackage = null; + object.securityBulletin = null; + } + if (message.cve != null && message.hasOwnProperty("cve")) + object.cve = $root.google.cloud.securitycenter.v2.Cve.toObject(message.cve, options); + if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) + object.offendingPackage = $root.google.cloud.securitycenter.v2.Package.toObject(message.offendingPackage, options); + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + object.fixedPackage = $root.google.cloud.securitycenter.v2.Package.toObject(message.fixedPackage, options); + if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) + object.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.toObject(message.securityBulletin, options); return object; }; /** - * Converts this OrgPolicy to JSON. + * Converts this Vulnerability to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @instance * @returns {Object.} JSON object */ - OrgPolicy.prototype.toJSON = function toJSON() { + Vulnerability.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OrgPolicy + * Gets the default type url for Vulnerability * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.OrgPolicy + * @memberof google.cloud.securitycenter.v2.Vulnerability * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OrgPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.OrgPolicy"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Vulnerability"; }; - return OrgPolicy; + return Vulnerability; })(); - v2.Process = (function() { + v2.Cve = (function() { /** - * Properties of a Process. + * Properties of a Cve. * @memberof google.cloud.securitycenter.v2 - * @interface IProcess - * @property {string|null} [name] Process name - * @property {google.cloud.securitycenter.v2.IFile|null} [binary] Process binary - * @property {Array.|null} [libraries] Process libraries - * @property {google.cloud.securitycenter.v2.IFile|null} [script] Process script - * @property {Array.|null} [args] Process args - * @property {boolean|null} [argumentsTruncated] Process argumentsTruncated - * @property {Array.|null} [envVariables] Process envVariables - * @property {boolean|null} [envVariablesTruncated] Process envVariablesTruncated - * @property {number|Long|null} [pid] Process pid - * @property {number|Long|null} [parentPid] Process parentPid + * @interface ICve + * @property {string|null} [id] Cve id + * @property {Array.|null} [references] Cve references + * @property {google.cloud.securitycenter.v2.ICvssv3|null} [cvssv3] Cve cvssv3 + * @property {boolean|null} [upstreamFixAvailable] Cve upstreamFixAvailable + * @property {google.cloud.securitycenter.v2.Cve.RiskRating|null} [impact] Cve impact + * @property {google.cloud.securitycenter.v2.Cve.ExploitationActivity|null} [exploitationActivity] Cve exploitationActivity + * @property {boolean|null} [observedInTheWild] Cve observedInTheWild + * @property {boolean|null} [zeroDay] Cve zeroDay */ /** - * Constructs a new Process. + * Constructs a new Cve. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Process. - * @implements IProcess + * @classdesc Represents a Cve. + * @implements ICve * @constructor - * @param {google.cloud.securitycenter.v2.IProcess=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICve=} [properties] Properties to set */ - function Process(properties) { - this.libraries = []; - this.args = []; - this.envVariables = []; + function Cve(properties) { + this.references = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84414,210 +88307,176 @@ } /** - * Process name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Process - * @instance - */ - Process.prototype.name = ""; - - /** - * Process binary. - * @member {google.cloud.securitycenter.v2.IFile|null|undefined} binary - * @memberof google.cloud.securitycenter.v2.Process - * @instance - */ - Process.prototype.binary = null; - - /** - * Process libraries. - * @member {Array.} libraries - * @memberof google.cloud.securitycenter.v2.Process + * Cve id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.libraries = $util.emptyArray; + Cve.prototype.id = ""; /** - * Process script. - * @member {google.cloud.securitycenter.v2.IFile|null|undefined} script - * @memberof google.cloud.securitycenter.v2.Process + * Cve references. + * @member {Array.} references + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.script = null; + Cve.prototype.references = $util.emptyArray; /** - * Process args. - * @member {Array.} args - * @memberof google.cloud.securitycenter.v2.Process + * Cve cvssv3. + * @member {google.cloud.securitycenter.v2.ICvssv3|null|undefined} cvssv3 + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.args = $util.emptyArray; + Cve.prototype.cvssv3 = null; /** - * Process argumentsTruncated. - * @member {boolean} argumentsTruncated - * @memberof google.cloud.securitycenter.v2.Process + * Cve upstreamFixAvailable. + * @member {boolean} upstreamFixAvailable + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.argumentsTruncated = false; + Cve.prototype.upstreamFixAvailable = false; /** - * Process envVariables. - * @member {Array.} envVariables - * @memberof google.cloud.securitycenter.v2.Process + * Cve impact. + * @member {google.cloud.securitycenter.v2.Cve.RiskRating} impact + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.envVariables = $util.emptyArray; + Cve.prototype.impact = 0; /** - * Process envVariablesTruncated. - * @member {boolean} envVariablesTruncated - * @memberof google.cloud.securitycenter.v2.Process + * Cve exploitationActivity. + * @member {google.cloud.securitycenter.v2.Cve.ExploitationActivity} exploitationActivity + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.envVariablesTruncated = false; + Cve.prototype.exploitationActivity = 0; /** - * Process pid. - * @member {number|Long} pid - * @memberof google.cloud.securitycenter.v2.Process + * Cve observedInTheWild. + * @member {boolean} observedInTheWild + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Cve.prototype.observedInTheWild = false; /** - * Process parentPid. - * @member {number|Long} parentPid - * @memberof google.cloud.securitycenter.v2.Process + * Cve zeroDay. + * @member {boolean} zeroDay + * @memberof google.cloud.securitycenter.v2.Cve * @instance */ - Process.prototype.parentPid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Cve.prototype.zeroDay = false; /** - * Creates a new Process instance using the specified properties. + * Creates a new Cve instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static - * @param {google.cloud.securitycenter.v2.IProcess=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Process} Process instance + * @param {google.cloud.securitycenter.v2.ICve=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Cve} Cve instance */ - Process.create = function create(properties) { - return new Process(properties); + Cve.create = function create(properties) { + return new Cve(properties); }; /** - * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static - * @param {google.cloud.securitycenter.v2.IProcess} message Process message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICve} message Cve message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Process.encode = function encode(message, writer) { + Cve.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.binary != null && Object.hasOwnProperty.call(message, "binary")) - $root.google.cloud.securitycenter.v2.File.encode(message.binary, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.libraries != null && message.libraries.length) - for (var i = 0; i < message.libraries.length; ++i) - $root.google.cloud.securitycenter.v2.File.encode(message.libraries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.script != null && Object.hasOwnProperty.call(message, "script")) - $root.google.cloud.securitycenter.v2.File.encode(message.script, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.args[i]); - if (message.argumentsTruncated != null && Object.hasOwnProperty.call(message, "argumentsTruncated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.argumentsTruncated); - if (message.envVariables != null && message.envVariables.length) - for (var i = 0; i < message.envVariables.length; ++i) - $root.google.cloud.securitycenter.v2.EnvironmentVariable.encode(message.envVariables[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.envVariablesTruncated != null && Object.hasOwnProperty.call(message, "envVariablesTruncated")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.envVariablesTruncated); - if (message.pid != null && Object.hasOwnProperty.call(message, "pid")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.pid); - if (message.parentPid != null && Object.hasOwnProperty.call(message, "parentPid")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.parentPid); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.securitycenter.v2.Reference.encode(message.references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) + $root.google.cloud.securitycenter.v2.Cvssv3.encode(message.cvssv3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.upstreamFixAvailable != null && Object.hasOwnProperty.call(message, "upstreamFixAvailable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.upstreamFixAvailable); + if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.impact); + if (message.exploitationActivity != null && Object.hasOwnProperty.call(message, "exploitationActivity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.exploitationActivity); + if (message.observedInTheWild != null && Object.hasOwnProperty.call(message, "observedInTheWild")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.observedInTheWild); + if (message.zeroDay != null && Object.hasOwnProperty.call(message, "zeroDay")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.zeroDay); return writer; }; /** - * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Process.verify|verify} messages. + * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static - * @param {google.cloud.securitycenter.v2.IProcess} message Process message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICve} message Cve message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Process.encodeDelimited = function encodeDelimited(message, writer) { + Cve.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Process message from the specified reader or buffer. + * Decodes a Cve message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Process} Process + * @returns {google.cloud.securitycenter.v2.Cve} Cve * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Process.decode = function decode(reader, length) { + Cve.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.cloud.securitycenter.v2.Process(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Cve(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.id = reader.string(); break; } case 2: { - message.binary = $root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32()); + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.securitycenter.v2.Reference.decode(reader, reader.uint32())); break; } case 3: { - if (!(message.libraries && message.libraries.length)) - message.libraries = []; - message.libraries.push($root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32())); + message.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.decode(reader, reader.uint32()); break; } case 4: { - message.script = $root.google.cloud.securitycenter.v2.File.decode(reader, reader.uint32()); + message.upstreamFixAvailable = reader.bool(); break; } case 5: { - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); + message.impact = reader.int32(); break; } case 6: { - message.argumentsTruncated = reader.bool(); + message.exploitationActivity = reader.int32(); break; } case 7: { - if (!(message.envVariables && message.envVariables.length)) - message.envVariables = []; - message.envVariables.push($root.google.cloud.securitycenter.v2.EnvironmentVariable.decode(reader, reader.uint32())); + message.observedInTheWild = reader.bool(); break; } case 8: { - message.envVariablesTruncated = reader.bool(); - break; - } - case 9: { - message.pid = reader.int64(); - break; - } - case 10: { - message.parentPid = reader.int64(); + message.zeroDay = reader.bool(); break; } default: @@ -84629,282 +88488,318 @@ }; /** - * Decodes a Process message from the specified reader or buffer, length delimited. + * Decodes a Cve message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Process} Process + * @returns {google.cloud.securitycenter.v2.Cve} Cve * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Process.decodeDelimited = function decodeDelimited(reader) { + Cve.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Process message. + * Verifies a Cve message. * @function verify - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Process.verify = function verify(message) { + Cve.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.binary != null && message.hasOwnProperty("binary")) { - var error = $root.google.cloud.securitycenter.v2.File.verify(message.binary); - if (error) - return "binary." + error; - } - if (message.libraries != null && message.hasOwnProperty("libraries")) { - if (!Array.isArray(message.libraries)) - return "libraries: array expected"; - for (var i = 0; i < message.libraries.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.File.verify(message.libraries[i]); + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Reference.verify(message.references[i]); if (error) - return "libraries." + error; + return "references." + error; } } - if (message.script != null && message.hasOwnProperty("script")) { - var error = $root.google.cloud.securitycenter.v2.File.verify(message.script); + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { + var error = $root.google.cloud.securitycenter.v2.Cvssv3.verify(message.cvssv3); if (error) - return "script." + error; - } - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; + return "cvssv3." + error; } - if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) - if (typeof message.argumentsTruncated !== "boolean") - return "argumentsTruncated: boolean expected"; - if (message.envVariables != null && message.hasOwnProperty("envVariables")) { - if (!Array.isArray(message.envVariables)) - return "envVariables: array expected"; - for (var i = 0; i < message.envVariables.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.EnvironmentVariable.verify(message.envVariables[i]); - if (error) - return "envVariables." + error; + if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) + if (typeof message.upstreamFixAvailable !== "boolean") + return "upstreamFixAvailable: boolean expected"; + if (message.impact != null && message.hasOwnProperty("impact")) + switch (message.impact) { + default: + return "impact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - } - if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) - if (typeof message.envVariablesTruncated !== "boolean") - return "envVariablesTruncated: boolean expected"; - if (message.pid != null && message.hasOwnProperty("pid")) - if (!$util.isInteger(message.pid) && !(message.pid && $util.isInteger(message.pid.low) && $util.isInteger(message.pid.high))) - return "pid: integer|Long expected"; - if (message.parentPid != null && message.hasOwnProperty("parentPid")) - if (!$util.isInteger(message.parentPid) && !(message.parentPid && $util.isInteger(message.parentPid.low) && $util.isInteger(message.parentPid.high))) - return "parentPid: integer|Long expected"; + if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) + switch (message.exploitationActivity) { + default: + return "exploitationActivity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) + if (typeof message.observedInTheWild !== "boolean") + return "observedInTheWild: boolean expected"; + if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) + if (typeof message.zeroDay !== "boolean") + return "zeroDay: boolean expected"; return null; }; /** - * Creates a Process message from a plain object. Also converts values to their respective internal types. + * Creates a Cve message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Process} Process + * @returns {google.cloud.securitycenter.v2.Cve} Cve */ - Process.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Process) + Cve.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Cve) return object; - var message = new $root.google.cloud.securitycenter.v2.Process(); - if (object.name != null) - message.name = String(object.name); - if (object.binary != null) { - if (typeof object.binary !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Process.binary: object expected"); - message.binary = $root.google.cloud.securitycenter.v2.File.fromObject(object.binary); - } - if (object.libraries) { - if (!Array.isArray(object.libraries)) - throw TypeError(".google.cloud.securitycenter.v2.Process.libraries: array expected"); - message.libraries = []; - for (var i = 0; i < object.libraries.length; ++i) { - if (typeof object.libraries[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Process.libraries: object expected"); - message.libraries[i] = $root.google.cloud.securitycenter.v2.File.fromObject(object.libraries[i]); + var message = new $root.google.cloud.securitycenter.v2.Cve(); + if (object.id != null) + message.id = String(object.id); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.securitycenter.v2.Cve.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Cve.references: object expected"); + message.references[i] = $root.google.cloud.securitycenter.v2.Reference.fromObject(object.references[i]); } } - if (object.script != null) { - if (typeof object.script !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Process.script: object expected"); - message.script = $root.google.cloud.securitycenter.v2.File.fromObject(object.script); - } - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".google.cloud.securitycenter.v2.Process.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); + if (object.cvssv3 != null) { + if (typeof object.cvssv3 !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Cve.cvssv3: object expected"); + message.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.fromObject(object.cvssv3); } - if (object.argumentsTruncated != null) - message.argumentsTruncated = Boolean(object.argumentsTruncated); - if (object.envVariables) { - if (!Array.isArray(object.envVariables)) - throw TypeError(".google.cloud.securitycenter.v2.Process.envVariables: array expected"); - message.envVariables = []; - for (var i = 0; i < object.envVariables.length; ++i) { - if (typeof object.envVariables[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Process.envVariables: object expected"); - message.envVariables[i] = $root.google.cloud.securitycenter.v2.EnvironmentVariable.fromObject(object.envVariables[i]); + if (object.upstreamFixAvailable != null) + message.upstreamFixAvailable = Boolean(object.upstreamFixAvailable); + switch (object.impact) { + default: + if (typeof object.impact === "number") { + message.impact = object.impact; + break; } + break; + case "RISK_RATING_UNSPECIFIED": + case 0: + message.impact = 0; + break; + case "LOW": + case 1: + message.impact = 1; + break; + case "MEDIUM": + case 2: + message.impact = 2; + break; + case "HIGH": + case 3: + message.impact = 3; + break; + case "CRITICAL": + case 4: + message.impact = 4; + break; } - if (object.envVariablesTruncated != null) - message.envVariablesTruncated = Boolean(object.envVariablesTruncated); - if (object.pid != null) - if ($util.Long) - (message.pid = $util.Long.fromValue(object.pid)).unsigned = false; - else if (typeof object.pid === "string") - message.pid = parseInt(object.pid, 10); - else if (typeof object.pid === "number") - message.pid = object.pid; - else if (typeof object.pid === "object") - message.pid = new $util.LongBits(object.pid.low >>> 0, object.pid.high >>> 0).toNumber(); - if (object.parentPid != null) - if ($util.Long) - (message.parentPid = $util.Long.fromValue(object.parentPid)).unsigned = false; - else if (typeof object.parentPid === "string") - message.parentPid = parseInt(object.parentPid, 10); - else if (typeof object.parentPid === "number") - message.parentPid = object.parentPid; - else if (typeof object.parentPid === "object") - message.parentPid = new $util.LongBits(object.parentPid.low >>> 0, object.parentPid.high >>> 0).toNumber(); + switch (object.exploitationActivity) { + default: + if (typeof object.exploitationActivity === "number") { + message.exploitationActivity = object.exploitationActivity; + break; + } + break; + case "EXPLOITATION_ACTIVITY_UNSPECIFIED": + case 0: + message.exploitationActivity = 0; + break; + case "WIDE": + case 1: + message.exploitationActivity = 1; + break; + case "CONFIRMED": + case 2: + message.exploitationActivity = 2; + break; + case "AVAILABLE": + case 3: + message.exploitationActivity = 3; + break; + case "ANTICIPATED": + case 4: + message.exploitationActivity = 4; + break; + case "NO_KNOWN": + case 5: + message.exploitationActivity = 5; + break; + } + if (object.observedInTheWild != null) + message.observedInTheWild = Boolean(object.observedInTheWild); + if (object.zeroDay != null) + message.zeroDay = Boolean(object.zeroDay); return message; }; /** - * Creates a plain object from a Process message. Also converts values to other types if specified. + * Creates a plain object from a Cve message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static - * @param {google.cloud.securitycenter.v2.Process} message Process + * @param {google.cloud.securitycenter.v2.Cve} message Cve * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Process.toObject = function toObject(message, options) { + Cve.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.libraries = []; - object.args = []; - object.envVariables = []; - } + if (options.arrays || options.defaults) + object.references = []; if (options.defaults) { - object.name = ""; - object.binary = null; - object.script = null; - object.argumentsTruncated = false; - object.envVariablesTruncated = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.pid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pid = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.parentPid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.parentPid = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.binary != null && message.hasOwnProperty("binary")) - object.binary = $root.google.cloud.securitycenter.v2.File.toObject(message.binary, options); - if (message.libraries && message.libraries.length) { - object.libraries = []; - for (var j = 0; j < message.libraries.length; ++j) - object.libraries[j] = $root.google.cloud.securitycenter.v2.File.toObject(message.libraries[j], options); - } - if (message.script != null && message.hasOwnProperty("script")) - object.script = $root.google.cloud.securitycenter.v2.File.toObject(message.script, options); - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; + object.id = ""; + object.cvssv3 = null; + object.upstreamFixAvailable = false; + object.impact = options.enums === String ? "RISK_RATING_UNSPECIFIED" : 0; + object.exploitationActivity = options.enums === String ? "EXPLOITATION_ACTIVITY_UNSPECIFIED" : 0; + object.observedInTheWild = false; + object.zeroDay = false; } - if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) - object.argumentsTruncated = message.argumentsTruncated; - if (message.envVariables && message.envVariables.length) { - object.envVariables = []; - for (var j = 0; j < message.envVariables.length; ++j) - object.envVariables[j] = $root.google.cloud.securitycenter.v2.EnvironmentVariable.toObject(message.envVariables[j], options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.securitycenter.v2.Reference.toObject(message.references[j], options); } - if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) - object.envVariablesTruncated = message.envVariablesTruncated; - if (message.pid != null && message.hasOwnProperty("pid")) - if (typeof message.pid === "number") - object.pid = options.longs === String ? String(message.pid) : message.pid; - else - object.pid = options.longs === String ? $util.Long.prototype.toString.call(message.pid) : options.longs === Number ? new $util.LongBits(message.pid.low >>> 0, message.pid.high >>> 0).toNumber() : message.pid; - if (message.parentPid != null && message.hasOwnProperty("parentPid")) - if (typeof message.parentPid === "number") - object.parentPid = options.longs === String ? String(message.parentPid) : message.parentPid; - else - object.parentPid = options.longs === String ? $util.Long.prototype.toString.call(message.parentPid) : options.longs === Number ? new $util.LongBits(message.parentPid.low >>> 0, message.parentPid.high >>> 0).toNumber() : message.parentPid; + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) + object.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.toObject(message.cvssv3, options); + if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) + object.upstreamFixAvailable = message.upstreamFixAvailable; + if (message.impact != null && message.hasOwnProperty("impact")) + object.impact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cve.RiskRating[message.impact] === undefined ? message.impact : $root.google.cloud.securitycenter.v2.Cve.RiskRating[message.impact] : message.impact; + if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) + object.exploitationActivity = options.enums === String ? $root.google.cloud.securitycenter.v2.Cve.ExploitationActivity[message.exploitationActivity] === undefined ? message.exploitationActivity : $root.google.cloud.securitycenter.v2.Cve.ExploitationActivity[message.exploitationActivity] : message.exploitationActivity; + if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) + object.observedInTheWild = message.observedInTheWild; + if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) + object.zeroDay = message.zeroDay; return object; }; /** - * Converts this Process to JSON. + * Converts this Cve to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @instance * @returns {Object.} JSON object */ - Process.prototype.toJSON = function toJSON() { + Cve.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Process + * Gets the default type url for Cve * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Process + * @memberof google.cloud.securitycenter.v2.Cve * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Process.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Cve.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Process"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Cve"; }; - return Process; + /** + * RiskRating enum. + * @name google.cloud.securitycenter.v2.Cve.RiskRating + * @enum {number} + * @property {number} RISK_RATING_UNSPECIFIED=0 RISK_RATING_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + * @property {number} CRITICAL=4 CRITICAL value + */ + Cve.RiskRating = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RISK_RATING_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + values[valuesById[4] = "CRITICAL"] = 4; + return values; + })(); + + /** + * ExploitationActivity enum. + * @name google.cloud.securitycenter.v2.Cve.ExploitationActivity + * @enum {number} + * @property {number} EXPLOITATION_ACTIVITY_UNSPECIFIED=0 EXPLOITATION_ACTIVITY_UNSPECIFIED value + * @property {number} WIDE=1 WIDE value + * @property {number} CONFIRMED=2 CONFIRMED value + * @property {number} AVAILABLE=3 AVAILABLE value + * @property {number} ANTICIPATED=4 ANTICIPATED value + * @property {number} NO_KNOWN=5 NO_KNOWN value + */ + Cve.ExploitationActivity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXPLOITATION_ACTIVITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "WIDE"] = 1; + values[valuesById[2] = "CONFIRMED"] = 2; + values[valuesById[3] = "AVAILABLE"] = 3; + values[valuesById[4] = "ANTICIPATED"] = 4; + values[valuesById[5] = "NO_KNOWN"] = 5; + return values; + })(); + + return Cve; })(); - v2.EnvironmentVariable = (function() { + v2.Reference = (function() { /** - * Properties of an EnvironmentVariable. + * Properties of a Reference. * @memberof google.cloud.securitycenter.v2 - * @interface IEnvironmentVariable - * @property {string|null} [name] EnvironmentVariable name - * @property {string|null} [val] EnvironmentVariable val + * @interface IReference + * @property {string|null} [source] Reference source + * @property {string|null} [uri] Reference uri */ /** - * Constructs a new EnvironmentVariable. + * Constructs a new Reference. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents an EnvironmentVariable. - * @implements IEnvironmentVariable + * @classdesc Represents a Reference. + * @implements IReference * @constructor - * @param {google.cloud.securitycenter.v2.IEnvironmentVariable=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IReference=} [properties] Properties to set */ - function EnvironmentVariable(properties) { + function Reference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84912,89 +88807,89 @@ } /** - * EnvironmentVariable name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * Reference source. + * @member {string} source + * @memberof google.cloud.securitycenter.v2.Reference * @instance */ - EnvironmentVariable.prototype.name = ""; + Reference.prototype.source = ""; /** - * EnvironmentVariable val. - * @member {string} val - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * Reference uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v2.Reference * @instance */ - EnvironmentVariable.prototype.val = ""; + Reference.prototype.uri = ""; /** - * Creates a new EnvironmentVariable instance using the specified properties. + * Creates a new Reference instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static - * @param {google.cloud.securitycenter.v2.IEnvironmentVariable=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable instance + * @param {google.cloud.securitycenter.v2.IReference=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Reference} Reference instance */ - EnvironmentVariable.create = function create(properties) { - return new EnvironmentVariable(properties); + Reference.create = function create(properties) { + return new Reference(properties); }; /** - * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static - * @param {google.cloud.securitycenter.v2.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {google.cloud.securitycenter.v2.IReference} message Reference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentVariable.encode = function encode(message, writer) { + Reference.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.val != null && Object.hasOwnProperty.call(message, "val")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.val); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); return writer; }; /** - * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.EnvironmentVariable.verify|verify} messages. + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static - * @param {google.cloud.securitycenter.v2.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {google.cloud.securitycenter.v2.IReference} message Reference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentVariable.encodeDelimited = function encodeDelimited(message, writer) { + Reference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer. + * Decodes a Reference message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + * @returns {google.cloud.securitycenter.v2.Reference} Reference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentVariable.decode = function decode(reader, length) { + Reference.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.cloud.securitycenter.v2.EnvironmentVariable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Reference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.source = reader.string(); break; } case 2: { - message.val = reader.string(); + message.uri = reader.string(); break; } default: @@ -85006,134 +88901,139 @@ }; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * Decodes a Reference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + * @returns {google.cloud.securitycenter.v2.Reference} Reference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentVariable.decodeDelimited = function decodeDelimited(reader) { + Reference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnvironmentVariable message. + * Verifies a Reference message. * @function verify - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnvironmentVariable.verify = function verify(message) { + Reference.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.val != null && message.hasOwnProperty("val")) - if (!$util.isString(message.val)) - return "val: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates an EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * Creates a Reference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.EnvironmentVariable} EnvironmentVariable + * @returns {google.cloud.securitycenter.v2.Reference} Reference */ - EnvironmentVariable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.EnvironmentVariable) + Reference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Reference) return object; - var message = new $root.google.cloud.securitycenter.v2.EnvironmentVariable(); - if (object.name != null) - message.name = String(object.name); - if (object.val != null) - message.val = String(object.val); + var message = new $root.google.cloud.securitycenter.v2.Reference(); + if (object.source != null) + message.source = String(object.source); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. + * Creates a plain object from a Reference message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static - * @param {google.cloud.securitycenter.v2.EnvironmentVariable} message EnvironmentVariable + * @param {google.cloud.securitycenter.v2.Reference} message Reference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnvironmentVariable.toObject = function toObject(message, options) { + Reference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.val = ""; + object.source = ""; + object.uri = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.val != null && message.hasOwnProperty("val")) - object.val = message.val; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this EnvironmentVariable to JSON. + * Converts this Reference to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @instance * @returns {Object.} JSON object */ - EnvironmentVariable.prototype.toJSON = function toJSON() { + Reference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnvironmentVariable + * Gets the default type url for Reference * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.EnvironmentVariable + * @memberof google.cloud.securitycenter.v2.Reference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnvironmentVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.EnvironmentVariable"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Reference"; }; - return EnvironmentVariable; + return Reference; })(); - v2.SecurityMarks = (function() { + v2.Cvssv3 = (function() { /** - * Properties of a SecurityMarks. + * Properties of a Cvssv3. * @memberof google.cloud.securitycenter.v2 - * @interface ISecurityMarks - * @property {string|null} [name] SecurityMarks name - * @property {Object.|null} [marks] SecurityMarks marks - * @property {string|null} [canonicalName] SecurityMarks canonicalName + * @interface ICvssv3 + * @property {number|null} [baseScore] Cvssv3 baseScore + * @property {google.cloud.securitycenter.v2.Cvssv3.AttackVector|null} [attackVector] Cvssv3 attackVector + * @property {google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|null} [attackComplexity] Cvssv3 attackComplexity + * @property {google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|null} [privilegesRequired] Cvssv3 privilegesRequired + * @property {google.cloud.securitycenter.v2.Cvssv3.UserInteraction|null} [userInteraction] Cvssv3 userInteraction + * @property {google.cloud.securitycenter.v2.Cvssv3.Scope|null} [scope] Cvssv3 scope + * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [confidentialityImpact] Cvssv3 confidentialityImpact + * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [integrityImpact] Cvssv3 integrityImpact + * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [availabilityImpact] Cvssv3 availabilityImpact */ /** - * Constructs a new SecurityMarks. + * Constructs a new Cvssv3. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a SecurityMarks. - * @implements ISecurityMarks + * @classdesc Represents a Cvssv3. + * @implements ICvssv3 * @constructor - * @param {google.cloud.securitycenter.v2.ISecurityMarks=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ICvssv3=} [properties] Properties to set */ - function SecurityMarks(properties) { - this.marks = {}; + function Cvssv3(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85141,123 +89041,187 @@ } /** - * SecurityMarks name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * Cvssv3 baseScore. + * @member {number} baseScore + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @instance */ - SecurityMarks.prototype.name = ""; + Cvssv3.prototype.baseScore = 0; /** - * SecurityMarks marks. - * @member {Object.} marks - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * Cvssv3 attackVector. + * @member {google.cloud.securitycenter.v2.Cvssv3.AttackVector} attackVector + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @instance */ - SecurityMarks.prototype.marks = $util.emptyObject; + Cvssv3.prototype.attackVector = 0; /** - * SecurityMarks canonicalName. - * @member {string} canonicalName - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * Cvssv3 attackComplexity. + * @member {google.cloud.securitycenter.v2.Cvssv3.AttackComplexity} attackComplexity + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @instance */ - SecurityMarks.prototype.canonicalName = ""; + Cvssv3.prototype.attackComplexity = 0; /** - * Creates a new SecurityMarks instance using the specified properties. + * Cvssv3 privilegesRequired. + * @member {google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired} privilegesRequired + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.privilegesRequired = 0; + + /** + * Cvssv3 userInteraction. + * @member {google.cloud.securitycenter.v2.Cvssv3.UserInteraction} userInteraction + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.userInteraction = 0; + + /** + * Cvssv3 scope. + * @member {google.cloud.securitycenter.v2.Cvssv3.Scope} scope + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.scope = 0; + + /** + * Cvssv3 confidentialityImpact. + * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} confidentialityImpact + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.confidentialityImpact = 0; + + /** + * Cvssv3 integrityImpact. + * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} integrityImpact + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.integrityImpact = 0; + + /** + * Cvssv3 availabilityImpact. + * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} availabilityImpact + * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @instance + */ + Cvssv3.prototype.availabilityImpact = 0; + + /** + * Creates a new Cvssv3 instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static - * @param {google.cloud.securitycenter.v2.ISecurityMarks=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks instance + * @param {google.cloud.securitycenter.v2.ICvssv3=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 instance */ - SecurityMarks.create = function create(properties) { - return new SecurityMarks(properties); + Cvssv3.create = function create(properties) { + return new Cvssv3(properties); }; /** - * Encodes the specified SecurityMarks message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static - * @param {google.cloud.securitycenter.v2.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICvssv3} message Cvssv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityMarks.encode = function encode(message, writer) { + Cvssv3.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.marks != null && Object.hasOwnProperty.call(message, "marks")) - for (var keys = Object.keys(message.marks), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.marks[keys[i]]).ldelim(); - if (message.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalName); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.baseScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.availabilityImpact); return writer; }; /** - * Encodes the specified SecurityMarks message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityMarks.verify|verify} messages. + * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static - * @param {google.cloud.securitycenter.v2.ISecurityMarks} message SecurityMarks message or plain object to encode + * @param {google.cloud.securitycenter.v2.ICvssv3} message Cvssv3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityMarks.encodeDelimited = function encodeDelimited(message, writer) { + Cvssv3.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityMarks message from the specified reader or buffer. + * Decodes a Cvssv3 message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decode = function decode(reader, length) { + Cvssv3.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.cloud.securitycenter.v2.SecurityMarks(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Cvssv3(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.baseScore = reader.double(); + break; + } + case 2: { + message.attackVector = reader.int32(); + break; + } + case 3: { + message.attackComplexity = reader.int32(); + break; + } + case 4: { + message.privilegesRequired = reader.int32(); break; } - case 2: { - if (message.marks === $util.emptyObject) - message.marks = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.marks[key] = value; + case 5: { + message.userInteraction = reader.int32(); break; } - case 3: { - message.canonicalName = reader.string(); + case 6: { + message.scope = reader.int32(); + break; + } + case 7: { + message.confidentialityImpact = reader.int32(); + break; + } + case 8: { + message.integrityImpact = reader.int32(); + break; + } + case 9: { + message.availabilityImpact = reader.int32(); break; } default: @@ -85269,162 +89233,516 @@ }; /** - * Decodes a SecurityMarks message from the specified reader or buffer, length delimited. + * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityMarks.decodeDelimited = function decodeDelimited(reader) { + Cvssv3.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityMarks message. + * Verifies a Cvssv3 message. * @function verify - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityMarks.verify = function verify(message) { + Cvssv3.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.marks != null && message.hasOwnProperty("marks")) { - if (!$util.isObject(message.marks)) - return "marks: object expected"; - var key = Object.keys(message.marks); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.marks[key[i]])) - return "marks: string{k:string} expected"; - } - if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) - if (!$util.isString(message.canonicalName)) - return "canonicalName: string expected"; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a SecurityMarks message from a plain object. Also converts values to their respective internal types. + * Creates a Cvssv3 message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.SecurityMarks} SecurityMarks + * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 */ - SecurityMarks.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.SecurityMarks) + Cvssv3.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Cvssv3) return object; - var message = new $root.google.cloud.securitycenter.v2.SecurityMarks(); - if (object.name != null) - message.name = String(object.name); - if (object.marks) { - if (typeof object.marks !== "object") - throw TypeError(".google.cloud.securitycenter.v2.SecurityMarks.marks: object expected"); - message.marks = {}; - for (var keys = Object.keys(object.marks), i = 0; i < keys.length; ++i) - message.marks[keys[i]] = String(object.marks[keys[i]]); + var message = new $root.google.cloud.securitycenter.v2.Cvssv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + switch (object.attackVector) { + default: + if (typeof object.attackVector === "number") { + message.attackVector = object.attackVector; + break; + } + break; + case "ATTACK_VECTOR_UNSPECIFIED": + case 0: + message.attackVector = 0; + break; + case "ATTACK_VECTOR_NETWORK": + case 1: + message.attackVector = 1; + break; + case "ATTACK_VECTOR_ADJACENT": + case 2: + message.attackVector = 2; + break; + case "ATTACK_VECTOR_LOCAL": + case 3: + message.attackVector = 3; + break; + case "ATTACK_VECTOR_PHYSICAL": + case 4: + message.attackVector = 4; + break; + } + switch (object.attackComplexity) { + default: + if (typeof object.attackComplexity === "number") { + message.attackComplexity = object.attackComplexity; + break; + } + break; + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; + break; + } + switch (object.privilegesRequired) { + default: + if (typeof object.privilegesRequired === "number") { + message.privilegesRequired = object.privilegesRequired; + break; + } + break; + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; + } + switch (object.userInteraction) { + default: + if (typeof object.userInteraction === "number") { + message.userInteraction = object.userInteraction; + break; + } + break; + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; + } + switch (object.confidentialityImpact) { + default: + if (typeof object.confidentialityImpact === "number") { + message.confidentialityImpact = object.confidentialityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; + } + switch (object.integrityImpact) { + default: + if (typeof object.integrityImpact === "number") { + message.integrityImpact = object.integrityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + default: + if (typeof object.availabilityImpact === "number") { + message.availabilityImpact = object.availabilityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; } - if (object.canonicalName != null) - message.canonicalName = String(object.canonicalName); return message; }; /** - * Creates a plain object from a SecurityMarks message. Also converts values to other types if specified. + * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static - * @param {google.cloud.securitycenter.v2.SecurityMarks} message SecurityMarks + * @param {google.cloud.securitycenter.v2.Cvssv3} message Cvssv3 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityMarks.toObject = function toObject(message, options) { + Cvssv3.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.marks = {}; if (options.defaults) { - object.name = ""; - object.canonicalName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.marks && (keys2 = Object.keys(message.marks)).length) { - object.marks = {}; - for (var j = 0; j < keys2.length; ++j) - object.marks[keys2[j]] = message.marks[keys2[j]]; + object.baseScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; } - if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) - object.canonicalName = message.canonicalName; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.securitycenter.v2.Cvssv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.securitycenter.v2.Cvssv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.securitycenter.v2.Cvssv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; /** - * Converts this SecurityMarks to JSON. + * Converts this Cvssv3 to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @instance * @returns {Object.} JSON object */ - SecurityMarks.prototype.toJSON = function toJSON() { + Cvssv3.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityMarks + * Gets the default type url for Cvssv3 * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.SecurityMarks + * @memberof google.cloud.securitycenter.v2.Cvssv3 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityMarks.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Cvssv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityMarks"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Cvssv3"; }; - return SecurityMarks; + /** + * AttackVector enum. + * @name google.cloud.securitycenter.v2.Cvssv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + Cvssv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); + + /** + * AttackComplexity enum. + * @name google.cloud.securitycenter.v2.Cvssv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + Cvssv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); + + /** + * PrivilegesRequired enum. + * @name google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + Cvssv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); + + /** + * UserInteraction enum. + * @name google.cloud.securitycenter.v2.Cvssv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + Cvssv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.securitycenter.v2.Cvssv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + Cvssv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); + + /** + * Impact enum. + * @name google.cloud.securitycenter.v2.Cvssv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + Cvssv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); + + return Cvssv3; })(); - v2.SecurityPosture = (function() { + v2.Package = (function() { /** - * Properties of a SecurityPosture. + * Properties of a Package. * @memberof google.cloud.securitycenter.v2 - * @interface ISecurityPosture - * @property {string|null} [name] SecurityPosture name - * @property {string|null} [revisionId] SecurityPosture revisionId - * @property {string|null} [postureDeploymentResource] SecurityPosture postureDeploymentResource - * @property {string|null} [postureDeployment] SecurityPosture postureDeployment - * @property {string|null} [changedPolicy] SecurityPosture changedPolicy - * @property {string|null} [policySet] SecurityPosture policySet - * @property {string|null} [policy] SecurityPosture policy - * @property {Array.|null} [policyDriftDetails] SecurityPosture policyDriftDetails + * @interface IPackage + * @property {string|null} [packageName] Package packageName + * @property {string|null} [cpeUri] Package cpeUri + * @property {string|null} [packageType] Package packageType + * @property {string|null} [packageVersion] Package packageVersion */ /** - * Constructs a new SecurityPosture. + * Constructs a new Package. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a SecurityPosture. - * @implements ISecurityPosture + * @classdesc Represents a Package. + * @implements IPackage * @constructor - * @param {google.cloud.securitycenter.v2.ISecurityPosture=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IPackage=} [properties] Properties to set */ - function SecurityPosture(properties) { - this.policyDriftDetails = []; + function Package(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85432,630 +89750,271 @@ } /** - * SecurityPosture name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @instance - */ - SecurityPosture.prototype.name = ""; - - /** - * SecurityPosture revisionId. - * @member {string} revisionId - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @instance - */ - SecurityPosture.prototype.revisionId = ""; - - /** - * SecurityPosture postureDeploymentResource. - * @member {string} postureDeploymentResource - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @instance - */ - SecurityPosture.prototype.postureDeploymentResource = ""; - - /** - * SecurityPosture postureDeployment. - * @member {string} postureDeployment - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @instance - */ - SecurityPosture.prototype.postureDeployment = ""; - - /** - * SecurityPosture changedPolicy. - * @member {string} changedPolicy - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * Package packageName. + * @member {string} packageName + * @memberof google.cloud.securitycenter.v2.Package * @instance */ - SecurityPosture.prototype.changedPolicy = ""; + Package.prototype.packageName = ""; /** - * SecurityPosture policySet. - * @member {string} policySet - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * Package cpeUri. + * @member {string} cpeUri + * @memberof google.cloud.securitycenter.v2.Package * @instance */ - SecurityPosture.prototype.policySet = ""; + Package.prototype.cpeUri = ""; /** - * SecurityPosture policy. - * @member {string} policy - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * Package packageType. + * @member {string} packageType + * @memberof google.cloud.securitycenter.v2.Package * @instance */ - SecurityPosture.prototype.policy = ""; + Package.prototype.packageType = ""; /** - * SecurityPosture policyDriftDetails. - * @member {Array.} policyDriftDetails - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * Package packageVersion. + * @member {string} packageVersion + * @memberof google.cloud.securitycenter.v2.Package * @instance */ - SecurityPosture.prototype.policyDriftDetails = $util.emptyArray; + Package.prototype.packageVersion = ""; /** - * Creates a new SecurityPosture instance using the specified properties. + * Creates a new Package instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @memberof google.cloud.securitycenter.v2.Package * @static - * @param {google.cloud.securitycenter.v2.ISecurityPosture=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture instance + * @param {google.cloud.securitycenter.v2.IPackage=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Package} Package instance */ - SecurityPosture.create = function create(properties) { - return new SecurityPosture(properties); + Package.create = function create(properties) { + return new Package(properties); }; /** - * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @memberof google.cloud.securitycenter.v2.Package * @static - * @param {google.cloud.securitycenter.v2.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {google.cloud.securitycenter.v2.IPackage} message Package message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPosture.encode = function encode(message, writer) { + Package.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - if (message.postureDeploymentResource != null && Object.hasOwnProperty.call(message, "postureDeploymentResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.postureDeploymentResource); - if (message.postureDeployment != null && Object.hasOwnProperty.call(message, "postureDeployment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.postureDeployment); - if (message.changedPolicy != null && Object.hasOwnProperty.call(message, "changedPolicy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.changedPolicy); - if (message.policySet != null && Object.hasOwnProperty.call(message, "policySet")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.policySet); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.policy); - if (message.policyDriftDetails != null && message.policyDriftDetails.length) - for (var i = 0; i < message.policyDriftDetails.length; ++i) - $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.encode(message.policyDriftDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageName); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cpeUri); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); + if (message.packageVersion != null && Object.hasOwnProperty.call(message, "packageVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageVersion); return writer; }; /** - * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.verify|verify} messages. + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @memberof google.cloud.securitycenter.v2.Package * @static - * @param {google.cloud.securitycenter.v2.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {google.cloud.securitycenter.v2.IPackage} message Package message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPosture.encodeDelimited = function encodeDelimited(message, writer) { + Package.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityPosture message from the specified reader or buffer. + * Decodes a Package message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.SecurityPosture + * @memberof google.cloud.securitycenter.v2.Package * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture + * @returns {google.cloud.securitycenter.v2.Package} Package * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityPosture.decode = function decode(reader, length) { + Package.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.cloud.securitycenter.v2.SecurityPosture(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Package(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.revisionId = reader.string(); - break; - } - case 3: { - message.postureDeploymentResource = reader.string(); - break; - } - case 4: { - message.postureDeployment = reader.string(); - break; - } - case 5: { - message.changedPolicy = reader.string(); - break; - } - case 6: { - message.policySet = reader.string(); - break; - } - case 7: { - message.policy = reader.string(); - break; - } - case 8: { - if (!(message.policyDriftDetails && message.policyDriftDetails.length)) - message.policyDriftDetails = []; - message.policyDriftDetails.push($root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPosture.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityPosture message. - * @function verify - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityPosture.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.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) - if (!$util.isString(message.postureDeploymentResource)) - return "postureDeploymentResource: string expected"; - if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) - if (!$util.isString(message.postureDeployment)) - return "postureDeployment: string expected"; - if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) - if (!$util.isString(message.changedPolicy)) - return "changedPolicy: string expected"; - if (message.policySet != null && message.hasOwnProperty("policySet")) - if (!$util.isString(message.policySet)) - return "policySet: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyDriftDetails != null && message.hasOwnProperty("policyDriftDetails")) { - if (!Array.isArray(message.policyDriftDetails)) - return "policyDriftDetails: array expected"; - for (var i = 0; i < message.policyDriftDetails.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify(message.policyDriftDetails[i]); - if (error) - return "policyDriftDetails." + error; - } - } - return null; - }; - - /** - * Creates a SecurityPosture message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.SecurityPosture} SecurityPosture - */ - SecurityPosture.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.SecurityPosture) - return object; - var message = new $root.google.cloud.securitycenter.v2.SecurityPosture(); - if (object.name != null) - message.name = String(object.name); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.postureDeploymentResource != null) - message.postureDeploymentResource = String(object.postureDeploymentResource); - if (object.postureDeployment != null) - message.postureDeployment = String(object.postureDeployment); - if (object.changedPolicy != null) - message.changedPolicy = String(object.changedPolicy); - if (object.policySet != null) - message.policySet = String(object.policySet); - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyDriftDetails) { - if (!Array.isArray(object.policyDriftDetails)) - throw TypeError(".google.cloud.securitycenter.v2.SecurityPosture.policyDriftDetails: array expected"); - message.policyDriftDetails = []; - for (var i = 0; i < object.policyDriftDetails.length; ++i) { - if (typeof object.policyDriftDetails[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.SecurityPosture.policyDriftDetails: object expected"); - message.policyDriftDetails[i] = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.fromObject(object.policyDriftDetails[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @static - * @param {google.cloud.securitycenter.v2.SecurityPosture} message SecurityPosture - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityPosture.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.policyDriftDetails = []; - if (options.defaults) { - object.name = ""; - object.revisionId = ""; - object.postureDeploymentResource = ""; - object.postureDeployment = ""; - object.changedPolicy = ""; - object.policySet = ""; - object.policy = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) - object.postureDeploymentResource = message.postureDeploymentResource; - if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) - object.postureDeployment = message.postureDeployment; - if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) - object.changedPolicy = message.changedPolicy; - if (message.policySet != null && message.hasOwnProperty("policySet")) - object.policySet = message.policySet; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.policyDriftDetails && message.policyDriftDetails.length) { - object.policyDriftDetails = []; - for (var j = 0; j < message.policyDriftDetails.length; ++j) - object.policyDriftDetails[j] = $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.toObject(message.policyDriftDetails[j], options); - } - return object; - }; - - /** - * Converts this SecurityPosture to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @instance - * @returns {Object.} JSON object - */ - SecurityPosture.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityPosture - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityPosture.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityPosture"; - }; - - SecurityPosture.PolicyDriftDetails = (function() { - - /** - * Properties of a PolicyDriftDetails. - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @interface IPolicyDriftDetails - * @property {string|null} [field] PolicyDriftDetails field - * @property {string|null} [expectedValue] PolicyDriftDetails expectedValue - * @property {string|null} [detectedValue] PolicyDriftDetails detectedValue - */ - - /** - * Constructs a new PolicyDriftDetails. - * @memberof google.cloud.securitycenter.v2.SecurityPosture - * @classdesc Represents a PolicyDriftDetails. - * @implements IPolicyDriftDetails - * @constructor - * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set - */ - function PolicyDriftDetails(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]]; - } - - /** - * PolicyDriftDetails field. - * @member {string} field - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.field = ""; - - /** - * PolicyDriftDetails expectedValue. - * @member {string} expectedValue - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.expectedValue = ""; - - /** - * PolicyDriftDetails detectedValue. - * @member {string} detectedValue - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.detectedValue = ""; - - /** - * Creates a new PolicyDriftDetails instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails instance - */ - PolicyDriftDetails.create = function create(properties) { - return new PolicyDriftDetails(properties); - }; - - /** - * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDriftDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); - if (message.detectedValue != null && Object.hasOwnProperty.call(message, "detectedValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.detectedValue); - return writer; - }; - - /** - * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v2.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDriftDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDriftDetails.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.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.expectedValue = reader.string(); - break; - } - case 3: { - message.detectedValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + case 1: { + message.packageName = reader.string(); + break; + } + case 2: { + message.cpeUri = reader.string(); + break; + } + case 3: { + message.packageType = reader.string(); + break; + } + case 4: { + message.packageVersion = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDriftDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a PolicyDriftDetails message. - * @function verify - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDriftDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - if (!$util.isString(message.expectedValue)) - return "expectedValue: string expected"; - if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) - if (!$util.isString(message.detectedValue)) - return "detectedValue: string expected"; - return null; - }; + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - */ - PolicyDriftDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails) - return object; - var message = new $root.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails(); - if (object.field != null) - message.field = String(object.field); - if (object.expectedValue != null) - message.expectedValue = String(object.expectedValue); - if (object.detectedValue != null) - message.detectedValue = String(object.detectedValue); - return message; - }; + /** + * Verifies a Package message. + * @function verify + * @memberof google.cloud.securitycenter.v2.Package + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Package.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + if (!$util.isString(message.packageType)) + return "packageType: string expected"; + if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) + if (!$util.isString(message.packageVersion)) + return "packageVersion: string expected"; + return null; + }; - /** - * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails} message PolicyDriftDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDriftDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = ""; - object.expectedValue = ""; - object.detectedValue = ""; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - object.expectedValue = message.expectedValue; - if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) - object.detectedValue = message.detectedValue; + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.Package + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.Package} Package + */ + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Package) return object; - }; + var message = new $root.google.cloud.securitycenter.v2.Package(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.packageType != null) + message.packageType = String(object.packageType); + if (object.packageVersion != null) + message.packageVersion = String(object.packageVersion); + return message; + }; - /** - * Converts this PolicyDriftDetails to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @instance - * @returns {Object.} JSON object - */ - PolicyDriftDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.Package + * @static + * @param {google.cloud.securitycenter.v2.Package} message Package + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Package.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packageName = ""; + object.cpeUri = ""; + object.packageType = ""; + object.packageVersion = ""; + } + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = message.packageType; + if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) + object.packageVersion = message.packageVersion; + return object; + }; - /** - * Gets the default type url for PolicyDriftDetails - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDriftDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails"; - }; + /** + * Converts this Package to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.Package + * @instance + * @returns {Object.} JSON object + */ + Package.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PolicyDriftDetails; - })(); + /** + * Gets the default type url for Package + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.Package + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Package"; + }; - return SecurityPosture; + return Package; })(); - v2.ToxicCombination = (function() { + v2.SecurityBulletin = (function() { /** - * Properties of a ToxicCombination. + * Properties of a SecurityBulletin. * @memberof google.cloud.securitycenter.v2 - * @interface IToxicCombination - * @property {number|null} [attackExposureScore] ToxicCombination attackExposureScore - * @property {Array.|null} [relatedFindings] ToxicCombination relatedFindings + * @interface ISecurityBulletin + * @property {string|null} [bulletinId] SecurityBulletin bulletinId + * @property {google.protobuf.ITimestamp|null} [submissionTime] SecurityBulletin submissionTime + * @property {string|null} [suggestedUpgradeVersion] SecurityBulletin suggestedUpgradeVersion */ /** - * Constructs a new ToxicCombination. + * Constructs a new SecurityBulletin. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a ToxicCombination. - * @implements IToxicCombination + * @classdesc Represents a SecurityBulletin. + * @implements ISecurityBulletin * @constructor - * @param {google.cloud.securitycenter.v2.IToxicCombination=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.ISecurityBulletin=} [properties] Properties to set */ - function ToxicCombination(properties) { - this.relatedFindings = []; + function SecurityBulletin(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86063,92 +90022,103 @@ } /** - * ToxicCombination attackExposureScore. - * @member {number} attackExposureScore - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * SecurityBulletin bulletinId. + * @member {string} bulletinId + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @instance */ - ToxicCombination.prototype.attackExposureScore = 0; + SecurityBulletin.prototype.bulletinId = ""; /** - * ToxicCombination relatedFindings. - * @member {Array.} relatedFindings - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * SecurityBulletin submissionTime. + * @member {google.protobuf.ITimestamp|null|undefined} submissionTime + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @instance */ - ToxicCombination.prototype.relatedFindings = $util.emptyArray; + SecurityBulletin.prototype.submissionTime = null; /** - * Creates a new ToxicCombination instance using the specified properties. + * SecurityBulletin suggestedUpgradeVersion. + * @member {string} suggestedUpgradeVersion + * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @instance + */ + SecurityBulletin.prototype.suggestedUpgradeVersion = ""; + + /** + * Creates a new SecurityBulletin instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static - * @param {google.cloud.securitycenter.v2.IToxicCombination=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination instance + * @param {google.cloud.securitycenter.v2.ISecurityBulletin=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin instance */ - ToxicCombination.create = function create(properties) { - return new ToxicCombination(properties); + SecurityBulletin.create = function create(properties) { + return new SecurityBulletin(properties); }; /** - * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static - * @param {google.cloud.securitycenter.v2.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {google.cloud.securitycenter.v2.ISecurityBulletin} message SecurityBulletin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToxicCombination.encode = function encode(message, writer) { + SecurityBulletin.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.attackExposureScore != null && Object.hasOwnProperty.call(message, "attackExposureScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.attackExposureScore); - if (message.relatedFindings != null && message.relatedFindings.length) - for (var i = 0; i < message.relatedFindings.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relatedFindings[i]); + if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bulletinId); + if (message.submissionTime != null && Object.hasOwnProperty.call(message, "submissionTime")) + $root.google.protobuf.Timestamp.encode(message.submissionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.suggestedUpgradeVersion != null && Object.hasOwnProperty.call(message, "suggestedUpgradeVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.suggestedUpgradeVersion); return writer; }; /** - * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ToxicCombination.verify|verify} messages. + * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static - * @param {google.cloud.securitycenter.v2.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {google.cloud.securitycenter.v2.ISecurityBulletin} message SecurityBulletin message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToxicCombination.encodeDelimited = function encodeDelimited(message, writer) { + SecurityBulletin.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ToxicCombination message from the specified reader or buffer. + * Decodes a SecurityBulletin message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToxicCombination.decode = function decode(reader, length) { + SecurityBulletin.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.cloud.securitycenter.v2.ToxicCombination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.SecurityBulletin(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.attackExposureScore = reader.double(); + message.bulletinId = reader.string(); break; } case 2: { - if (!(message.relatedFindings && message.relatedFindings.length)) - message.relatedFindings = []; - message.relatedFindings.push(reader.string()); + message.submissionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.suggestedUpgradeVersion = reader.string(); break; } default: @@ -86160,146 +90130,145 @@ }; /** - * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToxicCombination.decodeDelimited = function decodeDelimited(reader) { + SecurityBulletin.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ToxicCombination message. + * Verifies a SecurityBulletin message. * @function verify - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ToxicCombination.verify = function verify(message) { + SecurityBulletin.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) - if (typeof message.attackExposureScore !== "number") - return "attackExposureScore: number expected"; - if (message.relatedFindings != null && message.hasOwnProperty("relatedFindings")) { - if (!Array.isArray(message.relatedFindings)) - return "relatedFindings: array expected"; - for (var i = 0; i < message.relatedFindings.length; ++i) - if (!$util.isString(message.relatedFindings[i])) - return "relatedFindings: string[] expected"; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + if (!$util.isString(message.bulletinId)) + return "bulletinId: string expected"; + if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.submissionTime); + if (error) + return "submissionTime." + error; } + if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) + if (!$util.isString(message.suggestedUpgradeVersion)) + return "suggestedUpgradeVersion: string expected"; return null; }; /** - * Creates a ToxicCombination message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityBulletin message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin */ - ToxicCombination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.ToxicCombination) + SecurityBulletin.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.SecurityBulletin) return object; - var message = new $root.google.cloud.securitycenter.v2.ToxicCombination(); - if (object.attackExposureScore != null) - message.attackExposureScore = Number(object.attackExposureScore); - if (object.relatedFindings) { - if (!Array.isArray(object.relatedFindings)) - throw TypeError(".google.cloud.securitycenter.v2.ToxicCombination.relatedFindings: array expected"); - message.relatedFindings = []; - for (var i = 0; i < object.relatedFindings.length; ++i) - message.relatedFindings[i] = String(object.relatedFindings[i]); + var message = new $root.google.cloud.securitycenter.v2.SecurityBulletin(); + if (object.bulletinId != null) + message.bulletinId = String(object.bulletinId); + if (object.submissionTime != null) { + if (typeof object.submissionTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.SecurityBulletin.submissionTime: object expected"); + message.submissionTime = $root.google.protobuf.Timestamp.fromObject(object.submissionTime); } + if (object.suggestedUpgradeVersion != null) + message.suggestedUpgradeVersion = String(object.suggestedUpgradeVersion); return message; }; /** - * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. + * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static - * @param {google.cloud.securitycenter.v2.ToxicCombination} message ToxicCombination + * @param {google.cloud.securitycenter.v2.SecurityBulletin} message SecurityBulletin * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ToxicCombination.toObject = function toObject(message, options) { + SecurityBulletin.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.relatedFindings = []; - if (options.defaults) - object.attackExposureScore = 0; - if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) - object.attackExposureScore = options.json && !isFinite(message.attackExposureScore) ? String(message.attackExposureScore) : message.attackExposureScore; - if (message.relatedFindings && message.relatedFindings.length) { - object.relatedFindings = []; - for (var j = 0; j < message.relatedFindings.length; ++j) - object.relatedFindings[j] = message.relatedFindings[j]; + if (options.defaults) { + object.bulletinId = ""; + object.submissionTime = null; + object.suggestedUpgradeVersion = ""; } + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + object.bulletinId = message.bulletinId; + if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) + object.submissionTime = $root.google.protobuf.Timestamp.toObject(message.submissionTime, options); + if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) + object.suggestedUpgradeVersion = message.suggestedUpgradeVersion; return object; }; /** - * Converts this ToxicCombination to JSON. + * Converts this SecurityBulletin to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @instance * @returns {Object.} JSON object */ - ToxicCombination.prototype.toJSON = function toJSON() { + SecurityBulletin.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ToxicCombination + * Gets the default type url for SecurityBulletin * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.ToxicCombination + * @memberof google.cloud.securitycenter.v2.SecurityBulletin * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ToxicCombination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecurityBulletin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.ToxicCombination"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityBulletin"; }; - return ToxicCombination; + return SecurityBulletin; })(); - v2.Vulnerability = (function() { + v2.Folder = (function() { /** - * Properties of a Vulnerability. + * Properties of a Folder. * @memberof google.cloud.securitycenter.v2 - * @interface IVulnerability - * @property {google.cloud.securitycenter.v2.ICve|null} [cve] Vulnerability cve - * @property {google.cloud.securitycenter.v2.IPackage|null} [offendingPackage] Vulnerability offendingPackage - * @property {google.cloud.securitycenter.v2.IPackage|null} [fixedPackage] Vulnerability fixedPackage - * @property {google.cloud.securitycenter.v2.ISecurityBulletin|null} [securityBulletin] Vulnerability securityBulletin + * @interface IFolder + * @property {string|null} [resourceFolder] Folder resourceFolder + * @property {string|null} [resourceFolderDisplayName] Folder resourceFolderDisplayName */ /** - * Constructs a new Vulnerability. + * Constructs a new Folder. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Vulnerability. - * @implements IVulnerability + * @classdesc Represents a Folder. + * @implements IFolder * @constructor - * @param {google.cloud.securitycenter.v2.IVulnerability=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IFolder=} [properties] Properties to set */ - function Vulnerability(properties) { + function Folder(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86307,117 +90276,89 @@ } /** - * Vulnerability cve. - * @member {google.cloud.securitycenter.v2.ICve|null|undefined} cve - * @memberof google.cloud.securitycenter.v2.Vulnerability - * @instance - */ - Vulnerability.prototype.cve = null; - - /** - * Vulnerability offendingPackage. - * @member {google.cloud.securitycenter.v2.IPackage|null|undefined} offendingPackage - * @memberof google.cloud.securitycenter.v2.Vulnerability - * @instance - */ - Vulnerability.prototype.offendingPackage = null; - - /** - * Vulnerability fixedPackage. - * @member {google.cloud.securitycenter.v2.IPackage|null|undefined} fixedPackage - * @memberof google.cloud.securitycenter.v2.Vulnerability + * Folder resourceFolder. + * @member {string} resourceFolder + * @memberof google.cloud.securitycenter.v2.Folder * @instance */ - Vulnerability.prototype.fixedPackage = null; + Folder.prototype.resourceFolder = ""; /** - * Vulnerability securityBulletin. - * @member {google.cloud.securitycenter.v2.ISecurityBulletin|null|undefined} securityBulletin - * @memberof google.cloud.securitycenter.v2.Vulnerability + * Folder resourceFolderDisplayName. + * @member {string} resourceFolderDisplayName + * @memberof google.cloud.securitycenter.v2.Folder * @instance */ - Vulnerability.prototype.securityBulletin = null; + Folder.prototype.resourceFolderDisplayName = ""; /** - * Creates a new Vulnerability instance using the specified properties. + * Creates a new Folder instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static - * @param {google.cloud.securitycenter.v2.IVulnerability=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability instance + * @param {google.cloud.securitycenter.v2.IFolder=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Folder} Folder instance */ - Vulnerability.create = function create(properties) { - return new Vulnerability(properties); + Folder.create = function create(properties) { + return new Folder(properties); }; /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. + * Encodes the specified Folder message. Does not implicitly {@link google.cloud.securitycenter.v2.Folder.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static - * @param {google.cloud.securitycenter.v2.IVulnerability} message Vulnerability message or plain object to encode + * @param {google.cloud.securitycenter.v2.IFolder} message Folder message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vulnerability.encode = function encode(message, writer) { + Folder.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) - $root.google.cloud.securitycenter.v2.Cve.encode(message.cve, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.offendingPackage != null && Object.hasOwnProperty.call(message, "offendingPackage")) - $root.google.cloud.securitycenter.v2.Package.encode(message.offendingPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) - $root.google.cloud.securitycenter.v2.Package.encode(message.fixedPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.securityBulletin != null && Object.hasOwnProperty.call(message, "securityBulletin")) - $root.google.cloud.securitycenter.v2.SecurityBulletin.encode(message.securityBulletin, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resourceFolder != null && Object.hasOwnProperty.call(message, "resourceFolder")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceFolder); + if (message.resourceFolderDisplayName != null && Object.hasOwnProperty.call(message, "resourceFolderDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceFolderDisplayName); return writer; }; /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Vulnerability.verify|verify} messages. + * Encodes the specified Folder message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Folder.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static - * @param {google.cloud.securitycenter.v2.IVulnerability} message Vulnerability message or plain object to encode + * @param {google.cloud.securitycenter.v2.IFolder} message Folder message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + Folder.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Vulnerability message from the specified reader or buffer. + * Decodes a Folder message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v2.Folder} Folder * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vulnerability.decode = function decode(reader, length) { + Folder.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.cloud.securitycenter.v2.Vulnerability(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Folder(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cve = $root.google.cloud.securitycenter.v2.Cve.decode(reader, reader.uint32()); + message.resourceFolder = reader.string(); break; } case 2: { - message.offendingPackage = $root.google.cloud.securitycenter.v2.Package.decode(reader, reader.uint32()); - break; - } - case 3: { - message.fixedPackage = $root.google.cloud.securitycenter.v2.Package.decode(reader, reader.uint32()); - break; - } - case 4: { - message.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.decode(reader, reader.uint32()); + message.resourceFolderDisplayName = reader.string(); break; } default: @@ -86429,175 +90370,137 @@ }; /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * Decodes a Folder message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v2.Folder} Folder * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vulnerability.decodeDelimited = function decodeDelimited(reader) { + Folder.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Vulnerability message. + * Verifies a Folder message. * @function verify - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Vulnerability.verify = function verify(message) { + Folder.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cve != null && message.hasOwnProperty("cve")) { - var error = $root.google.cloud.securitycenter.v2.Cve.verify(message.cve); - if (error) - return "cve." + error; - } - if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) { - var error = $root.google.cloud.securitycenter.v2.Package.verify(message.offendingPackage); - if (error) - return "offendingPackage." + error; - } - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) { - var error = $root.google.cloud.securitycenter.v2.Package.verify(message.fixedPackage); - if (error) - return "fixedPackage." + error; - } - if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) { - var error = $root.google.cloud.securitycenter.v2.SecurityBulletin.verify(message.securityBulletin); - if (error) - return "securityBulletin." + error; - } + if (message.resourceFolder != null && message.hasOwnProperty("resourceFolder")) + if (!$util.isString(message.resourceFolder)) + return "resourceFolder: string expected"; + if (message.resourceFolderDisplayName != null && message.hasOwnProperty("resourceFolderDisplayName")) + if (!$util.isString(message.resourceFolderDisplayName)) + return "resourceFolderDisplayName: string expected"; return null; }; /** - * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * Creates a Folder message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v2.Folder} Folder */ - Vulnerability.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Vulnerability) + Folder.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Folder) return object; - var message = new $root.google.cloud.securitycenter.v2.Vulnerability(); - if (object.cve != null) { - if (typeof object.cve !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.cve: object expected"); - message.cve = $root.google.cloud.securitycenter.v2.Cve.fromObject(object.cve); - } - if (object.offendingPackage != null) { - if (typeof object.offendingPackage !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.offendingPackage: object expected"); - message.offendingPackage = $root.google.cloud.securitycenter.v2.Package.fromObject(object.offendingPackage); - } - if (object.fixedPackage != null) { - if (typeof object.fixedPackage !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.fixedPackage: object expected"); - message.fixedPackage = $root.google.cloud.securitycenter.v2.Package.fromObject(object.fixedPackage); - } - if (object.securityBulletin != null) { - if (typeof object.securityBulletin !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Vulnerability.securityBulletin: object expected"); - message.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.fromObject(object.securityBulletin); - } + var message = new $root.google.cloud.securitycenter.v2.Folder(); + if (object.resourceFolder != null) + message.resourceFolder = String(object.resourceFolder); + if (object.resourceFolderDisplayName != null) + message.resourceFolderDisplayName = String(object.resourceFolderDisplayName); return message; }; /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * Creates a plain object from a Folder message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static - * @param {google.cloud.securitycenter.v2.Vulnerability} message Vulnerability + * @param {google.cloud.securitycenter.v2.Folder} message Folder * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Vulnerability.toObject = function toObject(message, options) { + Folder.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.cve = null; - object.offendingPackage = null; - object.fixedPackage = null; - object.securityBulletin = null; + object.resourceFolder = ""; + object.resourceFolderDisplayName = ""; } - if (message.cve != null && message.hasOwnProperty("cve")) - object.cve = $root.google.cloud.securitycenter.v2.Cve.toObject(message.cve, options); - if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) - object.offendingPackage = $root.google.cloud.securitycenter.v2.Package.toObject(message.offendingPackage, options); - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - object.fixedPackage = $root.google.cloud.securitycenter.v2.Package.toObject(message.fixedPackage, options); - if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) - object.securityBulletin = $root.google.cloud.securitycenter.v2.SecurityBulletin.toObject(message.securityBulletin, options); + if (message.resourceFolder != null && message.hasOwnProperty("resourceFolder")) + object.resourceFolder = message.resourceFolder; + if (message.resourceFolderDisplayName != null && message.hasOwnProperty("resourceFolderDisplayName")) + object.resourceFolderDisplayName = message.resourceFolderDisplayName; return object; }; /** - * Converts this Vulnerability to JSON. + * Converts this Folder to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @instance * @returns {Object.} JSON object */ - Vulnerability.prototype.toJSON = function toJSON() { + Folder.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Vulnerability + * Gets the default type url for Folder * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Vulnerability + * @memberof google.cloud.securitycenter.v2.Folder * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Folder.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Vulnerability"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Folder"; }; - return Vulnerability; + return Folder; })(); - v2.Cve = (function() { + v2.MuteConfig = (function() { /** - * Properties of a Cve. + * Properties of a MuteConfig. * @memberof google.cloud.securitycenter.v2 - * @interface ICve - * @property {string|null} [id] Cve id - * @property {Array.|null} [references] Cve references - * @property {google.cloud.securitycenter.v2.ICvssv3|null} [cvssv3] Cve cvssv3 - * @property {boolean|null} [upstreamFixAvailable] Cve upstreamFixAvailable - * @property {google.cloud.securitycenter.v2.Cve.RiskRating|null} [impact] Cve impact - * @property {google.cloud.securitycenter.v2.Cve.ExploitationActivity|null} [exploitationActivity] Cve exploitationActivity - * @property {boolean|null} [observedInTheWild] Cve observedInTheWild - * @property {boolean|null} [zeroDay] Cve zeroDay + * @interface IMuteConfig + * @property {string|null} [name] MuteConfig name + * @property {string|null} [description] MuteConfig description + * @property {string|null} [filter] MuteConfig filter + * @property {google.protobuf.ITimestamp|null} [createTime] MuteConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MuteConfig updateTime + * @property {string|null} [mostRecentEditor] MuteConfig mostRecentEditor + * @property {google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|null} [type] MuteConfig type */ /** - * Constructs a new Cve. + * Constructs a new MuteConfig. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Cve. - * @implements ICve + * @classdesc Represents a MuteConfig. + * @implements IMuteConfig * @constructor - * @param {google.cloud.securitycenter.v2.ICve=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IMuteConfig=} [properties] Properties to set */ - function Cve(properties) { - this.references = []; + function MuteConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86605,176 +90508,159 @@ } /** - * Cve id. - * @member {string} id - * @memberof google.cloud.securitycenter.v2.Cve - * @instance - */ - Cve.prototype.id = ""; - - /** - * Cve references. - * @member {Array.} references - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.references = $util.emptyArray; + MuteConfig.prototype.name = ""; /** - * Cve cvssv3. - * @member {google.cloud.securitycenter.v2.ICvssv3|null|undefined} cvssv3 - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.cvssv3 = null; + MuteConfig.prototype.description = ""; /** - * Cve upstreamFixAvailable. - * @member {boolean} upstreamFixAvailable - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.upstreamFixAvailable = false; + MuteConfig.prototype.filter = ""; /** - * Cve impact. - * @member {google.cloud.securitycenter.v2.Cve.RiskRating} impact - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.impact = 0; + MuteConfig.prototype.createTime = null; /** - * Cve exploitationActivity. - * @member {google.cloud.securitycenter.v2.Cve.ExploitationActivity} exploitationActivity - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.exploitationActivity = 0; + MuteConfig.prototype.updateTime = null; /** - * Cve observedInTheWild. - * @member {boolean} observedInTheWild - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig mostRecentEditor. + * @member {string} mostRecentEditor + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.observedInTheWild = false; + MuteConfig.prototype.mostRecentEditor = ""; /** - * Cve zeroDay. - * @member {boolean} zeroDay - * @memberof google.cloud.securitycenter.v2.Cve + * MuteConfig type. + * @member {google.cloud.securitycenter.v2.MuteConfig.MuteConfigType} type + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance */ - Cve.prototype.zeroDay = false; + MuteConfig.prototype.type = 0; /** - * Creates a new Cve instance using the specified properties. + * Creates a new MuteConfig instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static - * @param {google.cloud.securitycenter.v2.ICve=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Cve} Cve instance + * @param {google.cloud.securitycenter.v2.IMuteConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig instance */ - Cve.create = function create(properties) { - return new Cve(properties); + MuteConfig.create = function create(properties) { + return new MuteConfig(properties); }; /** - * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. + * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static - * @param {google.cloud.securitycenter.v2.ICve} message Cve message or plain object to encode + * @param {google.cloud.securitycenter.v2.IMuteConfig} message MuteConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cve.encode = function encode(message, writer) { + MuteConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.references != null && message.references.length) - for (var i = 0; i < message.references.length; ++i) - $root.google.cloud.securitycenter.v2.Reference.encode(message.references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) - $root.google.cloud.securitycenter.v2.Cvssv3.encode(message.cvssv3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.upstreamFixAvailable != null && Object.hasOwnProperty.call(message, "upstreamFixAvailable")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.upstreamFixAvailable); - if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.impact); - if (message.exploitationActivity != null && Object.hasOwnProperty.call(message, "exploitationActivity")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.exploitationActivity); - if (message.observedInTheWild != null && Object.hasOwnProperty.call(message, "observedInTheWild")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.observedInTheWild); - if (message.zeroDay != null && Object.hasOwnProperty.call(message, "zeroDay")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.zeroDay); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mostRecentEditor); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); return writer; }; /** - * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cve.verify|verify} messages. + * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static - * @param {google.cloud.securitycenter.v2.ICve} message Cve message or plain object to encode + * @param {google.cloud.securitycenter.v2.IMuteConfig} message MuteConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cve.encodeDelimited = function encodeDelimited(message, writer) { + MuteConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cve message from the specified reader or buffer. + * Decodes a MuteConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Cve} Cve + * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cve.decode = function decode(reader, length) { + MuteConfig.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.cloud.securitycenter.v2.Cve(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.MuteConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.references && message.references.length)) - message.references = []; - message.references.push($root.google.cloud.securitycenter.v2.Reference.decode(reader, reader.uint32())); + message.description = reader.string(); break; } case 3: { - message.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.decode(reader, reader.uint32()); + message.filter = reader.string(); break; } case 4: { - message.upstreamFixAvailable = reader.bool(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 5: { - message.impact = reader.int32(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 6: { - message.exploitationActivity = reader.int32(); - break; - } - case 7: { - message.observedInTheWild = reader.bool(); + message.mostRecentEditor = reader.string(); break; } case 8: { - message.zeroDay = reader.bool(); + message.type = reader.int32(); break; } default: @@ -86786,318 +90672,218 @@ }; /** - * Decodes a Cve message from the specified reader or buffer, length delimited. + * Decodes a MuteConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Cve} Cve + * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cve.decodeDelimited = function decodeDelimited(reader) { + MuteConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Cve message. + * Verifies a MuteConfig message. * @function verify - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Cve.verify = function verify(message) { + MuteConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.references != null && message.hasOwnProperty("references")) { - if (!Array.isArray(message.references)) - return "references: array expected"; - for (var i = 0; i < message.references.length; ++i) { - var error = $root.google.cloud.securitycenter.v2.Reference.verify(message.references[i]); - if (error) - return "references." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { - var error = $root.google.cloud.securitycenter.v2.Cvssv3.verify(message.cvssv3); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "cvssv3." + error; + return "updateTime." + error; } - if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) - if (typeof message.upstreamFixAvailable !== "boolean") - return "upstreamFixAvailable: boolean expected"; - if (message.impact != null && message.hasOwnProperty("impact")) - switch (message.impact) { - default: - return "impact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) - switch (message.exploitationActivity) { + if (message.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + if (!$util.isString(message.mostRecentEditor)) + return "mostRecentEditor: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { default: - return "exploitationActivity: enum value expected"; + return "type: enum value expected"; case 0: case 1: - case 2: - case 3: - case 4: - case 5: break; } - if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) - if (typeof message.observedInTheWild !== "boolean") - return "observedInTheWild: boolean expected"; - if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) - if (typeof message.zeroDay !== "boolean") - return "zeroDay: boolean expected"; return null; }; /** - * Creates a Cve message from a plain object. Also converts values to their respective internal types. + * Creates a MuteConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Cve} Cve + * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig */ - Cve.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Cve) + MuteConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.MuteConfig) return object; - var message = new $root.google.cloud.securitycenter.v2.Cve(); - if (object.id != null) - message.id = String(object.id); - if (object.references) { - if (!Array.isArray(object.references)) - throw TypeError(".google.cloud.securitycenter.v2.Cve.references: array expected"); - message.references = []; - for (var i = 0; i < object.references.length; ++i) { - if (typeof object.references[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Cve.references: object expected"); - message.references[i] = $root.google.cloud.securitycenter.v2.Reference.fromObject(object.references[i]); - } - } - if (object.cvssv3 != null) { - if (typeof object.cvssv3 !== "object") - throw TypeError(".google.cloud.securitycenter.v2.Cve.cvssv3: object expected"); - message.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.fromObject(object.cvssv3); + var message = new $root.google.cloud.securitycenter.v2.MuteConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.MuteConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.upstreamFixAvailable != null) - message.upstreamFixAvailable = Boolean(object.upstreamFixAvailable); - switch (object.impact) { - default: - if (typeof object.impact === "number") { - message.impact = object.impact; - break; - } - break; - case "RISK_RATING_UNSPECIFIED": - case 0: - message.impact = 0; - break; - case "LOW": - case 1: - message.impact = 1; - break; - case "MEDIUM": - case 2: - message.impact = 2; - break; - case "HIGH": - case 3: - message.impact = 3; - break; - case "CRITICAL": - case 4: - message.impact = 4; - break; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v2.MuteConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - switch (object.exploitationActivity) { + if (object.mostRecentEditor != null) + message.mostRecentEditor = String(object.mostRecentEditor); + switch (object.type) { default: - if (typeof object.exploitationActivity === "number") { - message.exploitationActivity = object.exploitationActivity; + if (typeof object.type === "number") { + message.type = object.type; break; } break; - case "EXPLOITATION_ACTIVITY_UNSPECIFIED": + case "MUTE_CONFIG_TYPE_UNSPECIFIED": case 0: - message.exploitationActivity = 0; - break; - case "WIDE": - case 1: - message.exploitationActivity = 1; - break; - case "CONFIRMED": - case 2: - message.exploitationActivity = 2; - break; - case "AVAILABLE": - case 3: - message.exploitationActivity = 3; - break; - case "ANTICIPATED": - case 4: - message.exploitationActivity = 4; + message.type = 0; break; - case "NO_KNOWN": - case 5: - message.exploitationActivity = 5; + case "STATIC": + case 1: + message.type = 1; break; } - if (object.observedInTheWild != null) - message.observedInTheWild = Boolean(object.observedInTheWild); - if (object.zeroDay != null) - message.zeroDay = Boolean(object.zeroDay); return message; }; /** - * Creates a plain object from a Cve message. Also converts values to other types if specified. + * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static - * @param {google.cloud.securitycenter.v2.Cve} message Cve + * @param {google.cloud.securitycenter.v2.MuteConfig} message MuteConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cve.toObject = function toObject(message, options) { + MuteConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.references = []; if (options.defaults) { - object.id = ""; - object.cvssv3 = null; - object.upstreamFixAvailable = false; - object.impact = options.enums === String ? "RISK_RATING_UNSPECIFIED" : 0; - object.exploitationActivity = options.enums === String ? "EXPLOITATION_ACTIVITY_UNSPECIFIED" : 0; - object.observedInTheWild = false; - object.zeroDay = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.references && message.references.length) { - object.references = []; - for (var j = 0; j < message.references.length; ++j) - object.references[j] = $root.google.cloud.securitycenter.v2.Reference.toObject(message.references[j], options); + object.name = ""; + object.description = ""; + object.filter = ""; + object.createTime = null; + object.updateTime = null; + object.mostRecentEditor = ""; + object.type = options.enums === String ? "MUTE_CONFIG_TYPE_UNSPECIFIED" : 0; } - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) - object.cvssv3 = $root.google.cloud.securitycenter.v2.Cvssv3.toObject(message.cvssv3, options); - if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) - object.upstreamFixAvailable = message.upstreamFixAvailable; - if (message.impact != null && message.hasOwnProperty("impact")) - object.impact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cve.RiskRating[message.impact] === undefined ? message.impact : $root.google.cloud.securitycenter.v2.Cve.RiskRating[message.impact] : message.impact; - if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) - object.exploitationActivity = options.enums === String ? $root.google.cloud.securitycenter.v2.Cve.ExploitationActivity[message.exploitationActivity] === undefined ? message.exploitationActivity : $root.google.cloud.securitycenter.v2.Cve.ExploitationActivity[message.exploitationActivity] : message.exploitationActivity; - if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) - object.observedInTheWild = message.observedInTheWild; - if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) - object.zeroDay = message.zeroDay; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + object.mostRecentEditor = message.mostRecentEditor; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.securitycenter.v2.MuteConfig.MuteConfigType[message.type] === undefined ? message.type : $root.google.cloud.securitycenter.v2.MuteConfig.MuteConfigType[message.type] : message.type; return object; }; /** - * Converts this Cve to JSON. + * Converts this MuteConfig to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @instance * @returns {Object.} JSON object */ - Cve.prototype.toJSON = function toJSON() { + MuteConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Cve + * Gets the default type url for MuteConfig * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Cve + * @memberof google.cloud.securitycenter.v2.MuteConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Cve.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MuteConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Cve"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.MuteConfig"; }; /** - * RiskRating enum. - * @name google.cloud.securitycenter.v2.Cve.RiskRating - * @enum {number} - * @property {number} RISK_RATING_UNSPECIFIED=0 RISK_RATING_UNSPECIFIED value - * @property {number} LOW=1 LOW value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} HIGH=3 HIGH value - * @property {number} CRITICAL=4 CRITICAL value - */ - Cve.RiskRating = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RISK_RATING_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "HIGH"] = 3; - values[valuesById[4] = "CRITICAL"] = 4; - return values; - })(); - - /** - * ExploitationActivity enum. - * @name google.cloud.securitycenter.v2.Cve.ExploitationActivity + * MuteConfigType enum. + * @name google.cloud.securitycenter.v2.MuteConfig.MuteConfigType * @enum {number} - * @property {number} EXPLOITATION_ACTIVITY_UNSPECIFIED=0 EXPLOITATION_ACTIVITY_UNSPECIFIED value - * @property {number} WIDE=1 WIDE value - * @property {number} CONFIRMED=2 CONFIRMED value - * @property {number} AVAILABLE=3 AVAILABLE value - * @property {number} ANTICIPATED=4 ANTICIPATED value - * @property {number} NO_KNOWN=5 NO_KNOWN value + * @property {number} MUTE_CONFIG_TYPE_UNSPECIFIED=0 MUTE_CONFIG_TYPE_UNSPECIFIED value + * @property {number} STATIC=1 STATIC value */ - Cve.ExploitationActivity = (function() { + MuteConfig.MuteConfigType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EXPLOITATION_ACTIVITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "WIDE"] = 1; - values[valuesById[2] = "CONFIRMED"] = 2; - values[valuesById[3] = "AVAILABLE"] = 3; - values[valuesById[4] = "ANTICIPATED"] = 4; - values[valuesById[5] = "NO_KNOWN"] = 5; + values[valuesById[0] = "MUTE_CONFIG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATIC"] = 1; return values; })(); - return Cve; + return MuteConfig; })(); - v2.Reference = (function() { + v2.NotificationConfig = (function() { /** - * Properties of a Reference. + * Properties of a NotificationConfig. * @memberof google.cloud.securitycenter.v2 - * @interface IReference - * @property {string|null} [source] Reference source - * @property {string|null} [uri] Reference uri + * @interface INotificationConfig + * @property {string|null} [name] NotificationConfig name + * @property {string|null} [description] NotificationConfig description + * @property {string|null} [pubsubTopic] NotificationConfig pubsubTopic + * @property {string|null} [serviceAccount] NotificationConfig serviceAccount + * @property {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null} [streamingConfig] NotificationConfig streamingConfig */ /** - * Constructs a new Reference. + * Constructs a new NotificationConfig. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Reference. - * @implements IReference + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig * @constructor - * @param {google.cloud.securitycenter.v2.IReference=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.INotificationConfig=} [properties] Properties to set */ - function Reference(properties) { + function NotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87105,233 +90891,521 @@ } /** - * Reference source. - * @member {string} source - * @memberof google.cloud.securitycenter.v2.Reference + * NotificationConfig name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @instance */ - Reference.prototype.source = ""; + NotificationConfig.prototype.name = ""; /** - * Reference uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v2.Reference + * NotificationConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @instance */ - Reference.prototype.uri = ""; + NotificationConfig.prototype.description = ""; /** - * Creates a new Reference instance using the specified properties. + * NotificationConfig pubsubTopic. + * @member {string} pubsubTopic + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @instance + */ + NotificationConfig.prototype.pubsubTopic = ""; + + /** + * NotificationConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @instance + */ + NotificationConfig.prototype.serviceAccount = ""; + + /** + * NotificationConfig streamingConfig. + * @member {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null|undefined} streamingConfig + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @instance + */ + NotificationConfig.prototype.streamingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NotificationConfig notifyConfig. + * @member {"streamingConfig"|undefined} notifyConfig + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @instance + */ + Object.defineProperty(NotificationConfig.prototype, "notifyConfig", { + get: $util.oneOfGetter($oneOfFields = ["streamingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Reference + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @static - * @param {google.cloud.securitycenter.v2.IReference=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Reference} Reference instance + * @param {google.cloud.securitycenter.v2.INotificationConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig instance */ - Reference.create = function create(properties) { - return new Reference(properties); + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); }; /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Reference + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @static - * @param {google.cloud.securitycenter.v2.IReference} message Reference message or plain object to encode + * @param {google.cloud.securitycenter.v2.INotificationConfig} message NotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Reference.encode = function encode(message, writer) { + NotificationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.pubsubTopic != null && Object.hasOwnProperty.call(message, "pubsubTopic")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pubsubTopic); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceAccount); + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) + $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.encode(message.streamingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Reference.verify|verify} messages. + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Reference + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @static - * @param {google.cloud.securitycenter.v2.IReference} message Reference message or plain object to encode + * @param {google.cloud.securitycenter.v2.INotificationConfig} message NotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Reference.encodeDelimited = function encodeDelimited(message, writer) { + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Reference message from the specified reader or buffer. + * Decodes a NotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Reference + * @memberof google.cloud.securitycenter.v2.NotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Reference} Reference + * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Reference.decode = function decode(reader, length) { + NotificationConfig.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.cloud.securitycenter.v2.Reference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.NotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.source = reader.string(); + message.name = reader.string(); break; } case 2: { - message.uri = reader.string(); + message.description = reader.string(); + break; + } + case 3: { + message.pubsubTopic = reader.string(); + break; + } + case 4: { + message.serviceAccount = reader.string(); + break; + } + case 5: { + message.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) + if (!$util.isString(message.pubsubTopic)) + return "pubsubTopic: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + properties.notifyConfig = 1; + { + var error = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify(message.streamingConfig); + if (error) + return "streamingConfig." + error; + } + } + return null; + }; + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig + */ + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.NotificationConfig) + return object; + var message = new $root.google.cloud.securitycenter.v2.NotificationConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.pubsubTopic != null) + message.pubsubTopic = String(object.pubsubTopic); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.streamingConfig != null) { + if (typeof object.streamingConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v2.NotificationConfig.streamingConfig: object expected"); + message.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.fromObject(object.streamingConfig); + } + return message; + }; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @static + * @param {google.cloud.securitycenter.v2.NotificationConfig} message NotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.pubsubTopic = ""; + object.serviceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) + object.pubsubTopic = message.pubsubTopic; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + object.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.toObject(message.streamingConfig, options); + if (options.oneofs) + object.notifyConfig = "streamingConfig"; + } + return object; + }; + + /** + * Converts this NotificationConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @instance + * @returns {Object.} JSON object + */ + NotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationConfig"; + }; + + NotificationConfig.StreamingConfig = (function() { + + /** + * Properties of a StreamingConfig. + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @interface IStreamingConfig + * @property {string|null} [filter] StreamingConfig filter + */ + + /** + * Constructs a new StreamingConfig. + * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @classdesc Represents a StreamingConfig. + * @implements IStreamingConfig + * @constructor + * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig=} [properties] Properties to set + */ + function StreamingConfig(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]]; + } + + /** + * StreamingConfig filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @instance + */ + StreamingConfig.prototype.filter = ""; + + /** + * Creates a new StreamingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig instance + */ + StreamingConfig.create = function create(properties) { + return new StreamingConfig(properties); + }; + + /** + * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + return writer; + }; + + /** + * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingConfig.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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Reference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Reference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Reference} Reference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Reference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Reference message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Reference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Reference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; + /** + * Verifies a StreamingConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Creates a Reference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.Reference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Reference} Reference - */ - Reference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Reference) + /** + * Creates a StreamingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + */ + StreamingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig) + return object; + var message = new $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig(); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} message StreamingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filter = ""; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; - var message = new $root.google.cloud.securitycenter.v2.Reference(); - if (object.source != null) - message.source = String(object.source); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; + }; - /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.Reference - * @static - * @param {google.cloud.securitycenter.v2.Reference} message Reference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Reference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.source = ""; - object.uri = ""; - } - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; + /** + * Converts this StreamingConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @instance + * @returns {Object.} JSON object + */ + StreamingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Reference to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.Reference - * @instance - * @returns {Object.} JSON object - */ - Reference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for StreamingConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig"; + }; - /** - * Gets the default type url for Reference - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Reference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Reference"; - }; + return StreamingConfig; + })(); - return Reference; + return NotificationConfig; })(); - v2.Cvssv3 = (function() { + v2.NotificationMessage = (function() { /** - * Properties of a Cvssv3. + * Properties of a NotificationMessage. * @memberof google.cloud.securitycenter.v2 - * @interface ICvssv3 - * @property {number|null} [baseScore] Cvssv3 baseScore - * @property {google.cloud.securitycenter.v2.Cvssv3.AttackVector|null} [attackVector] Cvssv3 attackVector - * @property {google.cloud.securitycenter.v2.Cvssv3.AttackComplexity|null} [attackComplexity] Cvssv3 attackComplexity - * @property {google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired|null} [privilegesRequired] Cvssv3 privilegesRequired - * @property {google.cloud.securitycenter.v2.Cvssv3.UserInteraction|null} [userInteraction] Cvssv3 userInteraction - * @property {google.cloud.securitycenter.v2.Cvssv3.Scope|null} [scope] Cvssv3 scope - * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [confidentialityImpact] Cvssv3 confidentialityImpact - * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [integrityImpact] Cvssv3 integrityImpact - * @property {google.cloud.securitycenter.v2.Cvssv3.Impact|null} [availabilityImpact] Cvssv3 availabilityImpact + * @interface INotificationMessage + * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName + * @property {google.cloud.securitycenter.v2.IFinding|null} [finding] NotificationMessage finding + * @property {google.cloud.securitycenter.v2.IResource|null} [resource] NotificationMessage resource */ /** - * Constructs a new Cvssv3. + * Constructs a new NotificationMessage. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Cvssv3. - * @implements ICvssv3 + * @classdesc Represents a NotificationMessage. + * @implements INotificationMessage * @constructor - * @param {google.cloud.securitycenter.v2.ICvssv3=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.INotificationMessage=} [properties] Properties to set */ - function Cvssv3(properties) { + function NotificationMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87339,187 +91413,117 @@ } /** - * Cvssv3 baseScore. - * @member {number} baseScore - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @instance - */ - Cvssv3.prototype.baseScore = 0; - - /** - * Cvssv3 attackVector. - * @member {google.cloud.securitycenter.v2.Cvssv3.AttackVector} attackVector - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @instance - */ - Cvssv3.prototype.attackVector = 0; - - /** - * Cvssv3 attackComplexity. - * @member {google.cloud.securitycenter.v2.Cvssv3.AttackComplexity} attackComplexity - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @instance - */ - Cvssv3.prototype.attackComplexity = 0; - - /** - * Cvssv3 privilegesRequired. - * @member {google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired} privilegesRequired - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @instance - */ - Cvssv3.prototype.privilegesRequired = 0; - - /** - * Cvssv3 userInteraction. - * @member {google.cloud.securitycenter.v2.Cvssv3.UserInteraction} userInteraction - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * NotificationMessage notificationConfigName. + * @member {string} notificationConfigName + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @instance */ - Cvssv3.prototype.userInteraction = 0; + NotificationMessage.prototype.notificationConfigName = ""; /** - * Cvssv3 scope. - * @member {google.cloud.securitycenter.v2.Cvssv3.Scope} scope - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * NotificationMessage finding. + * @member {google.cloud.securitycenter.v2.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @instance */ - Cvssv3.prototype.scope = 0; + NotificationMessage.prototype.finding = null; /** - * Cvssv3 confidentialityImpact. - * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} confidentialityImpact - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * NotificationMessage resource. + * @member {google.cloud.securitycenter.v2.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @instance */ - Cvssv3.prototype.confidentialityImpact = 0; + NotificationMessage.prototype.resource = null; - /** - * Cvssv3 integrityImpact. - * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} integrityImpact - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @instance - */ - Cvssv3.prototype.integrityImpact = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Cvssv3 availabilityImpact. - * @member {google.cloud.securitycenter.v2.Cvssv3.Impact} availabilityImpact - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * NotificationMessage event. + * @member {"finding"|undefined} event + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @instance */ - Cvssv3.prototype.availabilityImpact = 0; + Object.defineProperty(NotificationMessage.prototype, "event", { + get: $util.oneOfGetter($oneOfFields = ["finding"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Cvssv3 instance using the specified properties. + * Creates a new NotificationMessage instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static - * @param {google.cloud.securitycenter.v2.ICvssv3=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 instance + * @param {google.cloud.securitycenter.v2.INotificationMessage=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage instance */ - Cvssv3.create = function create(properties) { - return new Cvssv3(properties); + NotificationMessage.create = function create(properties) { + return new NotificationMessage(properties); }; /** - * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. + * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static - * @param {google.cloud.securitycenter.v2.ICvssv3} message Cvssv3 message or plain object to encode + * @param {google.cloud.securitycenter.v2.INotificationMessage} message NotificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cvssv3.encode = function encode(message, writer) { + NotificationMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.baseScore); - if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.attackVector); - if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attackComplexity); - if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.privilegesRequired); - if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.userInteraction); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); - if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.confidentialityImpact); - if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.integrityImpact); - if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.availabilityImpact); + if (message.notificationConfigName != null && Object.hasOwnProperty.call(message, "notificationConfigName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v2.Finding.encode(message.finding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycenter.v2.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Cvssv3.verify|verify} messages. + * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static - * @param {google.cloud.securitycenter.v2.ICvssv3} message Cvssv3 message or plain object to encode + * @param {google.cloud.securitycenter.v2.INotificationMessage} message NotificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cvssv3.encodeDelimited = function encodeDelimited(message, writer) { + NotificationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cvssv3 message from the specified reader or buffer. + * Decodes a NotificationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 + * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cvssv3.decode = function decode(reader, length) { + NotificationMessage.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.cloud.securitycenter.v2.Cvssv3(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.NotificationMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.baseScore = reader.double(); + message.notificationConfigName = reader.string(); break; } case 2: { - message.attackVector = reader.int32(); + message.finding = $root.google.cloud.securitycenter.v2.Finding.decode(reader, reader.uint32()); break; } case 3: { - message.attackComplexity = reader.int32(); - break; - } - case 4: { - message.privilegesRequired = reader.int32(); - break; - } - case 5: { - message.userInteraction = reader.int32(); - break; - } - case 6: { - message.scope = reader.int32(); - break; - } - case 7: { - message.confidentialityImpact = reader.int32(); - break; - } - case 8: { - message.integrityImpact = reader.int32(); - break; - } - case 9: { - message.availabilityImpact = reader.int32(); + message.resource = $root.google.cloud.securitycenter.v2.Resource.decode(reader, reader.uint32()); break; } default: @@ -87527,638 +91531,399 @@ break; } } - return message; - }; - - /** - * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cvssv3.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cvssv3 message. - * @function verify - * @memberof google.cloud.securitycenter.v2.Cvssv3 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cvssv3.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - if (typeof message.baseScore !== "number") - return "baseScore: number expected"; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - switch (message.attackVector) { - default: - return "attackVector: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - switch (message.attackComplexity) { - default: - return "attackComplexity: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - switch (message.privilegesRequired) { - default: - return "privilegesRequired: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - switch (message.userInteraction) { - default: - return "userInteraction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - switch (message.confidentialityImpact) { - default: - return "confidentialityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - switch (message.integrityImpact) { - default: - return "integrityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - switch (message.availabilityImpact) { - default: - return "availabilityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + return message; + }; + + /** + * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.NotificationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationMessage message. + * @function verify + * @memberof google.cloud.securitycenter.v2.NotificationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) + if (!$util.isString(message.notificationConfigName)) + return "notificationConfigName: string expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + properties.event = 1; + { + var error = $root.google.cloud.securitycenter.v2.Finding.verify(message.finding); + if (error) + return "finding." + error; } + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v2.Resource.verify(message.resource); + if (error) + return "resource." + error; + } return null; }; /** - * Creates a Cvssv3 message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Cvssv3} Cvssv3 + * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage */ - Cvssv3.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Cvssv3) + NotificationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.NotificationMessage) return object; - var message = new $root.google.cloud.securitycenter.v2.Cvssv3(); - if (object.baseScore != null) - message.baseScore = Number(object.baseScore); - switch (object.attackVector) { - default: - if (typeof object.attackVector === "number") { - message.attackVector = object.attackVector; - break; - } - break; - case "ATTACK_VECTOR_UNSPECIFIED": - case 0: - message.attackVector = 0; - break; - case "ATTACK_VECTOR_NETWORK": - case 1: - message.attackVector = 1; - break; - case "ATTACK_VECTOR_ADJACENT": - case 2: - message.attackVector = 2; - break; - case "ATTACK_VECTOR_LOCAL": - case 3: - message.attackVector = 3; - break; - case "ATTACK_VECTOR_PHYSICAL": - case 4: - message.attackVector = 4; - break; - } - switch (object.attackComplexity) { - default: - if (typeof object.attackComplexity === "number") { - message.attackComplexity = object.attackComplexity; - break; - } - break; - case "ATTACK_COMPLEXITY_UNSPECIFIED": - case 0: - message.attackComplexity = 0; - break; - case "ATTACK_COMPLEXITY_LOW": - case 1: - message.attackComplexity = 1; - break; - case "ATTACK_COMPLEXITY_HIGH": - case 2: - message.attackComplexity = 2; - break; - } - switch (object.privilegesRequired) { - default: - if (typeof object.privilegesRequired === "number") { - message.privilegesRequired = object.privilegesRequired; - break; - } - break; - case "PRIVILEGES_REQUIRED_UNSPECIFIED": - case 0: - message.privilegesRequired = 0; - break; - case "PRIVILEGES_REQUIRED_NONE": - case 1: - message.privilegesRequired = 1; - break; - case "PRIVILEGES_REQUIRED_LOW": - case 2: - message.privilegesRequired = 2; - break; - case "PRIVILEGES_REQUIRED_HIGH": - case 3: - message.privilegesRequired = 3; - break; - } - switch (object.userInteraction) { - default: - if (typeof object.userInteraction === "number") { - message.userInteraction = object.userInteraction; - break; - } - break; - case "USER_INTERACTION_UNSPECIFIED": - case 0: - message.userInteraction = 0; - break; - case "USER_INTERACTION_NONE": - case 1: - message.userInteraction = 1; - break; - case "USER_INTERACTION_REQUIRED": - case 2: - message.userInteraction = 2; - break; - } - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "SCOPE_UNCHANGED": - case 1: - message.scope = 1; - break; - case "SCOPE_CHANGED": - case 2: - message.scope = 2; - break; - } - switch (object.confidentialityImpact) { - default: - if (typeof object.confidentialityImpact === "number") { - message.confidentialityImpact = object.confidentialityImpact; - break; - } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.confidentialityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.confidentialityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.confidentialityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.confidentialityImpact = 3; - break; - } - switch (object.integrityImpact) { - default: - if (typeof object.integrityImpact === "number") { - message.integrityImpact = object.integrityImpact; - break; - } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.integrityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.integrityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.integrityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.integrityImpact = 3; - break; + var message = new $root.google.cloud.securitycenter.v2.NotificationMessage(); + if (object.notificationConfigName != null) + message.notificationConfigName = String(object.notificationConfigName); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v2.NotificationMessage.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v2.Finding.fromObject(object.finding); } - switch (object.availabilityImpact) { - default: - if (typeof object.availabilityImpact === "number") { - message.availabilityImpact = object.availabilityImpact; - break; - } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.availabilityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.availabilityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.availabilityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.availabilityImpact = 3; - break; + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v2.NotificationMessage.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v2.Resource.fromObject(object.resource); } return message; }; /** - * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. + * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static - * @param {google.cloud.securitycenter.v2.Cvssv3} message Cvssv3 + * @param {google.cloud.securitycenter.v2.NotificationMessage} message NotificationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cvssv3.toObject = function toObject(message, options) { + NotificationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.baseScore = 0; - object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; - object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; - object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; - object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.notificationConfigName = ""; + object.resource = null; } - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.securitycenter.v2.Cvssv3.AttackVector[message.attackVector] : message.attackVector; - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.securitycenter.v2.Cvssv3.UserInteraction[message.userInteraction] : message.userInteraction; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.securitycenter.v2.Cvssv3.Scope[message.scope] : message.scope; - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.integrityImpact] : message.integrityImpact; - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.securitycenter.v2.Cvssv3.Impact[message.availabilityImpact] : message.availabilityImpact; + if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) + object.notificationConfigName = message.notificationConfigName; + if (message.finding != null && message.hasOwnProperty("finding")) { + object.finding = $root.google.cloud.securitycenter.v2.Finding.toObject(message.finding, options); + if (options.oneofs) + object.event = "finding"; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v2.Resource.toObject(message.resource, options); return object; }; /** - * Converts this Cvssv3 to JSON. + * Converts this NotificationMessage to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @instance * @returns {Object.} JSON object */ - Cvssv3.prototype.toJSON = function toJSON() { + NotificationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Cvssv3 + * Gets the default type url for NotificationMessage * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Cvssv3 + * @memberof google.cloud.securitycenter.v2.NotificationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Cvssv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Cvssv3"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationMessage"; }; + return NotificationMessage; + })(); + + v2.Resource = (function() { + /** - * AttackVector enum. - * @name google.cloud.securitycenter.v2.Cvssv3.AttackVector - * @enum {number} - * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value - * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value - * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value - * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value - * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v2 + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [displayName] Resource displayName + * @property {string|null} [type] Resource type + * @property {google.cloud.securitycenter.v2.CloudProvider|null} [cloudProvider] Resource cloudProvider + * @property {string|null} [service] Resource service + * @property {string|null} [location] Resource location + * @property {google.cloud.securitycenter.v2.IGcpMetadata|null} [gcpMetadata] Resource gcpMetadata + * @property {google.cloud.securitycenter.v2.IAwsMetadata|null} [awsMetadata] Resource awsMetadata + * @property {google.cloud.securitycenter.v2.IAzureMetadata|null} [azureMetadata] Resource azureMetadata + * @property {google.cloud.securitycenter.v2.IResourcePath|null} [resourcePath] Resource resourcePath + * @property {string|null} [resourcePathString] Resource resourcePathString */ - Cvssv3.AttackVector = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; - values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; - values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; - values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; - return values; - })(); /** - * AttackComplexity enum. - * @name google.cloud.securitycenter.v2.Cvssv3.AttackComplexity - * @enum {number} - * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value - * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value - * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v2 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v2.IResource=} [properties] Properties to set */ - Cvssv3.AttackComplexity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; - values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; - return values; - })(); + function Resource(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]]; + } /** - * PrivilegesRequired enum. - * @name google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired - * @enum {number} - * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value - * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value - * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value - * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ - Cvssv3.PrivilegesRequired = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; - values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; - values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; - return values; - })(); + Resource.prototype.name = ""; /** - * UserInteraction enum. - * @name google.cloud.securitycenter.v2.Cvssv3.UserInteraction - * @enum {number} - * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value - * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value - * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + * Resource displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ - Cvssv3.UserInteraction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; - values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; - return values; - })(); + Resource.prototype.displayName = ""; /** - * Scope enum. - * @name google.cloud.securitycenter.v2.Cvssv3.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value - * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + * Resource type. + * @member {string} type + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ - Cvssv3.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; - values[valuesById[2] = "SCOPE_CHANGED"] = 2; - return values; - })(); + Resource.prototype.type = ""; /** - * Impact enum. - * @name google.cloud.securitycenter.v2.Cvssv3.Impact - * @enum {number} - * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value - * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value - * @property {number} IMPACT_LOW=2 IMPACT_LOW value - * @property {number} IMPACT_NONE=3 IMPACT_NONE value + * Resource cloudProvider. + * @member {google.cloud.securitycenter.v2.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ - Cvssv3.Impact = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPACT_HIGH"] = 1; - values[valuesById[2] = "IMPACT_LOW"] = 2; - values[valuesById[3] = "IMPACT_NONE"] = 3; - return values; - })(); + Resource.prototype.cloudProvider = 0; - return Cvssv3; - })(); + /** + * Resource service. + * @member {string} service + * @memberof google.cloud.securitycenter.v2.Resource + * @instance + */ + Resource.prototype.service = ""; - v2.Package = (function() { + /** + * Resource location. + * @member {string} location + * @memberof google.cloud.securitycenter.v2.Resource + * @instance + */ + Resource.prototype.location = ""; /** - * Properties of a Package. - * @memberof google.cloud.securitycenter.v2 - * @interface IPackage - * @property {string|null} [packageName] Package packageName - * @property {string|null} [cpeUri] Package cpeUri - * @property {string|null} [packageType] Package packageType - * @property {string|null} [packageVersion] Package packageVersion + * Resource gcpMetadata. + * @member {google.cloud.securitycenter.v2.IGcpMetadata|null|undefined} gcpMetadata + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ + Resource.prototype.gcpMetadata = null; /** - * Constructs a new Package. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Package. - * @implements IPackage - * @constructor - * @param {google.cloud.securitycenter.v2.IPackage=} [properties] Properties to set + * Resource awsMetadata. + * @member {google.cloud.securitycenter.v2.IAwsMetadata|null|undefined} awsMetadata + * @memberof google.cloud.securitycenter.v2.Resource + * @instance */ - function Package(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]]; - } + Resource.prototype.awsMetadata = null; /** - * Package packageName. - * @member {string} packageName - * @memberof google.cloud.securitycenter.v2.Package + * Resource azureMetadata. + * @member {google.cloud.securitycenter.v2.IAzureMetadata|null|undefined} azureMetadata + * @memberof google.cloud.securitycenter.v2.Resource * @instance */ - Package.prototype.packageName = ""; + Resource.prototype.azureMetadata = null; /** - * Package cpeUri. - * @member {string} cpeUri - * @memberof google.cloud.securitycenter.v2.Package + * Resource resourcePath. + * @member {google.cloud.securitycenter.v2.IResourcePath|null|undefined} resourcePath + * @memberof google.cloud.securitycenter.v2.Resource * @instance */ - Package.prototype.cpeUri = ""; + Resource.prototype.resourcePath = null; /** - * Package packageType. - * @member {string} packageType - * @memberof google.cloud.securitycenter.v2.Package + * Resource resourcePathString. + * @member {string} resourcePathString + * @memberof google.cloud.securitycenter.v2.Resource * @instance */ - Package.prototype.packageType = ""; + Resource.prototype.resourcePathString = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Package packageVersion. - * @member {string} packageVersion - * @memberof google.cloud.securitycenter.v2.Package + * Resource cloudProviderMetadata. + * @member {"gcpMetadata"|"awsMetadata"|"azureMetadata"|undefined} cloudProviderMetadata + * @memberof google.cloud.securitycenter.v2.Resource * @instance */ - Package.prototype.packageVersion = ""; + Object.defineProperty(Resource.prototype, "cloudProviderMetadata", { + get: $util.oneOfGetter($oneOfFields = ["gcpMetadata", "awsMetadata", "azureMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Package instance using the specified properties. + * Creates a new Resource instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static - * @param {google.cloud.securitycenter.v2.IPackage=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Package} Package instance + * @param {google.cloud.securitycenter.v2.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.Resource} Resource instance */ - Package.create = function create(properties) { - return new Package(properties); + Resource.create = function create(properties) { + return new Resource(properties); }; /** - * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static - * @param {google.cloud.securitycenter.v2.IPackage} message Package message or plain object to encode + * @param {google.cloud.securitycenter.v2.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encode = function encode(message, writer) { + Resource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageName); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cpeUri); - if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); - if (message.packageVersion != null && Object.hasOwnProperty.call(message, "packageVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.cloudProvider); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.service); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + if (message.gcpMetadata != null && Object.hasOwnProperty.call(message, "gcpMetadata")) + $root.google.cloud.securitycenter.v2.GcpMetadata.encode(message.gcpMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.awsMetadata != null && Object.hasOwnProperty.call(message, "awsMetadata")) + $root.google.cloud.securitycenter.v2.AwsMetadata.encode(message.awsMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.azureMetadata != null && Object.hasOwnProperty.call(message, "azureMetadata")) + $root.google.cloud.securitycenter.v2.AzureMetadata.encode(message.azureMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.resourcePath != null && Object.hasOwnProperty.call(message, "resourcePath")) + $root.google.cloud.securitycenter.v2.ResourcePath.encode(message.resourcePath, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.resourcePathString != null && Object.hasOwnProperty.call(message, "resourcePathString")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.resourcePathString); return writer; }; /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Package.verify|verify} messages. + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static - * @param {google.cloud.securitycenter.v2.IPackage} message Package message or plain object to encode + * @param {google.cloud.securitycenter.v2.IResource} message Resource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encodeDelimited = function encodeDelimited(message, writer) { + Resource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Package message from the specified reader or buffer. + * Decodes a Resource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Package} Package + * @returns {google.cloud.securitycenter.v2.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Package.decode = function decode(reader, length) { + Resource.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.cloud.securitycenter.v2.Package(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.Resource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.packageName = reader.string(); + message.name = reader.string(); break; } case 2: { - message.cpeUri = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.packageType = reader.string(); + message.type = reader.string(); break; } case 4: { - message.packageVersion = reader.string(); + message.cloudProvider = reader.int32(); + break; + } + case 5: { + message.service = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + case 7: { + message.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.decode(reader, reader.uint32()); + break; + } + case 8: { + message.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.decode(reader, reader.uint32()); + break; + } + case 9: { + message.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.decode(reader, reader.uint32()); + break; + } + case 11: { + message.resourcePathString = reader.string(); break; } default: @@ -88170,149 +91935,296 @@ }; /** - * Decodes a Package message from the specified reader or buffer, length delimited. + * Decodes a Resource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Package} Package + * @returns {google.cloud.securitycenter.v2.Resource} Resource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Package.decodeDelimited = function decodeDelimited(reader) { + Resource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Package message. + * Verifies a Resource message. * @function verify - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Package.verify = function verify(message) { + Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - if (!$util.isString(message.packageType)) - return "packageType: string expected"; - if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) - if (!$util.isString(message.packageVersion)) - return "packageVersion: string expected"; + var properties = {}; + 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.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.gcpMetadata != null && message.hasOwnProperty("gcpMetadata")) { + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.GcpMetadata.verify(message.gcpMetadata); + if (error) + return "gcpMetadata." + error; + } + } + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.AwsMetadata.verify(message.awsMetadata); + if (error) + return "awsMetadata." + error; + } + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.AzureMetadata.verify(message.azureMetadata); + if (error) + return "azureMetadata." + error; + } + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) { + var error = $root.google.cloud.securitycenter.v2.ResourcePath.verify(message.resourcePath); + if (error) + return "resourcePath." + error; + } + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + if (!$util.isString(message.resourcePathString)) + return "resourcePathString: string expected"; return null; }; /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. + * Creates a Resource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Package} Package + * @returns {google.cloud.securitycenter.v2.Resource} Resource */ - Package.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Package) + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.Resource) return object; - var message = new $root.google.cloud.securitycenter.v2.Package(); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.packageType != null) - message.packageType = String(object.packageType); - if (object.packageVersion != null) - message.packageVersion = String(object.packageVersion); + var message = new $root.google.cloud.securitycenter.v2.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.type != null) + message.type = String(object.type); + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.location != null) + message.location = String(object.location); + if (object.gcpMetadata != null) { + if (typeof object.gcpMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Resource.gcpMetadata: object expected"); + message.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.fromObject(object.gcpMetadata); + } + if (object.awsMetadata != null) { + if (typeof object.awsMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Resource.awsMetadata: object expected"); + message.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.fromObject(object.awsMetadata); + } + if (object.azureMetadata != null) { + if (typeof object.azureMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Resource.azureMetadata: object expected"); + message.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.fromObject(object.azureMetadata); + } + if (object.resourcePath != null) { + if (typeof object.resourcePath !== "object") + throw TypeError(".google.cloud.securitycenter.v2.Resource.resourcePath: object expected"); + message.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.fromObject(object.resourcePath); + } + if (object.resourcePathString != null) + message.resourcePathString = String(object.resourcePathString); return message; }; /** - * Creates a plain object from a Package message. Also converts values to other types if specified. + * Creates a plain object from a Resource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static - * @param {google.cloud.securitycenter.v2.Package} message Package + * @param {google.cloud.securitycenter.v2.Resource} message Resource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Package.toObject = function toObject(message, options) { + Resource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.packageName = ""; - object.cpeUri = ""; - object.packageType = ""; - object.packageVersion = ""; + object.name = ""; + object.displayName = ""; + object.type = ""; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; + object.service = ""; + object.location = ""; + object.resourcePath = null; + object.resourcePathString = ""; } - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = message.packageType; - if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) - object.packageVersion = message.packageVersion; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] : message.cloudProvider; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.gcpMetadata != null && message.hasOwnProperty("gcpMetadata")) { + object.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.toObject(message.gcpMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "gcpMetadata"; + } + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + object.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.toObject(message.awsMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "awsMetadata"; + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + object.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.toObject(message.azureMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "azureMetadata"; + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) + object.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.toObject(message.resourcePath, options); + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + object.resourcePathString = message.resourcePathString; return object; }; /** - * Converts this Package to JSON. + * Converts this Resource to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @instance * @returns {Object.} JSON object */ - Package.prototype.toJSON = function toJSON() { + Resource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Package + * Gets the default type url for Resource * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Package + * @memberof google.cloud.securitycenter.v2.Resource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Package"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.Resource"; }; - return Package; + return Resource; })(); - v2.SecurityBulletin = (function() { + /** + * CloudProvider enum. + * @name google.cloud.securitycenter.v2.CloudProvider + * @enum {number} + * @property {number} CLOUD_PROVIDER_UNSPECIFIED=0 CLOUD_PROVIDER_UNSPECIFIED value + * @property {number} GOOGLE_CLOUD_PLATFORM=1 GOOGLE_CLOUD_PLATFORM value + * @property {number} AMAZON_WEB_SERVICES=2 AMAZON_WEB_SERVICES value + * @property {number} MICROSOFT_AZURE=3 MICROSOFT_AZURE value + */ + v2.CloudProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_CLOUD_PLATFORM"] = 1; + values[valuesById[2] = "AMAZON_WEB_SERVICES"] = 2; + values[valuesById[3] = "MICROSOFT_AZURE"] = 3; + return values; + })(); + + v2.GcpMetadata = (function() { /** - * Properties of a SecurityBulletin. + * Properties of a GcpMetadata. * @memberof google.cloud.securitycenter.v2 - * @interface ISecurityBulletin - * @property {string|null} [bulletinId] SecurityBulletin bulletinId - * @property {google.protobuf.ITimestamp|null} [submissionTime] SecurityBulletin submissionTime - * @property {string|null} [suggestedUpgradeVersion] SecurityBulletin suggestedUpgradeVersion + * @interface IGcpMetadata + * @property {string|null} [project] GcpMetadata project + * @property {string|null} [projectDisplayName] GcpMetadata projectDisplayName + * @property {string|null} [parent] GcpMetadata parent + * @property {string|null} [parentDisplayName] GcpMetadata parentDisplayName + * @property {Array.|null} [folders] GcpMetadata folders + * @property {string|null} [organization] GcpMetadata organization */ /** - * Constructs a new SecurityBulletin. + * Constructs a new GcpMetadata. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a SecurityBulletin. - * @implements ISecurityBulletin + * @classdesc Represents a GcpMetadata. + * @implements IGcpMetadata * @constructor - * @param {google.cloud.securitycenter.v2.ISecurityBulletin=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IGcpMetadata=} [properties] Properties to set */ - function SecurityBulletin(properties) { + function GcpMetadata(properties) { + this.folders = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88320,103 +92232,148 @@ } /** - * SecurityBulletin bulletinId. - * @member {string} bulletinId - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * GcpMetadata project. + * @member {string} project + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @instance */ - SecurityBulletin.prototype.bulletinId = ""; + GcpMetadata.prototype.project = ""; /** - * SecurityBulletin submissionTime. - * @member {google.protobuf.ITimestamp|null|undefined} submissionTime - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * GcpMetadata projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @instance */ - SecurityBulletin.prototype.submissionTime = null; + GcpMetadata.prototype.projectDisplayName = ""; /** - * SecurityBulletin suggestedUpgradeVersion. - * @member {string} suggestedUpgradeVersion - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * GcpMetadata parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @instance */ - SecurityBulletin.prototype.suggestedUpgradeVersion = ""; + GcpMetadata.prototype.parent = ""; /** - * Creates a new SecurityBulletin instance using the specified properties. + * GcpMetadata parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v2.GcpMetadata + * @instance + */ + GcpMetadata.prototype.parentDisplayName = ""; + + /** + * GcpMetadata folders. + * @member {Array.} folders + * @memberof google.cloud.securitycenter.v2.GcpMetadata + * @instance + */ + GcpMetadata.prototype.folders = $util.emptyArray; + + /** + * GcpMetadata organization. + * @member {string} organization + * @memberof google.cloud.securitycenter.v2.GcpMetadata + * @instance + */ + GcpMetadata.prototype.organization = ""; + + /** + * Creates a new GcpMetadata instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static - * @param {google.cloud.securitycenter.v2.ISecurityBulletin=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin instance + * @param {google.cloud.securitycenter.v2.IGcpMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.GcpMetadata} GcpMetadata instance */ - SecurityBulletin.create = function create(properties) { - return new SecurityBulletin(properties); + GcpMetadata.create = function create(properties) { + return new GcpMetadata(properties); }; /** - * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. + * Encodes the specified GcpMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.GcpMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static - * @param {google.cloud.securitycenter.v2.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {google.cloud.securitycenter.v2.IGcpMetadata} message GcpMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityBulletin.encode = function encode(message, writer) { + GcpMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bulletinId); - if (message.submissionTime != null && Object.hasOwnProperty.call(message, "submissionTime")) - $root.google.protobuf.Timestamp.encode(message.submissionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.suggestedUpgradeVersion != null && Object.hasOwnProperty.call(message, "suggestedUpgradeVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.suggestedUpgradeVersion); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectDisplayName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentDisplayName); + if (message.folders != null && message.folders.length) + for (var i = 0; i < message.folders.length; ++i) + $root.google.cloud.securitycenter.v2.Folder.encode(message.folders[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.organization); return writer; }; /** - * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.SecurityBulletin.verify|verify} messages. + * Encodes the specified GcpMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.GcpMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static - * @param {google.cloud.securitycenter.v2.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {google.cloud.securitycenter.v2.IGcpMetadata} message GcpMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityBulletin.encodeDelimited = function encodeDelimited(message, writer) { + GcpMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityBulletin message from the specified reader or buffer. + * Decodes a GcpMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v2.GcpMetadata} GcpMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityBulletin.decode = function decode(reader, length) { + GcpMetadata.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.cloud.securitycenter.v2.SecurityBulletin(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.GcpMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bulletinId = reader.string(); + message.project = reader.string(); break; } case 2: { - message.submissionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.projectDisplayName = reader.string(); break; } case 3: { - message.suggestedUpgradeVersion = reader.string(); + message.parent = reader.string(); + break; + } + case 4: { + message.parentDisplayName = reader.string(); + break; + } + case 5: { + if (!(message.folders && message.folders.length)) + message.folders = []; + message.folders.push($root.google.cloud.securitycenter.v2.Folder.decode(reader, reader.uint32())); + break; + } + case 6: { + message.organization = reader.string(); break; } default: @@ -88428,150 +92385,184 @@ }; /** - * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * Decodes a GcpMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v2.GcpMetadata} GcpMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityBulletin.decodeDelimited = function decodeDelimited(reader) { + GcpMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityBulletin message. + * Verifies a GcpMetadata message. * @function verify - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityBulletin.verify = function verify(message) { + GcpMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - if (!$util.isString(message.bulletinId)) - return "bulletinId: string expected"; - if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.submissionTime); - if (error) - return "submissionTime." + error; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + if (message.folders != null && message.hasOwnProperty("folders")) { + if (!Array.isArray(message.folders)) + return "folders: array expected"; + for (var i = 0; i < message.folders.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.Folder.verify(message.folders[i]); + if (error) + return "folders." + error; + } } - if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) - if (!$util.isString(message.suggestedUpgradeVersion)) - return "suggestedUpgradeVersion: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + if (!$util.isString(message.organization)) + return "organization: string expected"; return null; }; /** - * Creates a SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * Creates a GcpMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v2.GcpMetadata} GcpMetadata */ - SecurityBulletin.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.SecurityBulletin) + GcpMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.GcpMetadata) return object; - var message = new $root.google.cloud.securitycenter.v2.SecurityBulletin(); - if (object.bulletinId != null) - message.bulletinId = String(object.bulletinId); - if (object.submissionTime != null) { - if (typeof object.submissionTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.SecurityBulletin.submissionTime: object expected"); - message.submissionTime = $root.google.protobuf.Timestamp.fromObject(object.submissionTime); + var message = new $root.google.cloud.securitycenter.v2.GcpMetadata(); + if (object.project != null) + message.project = String(object.project); + if (object.projectDisplayName != null) + message.projectDisplayName = String(object.projectDisplayName); + if (object.parent != null) + message.parent = String(object.parent); + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + if (object.folders) { + if (!Array.isArray(object.folders)) + throw TypeError(".google.cloud.securitycenter.v2.GcpMetadata.folders: array expected"); + message.folders = []; + for (var i = 0; i < object.folders.length; ++i) { + if (typeof object.folders[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.GcpMetadata.folders: object expected"); + message.folders[i] = $root.google.cloud.securitycenter.v2.Folder.fromObject(object.folders[i]); + } } - if (object.suggestedUpgradeVersion != null) - message.suggestedUpgradeVersion = String(object.suggestedUpgradeVersion); + if (object.organization != null) + message.organization = String(object.organization); return message; }; /** - * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. + * Creates a plain object from a GcpMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static - * @param {google.cloud.securitycenter.v2.SecurityBulletin} message SecurityBulletin + * @param {google.cloud.securitycenter.v2.GcpMetadata} message GcpMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityBulletin.toObject = function toObject(message, options) { + GcpMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.folders = []; if (options.defaults) { - object.bulletinId = ""; - object.submissionTime = null; - object.suggestedUpgradeVersion = ""; + object.project = ""; + object.projectDisplayName = ""; + object.parent = ""; + object.parentDisplayName = ""; + object.organization = ""; } - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - object.bulletinId = message.bulletinId; - if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) - object.submissionTime = $root.google.protobuf.Timestamp.toObject(message.submissionTime, options); - if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) - object.suggestedUpgradeVersion = message.suggestedUpgradeVersion; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + if (message.folders && message.folders.length) { + object.folders = []; + for (var j = 0; j < message.folders.length; ++j) + object.folders[j] = $root.google.cloud.securitycenter.v2.Folder.toObject(message.folders[j], options); + } + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = message.organization; return object; }; /** - * Converts this SecurityBulletin to JSON. + * Converts this GcpMetadata to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @instance * @returns {Object.} JSON object */ - SecurityBulletin.prototype.toJSON = function toJSON() { + GcpMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityBulletin + * Gets the default type url for GcpMetadata * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.SecurityBulletin + * @memberof google.cloud.securitycenter.v2.GcpMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityBulletin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcpMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.SecurityBulletin"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.GcpMetadata"; }; - return SecurityBulletin; + return GcpMetadata; })(); - v2.MuteConfig = (function() { + v2.AwsMetadata = (function() { /** - * Properties of a MuteConfig. + * Properties of an AwsMetadata. * @memberof google.cloud.securitycenter.v2 - * @interface IMuteConfig - * @property {string|null} [name] MuteConfig name - * @property {string|null} [description] MuteConfig description - * @property {string|null} [filter] MuteConfig filter - * @property {google.protobuf.ITimestamp|null} [createTime] MuteConfig createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MuteConfig updateTime - * @property {string|null} [mostRecentEditor] MuteConfig mostRecentEditor - * @property {google.cloud.securitycenter.v2.MuteConfig.MuteConfigType|null} [type] MuteConfig type + * @interface IAwsMetadata + * @property {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization|null} [organization] AwsMetadata organization + * @property {Array.|null} [organizationalUnits] AwsMetadata organizationalUnits + * @property {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount|null} [account] AwsMetadata account */ /** - * Constructs a new MuteConfig. + * Constructs a new AwsMetadata. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a MuteConfig. - * @implements IMuteConfig + * @classdesc Represents an AwsMetadata. + * @implements IAwsMetadata * @constructor - * @param {google.cloud.securitycenter.v2.IMuteConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IAwsMetadata=} [properties] Properties to set */ - function MuteConfig(properties) { + function AwsMetadata(properties) { + this.organizationalUnits = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88579,159 +92570,106 @@ } /** - * MuteConfig name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @instance - */ - MuteConfig.prototype.name = ""; - - /** - * MuteConfig description. - * @member {string} description - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @instance - */ - MuteConfig.prototype.description = ""; - - /** - * MuteConfig filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @instance - */ - MuteConfig.prototype.filter = ""; - - /** - * MuteConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @instance - */ - MuteConfig.prototype.createTime = null; - - /** - * MuteConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v2.MuteConfig + * AwsMetadata organization. + * @member {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization|null|undefined} organization + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @instance */ - MuteConfig.prototype.updateTime = null; + AwsMetadata.prototype.organization = null; /** - * MuteConfig mostRecentEditor. - * @member {string} mostRecentEditor - * @memberof google.cloud.securitycenter.v2.MuteConfig + * AwsMetadata organizationalUnits. + * @member {Array.} organizationalUnits + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @instance */ - MuteConfig.prototype.mostRecentEditor = ""; + AwsMetadata.prototype.organizationalUnits = $util.emptyArray; /** - * MuteConfig type. - * @member {google.cloud.securitycenter.v2.MuteConfig.MuteConfigType} type - * @memberof google.cloud.securitycenter.v2.MuteConfig + * AwsMetadata account. + * @member {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount|null|undefined} account + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @instance */ - MuteConfig.prototype.type = 0; + AwsMetadata.prototype.account = null; /** - * Creates a new MuteConfig instance using the specified properties. + * Creates a new AwsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static - * @param {google.cloud.securitycenter.v2.IMuteConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig instance + * @param {google.cloud.securitycenter.v2.IAwsMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AwsMetadata} AwsMetadata instance */ - MuteConfig.create = function create(properties) { - return new MuteConfig(properties); + AwsMetadata.create = function create(properties) { + return new AwsMetadata(properties); }; /** - * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. + * Encodes the specified AwsMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static - * @param {google.cloud.securitycenter.v2.IMuteConfig} message MuteConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAwsMetadata} message AwsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MuteConfig.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.mostRecentEditor); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); + AwsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.encode(message.organization, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.organizationalUnits != null && message.organizationalUnits.length) + for (var i = 0; i < message.organizationalUnits.length; ++i) + $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.encode(message.organizationalUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.encode(message.account, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.MuteConfig.verify|verify} messages. + * Encodes the specified AwsMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static - * @param {google.cloud.securitycenter.v2.IMuteConfig} message MuteConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAwsMetadata} message AwsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MuteConfig.encodeDelimited = function encodeDelimited(message, writer) { + AwsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MuteConfig message from the specified reader or buffer. + * Decodes an AwsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig + * @returns {google.cloud.securitycenter.v2.AwsMetadata} AwsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MuteConfig.decode = function decode(reader, length) { + AwsMetadata.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.cloud.securitycenter.v2.MuteConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.AwsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.organization = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.decode(reader, reader.uint32()); break; } case 2: { - message.description = reader.string(); + if (!(message.organizationalUnits && message.organizationalUnits.length)) + message.organizationalUnits = []; + message.organizationalUnits.push($root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.decode(reader, reader.uint32())); break; } case 3: { - message.filter = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.mostRecentEditor = reader.string(); - break; - } - case 8: { - message.type = reader.int32(); + message.account = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.decode(reader, reader.uint32()); break; } default: @@ -88743,218 +92681,827 @@ }; /** - * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig + * @returns {google.cloud.securitycenter.v2.AwsMetadata} AwsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MuteConfig.decodeDelimited = function decodeDelimited(reader) { + AwsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MuteConfig message. + * Verifies an AwsMetadata message. * @function verify - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MuteConfig.verify = function verify(message) { + AwsMetadata.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.organization != null && message.hasOwnProperty("organization")) { + var error = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.verify(message.organization); if (error) - return "createTime." + error; + return "organization." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.organizationalUnits != null && message.hasOwnProperty("organizationalUnits")) { + if (!Array.isArray(message.organizationalUnits)) + return "organizationalUnits: array expected"; + for (var i = 0; i < message.organizationalUnits.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.verify(message.organizationalUnits[i]); + if (error) + return "organizationalUnits." + error; + } + } + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.verify(message.account); if (error) - return "updateTime." + error; + return "account." + error; } - if (message.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - if (!$util.isString(message.mostRecentEditor)) - return "mostRecentEditor: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } return null; }; /** - * Creates a MuteConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.MuteConfig + * @memberof google.cloud.securitycenter.v2.AwsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.MuteConfig} MuteConfig + * @returns {google.cloud.securitycenter.v2.AwsMetadata} AwsMetadata */ - MuteConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.MuteConfig) + AwsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AwsMetadata) return object; - var message = new $root.google.cloud.securitycenter.v2.MuteConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.MuteConfig.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.securitycenter.v2.AwsMetadata(); + if (object.organization != null) { + if (typeof object.organization !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AwsMetadata.organization: object expected"); + message.organization = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.fromObject(object.organization); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v2.MuteConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.organizationalUnits) { + if (!Array.isArray(object.organizationalUnits)) + throw TypeError(".google.cloud.securitycenter.v2.AwsMetadata.organizationalUnits: array expected"); + message.organizationalUnits = []; + for (var i = 0; i < object.organizationalUnits.length; ++i) { + if (typeof object.organizationalUnits[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AwsMetadata.organizationalUnits: object expected"); + message.organizationalUnits[i] = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.fromObject(object.organizationalUnits[i]); + } } - if (object.mostRecentEditor != null) - message.mostRecentEditor = String(object.mostRecentEditor); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AwsMetadata.account: object expected"); + message.account = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.fromObject(object.account); + } + return message; + }; + + /** + * Creates a plain object from an AwsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata} message AwsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.organizationalUnits = []; + if (options.defaults) { + object.organization = null; + object.account = null; + } + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.toObject(message.organization, options); + if (message.organizationalUnits && message.organizationalUnits.length) { + object.organizationalUnits = []; + for (var j = 0; j < message.organizationalUnits.length; ++j) + object.organizationalUnits[j] = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.toObject(message.organizationalUnits[j], options); + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.toObject(message.account, options); + return object; + }; + + /** + * Converts this AwsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @instance + * @returns {Object.} JSON object + */ + AwsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsMetadata + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AwsMetadata"; + }; + + AwsMetadata.AwsOrganization = (function() { + + /** + * Properties of an AwsOrganization. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @interface IAwsOrganization + * @property {string|null} [id] AwsOrganization id + */ + + /** + * Constructs a new AwsOrganization. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @classdesc Represents an AwsOrganization. + * @implements IAwsOrganization + * @constructor + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization=} [properties] Properties to set + */ + function AwsOrganization(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]]; + } + + /** + * AwsOrganization id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @instance + */ + AwsOrganization.prototype.id = ""; + + /** + * Creates a new AwsOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization} AwsOrganization instance + */ + AwsOrganization.create = function create(properties) { + return new AwsOrganization(properties); + }; + + /** + * Encodes the specified AwsOrganization message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization} message AwsOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + return writer; + }; + + /** + * Encodes the specified AwsOrganization message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganization} message AwsOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization} AwsOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganization.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.cloud.securitycenter.v2.AwsMetadata.AwsOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization} AwsOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsOrganization message. + * @function verify + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates an AwsOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization} AwsOrganization + */ + AwsOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization) + return object; + var message = new $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization(); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from an AwsOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization} message AwsOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsOrganization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this AwsOrganization to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @instance + * @returns {Object.} JSON object + */ + AwsOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsOrganization + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsOrganization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization"; + }; + + return AwsOrganization; + })(); + + AwsMetadata.AwsOrganizationalUnit = (function() { + + /** + * Properties of an AwsOrganizationalUnit. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @interface IAwsOrganizationalUnit + * @property {string|null} [id] AwsOrganizationalUnit id + * @property {string|null} [name] AwsOrganizationalUnit name + */ + + /** + * Constructs a new AwsOrganizationalUnit. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @classdesc Represents an AwsOrganizationalUnit. + * @implements IAwsOrganizationalUnit + * @constructor + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit=} [properties] Properties to set + */ + function AwsOrganizationalUnit(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]]; + } + + /** + * AwsOrganizationalUnit id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @instance + */ + AwsOrganizationalUnit.prototype.id = ""; + + /** + * AwsOrganizationalUnit name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @instance + */ + AwsOrganizationalUnit.prototype.name = ""; + + /** + * Creates a new AwsOrganizationalUnit instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit instance + */ + AwsOrganizationalUnit.create = function create(properties) { + return new AwsOrganizationalUnit(properties); + }; + + /** + * Encodes the specified AwsOrganizationalUnit message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit} message AwsOrganizationalUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganizationalUnit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified AwsOrganizationalUnit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsOrganizationalUnit} message AwsOrganizationalUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganizationalUnit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganizationalUnit.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.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganizationalUnit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsOrganizationalUnit message. + * @function verify + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsOrganizationalUnit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an AwsOrganizationalUnit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + */ + AwsOrganizationalUnit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit) + return object; + var message = new $root.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AwsOrganizationalUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit} message AwsOrganizationalUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsOrganizationalUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AwsOrganizationalUnit to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @instance + * @returns {Object.} JSON object + */ + AwsOrganizationalUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsOrganizationalUnit + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsOrganizationalUnit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit"; + }; + + return AwsOrganizationalUnit; + })(); + + AwsMetadata.AwsAccount = (function() { + + /** + * Properties of an AwsAccount. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @interface IAwsAccount + * @property {string|null} [id] AwsAccount id + * @property {string|null} [name] AwsAccount name + */ + + /** + * Constructs a new AwsAccount. + * @memberof google.cloud.securitycenter.v2.AwsMetadata + * @classdesc Represents an AwsAccount. + * @implements IAwsAccount + * @constructor + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount=} [properties] Properties to set + */ + function AwsAccount(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]]; + } + + /** + * AwsAccount id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @instance + */ + AwsAccount.prototype.id = ""; + + /** + * AwsAccount name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @instance + */ + AwsAccount.prototype.name = ""; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsAccount} AwsAccount instance + */ + AwsAccount.create = function create(properties) { + return new AwsAccount(properties); + }; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AwsMetadata.AwsAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.cloud.securitycenter.v2.AwsMetadata.AwsAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - break; - case "MUTE_CONFIG_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STATIC": - case 1: - message.type = 1; - break; - } - return message; - }; + return message; + }; - /** - * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @static - * @param {google.cloud.securitycenter.v2.MuteConfig} message MuteConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MuteConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.createTime = null; - object.updateTime = null; - object.mostRecentEditor = ""; - object.type = options.enums === String ? "MUTE_CONFIG_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - object.mostRecentEditor = message.mostRecentEditor; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.securitycenter.v2.MuteConfig.MuteConfigType[message.type] === undefined ? message.type : $root.google.cloud.securitycenter.v2.MuteConfig.MuteConfigType[message.type] : message.type; - return object; - }; + /** + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this MuteConfig to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @instance - * @returns {Object.} JSON object - */ - MuteConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an AwsAccount message. + * @function verify + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Gets the default type url for MuteConfig - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.MuteConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MuteConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.MuteConfig"; - }; + /** + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.AwsMetadata.AwsAccount} AwsAccount + */ + AwsAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount) + return object; + var message = new $root.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * MuteConfigType enum. - * @name google.cloud.securitycenter.v2.MuteConfig.MuteConfigType - * @enum {number} - * @property {number} MUTE_CONFIG_TYPE_UNSPECIFIED=0 MUTE_CONFIG_TYPE_UNSPECIFIED value - * @property {number} STATIC=1 STATIC value - */ - MuteConfig.MuteConfigType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MUTE_CONFIG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STATIC"] = 1; - return values; + /** + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v2.AwsMetadata.AwsAccount} message AwsAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AwsAccount to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @instance + * @returns {Object.} JSON object + */ + AwsAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsAccount + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AwsMetadata.AwsAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AwsMetadata.AwsAccount"; + }; + + return AwsAccount; })(); - return MuteConfig; + return AwsMetadata; })(); - v2.NotificationConfig = (function() { + v2.AzureMetadata = (function() { /** - * Properties of a NotificationConfig. + * Properties of an AzureMetadata. * @memberof google.cloud.securitycenter.v2 - * @interface INotificationConfig - * @property {string|null} [name] NotificationConfig name - * @property {string|null} [description] NotificationConfig description - * @property {string|null} [pubsubTopic] NotificationConfig pubsubTopic - * @property {string|null} [serviceAccount] NotificationConfig serviceAccount - * @property {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null} [streamingConfig] NotificationConfig streamingConfig + * @interface IAzureMetadata + * @property {Array.|null} [managementGroups] AzureMetadata managementGroups + * @property {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription|null} [subscription] AzureMetadata subscription + * @property {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup|null} [resourceGroup] AzureMetadata resourceGroup */ /** - * Constructs a new NotificationConfig. + * Constructs a new AzureMetadata. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig + * @classdesc Represents an AzureMetadata. + * @implements IAzureMetadata * @constructor - * @param {google.cloud.securitycenter.v2.INotificationConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IAzureMetadata=} [properties] Properties to set */ - function NotificationConfig(properties) { + function AzureMetadata(properties) { + this.managementGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88962,145 +93509,106 @@ } /** - * NotificationConfig name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @instance - */ - NotificationConfig.prototype.name = ""; - - /** - * NotificationConfig description. - * @member {string} description - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @instance - */ - NotificationConfig.prototype.description = ""; - - /** - * NotificationConfig pubsubTopic. - * @member {string} pubsubTopic - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @instance - */ - NotificationConfig.prototype.pubsubTopic = ""; - - /** - * NotificationConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * AzureMetadata managementGroups. + * @member {Array.} managementGroups + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @instance */ - NotificationConfig.prototype.serviceAccount = ""; + AzureMetadata.prototype.managementGroups = $util.emptyArray; /** - * NotificationConfig streamingConfig. - * @member {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig|null|undefined} streamingConfig - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * AzureMetadata subscription. + * @member {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription|null|undefined} subscription + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @instance */ - NotificationConfig.prototype.streamingConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AzureMetadata.prototype.subscription = null; /** - * NotificationConfig notifyConfig. - * @member {"streamingConfig"|undefined} notifyConfig - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * AzureMetadata resourceGroup. + * @member {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup|null|undefined} resourceGroup + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @instance */ - Object.defineProperty(NotificationConfig.prototype, "notifyConfig", { - get: $util.oneOfGetter($oneOfFields = ["streamingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + AzureMetadata.prototype.resourceGroup = null; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new AzureMetadata instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static - * @param {google.cloud.securitycenter.v2.INotificationConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig instance + * @param {google.cloud.securitycenter.v2.IAzureMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AzureMetadata} AzureMetadata instance */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); + AzureMetadata.create = function create(properties) { + return new AzureMetadata(properties); }; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. + * Encodes the specified AzureMetadata message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static - * @param {google.cloud.securitycenter.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAzureMetadata} message AzureMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encode = function encode(message, writer) { + AzureMetadata.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.pubsubTopic != null && Object.hasOwnProperty.call(message, "pubsubTopic")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pubsubTopic); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceAccount); - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.encode(message.streamingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.managementGroups != null && message.managementGroups.length) + for (var i = 0; i < message.managementGroups.length; ++i) + $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.encode(message.managementGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.encode(message.subscription, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) + $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.verify|verify} messages. + * Encodes the specified AzureMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static - * @param {google.cloud.securitycenter.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.IAzureMetadata} message AzureMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes an AzureMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata} AzureMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decode = function decode(reader, length) { + AzureMetadata.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.cloud.securitycenter.v2.NotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.AzureMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.managementGroups && message.managementGroups.length)) + message.managementGroups = []; + message.managementGroups.push($root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.decode(reader, reader.uint32())); break; } case 2: { - message.description = reader.string(); + message.subscription = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.decode(reader, reader.uint32()); break; } case 3: { - message.pubsubTopic = reader.string(); - break; - } - case 4: { - message.serviceAccount = reader.string(); - break; - } - case 5: { - message.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.decode(reader, reader.uint32()); + message.resourceGroup = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.decode(reader, reader.uint32()); break; } default: @@ -89112,163 +93620,392 @@ }; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata} AzureMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + AzureMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationConfig message. + * Verifies an AzureMetadata message. * @function verify - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationConfig.verify = function verify(message) { + AzureMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) - if (!$util.isString(message.pubsubTopic)) - return "pubsubTopic: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - properties.notifyConfig = 1; - { - var error = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify(message.streamingConfig); + if (message.managementGroups != null && message.hasOwnProperty("managementGroups")) { + if (!Array.isArray(message.managementGroups)) + return "managementGroups: array expected"; + for (var i = 0; i < message.managementGroups.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.verify(message.managementGroups[i]); if (error) - return "streamingConfig." + error; + return "managementGroups." + error; } } + if (message.subscription != null && message.hasOwnProperty("subscription")) { + var error = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.verify(message.subscription); + if (error) + return "subscription." + error; + } + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) { + var error = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.verify(message.resourceGroup); + if (error) + return "resourceGroup." + error; + } return null; }; /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata} AzureMetadata */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.NotificationConfig) + AzureMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AzureMetadata) return object; - var message = new $root.google.cloud.securitycenter.v2.NotificationConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.pubsubTopic != null) - message.pubsubTopic = String(object.pubsubTopic); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.streamingConfig != null) { - if (typeof object.streamingConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v2.NotificationConfig.streamingConfig: object expected"); - message.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.fromObject(object.streamingConfig); + var message = new $root.google.cloud.securitycenter.v2.AzureMetadata(); + if (object.managementGroups) { + if (!Array.isArray(object.managementGroups)) + throw TypeError(".google.cloud.securitycenter.v2.AzureMetadata.managementGroups: array expected"); + message.managementGroups = []; + for (var i = 0; i < object.managementGroups.length; ++i) { + if (typeof object.managementGroups[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AzureMetadata.managementGroups: object expected"); + message.managementGroups[i] = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.fromObject(object.managementGroups[i]); + } + } + if (object.subscription != null) { + if (typeof object.subscription !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AzureMetadata.subscription: object expected"); + message.subscription = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.fromObject(object.subscription); + } + if (object.resourceGroup != null) { + if (typeof object.resourceGroup !== "object") + throw TypeError(".google.cloud.securitycenter.v2.AzureMetadata.resourceGroup: object expected"); + message.resourceGroup = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.fromObject(object.resourceGroup); } return message; }; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @static - * @param {google.cloud.securitycenter.v2.NotificationConfig} message NotificationConfig + * @param {google.cloud.securitycenter.v2.AzureMetadata} message AzureMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationConfig.toObject = function toObject(message, options) { + AzureMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.managementGroups = []; if (options.defaults) { - object.name = ""; - object.description = ""; - object.pubsubTopic = ""; - object.serviceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) - object.pubsubTopic = message.pubsubTopic; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - object.streamingConfig = $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.toObject(message.streamingConfig, options); - if (options.oneofs) - object.notifyConfig = "streamingConfig"; - } + object.subscription = null; + object.resourceGroup = null; + } + if (message.managementGroups && message.managementGroups.length) { + object.managementGroups = []; + for (var j = 0; j < message.managementGroups.length; ++j) + object.managementGroups[j] = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.toObject(message.managementGroups[j], options); + } + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.toObject(message.subscription, options); + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + object.resourceGroup = $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.toObject(message.resourceGroup, options); return object; }; /** - * Converts this NotificationConfig to JSON. + * Converts this AzureMetadata to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.NotificationConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata * @instance * @returns {Object.} JSON object */ - NotificationConfig.prototype.toJSON = function toJSON() { + AzureMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for NotificationConfig - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationConfig"; - }; + /** + * Gets the default type url for AzureMetadata + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AzureMetadata"; + }; + + AzureMetadata.AzureManagementGroup = (function() { + + /** + * Properties of an AzureManagementGroup. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @interface IAzureManagementGroup + * @property {string|null} [id] AzureManagementGroup id + * @property {string|null} [displayName] AzureManagementGroup displayName + */ + + /** + * Constructs a new AzureManagementGroup. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @classdesc Represents an AzureManagementGroup. + * @implements IAzureManagementGroup + * @constructor + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup=} [properties] Properties to set + */ + function AzureManagementGroup(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]]; + } + + /** + * AzureManagementGroup id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @instance + */ + AzureManagementGroup.prototype.id = ""; + + /** + * AzureManagementGroup displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @instance + */ + AzureManagementGroup.prototype.displayName = ""; + + /** + * Creates a new AzureManagementGroup instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup} AzureManagementGroup instance + */ + AzureManagementGroup.create = function create(properties) { + return new AzureManagementGroup(properties); + }; + + /** + * Encodes the specified AzureManagementGroup message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup} message AzureManagementGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureManagementGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified AzureManagementGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureManagementGroup} message AzureManagementGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureManagementGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup} AzureManagementGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureManagementGroup.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.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup} AzureManagementGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureManagementGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureManagementGroup message. + * @function verify + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureManagementGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an AzureManagementGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup} AzureManagementGroup + */ + AzureManagementGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup) + return object; + var message = new $root.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an AzureManagementGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup} message AzureManagementGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureManagementGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this AzureManagementGroup to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @instance + * @returns {Object.} JSON object + */ + AzureManagementGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureManagementGroup + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureManagementGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup"; + }; + + return AzureManagementGroup; + })(); - NotificationConfig.StreamingConfig = (function() { + AzureMetadata.AzureSubscription = (function() { /** - * Properties of a StreamingConfig. - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @interface IStreamingConfig - * @property {string|null} [filter] StreamingConfig filter + * Properties of an AzureSubscription. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @interface IAzureSubscription + * @property {string|null} [id] AzureSubscription id + * @property {string|null} [displayName] AzureSubscription displayName */ /** - * Constructs a new StreamingConfig. - * @memberof google.cloud.securitycenter.v2.NotificationConfig - * @classdesc Represents a StreamingConfig. - * @implements IStreamingConfig + * Constructs a new AzureSubscription. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @classdesc Represents an AzureSubscription. + * @implements IAzureSubscription * @constructor - * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription=} [properties] Properties to set */ - function StreamingConfig(properties) { + function AzureSubscription(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89276,75 +94013,89 @@ } /** - * StreamingConfig filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * AzureSubscription id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @instance */ - StreamingConfig.prototype.filter = ""; + AzureSubscription.prototype.id = ""; /** - * Creates a new StreamingConfig instance using the specified properties. + * AzureSubscription displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription + * @instance + */ + AzureSubscription.prototype.displayName = ""; + + /** + * Creates a new AzureSubscription instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static - * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig instance + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription} AzureSubscription instance */ - StreamingConfig.create = function create(properties) { - return new StreamingConfig(properties); + AzureSubscription.create = function create(properties) { + return new AzureSubscription(properties); }; /** - * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * Encodes the specified AzureSubscription message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static - * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription} message AzureSubscription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingConfig.encode = function encode(message, writer) { + AzureSubscription.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig.verify|verify} messages. + * Encodes the specified AzureSubscription message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static - * @param {google.cloud.securitycenter.v2.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureSubscription} message AzureSubscription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureSubscription.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingConfig message from the specified reader or buffer. + * Decodes an AzureSubscription message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription} AzureSubscription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingConfig.decode = function decode(reader, length) { + AzureSubscription.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.cloud.securitycenter.v2.NotificationConfig.StreamingConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.filter = reader.string(); + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); break; } default: @@ -89356,407 +94107,338 @@ }; /** - * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureSubscription message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription} AzureSubscription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamingConfig.decodeDelimited = function decodeDelimited(reader) { + AzureSubscription.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingConfig message. + * Verifies an AzureSubscription message. * @function verify - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamingConfig.verify = function verify(message) { + AzureSubscription.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a StreamingConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureSubscription message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} StreamingConfig + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription} AzureSubscription */ - StreamingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig) + AzureSubscription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription) return object; - var message = new $root.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig(); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureSubscription message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static - * @param {google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig} message StreamingConfig + * @param {google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription} message AzureSubscription * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingConfig.toObject = function toObject(message, options) { + AzureSubscription.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.filter = ""; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this StreamingConfig to JSON. + * Converts this AzureSubscription to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @instance * @returns {Object.} JSON object */ - StreamingConfig.prototype.toJSON = function toJSON() { + AzureSubscription.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StreamingConfig + * Gets the default type url for AzureSubscription * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StreamingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureSubscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription"; }; - return StreamingConfig; + return AzureSubscription; })(); - return NotificationConfig; - })(); - - v2.NotificationMessage = (function() { - - /** - * Properties of a NotificationMessage. - * @memberof google.cloud.securitycenter.v2 - * @interface INotificationMessage - * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName - * @property {google.cloud.securitycenter.v2.IFinding|null} [finding] NotificationMessage finding - * @property {google.cloud.securitycenter.v2.IResource|null} [resource] NotificationMessage resource - */ - - /** - * Constructs a new NotificationMessage. - * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a NotificationMessage. - * @implements INotificationMessage - * @constructor - * @param {google.cloud.securitycenter.v2.INotificationMessage=} [properties] Properties to set - */ - function NotificationMessage(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]]; - } - - /** - * NotificationMessage notificationConfigName. - * @member {string} notificationConfigName - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @instance - */ - NotificationMessage.prototype.notificationConfigName = ""; - - /** - * NotificationMessage finding. - * @member {google.cloud.securitycenter.v2.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @instance - */ - NotificationMessage.prototype.finding = null; + AzureMetadata.AzureResourceGroup = (function() { - /** - * NotificationMessage resource. - * @member {google.cloud.securitycenter.v2.IResource|null|undefined} resource - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @instance - */ - NotificationMessage.prototype.resource = null; + /** + * Properties of an AzureResourceGroup. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @interface IAzureResourceGroup + * @property {string|null} [name] AzureResourceGroup name + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new AzureResourceGroup. + * @memberof google.cloud.securitycenter.v2.AzureMetadata + * @classdesc Represents an AzureResourceGroup. + * @implements IAzureResourceGroup + * @constructor + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup=} [properties] Properties to set + */ + function AzureResourceGroup(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]]; + } - /** - * NotificationMessage event. - * @member {"finding"|undefined} event - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @instance - */ - Object.defineProperty(NotificationMessage.prototype, "event", { - get: $util.oneOfGetter($oneOfFields = ["finding"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * AzureResourceGroup name. + * @member {string} name + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @instance + */ + AzureResourceGroup.prototype.name = ""; - /** - * Creates a new NotificationMessage instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {google.cloud.securitycenter.v2.INotificationMessage=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage instance - */ - NotificationMessage.create = function create(properties) { - return new NotificationMessage(properties); - }; + /** + * Creates a new AzureResourceGroup instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup} AzureResourceGroup instance + */ + AzureResourceGroup.create = function create(properties) { + return new AzureResourceGroup(properties); + }; - /** - * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {google.cloud.securitycenter.v2.INotificationMessage} message NotificationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.notificationConfigName != null && Object.hasOwnProperty.call(message, "notificationConfigName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v2.Finding.encode(message.finding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.securitycenter.v2.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified AzureResourceGroup message. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup} message AzureResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureResourceGroup.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); + return writer; + }; - /** - * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.NotificationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {google.cloud.securitycenter.v2.INotificationMessage} message NotificationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AzureResourceGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.IAzureResourceGroup} message AzureResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a NotificationMessage message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessage.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.cloud.securitycenter.v2.NotificationMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.notificationConfigName = reader.string(); - break; - } - case 2: { - message.finding = $root.google.cloud.securitycenter.v2.Finding.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.securitycenter.v2.Resource.decode(reader, reader.uint32()); + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup} AzureResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureResourceGroup.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.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup} AzureResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a NotificationMessage message. - * @function verify - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) - if (!$util.isString(message.notificationConfigName)) - return "notificationConfigName: string expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - properties.event = 1; - { - var error = $root.google.cloud.securitycenter.v2.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.securitycenter.v2.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; + /** + * Verifies an AzureResourceGroup message. + * @function verify + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a NotificationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.NotificationMessage} NotificationMessage - */ - NotificationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.NotificationMessage) - return object; - var message = new $root.google.cloud.securitycenter.v2.NotificationMessage(); - if (object.notificationConfigName != null) - message.notificationConfigName = String(object.notificationConfigName); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v2.NotificationMessage.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v2.Finding.fromObject(object.finding); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.securitycenter.v2.NotificationMessage.resource: object expected"); - message.resource = $root.google.cloud.securitycenter.v2.Resource.fromObject(object.resource); - } - return message; - }; + /** + * Creates an AzureResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup} AzureResourceGroup + */ + AzureResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup) + return object; + var message = new $root.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {google.cloud.securitycenter.v2.NotificationMessage} message NotificationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.notificationConfigName = ""; - object.resource = null; - } - if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) - object.notificationConfigName = message.notificationConfigName; - if (message.finding != null && message.hasOwnProperty("finding")) { - object.finding = $root.google.cloud.securitycenter.v2.Finding.toObject(message.finding, options); - if (options.oneofs) - object.event = "finding"; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.securitycenter.v2.Resource.toObject(message.resource, options); - return object; - }; + /** + * Creates a plain object from an AzureResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup} message AzureResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Converts this NotificationMessage to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @instance - * @returns {Object.} JSON object - */ - NotificationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AzureResourceGroup to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @instance + * @returns {Object.} JSON object + */ + AzureResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for NotificationMessage - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.NotificationMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.NotificationMessage"; - }; + /** + * Gets the default type url for AzureResourceGroup + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureResourceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup"; + }; - return NotificationMessage; + return AzureResourceGroup; + })(); + + return AzureMetadata; })(); - v2.Resource = (function() { + v2.ResourcePath = (function() { /** - * Properties of a Resource. + * Properties of a ResourcePath. * @memberof google.cloud.securitycenter.v2 - * @interface IResource - * @property {string|null} [name] Resource name - * @property {string|null} [displayName] Resource displayName - * @property {string|null} [type] Resource type + * @interface IResourcePath + * @property {Array.|null} [nodes] ResourcePath nodes */ /** - * Constructs a new Resource. + * Constructs a new ResourcePath. * @memberof google.cloud.securitycenter.v2 - * @classdesc Represents a Resource. - * @implements IResource + * @classdesc Represents a ResourcePath. + * @implements IResourcePath * @constructor - * @param {google.cloud.securitycenter.v2.IResource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v2.IResourcePath=} [properties] Properties to set */ - function Resource(properties) { + function ResourcePath(properties) { + this.nodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -89764,103 +94446,78 @@ } /** - * Resource name. - * @member {string} name - * @memberof google.cloud.securitycenter.v2.Resource - * @instance - */ - Resource.prototype.name = ""; - - /** - * Resource displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v2.Resource - * @instance - */ - Resource.prototype.displayName = ""; - - /** - * Resource type. - * @member {string} type - * @memberof google.cloud.securitycenter.v2.Resource + * ResourcePath nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v2.ResourcePath * @instance */ - Resource.prototype.type = ""; + ResourcePath.prototype.nodes = $util.emptyArray; /** - * Creates a new Resource instance using the specified properties. + * Creates a new ResourcePath instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static - * @param {google.cloud.securitycenter.v2.IResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v2.Resource} Resource instance + * @param {google.cloud.securitycenter.v2.IResourcePath=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ResourcePath} ResourcePath instance */ - Resource.create = function create(properties) { - return new Resource(properties); + ResourcePath.create = function create(properties) { + return new ResourcePath(properties); }; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. + * Encodes the specified ResourcePath message. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static - * @param {google.cloud.securitycenter.v2.IResource} message Resource message or plain object to encode + * @param {google.cloud.securitycenter.v2.IResourcePath} message ResourcePath message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encode = function encode(message, writer) { + ResourcePath.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.Resource.verify|verify} messages. + * Encodes the specified ResourcePath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static - * @param {google.cloud.securitycenter.v2.IResource} message Resource message or plain object to encode + * @param {google.cloud.securitycenter.v2.IResourcePath} message ResourcePath message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { + ResourcePath.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a ResourcePath message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v2.Resource} Resource + * @returns {google.cloud.securitycenter.v2.ResourcePath} ResourcePath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decode = function decode(reader, length) { + ResourcePath.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.cloud.securitycenter.v2.Resource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v2.ResourcePath(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.decode(reader, reader.uint32())); break; } default: @@ -89872,119 +94529,458 @@ }; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a ResourcePath message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v2.Resource} Resource + * @returns {google.cloud.securitycenter.v2.ResourcePath} ResourcePath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decodeDelimited = function decodeDelimited(reader) { + ResourcePath.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Resource message. + * Verifies a ResourcePath message. * @function verify - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Resource.verify = function verify(message) { + ResourcePath.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.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } + } return null; }; /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates a ResourcePath message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v2.Resource} Resource + * @returns {google.cloud.securitycenter.v2.ResourcePath} ResourcePath */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v2.Resource) + ResourcePath.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ResourcePath) return object; - var message = new $root.google.cloud.securitycenter.v2.Resource(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.securitycenter.v2.ResourcePath(); + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v2.ResourcePath.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ResourcePath.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.fromObject(object.nodes[i]); + } + } return message; }; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. + * Creates a plain object from a ResourcePath message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static - * @param {google.cloud.securitycenter.v2.Resource} message Resource + * @param {google.cloud.securitycenter.v2.ResourcePath} message ResourcePath * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Resource.toObject = function toObject(message, options) { + ResourcePath.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.type = ""; + if (options.arrays || options.defaults) + object.nodes = []; + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.toObject(message.nodes[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; return object; }; /** - * Converts this Resource to JSON. + * Converts this ResourcePath to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @instance * @returns {Object.} JSON object */ - Resource.prototype.toJSON = function toJSON() { + ResourcePath.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Resource + * Gets the default type url for ResourcePath * @function getTypeUrl - * @memberof google.cloud.securitycenter.v2.Resource + * @memberof google.cloud.securitycenter.v2.ResourcePath * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourcePath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v2.Resource"; + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ResourcePath"; }; - return Resource; + /** + * ResourcePathNodeType enum. + * @name google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType + * @enum {number} + * @property {number} RESOURCE_PATH_NODE_TYPE_UNSPECIFIED=0 RESOURCE_PATH_NODE_TYPE_UNSPECIFIED value + * @property {number} GCP_ORGANIZATION=1 GCP_ORGANIZATION value + * @property {number} GCP_FOLDER=2 GCP_FOLDER value + * @property {number} GCP_PROJECT=3 GCP_PROJECT value + * @property {number} AWS_ORGANIZATION=4 AWS_ORGANIZATION value + * @property {number} AWS_ORGANIZATIONAL_UNIT=5 AWS_ORGANIZATIONAL_UNIT value + * @property {number} AWS_ACCOUNT=6 AWS_ACCOUNT value + * @property {number} AZURE_MANAGEMENT_GROUP=7 AZURE_MANAGEMENT_GROUP value + * @property {number} AZURE_SUBSCRIPTION=8 AZURE_SUBSCRIPTION value + * @property {number} AZURE_RESOURCE_GROUP=9 AZURE_RESOURCE_GROUP value + */ + ResourcePath.ResourcePathNodeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_ORGANIZATION"] = 1; + values[valuesById[2] = "GCP_FOLDER"] = 2; + values[valuesById[3] = "GCP_PROJECT"] = 3; + values[valuesById[4] = "AWS_ORGANIZATION"] = 4; + values[valuesById[5] = "AWS_ORGANIZATIONAL_UNIT"] = 5; + values[valuesById[6] = "AWS_ACCOUNT"] = 6; + values[valuesById[7] = "AZURE_MANAGEMENT_GROUP"] = 7; + values[valuesById[8] = "AZURE_SUBSCRIPTION"] = 8; + values[valuesById[9] = "AZURE_RESOURCE_GROUP"] = 9; + return values; + })(); + + ResourcePath.ResourcePathNode = (function() { + + /** + * Properties of a ResourcePathNode. + * @memberof google.cloud.securitycenter.v2.ResourcePath + * @interface IResourcePathNode + * @property {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType|null} [nodeType] ResourcePathNode nodeType + * @property {string|null} [id] ResourcePathNode id + * @property {string|null} [displayName] ResourcePathNode displayName + */ + + /** + * Constructs a new ResourcePathNode. + * @memberof google.cloud.securitycenter.v2.ResourcePath + * @classdesc Represents a ResourcePathNode. + * @implements IResourcePathNode + * @constructor + * @param {google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode=} [properties] Properties to set + */ + function ResourcePathNode(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]]; + } + + /** + * ResourcePathNode nodeType. + * @member {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType} nodeType + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.nodeType = 0; + + /** + * ResourcePathNode id. + * @member {string} id + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.id = ""; + + /** + * ResourcePathNode displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.displayName = ""; + + /** + * Creates a new ResourcePathNode instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode} ResourcePathNode instance + */ + ResourcePathNode.create = function create(properties) { + return new ResourcePathNode(properties); + }; + + /** + * Encodes the specified ResourcePathNode message. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode} message ResourcePathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePathNode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeType != null && Object.hasOwnProperty.call(message, "nodeType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nodeType); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ResourcePathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v2.ResourcePath.IResourcePathNode} message ResourcePathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePathNode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode} ResourcePathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePathNode.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.cloud.securitycenter.v2.ResourcePath.ResourcePathNode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeType = reader.int32(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode} ResourcePathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePathNode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourcePathNode message. + * @function verify + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourcePathNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeType != null && message.hasOwnProperty("nodeType")) + switch (message.nodeType) { + default: + return "nodeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ResourcePathNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode} ResourcePathNode + */ + ResourcePathNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode) + return object; + var message = new $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode(); + switch (object.nodeType) { + default: + if (typeof object.nodeType === "number") { + message.nodeType = object.nodeType; + break; + } + break; + case "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED": + case 0: + message.nodeType = 0; + break; + case "GCP_ORGANIZATION": + case 1: + message.nodeType = 1; + break; + case "GCP_FOLDER": + case 2: + message.nodeType = 2; + break; + case "GCP_PROJECT": + case 3: + message.nodeType = 3; + break; + case "AWS_ORGANIZATION": + case 4: + message.nodeType = 4; + break; + case "AWS_ORGANIZATIONAL_UNIT": + case 5: + message.nodeType = 5; + break; + case "AWS_ACCOUNT": + case 6: + message.nodeType = 6; + break; + case "AZURE_MANAGEMENT_GROUP": + case 7: + message.nodeType = 7; + break; + case "AZURE_SUBSCRIPTION": + case 8: + message.nodeType = 8; + break; + case "AZURE_RESOURCE_GROUP": + case 9: + message.nodeType = 9; + break; + } + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ResourcePathNode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode} message ResourcePathNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourcePathNode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.nodeType = options.enums === String ? "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" : 0; + object.id = ""; + object.displayName = ""; + } + if (message.nodeType != null && message.hasOwnProperty("nodeType")) + object.nodeType = options.enums === String ? $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType[message.nodeType] === undefined ? message.nodeType : $root.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType[message.nodeType] : message.nodeType; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ResourcePathNode to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @instance + * @returns {Object.} JSON object + */ + ResourcePathNode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourcePathNode + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourcePathNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode"; + }; + + return ResourcePathNode; + })(); + + return ResourcePath; })(); v2.ResourceValueConfig = (function() { @@ -90002,6 +94998,7 @@ * @property {string|null} [description] ResourceValueConfig description * @property {google.protobuf.ITimestamp|null} [createTime] ResourceValueConfig createTime * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceValueConfig updateTime + * @property {google.cloud.securitycenter.v2.CloudProvider|null} [cloudProvider] ResourceValueConfig cloudProvider * @property {google.cloud.securitycenter.v2.ResourceValueConfig.ISensitiveDataProtectionMapping|null} [sensitiveDataProtectionMapping] ResourceValueConfig sensitiveDataProtectionMapping */ @@ -90094,6 +95091,14 @@ */ ResourceValueConfig.prototype.updateTime = null; + /** + * ResourceValueConfig cloudProvider. + * @member {google.cloud.securitycenter.v2.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v2.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.cloudProvider = 0; + /** * ResourceValueConfig sensitiveDataProtectionMapping. * @member {google.cloud.securitycenter.v2.ResourceValueConfig.ISensitiveDataProtectionMapping|null|undefined} sensitiveDataProtectionMapping @@ -90146,6 +95151,8 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.cloudProvider); if (message.sensitiveDataProtectionMapping != null && Object.hasOwnProperty.call(message, "sensitiveDataProtectionMapping")) $root.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping.encode(message.sensitiveDataProtectionMapping, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; @@ -90239,6 +95246,10 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 10: { + message.cloudProvider = reader.int32(); + break; + } case 11: { message.sensitiveDataProtectionMapping = $root.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping.decode(reader, reader.uint32()); break; @@ -90326,6 +95337,16 @@ if (error) return "updateTime." + error; } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } if (message.sensitiveDataProtectionMapping != null && message.hasOwnProperty("sensitiveDataProtectionMapping")) { var error = $root.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping.verify(message.sensitiveDataProtectionMapping); if (error) @@ -90406,6 +95427,30 @@ throw TypeError(".google.cloud.securitycenter.v2.ResourceValueConfig.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } if (object.sensitiveDataProtectionMapping != null) { if (typeof object.sensitiveDataProtectionMapping !== "object") throw TypeError(".google.cloud.securitycenter.v2.ResourceValueConfig.sensitiveDataProtectionMapping: object expected"); @@ -90439,6 +95484,7 @@ object.description = ""; object.createTime = null; object.updateTime = null; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; object.sensitiveDataProtectionMapping = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -90466,6 +95512,8 @@ 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.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] : message.cloudProvider; if (message.sensitiveDataProtectionMapping != null && message.hasOwnProperty("sensitiveDataProtectionMapping")) object.sensitiveDataProtectionMapping = $root.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping.toObject(message.sensitiveDataProtectionMapping, options); return object; @@ -99467,6 +104515,14 @@ * @property {string|null} [name] Resource name * @property {string|null} [displayName] Resource displayName * @property {string|null} [type] Resource type + * @property {google.cloud.securitycenter.v2.CloudProvider|null} [cloudProvider] Resource cloudProvider + * @property {string|null} [service] Resource service + * @property {string|null} [location] Resource location + * @property {google.cloud.securitycenter.v2.IGcpMetadata|null} [gcpMetadata] Resource gcpMetadata + * @property {google.cloud.securitycenter.v2.IAwsMetadata|null} [awsMetadata] Resource awsMetadata + * @property {google.cloud.securitycenter.v2.IAzureMetadata|null} [azureMetadata] Resource azureMetadata + * @property {google.cloud.securitycenter.v2.IResourcePath|null} [resourcePath] Resource resourcePath + * @property {string|null} [resourcePathString] Resource resourcePathString */ /** @@ -99508,6 +104564,84 @@ */ Resource.prototype.type = ""; + /** + * Resource cloudProvider. + * @member {google.cloud.securitycenter.v2.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.cloudProvider = 0; + + /** + * Resource service. + * @member {string} service + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.service = ""; + + /** + * Resource location. + * @member {string} location + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.location = ""; + + /** + * Resource gcpMetadata. + * @member {google.cloud.securitycenter.v2.IGcpMetadata|null|undefined} gcpMetadata + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.gcpMetadata = null; + + /** + * Resource awsMetadata. + * @member {google.cloud.securitycenter.v2.IAwsMetadata|null|undefined} awsMetadata + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.awsMetadata = null; + + /** + * Resource azureMetadata. + * @member {google.cloud.securitycenter.v2.IAzureMetadata|null|undefined} azureMetadata + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.azureMetadata = null; + + /** + * Resource resourcePath. + * @member {google.cloud.securitycenter.v2.IResourcePath|null|undefined} resourcePath + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.resourcePath = null; + + /** + * Resource resourcePathString. + * @member {string} resourcePathString + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.resourcePathString = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Resource cloudProviderMetadata. + * @member {"gcpMetadata"|"awsMetadata"|"azureMetadata"|undefined} cloudProviderMetadata + * @memberof google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Object.defineProperty(Resource.prototype, "cloudProviderMetadata", { + get: $util.oneOfGetter($oneOfFields = ["gcpMetadata", "awsMetadata", "azureMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Resource instance using the specified properties. * @function create @@ -99538,6 +104672,22 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.cloudProvider); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.service); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + if (message.gcpMetadata != null && Object.hasOwnProperty.call(message, "gcpMetadata")) + $root.google.cloud.securitycenter.v2.GcpMetadata.encode(message.gcpMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.awsMetadata != null && Object.hasOwnProperty.call(message, "awsMetadata")) + $root.google.cloud.securitycenter.v2.AwsMetadata.encode(message.awsMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.azureMetadata != null && Object.hasOwnProperty.call(message, "azureMetadata")) + $root.google.cloud.securitycenter.v2.AzureMetadata.encode(message.azureMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.resourcePath != null && Object.hasOwnProperty.call(message, "resourcePath")) + $root.google.cloud.securitycenter.v2.ResourcePath.encode(message.resourcePath, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.resourcePathString != null && Object.hasOwnProperty.call(message, "resourcePathString")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.resourcePathString); return writer; }; @@ -99584,6 +104734,38 @@ message.type = reader.string(); break; } + case 4: { + message.cloudProvider = reader.int32(); + break; + } + case 5: { + message.service = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + case 7: { + message.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.decode(reader, reader.uint32()); + break; + } + case 8: { + message.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.decode(reader, reader.uint32()); + break; + } + case 9: { + message.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.decode(reader, reader.uint32()); + break; + } + case 11: { + message.resourcePathString = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -99619,6 +104801,7 @@ Resource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -99628,6 +104811,58 @@ if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.gcpMetadata != null && message.hasOwnProperty("gcpMetadata")) { + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.GcpMetadata.verify(message.gcpMetadata); + if (error) + return "gcpMetadata." + error; + } + } + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.AwsMetadata.verify(message.awsMetadata); + if (error) + return "awsMetadata." + error; + } + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v2.AzureMetadata.verify(message.azureMetadata); + if (error) + return "azureMetadata." + error; + } + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) { + var error = $root.google.cloud.securitycenter.v2.ResourcePath.verify(message.resourcePath); + if (error) + return "resourcePath." + error; + } + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + if (!$util.isString(message.resourcePathString)) + return "resourcePathString: string expected"; return null; }; @@ -99649,6 +104884,56 @@ message.displayName = String(object.displayName); if (object.type != null) message.type = String(object.type); + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.location != null) + message.location = String(object.location); + if (object.gcpMetadata != null) { + if (typeof object.gcpMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource.gcpMetadata: object expected"); + message.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.fromObject(object.gcpMetadata); + } + if (object.awsMetadata != null) { + if (typeof object.awsMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource.awsMetadata: object expected"); + message.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.fromObject(object.awsMetadata); + } + if (object.azureMetadata != null) { + if (typeof object.azureMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource.azureMetadata: object expected"); + message.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.fromObject(object.azureMetadata); + } + if (object.resourcePath != null) { + if (typeof object.resourcePath !== "object") + throw TypeError(".google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource.resourcePath: object expected"); + message.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.fromObject(object.resourcePath); + } + if (object.resourcePathString != null) + message.resourcePathString = String(object.resourcePathString); return message; }; @@ -99669,6 +104954,11 @@ object.name = ""; object.displayName = ""; object.type = ""; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; + object.service = ""; + object.location = ""; + object.resourcePath = null; + object.resourcePathString = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -99676,6 +104966,31 @@ object.displayName = message.displayName; if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] : message.cloudProvider; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.gcpMetadata != null && message.hasOwnProperty("gcpMetadata")) { + object.gcpMetadata = $root.google.cloud.securitycenter.v2.GcpMetadata.toObject(message.gcpMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "gcpMetadata"; + } + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + object.awsMetadata = $root.google.cloud.securitycenter.v2.AwsMetadata.toObject(message.awsMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "awsMetadata"; + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + object.azureMetadata = $root.google.cloud.securitycenter.v2.AzureMetadata.toObject(message.azureMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "azureMetadata"; + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) + object.resourcePath = $root.google.cloud.securitycenter.v2.ResourcePath.toObject(message.resourcePath, options); + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + object.resourcePathString = message.resourcePathString; return object; }; @@ -104686,6 +110001,7 @@ * @property {string|null} [name] Simulation name * @property {google.protobuf.ITimestamp|null} [createTime] Simulation createTime * @property {Array.|null} [resourceValueConfigsMetadata] Simulation resourceValueConfigsMetadata + * @property {google.cloud.securitycenter.v2.CloudProvider|null} [cloudProvider] Simulation cloudProvider */ /** @@ -104728,6 +110044,14 @@ */ Simulation.prototype.resourceValueConfigsMetadata = $util.emptyArray; + /** + * Simulation cloudProvider. + * @member {google.cloud.securitycenter.v2.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v2.Simulation + * @instance + */ + Simulation.prototype.cloudProvider = 0; + /** * Creates a new Simulation instance using the specified properties. * @function create @@ -104759,6 +110083,8 @@ if (message.resourceValueConfigsMetadata != null && message.resourceValueConfigsMetadata.length) for (var i = 0; i < message.resourceValueConfigsMetadata.length; ++i) $root.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.encode(message.resourceValueConfigsMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.cloudProvider); return writer; }; @@ -104807,6 +110133,10 @@ message.resourceValueConfigsMetadata.push($root.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.decode(reader, reader.uint32())); break; } + case 4: { + message.cloudProvider = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -104859,6 +110189,16 @@ return "resourceValueConfigsMetadata." + error; } } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; @@ -104891,6 +110231,30 @@ message.resourceValueConfigsMetadata[i] = $root.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.fromObject(object.resourceValueConfigsMetadata[i]); } } + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } return message; }; @@ -104912,6 +110276,7 @@ if (options.defaults) { object.name = ""; object.createTime = null; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -104922,6 +110287,8 @@ for (var j = 0; j < message.resourceValueConfigsMetadata.length; ++j) object.resourceValueConfigsMetadata[j] = $root.google.cloud.securitycenter.v2.ResourceValueConfigMetadata.toObject(message.resourceValueConfigsMetadata[j], options); } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v2.CloudProvider[message.cloudProvider] : message.cloudProvider; return object; }; diff --git a/packages/google-cloud-securitycenter/protos/protos.json b/packages/google-cloud-securitycenter/protos/protos.json index 689ed2406b2e..eca340dab11f 100644 --- a/packages/google-cloud-securitycenter/protos/protos.json +++ b/packages/google-cloud-securitycenter/protos/protos.json @@ -7538,8 +7538,8 @@ "java_package": "com.google.cloud.securitycenter.v2", "php_namespace": "Google\\Cloud\\SecurityCenter\\V2", "ruby_package": "Google::Cloud::SecurityCenter::V2", - "(google.api.resource_definition).type": "securitycenter.googleapis.com/FolderLocation", - "(google.api.resource_definition).pattern": "folders/{folder}/locations/{location}" + "(google.api.resource_definition).type": "securitycenter.googleapis.com/OrganizationValuedResource", + "(google.api.resource_definition).pattern": "organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}" }, "nested": { "Access": { @@ -7670,7 +7670,7 @@ "AttackPath": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/AttackPath", - "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}", "(google.api.resource).plural": "attackPaths", "(google.api.resource).singular": "attackPath" }, @@ -7888,6 +7888,94 @@ } } }, + "CloudArmor": { + "fields": { + "securityPolicy": { + "type": "SecurityPolicy", + "id": 1 + }, + "requests": { + "type": "Requests", + "id": 2 + }, + "adaptiveProtection": { + "type": "AdaptiveProtection", + "id": 3 + }, + "attack": { + "type": "Attack", + "id": 4 + }, + "threatVector": { + "type": "string", + "id": 5 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 6 + } + } + }, + "SecurityPolicy": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "preview": { + "type": "bool", + "id": 3 + } + } + }, + "Requests": { + "fields": { + "ratio": { + "type": "double", + "id": 1 + }, + "shortTermAllowed": { + "type": "int32", + "id": 2 + }, + "longTermAllowed": { + "type": "int32", + "id": 3 + }, + "longTermDenied": { + "type": "int32", + "id": 4 + } + } + }, + "AdaptiveProtection": { + "fields": { + "confidence": { + "type": "double", + "id": 1 + } + } + }, + "Attack": { + "fields": { + "volumePps": { + "type": "int32", + "id": 1 + }, + "volumeBps": { + "type": "int32", + "id": 2 + }, + "classification": { + "type": "string", + "id": 3 + } + } + }, "CloudDlpDataProfile": { "fields": { "dataProfile": { @@ -8461,6 +8549,14 @@ "type": "LoadBalancer", "id": 50 }, + "cloudArmor": { + "type": "CloudArmor", + "id": 51 + }, + "notebook": { + "type": "Notebook", + "id": 55 + }, "toxicCombination": { "type": "ToxicCombination", "id": 56 @@ -9002,6 +9098,7 @@ "PROCESS_DISCOVERY": 56, "COMMAND_AND_SCRIPTING_INTERPRETER": 6, "UNIX_SHELL": 7, + "PYTHON": 59, "PERMISSION_GROUPS_DISCOVERY": 18, "CLOUD_GROUPS": 19, "APPLICATION_LAYER_PROTOCOL": 45, @@ -9051,11 +9148,34 @@ "OBTAIN_CAPABILITIES": 43, "ACTIVE_SCANNING": 1, "SCANNING_IP_BLOCKS": 2, - "CONTAINER_AND_RESOURCE_DISCOVERY": 57 + "CONTAINER_ADMINISTRATION_COMMAND": 60, + "ESCAPE_TO_HOST": 61, + "CONTAINER_AND_RESOURCE_DISCOVERY": 57, + "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": 62 } } } }, + "Notebook": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "lastAuthor": { + "type": "string", + "id": 3 + }, + "notebookUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, "OrgPolicy": { "options": { "(google.api.resource).type": "orgpolicy.googleapis.com/Policy", @@ -9430,6 +9550,18 @@ } } }, + "Folder": { + "fields": { + "resourceFolder": { + "type": "string", + "id": 1 + }, + "resourceFolderDisplayName": { + "type": "string", + "id": 2 + } + } + }, "MuteConfig": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/MuteConfig", @@ -9568,6 +9700,15 @@ } }, "Resource": { + "oneofs": { + "cloudProviderMetadata": { + "oneof": [ + "gcpMetadata", + "awsMetadata", + "azureMetadata" + ] + } + }, "fields": { "name": { "type": "string", @@ -9580,13 +9721,230 @@ "type": { "type": "string", "id": 3 + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 4 + }, + "service": { + "type": "string", + "id": 5 + }, + "location": { + "type": "string", + "id": 6 + }, + "gcpMetadata": { + "type": "GcpMetadata", + "id": 7 + }, + "awsMetadata": { + "type": "AwsMetadata", + "id": 8 + }, + "azureMetadata": { + "type": "AzureMetadata", + "id": 9 + }, + "resourcePath": { + "type": "ResourcePath", + "id": 10 + }, + "resourcePathString": { + "type": "string", + "id": 11 + } + } + }, + "CloudProvider": { + "values": { + "CLOUD_PROVIDER_UNSPECIFIED": 0, + "GOOGLE_CLOUD_PLATFORM": 1, + "AMAZON_WEB_SERVICES": 2, + "MICROSOFT_AZURE": 3 + } + }, + "GcpMetadata": { + "fields": { + "project": { + "type": "string", + "id": 1 + }, + "projectDisplayName": { + "type": "string", + "id": 2 + }, + "parent": { + "type": "string", + "id": 3 + }, + "parentDisplayName": { + "type": "string", + "id": 4 + }, + "folders": { + "rule": "repeated", + "type": "Folder", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "organization": { + "type": "string", + "id": 6 + } + } + }, + "AwsMetadata": { + "fields": { + "organization": { + "type": "AwsOrganization", + "id": 1 + }, + "organizationalUnits": { + "rule": "repeated", + "type": "AwsOrganizationalUnit", + "id": 2 + }, + "account": { + "type": "AwsAccount", + "id": 3 + } + }, + "nested": { + "AwsOrganization": { + "fields": { + "id": { + "type": "string", + "id": 1 + } + } + }, + "AwsOrganizationalUnit": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + }, + "AwsAccount": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 2 + } + } + } + } + }, + "AzureMetadata": { + "fields": { + "managementGroups": { + "rule": "repeated", + "type": "AzureManagementGroup", + "id": 1 + }, + "subscription": { + "type": "AzureSubscription", + "id": 2 + }, + "resourceGroup": { + "type": "AzureResourceGroup", + "id": 3 + } + }, + "nested": { + "AzureManagementGroup": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "AzureSubscription": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "AzureResourceGroup": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ResourcePath": { + "fields": { + "nodes": { + "rule": "repeated", + "type": "ResourcePathNode", + "id": 1 + } + }, + "nested": { + "ResourcePathNodeType": { + "values": { + "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED": 0, + "GCP_ORGANIZATION": 1, + "GCP_FOLDER": 2, + "GCP_PROJECT": 3, + "AWS_ORGANIZATION": 4, + "AWS_ORGANIZATIONAL_UNIT": 5, + "AWS_ACCOUNT": 6, + "AZURE_MANAGEMENT_GROUP": 7, + "AZURE_SUBSCRIPTION": 8, + "AZURE_RESOURCE_GROUP": 9 + } + }, + "ResourcePathNode": { + "fields": { + "nodeType": { + "type": "ResourcePathNodeType", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + } + } } } }, "ResourceValueConfig": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/ResourceValueConfig", - "(google.api.resource).pattern": "organizations/{organization}/resourceValueConfigs/{resource_value_config}" + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}", + "(google.api.resource).plural": "resourceValueConfigs", + "(google.api.resource).singular": "resourceValueConfig" }, "fields": { "name": { @@ -9636,6 +9994,10 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "cloudProvider": { + "type": "CloudProvider", + "id": 10 + }, "sensitiveDataProtectionMapping": { "type": "SensitiveDataProtectionMapping", "id": 11 @@ -9677,13 +10039,19 @@ "options": { "(google.api.http).post": "/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "parent,requests" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate", + "body": "*" + } } }, { @@ -10032,12 +10400,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v2/{name=organizations/*/resourceValueConfigs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v2/{name=organizations/*/resourceValueConfigs/*}" + "delete": "/v2/{name=organizations/*/resourceValueConfigs/*}", + "additional_bindings": { + "delete": "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}" + } } }, { @@ -10077,12 +10449,16 @@ "responseType": "Simulation", "options": { "(google.api.http).get": "/v2/{name=organizations/*/simulations/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/simulations/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{name=organizations/*/simulations/*}" + "get": "/v2/{name=organizations/*/simulations/*}", + "additional_bindings": { + "get": "/v2/{name=organizations/*/locations/*/simulations/*}" + } } }, { @@ -10095,12 +10471,16 @@ "responseType": "ValuedResource", "options": { "(google.api.http).get": "/v2/{name=organizations/*/simulations/*/valuedResources/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/simulations/*/valuedResources/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{name=organizations/*/simulations/*/valuedResources/*}" + "get": "/v2/{name=organizations/*/simulations/*/valuedResources/*}", + "additional_bindings": { + "get": "/v2/{name=organizations/*/locations/*/simulations/*/valuedResources/*}" + } } }, { @@ -10216,12 +10596,16 @@ "responseType": "ResourceValueConfig", "options": { "(google.api.http).get": "/v2/{name=organizations/*/resourceValueConfigs/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{name=organizations/*/resourceValueConfigs/*}" + "get": "/v2/{name=organizations/*/resourceValueConfigs/*}", + "additional_bindings": { + "get": "/v2/{name=organizations/*/locations/*/resourceValueConfigs/*}" + } } }, { @@ -10296,7 +10680,7 @@ "responseType": "ListAttackPathsResponse", "options": { "(google.api.http).get": "/v2/{parent=organizations/*/simulations/*}/attackPaths", - "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*/simulations/*/attackExposureResults/*}/attackPaths", "(google.api.method_signature)": "parent" }, "parsedOptions": [ @@ -10307,8 +10691,14 @@ { "get": "/v2/{parent=organizations/*/simulations/*/valuedResources/*}/attackPaths" }, + { + "get": "/v2/{parent=organizations/*/locations/*/simulations/*/valuedResources/*}/attackPaths" + }, { "get": "/v2/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths" + }, + { + "get": "/v2/{parent=organizations/*/locations/*/simulations/*/attackExposureResults/*}/attackPaths" } ] } @@ -10469,12 +10859,16 @@ "responseType": "ListResourceValueConfigsResponse", "options": { "(google.api.http).get": "/v2/{parent=organizations/*}/resourceValueConfigs", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{parent=organizations/*}/resourceValueConfigs" + "get": "/v2/{parent=organizations/*}/resourceValueConfigs", + "additional_bindings": { + "get": "/v2/{parent=organizations/*/locations/*}/resourceValueConfigs" + } } }, { @@ -10881,13 +11275,19 @@ "options": { "(google.api.http).patch": "/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}", "(google.api.http).body": "resource_value_config", + "(google.api.http).additional_bindings.patch": "/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}", + "(google.api.http).additional_bindings.body": "resource_value_config", "(google.api.method_signature)": "resource_value_config,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}", - "body": "resource_value_config" + "body": "resource_value_config", + "additional_bindings": { + "patch": "/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}", + "body": "resource_value_config" + } } }, { @@ -11491,6 +11891,15 @@ }, "nested": { "Resource": { + "oneofs": { + "cloudProviderMetadata": { + "oneof": [ + "gcpMetadata", + "awsMetadata", + "azureMetadata" + ] + } + }, "fields": { "name": { "type": "string", @@ -11503,6 +11912,38 @@ "type": { "type": "string", "id": 3 + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 4 + }, + "service": { + "type": "string", + "id": 5 + }, + "location": { + "type": "string", + "id": 6 + }, + "gcpMetadata": { + "type": "GcpMetadata", + "id": 7 + }, + "awsMetadata": { + "type": "AwsMetadata", + "id": 8 + }, + "azureMetadata": { + "type": "AzureMetadata", + "id": 9 + }, + "resourcePath": { + "type": "ResourcePath", + "id": 10 + }, + "resourcePathString": { + "type": "string", + "id": 11 } } } @@ -11851,7 +12292,7 @@ "Simulation": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/Simulation", - "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/simulations/{simluation}", "(google.api.resource).plural": "simulations", "(google.api.resource).singular": "simulation" }, @@ -11871,13 +12312,17 @@ "rule": "repeated", "type": "ResourceValueConfigMetadata", "id": 3 + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 4 } } }, "ValuedResource": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/ValuedResource", - "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}", "(google.api.resource).plural": "valuedResources", "(google.api.resource).singular": "valuedResource" }, diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/security_center.group_findings.js b/packages/google-cloud-securitycenter/samples/generated/v2/security_center.group_findings.js index f7f021d890d2..e431c880f1d7 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/security_center.group_findings.js +++ b/packages/google-cloud-securitycenter/samples/generated/v2/security_center.group_findings.js @@ -93,12 +93,6 @@ function main(parent, groupBy) { * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity */ // const groupBy = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/security_center.update_resource_value_config.js b/packages/google-cloud-securitycenter/samples/generated/v2/security_center.update_resource_value_config.js index 8a5f5f9b11b9..7924ad61c990 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/security_center.update_resource_value_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v2/security_center.update_resource_value_config.js @@ -35,6 +35,9 @@ function main(resourceValueConfig) { /** * The list of fields to be updated. * If empty all mutable fields will be updated. + * To update nested fields, include the top level field in the mask + * For example, to update gcp_metadata.resource_type, include the + * "gcp_metadata" field mask */ // const updateMask = {} diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json index 30139ebf1007..0d6efa57131e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json @@ -830,7 +830,7 @@ "segments": [ { "start": 25, - "end": 136, + "end": 130, "type": "FULL" } ], @@ -1694,7 +1694,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 61, "type": "FULL" } ], diff --git a/packages/google-cloud-securitycenter/src/v2/security_center_client.ts b/packages/google-cloud-securitycenter/src/v2/security_center_client.ts index a4b96c680189..3115b0f666ef 100644 --- a/packages/google-cloud-securitycenter/src/v2/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v2/security_center_client.ts @@ -202,9 +202,6 @@ export class SecurityCenterClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - attackPathPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}' - ), folderAssetSecurityMarksPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/assets/{asset}/securityMarks' ), @@ -273,9 +270,40 @@ export class SecurityCenterClient { new this._gaxModule.PathTemplate( 'organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}' ), + organizationLocationResourceValueConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}' + ), + organizationLocationSimluationPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/simulations/{simluation}' + ), + organizationLocationSimluationValuedResourcePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}' + ), + organizationLocationSimulationValuedResourceAttackPathPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}' + ), organizationMuteConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/muteConfigs/{mute_config}' ), + organizationResourceValueConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/resourceValueConfigs/{resource_value_config}' + ), + organizationSimulationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}' + ), + organizationSimulationValuedResourcePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}' + ), + organizationSimulationValuedResourceAttackPathPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}' + ), organizationSourcePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/sources/{source}' ), @@ -347,15 +375,6 @@ export class SecurityCenterClient { new this._gaxModule.PathTemplate( 'projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks' ), - resourceValueConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/resourceValueConfigs/{resource_value_config}' - ), - simulationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/simulations/{simulation}' - ), - valuedResourcePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}' - ), }; // Some of the methods on this service return "paged" results, @@ -3569,6 +3588,10 @@ export class SecurityCenterClient { * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to be updated. * If empty all mutable fields will be updated. + * + * To update nested fields, include the top level field in the mask + * For example, to update gcp_metadata.resource_type, include the + * "gcp_metadata" field mask * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -4122,14 +4145,6 @@ export class SecurityCenterClient { * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: "parent,resource_name". - * - * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -4302,14 +4317,6 @@ export class SecurityCenterClient { * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: "parent,resource_name". - * - * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -4430,14 +4437,6 @@ export class SecurityCenterClient { * Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: "parent,resource_name". - * - * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity * @param {string} request.pageToken * The value returned by the last `GroupFindingsResponse`; indicates * that this is a continuation of a prior `GroupFindings` call, and @@ -6845,77 +6844,6 @@ export class SecurityCenterClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified attackPath resource name string. - * - * @param {string} organization - * @param {string} simulation - * @param {string} valued_resource - * @param {string} attack_path - * @returns {string} Resource name string. - */ - attackPathPath( - organization: string, - simulation: string, - valuedResource: string, - attackPath: string - ) { - return this.pathTemplates.attackPathPathTemplate.render({ - organization: organization, - simulation: simulation, - valued_resource: valuedResource, - attack_path: attackPath, - }); - } - - /** - * Parse the organization from AttackPath resource. - * - * @param {string} attackPathName - * A fully-qualified path representing AttackPath resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromAttackPathName(attackPathName: string) { - return this.pathTemplates.attackPathPathTemplate.match(attackPathName) - .organization; - } - - /** - * Parse the simulation from AttackPath resource. - * - * @param {string} attackPathName - * A fully-qualified path representing AttackPath resource. - * @returns {string} A string representing the simulation. - */ - matchSimulationFromAttackPathName(attackPathName: string) { - return this.pathTemplates.attackPathPathTemplate.match(attackPathName) - .simulation; - } - - /** - * Parse the valued_resource from AttackPath resource. - * - * @param {string} attackPathName - * A fully-qualified path representing AttackPath resource. - * @returns {string} A string representing the valued_resource. - */ - matchValuedResourceFromAttackPathName(attackPathName: string) { - return this.pathTemplates.attackPathPathTemplate.match(attackPathName) - .valued_resource; - } - - /** - * Parse the attack_path from AttackPath resource. - * - * @param {string} attackPathName - * A fully-qualified path representing AttackPath resource. - * @returns {string} A string representing the attack_path. - */ - matchAttackPathFromAttackPathName(attackPathName: string) { - return this.pathTemplates.attackPathPathTemplate.match(attackPathName) - .attack_path; - } - /** * Return a fully-qualified folderAssetSecurityMarks resource name string. * @@ -8104,6 +8032,328 @@ export class SecurityCenterClient { ).notification_config; } + /** + * Return a fully-qualified organizationLocationResourceValueConfig resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} resource_value_config + * @returns {string} Resource name string. + */ + organizationLocationResourceValueConfigPath( + organization: string, + location: string, + resourceValueConfig: string + ) { + return this.pathTemplates.organizationLocationResourceValueConfigPathTemplate.render( + { + organization: organization, + location: location, + resource_value_config: resourceValueConfig, + } + ); + } + + /** + * Parse the organization from OrganizationLocationResourceValueConfig resource. + * + * @param {string} organizationLocationResourceValueConfigName + * A fully-qualified path representing organization_location_resource_value_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationResourceValueConfigName( + organizationLocationResourceValueConfigName: string + ) { + return this.pathTemplates.organizationLocationResourceValueConfigPathTemplate.match( + organizationLocationResourceValueConfigName + ).organization; + } + + /** + * Parse the location from OrganizationLocationResourceValueConfig resource. + * + * @param {string} organizationLocationResourceValueConfigName + * A fully-qualified path representing organization_location_resource_value_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationResourceValueConfigName( + organizationLocationResourceValueConfigName: string + ) { + return this.pathTemplates.organizationLocationResourceValueConfigPathTemplate.match( + organizationLocationResourceValueConfigName + ).location; + } + + /** + * Parse the resource_value_config from OrganizationLocationResourceValueConfig resource. + * + * @param {string} organizationLocationResourceValueConfigName + * A fully-qualified path representing organization_location_resource_value_config resource. + * @returns {string} A string representing the resource_value_config. + */ + matchResourceValueConfigFromOrganizationLocationResourceValueConfigName( + organizationLocationResourceValueConfigName: string + ) { + return this.pathTemplates.organizationLocationResourceValueConfigPathTemplate.match( + organizationLocationResourceValueConfigName + ).resource_value_config; + } + + /** + * Return a fully-qualified organizationLocationSimluation resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} simluation + * @returns {string} Resource name string. + */ + organizationLocationSimluationPath( + organization: string, + location: string, + simluation: string + ) { + return this.pathTemplates.organizationLocationSimluationPathTemplate.render( + { + organization: organization, + location: location, + simluation: simluation, + } + ); + } + + /** + * Parse the organization from OrganizationLocationSimluation resource. + * + * @param {string} organizationLocationSimluationName + * A fully-qualified path representing organization_location_simluation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationSimluationName( + organizationLocationSimluationName: string + ) { + return this.pathTemplates.organizationLocationSimluationPathTemplate.match( + organizationLocationSimluationName + ).organization; + } + + /** + * Parse the location from OrganizationLocationSimluation resource. + * + * @param {string} organizationLocationSimluationName + * A fully-qualified path representing organization_location_simluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationSimluationName( + organizationLocationSimluationName: string + ) { + return this.pathTemplates.organizationLocationSimluationPathTemplate.match( + organizationLocationSimluationName + ).location; + } + + /** + * Parse the simluation from OrganizationLocationSimluation resource. + * + * @param {string} organizationLocationSimluationName + * A fully-qualified path representing organization_location_simluation resource. + * @returns {string} A string representing the simluation. + */ + matchSimluationFromOrganizationLocationSimluationName( + organizationLocationSimluationName: string + ) { + return this.pathTemplates.organizationLocationSimluationPathTemplate.match( + organizationLocationSimluationName + ).simluation; + } + + /** + * Return a fully-qualified organizationLocationSimluationValuedResource resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} simluation + * @param {string} valued_resource + * @returns {string} Resource name string. + */ + organizationLocationSimluationValuedResourcePath( + organization: string, + location: string, + simluation: string, + valuedResource: string + ) { + return this.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.render( + { + organization: organization, + location: location, + simluation: simluation, + valued_resource: valuedResource, + } + ); + } + + /** + * Parse the organization from OrganizationLocationSimluationValuedResource resource. + * + * @param {string} organizationLocationSimluationValuedResourceName + * A fully-qualified path representing organization_location_simluation_valued_resource resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationSimluationValuedResourceName( + organizationLocationSimluationValuedResourceName: string + ) { + return this.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match( + organizationLocationSimluationValuedResourceName + ).organization; + } + + /** + * Parse the location from OrganizationLocationSimluationValuedResource resource. + * + * @param {string} organizationLocationSimluationValuedResourceName + * A fully-qualified path representing organization_location_simluation_valued_resource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationSimluationValuedResourceName( + organizationLocationSimluationValuedResourceName: string + ) { + return this.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match( + organizationLocationSimluationValuedResourceName + ).location; + } + + /** + * Parse the simluation from OrganizationLocationSimluationValuedResource resource. + * + * @param {string} organizationLocationSimluationValuedResourceName + * A fully-qualified path representing organization_location_simluation_valued_resource resource. + * @returns {string} A string representing the simluation. + */ + matchSimluationFromOrganizationLocationSimluationValuedResourceName( + organizationLocationSimluationValuedResourceName: string + ) { + return this.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match( + organizationLocationSimluationValuedResourceName + ).simluation; + } + + /** + * Parse the valued_resource from OrganizationLocationSimluationValuedResource resource. + * + * @param {string} organizationLocationSimluationValuedResourceName + * A fully-qualified path representing organization_location_simluation_valued_resource resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromOrganizationLocationSimluationValuedResourceName( + organizationLocationSimluationValuedResourceName: string + ) { + return this.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match( + organizationLocationSimluationValuedResourceName + ).valued_resource; + } + + /** + * Return a fully-qualified organizationLocationSimulationValuedResourceAttackPath resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} simulation + * @param {string} valued_resource + * @param {string} attack_path + * @returns {string} Resource name string. + */ + organizationLocationSimulationValuedResourceAttackPathPath( + organization: string, + location: string, + simulation: string, + valuedResource: string, + attackPath: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.render( + { + organization: organization, + location: location, + simulation: simulation, + valued_resource: valuedResource, + attack_path: attackPath, + } + ); + } + + /** + * Parse the organization from OrganizationLocationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationLocationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_location_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationSimulationValuedResourceAttackPathName( + organizationLocationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match( + organizationLocationSimulationValuedResourceAttackPathName + ).organization; + } + + /** + * Parse the location from OrganizationLocationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationLocationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_location_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationSimulationValuedResourceAttackPathName( + organizationLocationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match( + organizationLocationSimulationValuedResourceAttackPathName + ).location; + } + + /** + * Parse the simulation from OrganizationLocationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationLocationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_location_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromOrganizationLocationSimulationValuedResourceAttackPathName( + organizationLocationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match( + organizationLocationSimulationValuedResourceAttackPathName + ).simulation; + } + + /** + * Parse the valued_resource from OrganizationLocationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationLocationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_location_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromOrganizationLocationSimulationValuedResourceAttackPathName( + organizationLocationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match( + organizationLocationSimulationValuedResourceAttackPathName + ).valued_resource; + } + + /** + * Parse the attack_path from OrganizationLocationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationLocationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_location_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the attack_path. + */ + matchAttackPathFromOrganizationLocationSimulationValuedResourceAttackPathName( + organizationLocationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match( + organizationLocationSimulationValuedResourceAttackPathName + ).attack_path; + } + /** * Return a fully-qualified organizationMuteConfig resource name string. * @@ -8148,6 +8398,251 @@ export class SecurityCenterClient { ).mute_config; } + /** + * Return a fully-qualified organizationResourceValueConfig resource name string. + * + * @param {string} organization + * @param {string} resource_value_config + * @returns {string} Resource name string. + */ + organizationResourceValueConfigPath( + organization: string, + resourceValueConfig: string + ) { + return this.pathTemplates.organizationResourceValueConfigPathTemplate.render( + { + organization: organization, + resource_value_config: resourceValueConfig, + } + ); + } + + /** + * Parse the organization from OrganizationResourceValueConfig resource. + * + * @param {string} organizationResourceValueConfigName + * A fully-qualified path representing organization_resource_value_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationResourceValueConfigName( + organizationResourceValueConfigName: string + ) { + return this.pathTemplates.organizationResourceValueConfigPathTemplate.match( + organizationResourceValueConfigName + ).organization; + } + + /** + * Parse the resource_value_config from OrganizationResourceValueConfig resource. + * + * @param {string} organizationResourceValueConfigName + * A fully-qualified path representing organization_resource_value_config resource. + * @returns {string} A string representing the resource_value_config. + */ + matchResourceValueConfigFromOrganizationResourceValueConfigName( + organizationResourceValueConfigName: string + ) { + return this.pathTemplates.organizationResourceValueConfigPathTemplate.match( + organizationResourceValueConfigName + ).resource_value_config; + } + + /** + * Return a fully-qualified organizationSimulation resource name string. + * + * @param {string} organization + * @param {string} simulation + * @returns {string} Resource name string. + */ + organizationSimulationPath(organization: string, simulation: string) { + return this.pathTemplates.organizationSimulationPathTemplate.render({ + organization: organization, + simulation: simulation, + }); + } + + /** + * Parse the organization from OrganizationSimulation resource. + * + * @param {string} organizationSimulationName + * A fully-qualified path representing organization_simulation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSimulationName( + organizationSimulationName: string + ) { + return this.pathTemplates.organizationSimulationPathTemplate.match( + organizationSimulationName + ).organization; + } + + /** + * Parse the simulation from OrganizationSimulation resource. + * + * @param {string} organizationSimulationName + * A fully-qualified path representing organization_simulation resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromOrganizationSimulationName( + organizationSimulationName: string + ) { + return this.pathTemplates.organizationSimulationPathTemplate.match( + organizationSimulationName + ).simulation; + } + + /** + * Return a fully-qualified organizationSimulationValuedResource resource name string. + * + * @param {string} organization + * @param {string} simulation + * @param {string} valued_resource + * @returns {string} Resource name string. + */ + organizationSimulationValuedResourcePath( + organization: string, + simulation: string, + valuedResource: string + ) { + return this.pathTemplates.organizationSimulationValuedResourcePathTemplate.render( + { + organization: organization, + simulation: simulation, + valued_resource: valuedResource, + } + ); + } + + /** + * Parse the organization from OrganizationSimulationValuedResource resource. + * + * @param {string} organizationSimulationValuedResourceName + * A fully-qualified path representing organization_simulation_valued_resource resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSimulationValuedResourceName( + organizationSimulationValuedResourceName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourcePathTemplate.match( + organizationSimulationValuedResourceName + ).organization; + } + + /** + * Parse the simulation from OrganizationSimulationValuedResource resource. + * + * @param {string} organizationSimulationValuedResourceName + * A fully-qualified path representing organization_simulation_valued_resource resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromOrganizationSimulationValuedResourceName( + organizationSimulationValuedResourceName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourcePathTemplate.match( + organizationSimulationValuedResourceName + ).simulation; + } + + /** + * Parse the valued_resource from OrganizationSimulationValuedResource resource. + * + * @param {string} organizationSimulationValuedResourceName + * A fully-qualified path representing organization_simulation_valued_resource resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromOrganizationSimulationValuedResourceName( + organizationSimulationValuedResourceName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourcePathTemplate.match( + organizationSimulationValuedResourceName + ).valued_resource; + } + + /** + * Return a fully-qualified organizationSimulationValuedResourceAttackPath resource name string. + * + * @param {string} organization + * @param {string} simulation + * @param {string} valued_resource + * @param {string} attack_path + * @returns {string} Resource name string. + */ + organizationSimulationValuedResourceAttackPathPath( + organization: string, + simulation: string, + valuedResource: string, + attackPath: string + ) { + return this.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.render( + { + organization: organization, + simulation: simulation, + valued_resource: valuedResource, + attack_path: attackPath, + } + ); + } + + /** + * Parse the organization from OrganizationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSimulationValuedResourceAttackPathName( + organizationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match( + organizationSimulationValuedResourceAttackPathName + ).organization; + } + + /** + * Parse the simulation from OrganizationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromOrganizationSimulationValuedResourceAttackPathName( + organizationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match( + organizationSimulationValuedResourceAttackPathName + ).simulation; + } + + /** + * Parse the valued_resource from OrganizationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromOrganizationSimulationValuedResourceAttackPathName( + organizationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match( + organizationSimulationValuedResourceAttackPathName + ).valued_resource; + } + + /** + * Parse the attack_path from OrganizationSimulationValuedResourceAttackPath resource. + * + * @param {string} organizationSimulationValuedResourceAttackPathName + * A fully-qualified path representing organization_simulation_valued_resource_attack_path resource. + * @returns {string} A string representing the attack_path. + */ + matchAttackPathFromOrganizationSimulationValuedResourceAttackPathName( + organizationSimulationValuedResourceAttackPathName: string + ) { + return this.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match( + organizationSimulationValuedResourceAttackPathName + ).attack_path; + } + /** * Return a fully-qualified organizationSource resource name string. * @@ -9513,147 +10008,6 @@ export class SecurityCenterClient { ).finding; } - /** - * Return a fully-qualified resourceValueConfig resource name string. - * - * @param {string} organization - * @param {string} resource_value_config - * @returns {string} Resource name string. - */ - resourceValueConfigPath(organization: string, resourceValueConfig: string) { - return this.pathTemplates.resourceValueConfigPathTemplate.render({ - organization: organization, - resource_value_config: resourceValueConfig, - }); - } - - /** - * Parse the organization from ResourceValueConfig resource. - * - * @param {string} resourceValueConfigName - * A fully-qualified path representing ResourceValueConfig resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromResourceValueConfigName( - resourceValueConfigName: string - ) { - return this.pathTemplates.resourceValueConfigPathTemplate.match( - resourceValueConfigName - ).organization; - } - - /** - * Parse the resource_value_config from ResourceValueConfig resource. - * - * @param {string} resourceValueConfigName - * A fully-qualified path representing ResourceValueConfig resource. - * @returns {string} A string representing the resource_value_config. - */ - matchResourceValueConfigFromResourceValueConfigName( - resourceValueConfigName: string - ) { - return this.pathTemplates.resourceValueConfigPathTemplate.match( - resourceValueConfigName - ).resource_value_config; - } - - /** - * Return a fully-qualified simulation resource name string. - * - * @param {string} organization - * @param {string} simulation - * @returns {string} Resource name string. - */ - simulationPath(organization: string, simulation: string) { - return this.pathTemplates.simulationPathTemplate.render({ - organization: organization, - simulation: simulation, - }); - } - - /** - * Parse the organization from Simulation resource. - * - * @param {string} simulationName - * A fully-qualified path representing Simulation resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromSimulationName(simulationName: string) { - return this.pathTemplates.simulationPathTemplate.match(simulationName) - .organization; - } - - /** - * Parse the simulation from Simulation resource. - * - * @param {string} simulationName - * A fully-qualified path representing Simulation resource. - * @returns {string} A string representing the simulation. - */ - matchSimulationFromSimulationName(simulationName: string) { - return this.pathTemplates.simulationPathTemplate.match(simulationName) - .simulation; - } - - /** - * Return a fully-qualified valuedResource resource name string. - * - * @param {string} organization - * @param {string} simulation - * @param {string} valued_resource - * @returns {string} Resource name string. - */ - valuedResourcePath( - organization: string, - simulation: string, - valuedResource: string - ) { - return this.pathTemplates.valuedResourcePathTemplate.render({ - organization: organization, - simulation: simulation, - valued_resource: valuedResource, - }); - } - - /** - * Parse the organization from ValuedResource resource. - * - * @param {string} valuedResourceName - * A fully-qualified path representing ValuedResource resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromValuedResourceName(valuedResourceName: string) { - return this.pathTemplates.valuedResourcePathTemplate.match( - valuedResourceName - ).organization; - } - - /** - * Parse the simulation from ValuedResource resource. - * - * @param {string} valuedResourceName - * A fully-qualified path representing ValuedResource resource. - * @returns {string} A string representing the simulation. - */ - matchSimulationFromValuedResourceName(valuedResourceName: string) { - return this.pathTemplates.valuedResourcePathTemplate.match( - valuedResourceName - ).simulation; - } - - /** - * Parse the valued_resource from ValuedResource resource. - * - * @param {string} valuedResourceName - * A fully-qualified path representing ValuedResource resource. - * @returns {string} A string representing the valued_resource. - */ - matchValuedResourceFromValuedResourceName(valuedResourceName: string) { - return this.pathTemplates.valuedResourcePathTemplate.match( - valuedResourceName - ).valued_resource; - } - /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-securitycenter/src/v2/security_center_proto_list.json b/packages/google-cloud-securitycenter/src/v2/security_center_proto_list.json index 9271fe5c766b..1b897ec426c1 100644 --- a/packages/google-cloud-securitycenter/src/v2/security_center_proto_list.json +++ b/packages/google-cloud-securitycenter/src/v2/security_center_proto_list.json @@ -5,6 +5,7 @@ "../../protos/google/cloud/securitycenter/v2/attack_path.proto", "../../protos/google/cloud/securitycenter/v2/backup_disaster_recovery.proto", "../../protos/google/cloud/securitycenter/v2/bigquery_export.proto", + "../../protos/google/cloud/securitycenter/v2/cloud_armor.proto", "../../protos/google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto", "../../protos/google/cloud/securitycenter/v2/cloud_dlp_inspection.proto", "../../protos/google/cloud/securitycenter/v2/compliance.proto", @@ -16,6 +17,7 @@ "../../protos/google/cloud/securitycenter/v2/external_system.proto", "../../protos/google/cloud/securitycenter/v2/file.proto", "../../protos/google/cloud/securitycenter/v2/finding.proto", + "../../protos/google/cloud/securitycenter/v2/folder.proto", "../../protos/google/cloud/securitycenter/v2/group_membership.proto", "../../protos/google/cloud/securitycenter/v2/iam_binding.proto", "../../protos/google/cloud/securitycenter/v2/indicator.proto", @@ -26,6 +28,7 @@ "../../protos/google/cloud/securitycenter/v2/log_entry.proto", "../../protos/google/cloud/securitycenter/v2/mitre_attack.proto", "../../protos/google/cloud/securitycenter/v2/mute_config.proto", + "../../protos/google/cloud/securitycenter/v2/notebook.proto", "../../protos/google/cloud/securitycenter/v2/notification_config.proto", "../../protos/google/cloud/securitycenter/v2/notification_message.proto", "../../protos/google/cloud/securitycenter/v2/org_policy.proto", diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts index 0c99cb618c11..2d566cdd7016 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v2.ts @@ -7904,82 +7904,6 @@ describe('v2.SecurityCenterClient', () => { }); describe('Path templates', () => { - describe('attackPath', () => { - const fakePath = '/rendered/path/attackPath'; - const expectedParameters = { - organization: 'organizationValue', - simulation: 'simulationValue', - valued_resource: 'valuedResourceValue', - attack_path: 'attackPathValue', - }; - const client = new securitycenterModule.v2.SecurityCenterClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attackPathPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.attackPathPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('attackPathPath', () => { - const result = client.attackPathPath( - 'organizationValue', - 'simulationValue', - 'valuedResourceValue', - 'attackPathValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.attackPathPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchOrganizationFromAttackPathName', () => { - const result = client.matchOrganizationFromAttackPathName(fakePath); - assert.strictEqual(result, 'organizationValue'); - assert( - (client.pathTemplates.attackPathPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchSimulationFromAttackPathName', () => { - const result = client.matchSimulationFromAttackPathName(fakePath); - assert.strictEqual(result, 'simulationValue'); - assert( - (client.pathTemplates.attackPathPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchValuedResourceFromAttackPathName', () => { - const result = client.matchValuedResourceFromAttackPathName(fakePath); - assert.strictEqual(result, 'valuedResourceValue'); - assert( - (client.pathTemplates.attackPathPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchAttackPathFromAttackPathName', () => { - const result = client.matchAttackPathFromAttackPathName(fakePath); - assert.strictEqual(result, 'attackPathValue'); - assert( - (client.pathTemplates.attackPathPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('folderAssetSecurityMarks', () => { const fakePath = '/rendered/path/folderAssetSecurityMarks'; const expectedParameters = { @@ -9373,21 +9297,703 @@ describe('v2.SecurityCenterClient', () => { assert.strictEqual(result, 'organizationValue'); assert( ( - client.pathTemplates.organizationLocationMuteConfigPathTemplate - .match as SinonStub + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationMuteConfigName', () => { + const result = + client.matchLocationFromOrganizationLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMuteConfigFromOrganizationLocationMuteConfigName', () => { + const result = + client.matchMuteConfigFromOrganizationLocationMuteConfigName( + fakePath + ); + assert.strictEqual(result, 'muteConfigValue'); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationNotificationConfig', () => { + const fakePath = '/rendered/path/organizationLocationNotificationConfig'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + notification_config: 'notificationConfigValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationNotificationConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationNotificationConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationNotificationConfigPath', () => { + const result = client.organizationLocationNotificationConfigPath( + 'organizationValue', + 'locationValue', + 'notificationConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationNotificationConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationNotificationConfigName', () => { + const result = + client.matchOrganizationFromOrganizationLocationNotificationConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationNotificationConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationNotificationConfigName', () => { + const result = + client.matchLocationFromOrganizationLocationNotificationConfigName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationNotificationConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationConfigFromOrganizationLocationNotificationConfigName', () => { + const result = + client.matchNotificationConfigFromOrganizationLocationNotificationConfigName( + fakePath + ); + assert.strictEqual(result, 'notificationConfigValue'); + assert( + ( + client.pathTemplates + .organizationLocationNotificationConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationResourceValueConfig', () => { + const fakePath = '/rendered/path/organizationLocationResourceValueConfig'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + resource_value_config: 'resourceValueConfigValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationResourceValueConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationResourceValueConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationResourceValueConfigPath', () => { + const result = client.organizationLocationResourceValueConfigPath( + 'organizationValue', + 'locationValue', + 'resourceValueConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationResourceValueConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationResourceValueConfigName', () => { + const result = + client.matchOrganizationFromOrganizationLocationResourceValueConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationResourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationResourceValueConfigName', () => { + const result = + client.matchLocationFromOrganizationLocationResourceValueConfigName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationResourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchResourceValueConfigFromOrganizationLocationResourceValueConfigName', () => { + const result = + client.matchResourceValueConfigFromOrganizationLocationResourceValueConfigName( + fakePath + ); + assert.strictEqual(result, 'resourceValueConfigValue'); + assert( + ( + client.pathTemplates + .organizationLocationResourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationSimluation', () => { + const fakePath = '/rendered/path/organizationLocationSimluation'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + simluation: 'simluationValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationSimluationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationSimluationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationSimluationPath', () => { + const result = client.organizationLocationSimluationPath( + 'organizationValue', + 'locationValue', + 'simluationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationSimluationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationSimluationName', () => { + const result = + client.matchOrganizationFromOrganizationLocationSimluationName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationSimluationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationSimluationName', () => { + const result = + client.matchLocationFromOrganizationLocationSimluationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationSimluationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimluationFromOrganizationLocationSimluationName', () => { + const result = + client.matchSimluationFromOrganizationLocationSimluationName( + fakePath + ); + assert.strictEqual(result, 'simluationValue'); + assert( + ( + client.pathTemplates.organizationLocationSimluationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationSimluationValuedResource', () => { + const fakePath = + '/rendered/path/organizationLocationSimluationValuedResource'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + simluation: 'simluationValue', + valued_resource: 'valuedResourceValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationSimluationValuedResourcePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationSimluationValuedResourcePath', () => { + const result = client.organizationLocationSimluationValuedResourcePath( + 'organizationValue', + 'locationValue', + 'simluationValue', + 'valuedResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationSimluationValuedResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationSimluationValuedResourceName', () => { + const result = + client.matchOrganizationFromOrganizationLocationSimluationValuedResourceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimluationValuedResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationSimluationValuedResourceName', () => { + const result = + client.matchLocationFromOrganizationLocationSimluationValuedResourceName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimluationValuedResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimluationFromOrganizationLocationSimluationValuedResourceName', () => { + const result = + client.matchSimluationFromOrganizationLocationSimluationValuedResourceName( + fakePath + ); + assert.strictEqual(result, 'simluationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimluationValuedResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchValuedResourceFromOrganizationLocationSimluationValuedResourceName', () => { + const result = + client.matchValuedResourceFromOrganizationLocationSimluationValuedResourceName( + fakePath + ); + assert.strictEqual(result, 'valuedResourceValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimluationValuedResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationLocationSimulationValuedResourceAttackPath', () => { + const fakePath = + '/rendered/path/organizationLocationSimulationValuedResourceAttackPath'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + simulation: 'simulationValue', + valued_resource: 'valuedResourceValue', + attack_path: 'attackPathValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationSimulationValuedResourceAttackPathPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationSimulationValuedResourceAttackPathPath', () => { + const result = + client.organizationLocationSimulationValuedResourceAttackPathPath( + 'organizationValue', + 'locationValue', + 'simulationValue', + 'valuedResourceValue', + 'attackPathValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchOrganizationFromOrganizationLocationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchLocationFromOrganizationLocationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimulationFromOrganizationLocationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchSimulationFromOrganizationLocationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'simulationValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchValuedResourceFromOrganizationLocationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchValuedResourceFromOrganizationLocationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'valuedResourceValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttackPathFromOrganizationLocationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchAttackPathFromOrganizationLocationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'attackPathValue'); + assert( + ( + client.pathTemplates + .organizationLocationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationMuteConfig', () => { + const fakePath = '/rendered/path/organizationMuteConfig'; + const expectedParameters = { + organization: 'organizationValue', + mute_config: 'muteConfigValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationMuteConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationMuteConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationMuteConfigPath', () => { + const result = client.organizationMuteConfigPath( + 'organizationValue', + 'muteConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationMuteConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationMuteConfigName', () => { + const result = + client.matchOrganizationFromOrganizationMuteConfigName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMuteConfigFromOrganizationMuteConfigName', () => { + const result = + client.matchMuteConfigFromOrganizationMuteConfigName(fakePath); + assert.strictEqual(result, 'muteConfigValue'); + assert( + ( + client.pathTemplates.organizationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationResourceValueConfig', () => { + const fakePath = '/rendered/path/organizationResourceValueConfig'; + const expectedParameters = { + organization: 'organizationValue', + resource_value_config: 'resourceValueConfigValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationResourceValueConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationResourceValueConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationResourceValueConfigPath', () => { + const result = client.organizationResourceValueConfigPath( + 'organizationValue', + 'resourceValueConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationResourceValueConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationResourceValueConfigName', () => { + const result = + client.matchOrganizationFromOrganizationResourceValueConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationResourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchResourceValueConfigFromOrganizationResourceValueConfigName', () => { + const result = + client.matchResourceValueConfigFromOrganizationResourceValueConfigName( + fakePath + ); + assert.strictEqual(result, 'resourceValueConfigValue'); + assert( + ( + client.pathTemplates.organizationResourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationSimulation', () => { + const fakePath = '/rendered/path/organizationSimulation'; + const expectedParameters = { + organization: 'organizationValue', + simulation: 'simulationValue', + }; + const client = new securitycenterModule.v2.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSimulationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSimulationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSimulationPath', () => { + const result = client.organizationSimulationPath( + 'organizationValue', + 'simulationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationSimulationPathTemplate + .render as SinonStub ) .getCall(-1) - .calledWith(fakePath) + .calledWith(expectedParameters) ); }); - it('matchLocationFromOrganizationLocationMuteConfigName', () => { + it('matchOrganizationFromOrganizationSimulationName', () => { const result = - client.matchLocationFromOrganizationLocationMuteConfigName(fakePath); - assert.strictEqual(result, 'locationValue'); + client.matchOrganizationFromOrganizationSimulationName(fakePath); + assert.strictEqual(result, 'organizationValue'); assert( ( - client.pathTemplates.organizationLocationMuteConfigPathTemplate + client.pathTemplates.organizationSimulationPathTemplate .match as SinonStub ) .getCall(-1) @@ -9395,15 +10001,13 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchMuteConfigFromOrganizationLocationMuteConfigName', () => { + it('matchSimulationFromOrganizationSimulationName', () => { const result = - client.matchMuteConfigFromOrganizationLocationMuteConfigName( - fakePath - ); - assert.strictEqual(result, 'muteConfigValue'); + client.matchSimulationFromOrganizationSimulationName(fakePath); + assert.strictEqual(result, 'simulationValue'); assert( ( - client.pathTemplates.organizationLocationMuteConfigPathTemplate + client.pathTemplates.organizationSimulationPathTemplate .match as SinonStub ) .getCall(-1) @@ -9412,34 +10016,34 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationLocationNotificationConfig', () => { - const fakePath = '/rendered/path/organizationLocationNotificationConfig'; + describe('organizationSimulationValuedResource', () => { + const fakePath = '/rendered/path/organizationSimulationValuedResource'; const expectedParameters = { organization: 'organizationValue', - location: 'locationValue', - notification_config: 'notificationConfigValue', + simulation: 'simulationValue', + valued_resource: 'valuedResourceValue', }; const client = new securitycenterModule.v2.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationLocationNotificationConfigPathTemplate.render = + client.pathTemplates.organizationSimulationValuedResourcePathTemplate.render = sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationNotificationConfigPathTemplate.match = + client.pathTemplates.organizationSimulationValuedResourcePathTemplate.match = sinon.stub().returns(expectedParameters); - it('organizationLocationNotificationConfigPath', () => { - const result = client.organizationLocationNotificationConfigPath( + it('organizationSimulationValuedResourcePath', () => { + const result = client.organizationSimulationValuedResourcePath( 'organizationValue', - 'locationValue', - 'notificationConfigValue' + 'simulationValue', + 'valuedResourceValue' ); assert.strictEqual(result, fakePath); assert( ( client.pathTemplates - .organizationLocationNotificationConfigPathTemplate + .organizationSimulationValuedResourcePathTemplate .render as SinonStub ) .getCall(-1) @@ -9447,16 +10051,16 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchOrganizationFromOrganizationLocationNotificationConfigName', () => { + it('matchOrganizationFromOrganizationSimulationValuedResourceName', () => { const result = - client.matchOrganizationFromOrganizationLocationNotificationConfigName( + client.matchOrganizationFromOrganizationSimulationValuedResourceName( fakePath ); assert.strictEqual(result, 'organizationValue'); assert( ( client.pathTemplates - .organizationLocationNotificationConfigPathTemplate + .organizationSimulationValuedResourcePathTemplate .match as SinonStub ) .getCall(-1) @@ -9464,16 +10068,16 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchLocationFromOrganizationLocationNotificationConfigName', () => { + it('matchSimulationFromOrganizationSimulationValuedResourceName', () => { const result = - client.matchLocationFromOrganizationLocationNotificationConfigName( + client.matchSimulationFromOrganizationSimulationValuedResourceName( fakePath ); - assert.strictEqual(result, 'locationValue'); + assert.strictEqual(result, 'simulationValue'); assert( ( client.pathTemplates - .organizationLocationNotificationConfigPathTemplate + .organizationSimulationValuedResourcePathTemplate .match as SinonStub ) .getCall(-1) @@ -9481,16 +10085,16 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchNotificationConfigFromOrganizationLocationNotificationConfigName', () => { + it('matchValuedResourceFromOrganizationSimulationValuedResourceName', () => { const result = - client.matchNotificationConfigFromOrganizationLocationNotificationConfigName( + client.matchValuedResourceFromOrganizationSimulationValuedResourceName( fakePath ); - assert.strictEqual(result, 'notificationConfigValue'); + assert.strictEqual(result, 'valuedResourceValue'); assert( ( client.pathTemplates - .organizationLocationNotificationConfigPathTemplate + .organizationSimulationValuedResourcePathTemplate .match as SinonStub ) .getCall(-1) @@ -9499,33 +10103,38 @@ describe('v2.SecurityCenterClient', () => { }); }); - describe('organizationMuteConfig', () => { - const fakePath = '/rendered/path/organizationMuteConfig'; + describe('organizationSimulationValuedResourceAttackPath', () => { + const fakePath = + '/rendered/path/organizationSimulationValuedResourceAttackPath'; const expectedParameters = { organization: 'organizationValue', - mute_config: 'muteConfigValue', + simulation: 'simulationValue', + valued_resource: 'valuedResourceValue', + attack_path: 'attackPathValue', }; const client = new securitycenterModule.v2.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationMuteConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationMuteConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationSimulationValuedResourceAttackPathPathTemplate.match = + sinon.stub().returns(expectedParameters); - it('organizationMuteConfigPath', () => { - const result = client.organizationMuteConfigPath( - 'organizationValue', - 'muteConfigValue' - ); + it('organizationSimulationValuedResourceAttackPathPath', () => { + const result = + client.organizationSimulationValuedResourceAttackPathPath( + 'organizationValue', + 'simulationValue', + 'valuedResourceValue', + 'attackPathValue' + ); assert.strictEqual(result, fakePath); assert( ( - client.pathTemplates.organizationMuteConfigPathTemplate + client.pathTemplates + .organizationSimulationValuedResourceAttackPathPathTemplate .render as SinonStub ) .getCall(-1) @@ -9533,13 +10142,16 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchOrganizationFromOrganizationMuteConfigName', () => { + it('matchOrganizationFromOrganizationSimulationValuedResourceAttackPathName', () => { const result = - client.matchOrganizationFromOrganizationMuteConfigName(fakePath); + client.matchOrganizationFromOrganizationSimulationValuedResourceAttackPathName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( ( - client.pathTemplates.organizationMuteConfigPathTemplate + client.pathTemplates + .organizationSimulationValuedResourceAttackPathPathTemplate .match as SinonStub ) .getCall(-1) @@ -9547,13 +10159,50 @@ describe('v2.SecurityCenterClient', () => { ); }); - it('matchMuteConfigFromOrganizationMuteConfigName', () => { + it('matchSimulationFromOrganizationSimulationValuedResourceAttackPathName', () => { const result = - client.matchMuteConfigFromOrganizationMuteConfigName(fakePath); - assert.strictEqual(result, 'muteConfigValue'); + client.matchSimulationFromOrganizationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'simulationValue'); assert( ( - client.pathTemplates.organizationMuteConfigPathTemplate + client.pathTemplates + .organizationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchValuedResourceFromOrganizationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchValuedResourceFromOrganizationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'valuedResourceValue'); + assert( + ( + client.pathTemplates + .organizationSimulationValuedResourceAttackPathPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttackPathFromOrganizationSimulationValuedResourceAttackPathName', () => { + const result = + client.matchAttackPathFromOrganizationSimulationValuedResourceAttackPathName( + fakePath + ); + assert.strictEqual(result, 'attackPathValue'); + assert( + ( + client.pathTemplates + .organizationSimulationValuedResourceAttackPathPathTemplate .match as SinonStub ) .getCall(-1) @@ -11293,185 +11942,5 @@ describe('v2.SecurityCenterClient', () => { ); }); }); - - describe('resourceValueConfig', () => { - const fakePath = '/rendered/path/resourceValueConfig'; - const expectedParameters = { - organization: 'organizationValue', - resource_value_config: 'resourceValueConfigValue', - }; - const client = new securitycenterModule.v2.SecurityCenterClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.resourceValueConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.resourceValueConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('resourceValueConfigPath', () => { - const result = client.resourceValueConfigPath( - 'organizationValue', - 'resourceValueConfigValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.resourceValueConfigPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchOrganizationFromResourceValueConfigName', () => { - const result = - client.matchOrganizationFromResourceValueConfigName(fakePath); - assert.strictEqual(result, 'organizationValue'); - assert( - ( - client.pathTemplates.resourceValueConfigPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchResourceValueConfigFromResourceValueConfigName', () => { - const result = - client.matchResourceValueConfigFromResourceValueConfigName(fakePath); - assert.strictEqual(result, 'resourceValueConfigValue'); - assert( - ( - client.pathTemplates.resourceValueConfigPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('simulation', () => { - const fakePath = '/rendered/path/simulation'; - const expectedParameters = { - organization: 'organizationValue', - simulation: 'simulationValue', - }; - const client = new securitycenterModule.v2.SecurityCenterClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.simulationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.simulationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('simulationPath', () => { - const result = client.simulationPath( - 'organizationValue', - 'simulationValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.simulationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchOrganizationFromSimulationName', () => { - const result = client.matchOrganizationFromSimulationName(fakePath); - assert.strictEqual(result, 'organizationValue'); - assert( - (client.pathTemplates.simulationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchSimulationFromSimulationName', () => { - const result = client.matchSimulationFromSimulationName(fakePath); - assert.strictEqual(result, 'simulationValue'); - assert( - (client.pathTemplates.simulationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('valuedResource', () => { - const fakePath = '/rendered/path/valuedResource'; - const expectedParameters = { - organization: 'organizationValue', - simulation: 'simulationValue', - valued_resource: 'valuedResourceValue', - }; - const client = new securitycenterModule.v2.SecurityCenterClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.valuedResourcePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.valuedResourcePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('valuedResourcePath', () => { - const result = client.valuedResourcePath( - 'organizationValue', - 'simulationValue', - 'valuedResourceValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.valuedResourcePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchOrganizationFromValuedResourceName', () => { - const result = client.matchOrganizationFromValuedResourceName(fakePath); - assert.strictEqual(result, 'organizationValue'); - assert( - (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchSimulationFromValuedResourceName', () => { - const result = client.matchSimulationFromValuedResourceName(fakePath); - assert.strictEqual(result, 'simulationValue'); - assert( - (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchValuedResourceFromValuedResourceName', () => { - const result = - client.matchValuedResourceFromValuedResourceName(fakePath); - assert.strictEqual(result, 'valuedResourceValue'); - assert( - (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); }); }); From 03bfa5d4314e3c2e97e50d0c09b98cffe3669d9b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 09:24:20 +0000 Subject: [PATCH 02/17] feat: [dataplex] expose data scan execution create time to customers (#5510) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 647205054 Source-Link: https://togithub.com/googleapis/googleapis/commit/0e33f8672486b380c7729397db5ad2bd6939c9c1 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/efa2da1632aaf19fa074f724689c36c0c9768d4b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwbGV4Ly5Pd2xCb3QueWFtbCIsImgiOiJlZmEyZGExNjMyYWFmMTlmYTA3NGY3MjQ2ODljMzZjMGM5NzY4ZDRiIn0= --- .../google/cloud/dataplex/v1/datascans.proto | 4 +++ .../google-cloud-dataplex/protos/protos.d.ts | 6 ++++ .../google-cloud-dataplex/protos/protos.js | 28 +++++++++++++++++++ .../google-cloud-dataplex/protos/protos.json | 7 +++++ 4 files changed, 45 insertions(+) diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto index b3b6fc909409..0768b5a129e9 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto @@ -447,6 +447,10 @@ message DataScan { // The time when the latest DataScanJob ended. google.protobuf.Timestamp latest_job_end_time = 5; + + // Optional. The time when the DataScanJob execution was created. + google.protobuf.Timestamp latest_job_create_time = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. The relative resource name of the scan, of the form: diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 1e9cd83c5e88..7c26f5c54856 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -27692,6 +27692,9 @@ export namespace google { /** ExecutionStatus latestJobEndTime */ latestJobEndTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobCreateTime */ + latestJobCreateTime?: (google.protobuf.ITimestamp|null); } /** Represents an ExecutionStatus. */ @@ -27709,6 +27712,9 @@ export namespace google { /** ExecutionStatus latestJobEndTime. */ public latestJobEndTime?: (google.protobuf.ITimestamp|null); + /** ExecutionStatus latestJobCreateTime. */ + public latestJobCreateTime?: (google.protobuf.ITimestamp|null); + /** * Creates a new ExecutionStatus instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 408ff24a45b1..6b7d35e7db99 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -67483,6 +67483,7 @@ * @interface IExecutionStatus * @property {google.protobuf.ITimestamp|null} [latestJobStartTime] ExecutionStatus latestJobStartTime * @property {google.protobuf.ITimestamp|null} [latestJobEndTime] ExecutionStatus latestJobEndTime + * @property {google.protobuf.ITimestamp|null} [latestJobCreateTime] ExecutionStatus latestJobCreateTime */ /** @@ -67516,6 +67517,14 @@ */ ExecutionStatus.prototype.latestJobEndTime = null; + /** + * ExecutionStatus latestJobCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobCreateTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobCreateTime = null; + /** * Creates a new ExecutionStatus instance using the specified properties. * @function create @@ -67544,6 +67553,8 @@ $root.google.protobuf.Timestamp.encode(message.latestJobStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.latestJobEndTime != null && Object.hasOwnProperty.call(message, "latestJobEndTime")) $root.google.protobuf.Timestamp.encode(message.latestJobEndTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.latestJobCreateTime != null && Object.hasOwnProperty.call(message, "latestJobCreateTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -67586,6 +67597,10 @@ message.latestJobEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + message.latestJobCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -67631,6 +67646,11 @@ if (error) return "latestJobEndTime." + error; } + if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobCreateTime); + if (error) + return "latestJobCreateTime." + error; + } return null; }; @@ -67656,6 +67676,11 @@ throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobEndTime: object expected"); message.latestJobEndTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobEndTime); } + if (object.latestJobCreateTime != null) { + if (typeof object.latestJobCreateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobCreateTime: object expected"); + message.latestJobCreateTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobCreateTime); + } return message; }; @@ -67675,11 +67700,14 @@ if (options.defaults) { object.latestJobStartTime = null; object.latestJobEndTime = null; + object.latestJobCreateTime = null; } if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) object.latestJobStartTime = $root.google.protobuf.Timestamp.toObject(message.latestJobStartTime, options); if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) object.latestJobEndTime = $root.google.protobuf.Timestamp.toObject(message.latestJobEndTime, options); + if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) + object.latestJobCreateTime = $root.google.protobuf.Timestamp.toObject(message.latestJobCreateTime, options); return object; }; diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index c1f8de200c07..62b6f80cd090 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -8629,6 +8629,13 @@ "latestJobEndTime": { "type": "google.protobuf.Timestamp", "id": 5 + }, + "latestJobCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } } From c4f4ad4b4d308368866bab4820e3cae31906bf04 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 09:03:26 -0700 Subject: [PATCH 03/17] chore: release main (#5508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 4 +- changelog.json | 48 ++++++++++++++++++- packages/google-cloud-dataplex/CHANGELOG.md | 7 +++ packages/google-cloud-dataplex/package.json | 2 +- ...pet_metadata.google.cloud.dataplex.v1.json | 2 +- ...pet_metadata_google.cloud.dataplex.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-securitycenter/CHANGELOG.md | 9 ++++ .../google-cloud-securitycenter/package.json | 2 +- ...tadata.google.cloud.securitycenter.v1.json | 2 +- ...tadata_google.cloud.securitycenter.v1.json | 2 +- ...a.google.cloud.securitycenter.v1beta1.json | 2 +- ...a_google.cloud.securitycenter.v1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...tadata_google.cloud.securitycenter.v2.json | 2 +- .../samples/package.json | 2 +- 17 files changed, 78 insertions(+), 16 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 910a45392d1a..8f673f324bfd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -51,7 +51,7 @@ "packages/google-cloud-dataform": "1.3.0", "packages/google-cloud-datafusion": "3.2.0", "packages/google-cloud-datalabeling": "4.2.0", - "packages/google-cloud-dataplex": "3.10.0", + "packages/google-cloud-dataplex": "3.11.0", "packages/google-cloud-dataproc": "5.7.0", "packages/google-cloud-dataqna": "3.2.0", "packages/google-cloud-datastream": "3.2.0", @@ -113,7 +113,7 @@ "packages/google-cloud-secretmanager": "5.6.0", "packages/google-cloud-security-privateca": "5.4.0", "packages/google-cloud-security-publicca": "1.3.0", - "packages/google-cloud-securitycenter": "8.9.0", + "packages/google-cloud-securitycenter": "8.10.0", "packages/google-cloud-servicedirectory": "5.3.0", "packages/google-cloud-shell": "3.3.0", "packages/google-cloud-speech": "6.6.1", diff --git a/changelog.json b/changelog.json index 3e92f4c1cf36..4a1e1a16e2f6 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,52 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "9e8416fe9c4c401119910fb5867b5b445e8224e7", + "message": "Added http configuration rule to ResourceValueConfig and ValuedResource API methods", + "issues": [] + }, + { + "type": "feat", + "sha": "9e8416fe9c4c401119910fb5867b5b445e8224e7", + "message": "Added toxic combination field to finding", + "issues": [] + }, + { + "type": "feat", + "sha": "9e8416fe9c4c401119910fb5867b5b445e8224e7", + "message": "[securitycenter] added cloud provider field to list findings response", + "issues": [ + "5507" + ] + } + ], + "version": "8.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/security-center", + "id": "102d7d8d-e23f-485f-a7a4-c7f32f982ad8", + "createTime": "2024-06-27T09:25:51.635Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "03bfa5d4314e3c2e97e50d0c09b98cffe3669d9b", + "message": "[dataplex] expose data scan execution create time to customers", + "issues": [ + "5510" + ] + } + ], + "version": "3.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "42ddd14e-bdab-40a7-b67c-1a111fcc8760", + "createTime": "2024-06-27T09:25:51.546Z" + }, { "changes": [ { @@ -34907,5 +34953,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2024-06-26T22:23:49.050Z" + "updateTime": "2024-06-27T09:25:51.635Z" } \ No newline at end of file diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index 60eb893ed619..c9ad829280f2 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.11.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v3.10.0...dataplex-v3.11.0) (2024-06-27) + + +### Features + +* [dataplex] expose data scan execution create time to customers ([#5510](https://github.com/googleapis/google-cloud-node/issues/5510)) ([03bfa5d](https://github.com/googleapis/google-cloud-node/commit/03bfa5d4314e3c2e97e50d0c09b98cffe3669d9b)) + ## [3.10.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v3.9.0...dataplex-v3.10.0) (2024-06-21) diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index d5fd8db901aa..1c7a19a48025 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "3.10.0", + "version": "3.11.0", "description": "dataplex client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 262e77b3666e..4dc1a2393c3d 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "3.10.0", + "version": "3.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json index f80a08db1df2..c70e3f14ca41 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "3.10.0", + "version": "3.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index d1b7c3184969..996eef13d768 100644 --- a/packages/google-cloud-dataplex/samples/package.json +++ b/packages/google-cloud-dataplex/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataplex": "^3.10.0" + "@google-cloud/dataplex": "^3.11.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-securitycenter/CHANGELOG.md b/packages/google-cloud-securitycenter/CHANGELOG.md index 585ae5ee36fa..d5386e312502 100644 --- a/packages/google-cloud-securitycenter/CHANGELOG.md +++ b/packages/google-cloud-securitycenter/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/@google-cloud/security-center?activeTab=versions +## [8.10.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v8.9.0...security-center-v8.10.0) (2024-06-27) + + +### Features + +* [securitycenter] added cloud provider field to list findings response ([#5507](https://github.com/googleapis/google-cloud-node/issues/5507)) ([9e8416f](https://github.com/googleapis/google-cloud-node/commit/9e8416fe9c4c401119910fb5867b5b445e8224e7)) +* Added http configuration rule to ResourceValueConfig and ValuedResource API methods ([9e8416f](https://github.com/googleapis/google-cloud-node/commit/9e8416fe9c4c401119910fb5867b5b445e8224e7)) +* Added toxic combination field to finding ([9e8416f](https://github.com/googleapis/google-cloud-node/commit/9e8416fe9c4c401119910fb5867b5b445e8224e7)) + ## [8.9.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v8.8.0...security-center-v8.9.0) (2024-06-26) diff --git a/packages/google-cloud-securitycenter/package.json b/packages/google-cloud-securitycenter/package.json index f1aa66b52673..26be992ca5c7 100644 --- a/packages/google-cloud-securitycenter/package.json +++ b/packages/google-cloud-securitycenter/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/security-center", "description": "Cloud Security Command Center API client for Node.js", - "version": "8.9.0", + "version": "8.10.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json index f00b2cc239c8..c508bd4cc4e5 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json index aa2b0d5bf132..4e23bce283bc 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json index 034785e35d0b..2db58aa4823f 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json index 034785e35d0b..2db58aa4823f 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json index b8ab9b607acb..5827d8f6ccde 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json index b8ab9b607acb..5827d8f6ccde 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json index 0d6efa57131e..83e2e025d460 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.9.0", + "version": "8.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/package.json b/packages/google-cloud-securitycenter/samples/package.json index c42fc176f057..9e964c753b1a 100644 --- a/packages/google-cloud-securitycenter/samples/package.json +++ b/packages/google-cloud-securitycenter/samples/package.json @@ -14,7 +14,7 @@ "license": "Apache-2.0", "dependencies": { "@google-cloud/pubsub": "^4.0.0", - "@google-cloud/security-center": "^8.9.0" + "@google-cloud/security-center": "^8.10.0" }, "devDependencies": { "chai": "^4.2.0", From 2c3f4c810f1eda3c0d9f9fb5bf7f5050c7e01234 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:30:55 -0700 Subject: [PATCH 04/17] chore: [edgecontainer] Configure clients for edgecontainer (#5513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Configure clients for edgecontainer PiperOrigin-RevId: 647486641 Source-Link: https://github.com/googleapis/googleapis/commit/a235ef2b878a20039af42339b7b9fdfb1b80880f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9066c39cbcd7253ac2f54b974b2664a0061a8e53 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2Vjb250YWluZXIvLk93bEJvdC55YW1sIiwiaCI6IjkwNjZjMzljYmNkNzI1M2FjMmY1NGI5NzRiMjY2NGEwMDYxYThlNTMifQ== * 🦉 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/cloud/edgecontainer/v1/resources.proto | 3 +++ .../protos/google/cloud/edgecontainer/v1/service.proto | 3 +++ packages/google-cloud-edgecontainer/protos/protos.json | 3 +++ 3 files changed, 9 insertions(+) diff --git a/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/resources.proto b/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/resources.proto index b6dd853a8eee..08b99a646347 100644 --- a/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/resources.proto +++ b/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/resources.proto @@ -22,10 +22,13 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +option csharp_namespace = "Google.Cloud.EdgeContainer.V1"; option go_package = "cloud.google.com/go/edgecontainer/apiv1/edgecontainerpb;edgecontainerpb"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; option java_package = "com.google.cloud.edgecontainer.v1"; +option php_namespace = "Google\\Cloud\\EdgeContainer\\V1"; +option ruby_package = "Google::Cloud::EdgeContainer::V1"; option (google.api.resource_definition) = { type: "cloudkms.googleapis.com/CryptoKey" pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" diff --git a/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/service.proto b/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/service.proto index ee1d06c17444..3c9373ad1862 100644 --- a/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/service.proto +++ b/packages/google-cloud-edgecontainer/protos/google/cloud/edgecontainer/v1/service.proto @@ -25,10 +25,13 @@ import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +option csharp_namespace = "Google.Cloud.EdgeContainer.V1"; option go_package = "cloud.google.com/go/edgecontainer/apiv1/edgecontainerpb;edgecontainerpb"; option java_multiple_files = true; option java_outer_classname = "ServiceProto"; option java_package = "com.google.cloud.edgecontainer.v1"; +option php_namespace = "Google\\Cloud\\EdgeContainer\\V1"; +option ruby_package = "Google::Cloud::EdgeContainer::V1"; // EdgeContainer API provides management of Kubernetes Clusters on Google Edge // Cloud deployments. diff --git a/packages/google-cloud-edgecontainer/protos/protos.json b/packages/google-cloud-edgecontainer/protos/protos.json index 67303a7aacf8..1fc56f9f8b88 100644 --- a/packages/google-cloud-edgecontainer/protos/protos.json +++ b/packages/google-cloud-edgecontainer/protos/protos.json @@ -8,10 +8,13 @@ "nested": { "v1": { "options": { + "csharp_namespace": "Google.Cloud.EdgeContainer.V1", "go_package": "cloud.google.com/go/edgecontainer/apiv1/edgecontainerpb;edgecontainerpb", "java_multiple_files": true, "java_outer_classname": "ServiceProto", "java_package": "com.google.cloud.edgecontainer.v1", + "php_namespace": "Google\\Cloud\\EdgeContainer\\V1", + "ruby_package": "Google::Cloud::EdgeContainer::V1", "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" }, From 6d8a33d6caf2b9dbe4aa043d083cb76e989ed5a3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:11:28 -0700 Subject: [PATCH 05/17] feat: [sql] add Dataplex integration opt-in field (#5518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Dataplex integration opt-in field PiperOrigin-RevId: 648786150 Source-Link: https://github.com/googleapis/googleapis/commit/62b41960a770dc74c2e24c5e997e7b79d77b5333 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed8eef47df18f760d9a21d9653a01114a4108069 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiZWQ4ZWVmNDdkZjE4Zjc2MGQ5YTIxZDk2NTNhMDExMTRhNDEwODA2OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 --- .../cloud/sql/v1/cloud_sql_resources.proto | 6 ++++ packages/google-cloud-sql/protos/protos.d.ts | 6 ++++ packages/google-cloud-sql/protos/protos.js | 28 +++++++++++++++++++ packages/google-cloud-sql/protos/protos.json | 7 +++++ 4 files changed, 47 insertions(+) diff --git a/packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_resources.proto b/packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_resources.proto index 27b07fb61d45..ef549457b16f 100644 --- a/packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_resources.proto +++ b/packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_resources.proto @@ -1345,6 +1345,12 @@ message Settings { // SQL for PostgreSQL instances. google.protobuf.BoolValue enable_google_ml_integration = 40 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. By default, Cloud SQL instances have schema extraction disabled + // for Dataplex. When this parameter is set to true, schema extraction for + // Dataplex on Cloud SQL instances is activated. + google.protobuf.BoolValue enable_dataplex_integration = 41 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies options for controlling advanced machine features. diff --git a/packages/google-cloud-sql/protos/protos.d.ts b/packages/google-cloud-sql/protos/protos.d.ts index 4c4eaa95dbe5..e6e42e499258 100644 --- a/packages/google-cloud-sql/protos/protos.d.ts +++ b/packages/google-cloud-sql/protos/protos.d.ts @@ -5774,6 +5774,9 @@ export namespace google { /** Settings enableGoogleMlIntegration */ enableGoogleMlIntegration?: (google.protobuf.IBoolValue|null); + + /** Settings enableDataplexIntegration */ + enableDataplexIntegration?: (google.protobuf.IBoolValue|null); } /** Represents a Settings. */ @@ -5884,6 +5887,9 @@ export namespace google { /** Settings enableGoogleMlIntegration. */ public enableGoogleMlIntegration?: (google.protobuf.IBoolValue|null); + /** Settings enableDataplexIntegration. */ + public enableDataplexIntegration?: (google.protobuf.IBoolValue|null); + /** * Creates a new Settings instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-sql/protos/protos.js b/packages/google-cloud-sql/protos/protos.js index b556bf0c8cc7..6d9c5ec2cf85 100644 --- a/packages/google-cloud-sql/protos/protos.js +++ b/packages/google-cloud-sql/protos/protos.js @@ -14835,6 +14835,7 @@ * @property {google.cloud.sql.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] Settings advancedMachineFeatures * @property {google.cloud.sql.v1.IDataCacheConfig|null} [dataCacheConfig] Settings dataCacheConfig * @property {google.protobuf.IBoolValue|null} [enableGoogleMlIntegration] Settings enableGoogleMlIntegration + * @property {google.protobuf.IBoolValue|null} [enableDataplexIntegration] Settings enableDataplexIntegration */ /** @@ -15120,6 +15121,14 @@ */ Settings.prototype.enableGoogleMlIntegration = null; + /** + * Settings enableDataplexIntegration. + * @member {google.protobuf.IBoolValue|null|undefined} enableDataplexIntegration + * @memberof google.cloud.sql.v1.Settings + * @instance + */ + Settings.prototype.enableDataplexIntegration = null; + /** * Creates a new Settings instance using the specified properties. * @function create @@ -15214,6 +15223,8 @@ writer.uint32(/* id 38, wireType 0 =*/304).int32(message.edition); if (message.enableGoogleMlIntegration != null && Object.hasOwnProperty.call(message, "enableGoogleMlIntegration")) $root.google.protobuf.BoolValue.encode(message.enableGoogleMlIntegration, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.enableDataplexIntegration != null && Object.hasOwnProperty.call(message, "enableDataplexIntegration")) + $root.google.protobuf.BoolValue.encode(message.enableDataplexIntegration, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); return writer; }; @@ -15405,6 +15416,10 @@ message.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } + case 41: { + message.enableDataplexIntegration = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15640,6 +15655,11 @@ if (error) return "enableGoogleMlIntegration." + error; } + if (message.enableDataplexIntegration != null && message.hasOwnProperty("enableDataplexIntegration")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableDataplexIntegration); + if (error) + return "enableDataplexIntegration." + error; + } return null; }; @@ -15935,6 +15955,11 @@ throw TypeError(".google.cloud.sql.v1.Settings.enableGoogleMlIntegration: object expected"); message.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.fromObject(object.enableGoogleMlIntegration); } + if (object.enableDataplexIntegration != null) { + if (typeof object.enableDataplexIntegration !== "object") + throw TypeError(".google.cloud.sql.v1.Settings.enableDataplexIntegration: object expected"); + message.enableDataplexIntegration = $root.google.protobuf.BoolValue.fromObject(object.enableDataplexIntegration); + } return message; }; @@ -15988,6 +16013,7 @@ object.dataCacheConfig = null; object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; object.enableGoogleMlIntegration = null; + object.enableDataplexIntegration = null; } if (message.settingsVersion != null && message.hasOwnProperty("settingsVersion")) object.settingsVersion = $root.google.protobuf.Int64Value.toObject(message.settingsVersion, options); @@ -16068,6 +16094,8 @@ object.edition = options.enums === String ? $root.google.cloud.sql.v1.Settings.Edition[message.edition] === undefined ? message.edition : $root.google.cloud.sql.v1.Settings.Edition[message.edition] : message.edition; if (message.enableGoogleMlIntegration != null && message.hasOwnProperty("enableGoogleMlIntegration")) object.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.toObject(message.enableGoogleMlIntegration, options); + if (message.enableDataplexIntegration != null && message.hasOwnProperty("enableDataplexIntegration")) + object.enableDataplexIntegration = $root.google.protobuf.BoolValue.toObject(message.enableDataplexIntegration, options); return object; }; diff --git a/packages/google-cloud-sql/protos/protos.json b/packages/google-cloud-sql/protos/protos.json index 769f5e27432a..de4bdc0c0f58 100644 --- a/packages/google-cloud-sql/protos/protos.json +++ b/packages/google-cloud-sql/protos/protos.json @@ -1504,6 +1504,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "enableDataplexIntegration": { + "type": "google.protobuf.BoolValue", + "id": 41, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { From c1a0a8a52866dee658ad34479b3ae62ae4b21bb5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:11:42 -0700 Subject: [PATCH 06/17] feat: [parallelstore] add iam.googleapis.com/ServiceAccount resource definition (#5520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add iam.googleapis.com/ServiceAccount resource definition --- feat: Adding Import/Export BYOSA to the export Data request --- feat: Adding Import/Export BYOSA to the import Data request PiperOrigin-RevId: 648793361 Source-Link: https://github.com/googleapis/googleapis/commit/748b487f94c07593af87bb41ef6816dba5a5accc Source-Link: https://github.com/googleapis/googleapis-gen/commit/07a6a5eda6f91dc2216e350c923dd9ee42780379 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUvLk93bEJvdC55YW1sIiwiaCI6IjA3YTZhNWVkYTZmOTFkYzIyMTZlMzUwYzkyM2RkOWVlNDI3ODAzNzkifQ== * 🦉 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 --- .../parallelstore/v1beta/parallelstore.proto | 28 ++++++++++ .../protos/protos.d.ts | 12 ++++ .../protos/protos.js | 46 ++++++++++++++++ .../protos/protos.json | 20 ++++++- .../v1beta/parallelstore.export_data.js | 8 +++ .../v1beta/parallelstore.import_data.js | 8 +++ ...ata_google.cloud.parallelstore.v1beta.json | 12 +++- .../src/v1beta/parallelstore_client.ts | 55 +++++++++++++++++++ .../test/gapic_parallelstore_v1beta.ts | 53 ++++++++++++++++++ 9 files changed, 238 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto index 743dd57a3f53..0114beec7904 100644 --- a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto +++ b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto @@ -41,6 +41,10 @@ option (google.api.resource_definition) = { type: "compute.googleapis.com/Address" pattern: "projects/{project}/regions/{region}/addresses/{address}" }; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; // Service describing handlers for resources // Configures and manages parallelstore resources. @@ -517,6 +521,18 @@ message ImportDataRequest { (google.api.field_info).format = UUID4, (google.api.field_behavior) = OPTIONAL ]; + + // Optional. User-specified Service Account (SA) credentials to be used when + // performing the transfer. + // Format: `projects/{project_id}/serviceAccounts/{service_account}` + // If unspecified, the Parallelstore service agent is used: + // service-@gcp-sa-parallelstore.iam.gserviceaccount.com) + string service_account = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; } // Message representing the request exporting data from Cloud Storage to @@ -559,6 +575,18 @@ message ExportDataRequest { (google.api.field_info).format = UUID4, (google.api.field_behavior) = OPTIONAL ]; + + // Optional. User-specified Service Account (SA) credentials to be used when + // performing the transfer. + // Format: `projects/{project_id}/serviceAccounts/{service_account}` + // If unspecified, the Parallelstore service agent is used: + // service-@gcp-sa-parallelstore.iam.gserviceaccount.com) + string service_account = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; } // ImportDataResponse is the response returned from ImportData rpc. diff --git a/packages/google-cloud-parallelstore/protos/protos.d.ts b/packages/google-cloud-parallelstore/protos/protos.d.ts index 4f62d4136d0f..6ee2f9d043c4 100644 --- a/packages/google-cloud-parallelstore/protos/protos.d.ts +++ b/packages/google-cloud-parallelstore/protos/protos.d.ts @@ -1568,6 +1568,9 @@ export namespace google { /** ImportDataRequest requestId */ requestId?: (string|null); + + /** ImportDataRequest serviceAccount */ + serviceAccount?: (string|null); } /** Represents an ImportDataRequest. */ @@ -1591,6 +1594,9 @@ export namespace google { /** ImportDataRequest requestId. */ public requestId: string; + /** ImportDataRequest serviceAccount. */ + public serviceAccount: string; + /** ImportDataRequest source. */ public source?: "sourceGcsBucket"; @@ -1689,6 +1695,9 @@ export namespace google { /** ExportDataRequest requestId */ requestId?: (string|null); + + /** ExportDataRequest serviceAccount */ + serviceAccount?: (string|null); } /** Represents an ExportDataRequest. */ @@ -1712,6 +1721,9 @@ export namespace google { /** ExportDataRequest requestId. */ public requestId: string; + /** ExportDataRequest serviceAccount. */ + public serviceAccount: string; + /** ExportDataRequest source. */ public source?: "sourceParallelstore"; diff --git a/packages/google-cloud-parallelstore/protos/protos.js b/packages/google-cloud-parallelstore/protos/protos.js index 1469a82bcbb2..b5e8fd89e28a 100644 --- a/packages/google-cloud-parallelstore/protos/protos.js +++ b/packages/google-cloud-parallelstore/protos/protos.js @@ -3662,6 +3662,7 @@ * @property {google.cloud.parallelstore.v1beta.IDestinationParallelstore|null} [destinationParallelstore] ImportDataRequest destinationParallelstore * @property {string|null} [name] ImportDataRequest name * @property {string|null} [requestId] ImportDataRequest requestId + * @property {string|null} [serviceAccount] ImportDataRequest serviceAccount */ /** @@ -3711,6 +3712,14 @@ */ ImportDataRequest.prototype.requestId = ""; + /** + * ImportDataRequest serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.parallelstore.v1beta.ImportDataRequest + * @instance + */ + ImportDataRequest.prototype.serviceAccount = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3768,6 +3777,8 @@ $root.google.cloud.parallelstore.v1beta.DestinationParallelstore.encode(message.destinationParallelstore, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); return writer; }; @@ -3818,6 +3829,10 @@ message.requestId = reader.string(); break; } + case 5: { + message.serviceAccount = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3876,6 +3891,9 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; return null; }; @@ -3905,6 +3923,8 @@ message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); return message; }; @@ -3924,6 +3944,7 @@ if (options.defaults) { object.name = ""; object.requestId = ""; + object.serviceAccount = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -3939,6 +3960,8 @@ } if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; return object; }; @@ -3981,6 +4004,7 @@ * @property {google.cloud.parallelstore.v1beta.IDestinationGcsBucket|null} [destinationGcsBucket] ExportDataRequest destinationGcsBucket * @property {string|null} [name] ExportDataRequest name * @property {string|null} [requestId] ExportDataRequest requestId + * @property {string|null} [serviceAccount] ExportDataRequest serviceAccount */ /** @@ -4030,6 +4054,14 @@ */ ExportDataRequest.prototype.requestId = ""; + /** + * ExportDataRequest serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.parallelstore.v1beta.ExportDataRequest + * @instance + */ + ExportDataRequest.prototype.serviceAccount = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -4087,6 +4119,8 @@ $root.google.cloud.parallelstore.v1beta.DestinationGcsBucket.encode(message.destinationGcsBucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); return writer; }; @@ -4137,6 +4171,10 @@ message.requestId = reader.string(); break; } + case 5: { + message.serviceAccount = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4195,6 +4233,9 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; return null; }; @@ -4224,6 +4265,8 @@ message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); return message; }; @@ -4243,6 +4286,7 @@ if (options.defaults) { object.name = ""; object.requestId = ""; + object.serviceAccount = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -4258,6 +4302,8 @@ } if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; return object; }; diff --git a/packages/google-cloud-parallelstore/protos/protos.json b/packages/google-cloud-parallelstore/protos/protos.json index 3158349e1c55..8d58ffa556bb 100644 --- a/packages/google-cloud-parallelstore/protos/protos.json +++ b/packages/google-cloud-parallelstore/protos/protos.json @@ -15,8 +15,8 @@ "java_package": "com.google.cloud.parallelstore.v1beta", "php_namespace": "Google\\Cloud\\Parallelstore\\V1beta", "ruby_package": "Google::Cloud::Parallelstore::V1beta", - "(google.api.resource_definition).type": "compute.googleapis.com/Address", - "(google.api.resource_definition).pattern": "projects/{project}/regions/{region}/addresses/{address}" + "(google.api.resource_definition).type": "iam.googleapis.com/ServiceAccount", + "(google.api.resource_definition).pattern": "projects/{project}/serviceAccounts/{service_account}" }, "nested": { "Parallelstore": { @@ -591,6 +591,14 @@ "(google.api.field_info).format": "UUID4", "(google.api.field_behavior)": "OPTIONAL" } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } } } }, @@ -631,6 +639,14 @@ "(google.api.field_info).format": "UUID4", "(google.api.field_behavior)": "OPTIONAL" } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } } } }, diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js index 5f6235295f54..58e0f745ca5b 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js @@ -54,6 +54,14 @@ function main(name) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Format: `projects/{project_id}/serviceAccounts/{service_account}` + * If unspecified, the Parallelstore service agent is used: + * service-@gcp-sa-parallelstore.iam.gserviceaccount.com) + */ + // const serviceAccount = 'abc123' // Imports the Parallelstore library const {ParallelstoreClient} = require('@google-cloud/parallelstore').v1beta; diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js index 4e1552950975..1a3591f45f24 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js @@ -54,6 +54,14 @@ function main(name) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Format: `projects/{project_id}/serviceAccounts/{service_account}` + * If unspecified, the Parallelstore service agent is used: + * service-@gcp-sa-parallelstore.iam.gserviceaccount.com) + */ + // const serviceAccount = 'abc123' // Imports the Parallelstore library const {ParallelstoreClient} = require('@google-cloud/parallelstore').v1beta; diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json index f02ed662bbad..31a0ad6a8d62 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json @@ -262,7 +262,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 84, "type": "FULL" } ], @@ -286,6 +286,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "service_account", + "type": "TYPE_STRING" } ], "resultType": ".google.longrunning.Operation", @@ -314,7 +318,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 84, "type": "FULL" } ], @@ -338,6 +342,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "service_account", + "type": "TYPE_STRING" } ], "resultType": ".google.longrunning.Operation", diff --git a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts index 0f8b0574c5e9..ebe08da871b8 100644 --- a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts +++ b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts @@ -238,6 +238,9 @@ export class ParallelstoreClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + serviceAccountPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/serviceAccounts/{service_account}' + ), }; // Some of the methods on this service return "paged" results, @@ -1110,6 +1113,12 @@ export class ParallelstoreClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} [request.serviceAccount] + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Format: `projects/{project_id}/serviceAccounts/{service_account}` + * If unspecified, the Parallelstore service agent is used: + * service-@gcp-sa-parallelstore.iam.gserviceaccount.com) * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1264,6 +1273,12 @@ export class ParallelstoreClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} [request.serviceAccount] + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Format: `projects/{project_id}/serviceAccounts/{service_account}` + * If unspecified, the Parallelstore service agent is used: + * service-@gcp-sa-parallelstore.iam.gserviceaccount.com) * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2059,6 +2074,46 @@ export class ParallelstoreClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified serviceAccount resource name string. + * + * @param {string} project + * @param {string} service_account + * @returns {string} Resource name string. + */ + serviceAccountPath(project: string, serviceAccount: string) { + return this.pathTemplates.serviceAccountPathTemplate.render({ + project: project, + service_account: serviceAccount, + }); + } + + /** + * Parse the project from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match( + serviceAccountName + ).project; + } + + /** + * Parse the service_account from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the service_account. + */ + matchServiceAccountFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match( + serviceAccountName + ).service_account; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts index ab72e4691c25..86d784d973d2 100644 --- a/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts +++ b/packages/google-cloud-parallelstore/test/gapic_parallelstore_v1beta.ts @@ -2537,5 +2537,58 @@ describe('v1beta.ParallelstoreClient', () => { ); }); }); + + describe('serviceAccount', () => { + const fakePath = '/rendered/path/serviceAccount'; + const expectedParameters = { + project: 'projectValue', + service_account: 'serviceAccountValue', + }; + const client = new parallelstoreModule.v1beta.ParallelstoreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.serviceAccountPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.serviceAccountPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('serviceAccountPath', () => { + const result = client.serviceAccountPath( + 'projectValue', + 'serviceAccountValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.serviceAccountPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceAccountName', () => { + const result = client.matchProjectFromServiceAccountName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceAccountFromServiceAccountName', () => { + const result = + client.matchServiceAccountFromServiceAccountName(fakePath); + assert.strictEqual(result, 'serviceAccountValue'); + assert( + (client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); From 88382897c1c0ba6f5f80ba72ab775808de301962 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 15:12:05 -0700 Subject: [PATCH 07/17] fix: [container] Deprecate "EXPERIMENTAL" option for Gateway API (this value has never been supported) (#5519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Deprecate "EXPERIMENTAL" option for Gateway API (this value has never been supported) PiperOrigin-RevId: 648792772 Source-Link: https://github.com/googleapis/googleapis/commit/fa77a9fd140f993668d8490baac366cd72ff621a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c3faf93148a4df73b578e59a649200749723463b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiYzNmYWY5MzE0OGE0ZGY3M2I1NzhlNTlhNjQ5MjAwNzQ5NzIzNDYzYiJ9 * 🦉 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/container/v1beta1/cluster_service.proto | 3 ++- packages/google-container/protos/protos.json | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index e3ee256d1935..203b49d840ab 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -5164,8 +5164,9 @@ message GatewayAPIConfig { // Gateway API support is disabled CHANNEL_DISABLED = 1; + // Deprecated: use CHANNEL_STANDARD instead. // Gateway API support is enabled, experimental CRDs are installed - CHANNEL_EXPERIMENTAL = 3; + CHANNEL_EXPERIMENTAL = 3 [deprecated = true]; // Gateway API support is enabled, standard CRDs are installed CHANNEL_STANDARD = 4; diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index 8cb664888dd8..8402126f8663 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -11888,6 +11888,11 @@ }, "nested": { "Channel": { + "valuesOptions": { + "CHANNEL_EXPERIMENTAL": { + "deprecated": true + } + }, "values": { "CHANNEL_UNSPECIFIED": 0, "CHANNEL_DISABLED": 1, From e85b5752ea97e102b8cd729d1e9b18aadfd8f045 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:26:22 -0700 Subject: [PATCH 08/17] feat: [bigquery-analyticshub] support public directory self service for Listings/Exchanges (#5523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support public directory self service for Listings/Exchanges feat: support Direct Table Access Toggle (Egress GA) docs: A comment for message `Listing` is changed docs: A comment for message `DataExchange` is changed PiperOrigin-RevId: 648941893 Source-Link: https://github.com/googleapis/googleapis/commit/c23223d273469bc9c0f296856b47d22fa1dfe3d9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/40846ed11e4ee577ba956411289d3b5e3022a968 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWFuYWx5dGljc2h1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA4NDZlZDExZTRlZTU3N2JhOTU2NDExMjg5ZDNiNWUzMDIyYTk2OCJ9 * 🦉 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 --- .../analyticshub/v1/analyticshub.proto | 70 ++- .../protos/protos.d.ts | 140 ++++++ .../protos/protos.js | 440 +++++++++++++++++- .../protos/protos.json | 72 ++- ...nalytics_hub_service.list_subscriptions.js | 12 +- ...analytics_hub_service.subscribe_listing.js | 5 +- ...google.cloud.bigquery.analyticshub.v1.json | 4 +- .../src/v1/analytics_hub_service_client.ts | 50 +- 8 files changed, 779 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto index 72fcc89a0492..31d83a79b7a5 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto +++ b/packages/google-cloud-bigquery-analyticshub/protos/google/cloud/bigquery/analyticshub/v1/analyticshub.proto @@ -298,6 +298,22 @@ service AnalyticsHubService { } } +// Specifies the type of discovery on the discovery page. Note that +// this does not control the visibility of the exchange/listing which is +// defined by IAM permission. +enum DiscoveryType { + // Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. + DISCOVERY_TYPE_UNSPECIFIED = 0; + + // The Data exchange/listing can be discovered in the 'Private' results + // list. + DISCOVERY_TYPE_PRIVATE = 1; + + // The Data exchange/listing can be discovered in the 'Public' results + // list. + DISCOVERY_TYPE_PUBLIC = 2; +} + // A data exchange is a container that lets you share data. Along with the // descriptive information about the data exchange, it contains listings that // reference shared datasets. @@ -344,6 +360,12 @@ message DataExchange { // Optional. Configurable data sharing environment option for a data exchange. SharingEnvironmentConfig sharing_environment_config = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of discovery on the discovery page for all the listings + // under this exchange. Updating this field also updates (overwrites) the + // discovery_type field for all the listings under this exchange. + optional DiscoveryType discovery_type = 9 + [(google.api.field_behavior) = OPTIONAL]; } // Sharing environment is a behavior model for sharing data within a @@ -473,6 +495,24 @@ message Listing { } } + // Restricted export policy used to configure restricted export on linked + // dataset. + message RestrictedExportPolicy { + // Optional. If true, enable restricted export. + google.protobuf.BoolValue enabled = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, restrict direct table access (read + // api/tabledata.list) on linked table. + google.protobuf.BoolValue restrict_direct_table_access = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, restrict export of query result derived from + // restricted linked dataset table. + google.protobuf.BoolValue restrict_query_result = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + // Resource name of the dataset source for this listing. // e.g. `projects/myproject/datasets/123` string dataset = 1 [(google.api.resource_reference) = { @@ -484,6 +524,11 @@ message Listing { // shared. This field is only valid for data clean room exchanges. repeated SelectedResource selected_resources = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, restricted export policy will be propagated and + // enforced on the linked dataset. + RestrictedExportPolicy restricted_export_policy = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Restricted export config, used to configure restricted export on linked @@ -614,6 +659,10 @@ message Listing { // enforced on the linked dataset. RestrictedExportConfig restricted_export_config = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of discovery of the listing on the discovery page. + optional DiscoveryType discovery_type = 14 + [(google.api.field_behavior) = OPTIONAL]; } // A subscription represents a subscribers' access to a particular set of @@ -901,8 +950,9 @@ message DeleteListingRequest { message SubscribeListingRequest { // Resulting destination of the listing that you subscribed to. oneof destination { - // BigQuery destination dataset to create for the subscriber. - DestinationDataset destination_dataset = 3; + // Input only. BigQuery destination dataset to create for the subscriber. + DestinationDataset destination_dataset = 3 + [(google.api.field_behavior) = INPUT_ONLY]; } // Required. Resource name of the listing that you want to subscribe to. @@ -996,7 +1046,21 @@ message ListSubscriptionsRequest { } ]; - // The filter expression may be used to filter by Data Exchange or Listing. + // An expression for filtering the results of the request. Eligible + // fields for filtering are: + // + // * `listing` + // * `data_exchange` + // + // Alternatively, a literal wrapped in double quotes may be provided. + // This will be checked for an exact match against both fields above. + // + // In all cases, the full Data Exchange or Listing resource name must + // be provided. Some example of using filters: + // + // * data_exchange="projects/myproject/locations/us/dataExchanges/123" + // * listing="projects/123/locations/us/dataExchanges/456/listings/789" + // * "projects/myproject/locations/us/dataExchanges/123" string filter = 2; // The maximum number of results to return in a single response page. diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts b/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts index f572a431440a..ec55c996378e 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.d.ts @@ -515,6 +515,13 @@ export namespace google { type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; } + /** DiscoveryType enum. */ + enum DiscoveryType { + DISCOVERY_TYPE_UNSPECIFIED = 0, + DISCOVERY_TYPE_PRIVATE = 1, + DISCOVERY_TYPE_PUBLIC = 2 + } + /** Properties of a DataExchange. */ interface IDataExchange { @@ -541,6 +548,9 @@ export namespace google { /** DataExchange sharingEnvironmentConfig */ sharingEnvironmentConfig?: (google.cloud.bigquery.analyticshub.v1.ISharingEnvironmentConfig|null); + + /** DataExchange discoveryType */ + discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); } /** Represents a DataExchange. */ @@ -576,6 +586,12 @@ export namespace google { /** DataExchange sharingEnvironmentConfig. */ public sharingEnvironmentConfig?: (google.cloud.bigquery.analyticshub.v1.ISharingEnvironmentConfig|null); + /** DataExchange discoveryType. */ + public discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); + + /** DataExchange _discoveryType. */ + public _discoveryType?: "discoveryType"; + /** * Creates a new DataExchange instance using the specified properties. * @param [properties] Properties to set @@ -1434,6 +1450,9 @@ export namespace google { /** Listing restrictedExportConfig */ restrictedExportConfig?: (google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null); + + /** Listing discoveryType */ + discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); } /** Represents a Listing. */ @@ -1484,9 +1503,15 @@ export namespace google { /** Listing restrictedExportConfig. */ public restrictedExportConfig?: (google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null); + /** Listing discoveryType. */ + public discoveryType?: (google.cloud.bigquery.analyticshub.v1.DiscoveryType|keyof typeof google.cloud.bigquery.analyticshub.v1.DiscoveryType|null); + /** Listing source. */ public source?: "bigqueryDataset"; + /** Listing _discoveryType. */ + public _discoveryType?: "discoveryType"; + /** * Creates a new Listing instance using the specified properties. * @param [properties] Properties to set @@ -1575,6 +1600,9 @@ export namespace google { /** BigQueryDatasetSource selectedResources */ selectedResources?: (google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ISelectedResource[]|null); + + /** BigQueryDatasetSource restrictedExportPolicy */ + restrictedExportPolicy?: (google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy|null); } /** Represents a BigQueryDatasetSource. */ @@ -1592,6 +1620,9 @@ export namespace google { /** BigQueryDatasetSource selectedResources. */ public selectedResources: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.ISelectedResource[]; + /** BigQueryDatasetSource restrictedExportPolicy. */ + public restrictedExportPolicy?: (google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy|null); + /** * Creates a new BigQueryDatasetSource instance using the specified properties. * @param [properties] Properties to set @@ -1771,6 +1802,115 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a RestrictedExportPolicy. */ + interface IRestrictedExportPolicy { + + /** RestrictedExportPolicy enabled */ + enabled?: (google.protobuf.IBoolValue|null); + + /** RestrictedExportPolicy restrictDirectTableAccess */ + restrictDirectTableAccess?: (google.protobuf.IBoolValue|null); + + /** RestrictedExportPolicy restrictQueryResult */ + restrictQueryResult?: (google.protobuf.IBoolValue|null); + } + + /** Represents a RestrictedExportPolicy. */ + class RestrictedExportPolicy implements IRestrictedExportPolicy { + + /** + * Constructs a new RestrictedExportPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy); + + /** RestrictedExportPolicy enabled. */ + public enabled?: (google.protobuf.IBoolValue|null); + + /** RestrictedExportPolicy restrictDirectTableAccess. */ + public restrictDirectTableAccess?: (google.protobuf.IBoolValue|null); + + /** RestrictedExportPolicy restrictQueryResult. */ + public restrictQueryResult?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new RestrictedExportPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns RestrictedExportPolicy instance + */ + public static create(properties?: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy): google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy; + + /** + * Encodes the specified RestrictedExportPolicy message. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.verify|verify} messages. + * @param message RestrictedExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestrictedExportPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.verify|verify} messages. + * @param message RestrictedExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestrictedExportPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestrictedExportPolicy + * @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.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy; + + /** + * Decodes a RestrictedExportPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestrictedExportPolicy + * @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.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy; + + /** + * Verifies a RestrictedExportPolicy 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 RestrictedExportPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestrictedExportPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy; + + /** + * Creates a plain object from a RestrictedExportPolicy message. Also converts values to other types if specified. + * @param message RestrictedExportPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestrictedExportPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestrictedExportPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a RestrictedExportConfig. */ diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.js b/packages/google-cloud-bigquery-analyticshub/protos/protos.js index e5ed38bba162..d4f16c05e043 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.js +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.js @@ -836,6 +836,22 @@ return AnalyticsHubService; })(); + /** + * DiscoveryType enum. + * @name google.cloud.bigquery.analyticshub.v1.DiscoveryType + * @enum {number} + * @property {number} DISCOVERY_TYPE_UNSPECIFIED=0 DISCOVERY_TYPE_UNSPECIFIED value + * @property {number} DISCOVERY_TYPE_PRIVATE=1 DISCOVERY_TYPE_PRIVATE value + * @property {number} DISCOVERY_TYPE_PUBLIC=2 DISCOVERY_TYPE_PUBLIC value + */ + v1.DiscoveryType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISCOVERY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISCOVERY_TYPE_PRIVATE"] = 1; + values[valuesById[2] = "DISCOVERY_TYPE_PUBLIC"] = 2; + return values; + })(); + v1.DataExchange = (function() { /** @@ -850,6 +866,7 @@ * @property {number|null} [listingCount] DataExchange listingCount * @property {Uint8Array|null} [icon] DataExchange icon * @property {google.cloud.bigquery.analyticshub.v1.ISharingEnvironmentConfig|null} [sharingEnvironmentConfig] DataExchange sharingEnvironmentConfig + * @property {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null} [discoveryType] DataExchange discoveryType */ /** @@ -931,6 +948,28 @@ */ DataExchange.prototype.sharingEnvironmentConfig = null; + /** + * DataExchange discoveryType. + * @member {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null|undefined} discoveryType + * @memberof google.cloud.bigquery.analyticshub.v1.DataExchange + * @instance + */ + DataExchange.prototype.discoveryType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataExchange _discoveryType. + * @member {"discoveryType"|undefined} _discoveryType + * @memberof google.cloud.bigquery.analyticshub.v1.DataExchange + * @instance + */ + Object.defineProperty(DataExchange.prototype, "_discoveryType", { + get: $util.oneOfGetter($oneOfFields = ["discoveryType"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DataExchange instance using the specified properties. * @function create @@ -971,6 +1010,8 @@ writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.icon); if (message.sharingEnvironmentConfig != null && Object.hasOwnProperty.call(message, "sharingEnvironmentConfig")) $root.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.encode(message.sharingEnvironmentConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.discoveryType != null && Object.hasOwnProperty.call(message, "discoveryType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.discoveryType); return writer; }; @@ -1037,6 +1078,10 @@ message.sharingEnvironmentConfig = $root.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.decode(reader, reader.uint32()); break; } + case 9: { + message.discoveryType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1072,6 +1117,7 @@ DataExchange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -1098,6 +1144,17 @@ if (error) return "sharingEnvironmentConfig." + error; } + if (message.discoveryType != null && message.hasOwnProperty("discoveryType")) { + properties._discoveryType = 1; + switch (message.discoveryType) { + default: + return "discoveryType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } return null; }; @@ -1135,6 +1192,26 @@ throw TypeError(".google.cloud.bigquery.analyticshub.v1.DataExchange.sharingEnvironmentConfig: object expected"); message.sharingEnvironmentConfig = $root.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.fromObject(object.sharingEnvironmentConfig); } + switch (object.discoveryType) { + default: + if (typeof object.discoveryType === "number") { + message.discoveryType = object.discoveryType; + break; + } + break; + case "DISCOVERY_TYPE_UNSPECIFIED": + case 0: + message.discoveryType = 0; + break; + case "DISCOVERY_TYPE_PRIVATE": + case 1: + message.discoveryType = 1; + break; + case "DISCOVERY_TYPE_PUBLIC": + case 2: + message.discoveryType = 2; + break; + } return message; }; @@ -1183,6 +1260,11 @@ object.icon = options.bytes === String ? $util.base64.encode(message.icon, 0, message.icon.length) : options.bytes === Array ? Array.prototype.slice.call(message.icon) : message.icon; if (message.sharingEnvironmentConfig != null && message.hasOwnProperty("sharingEnvironmentConfig")) object.sharingEnvironmentConfig = $root.google.cloud.bigquery.analyticshub.v1.SharingEnvironmentConfig.toObject(message.sharingEnvironmentConfig, options); + if (message.discoveryType != null && message.hasOwnProperty("discoveryType")) { + object.discoveryType = options.enums === String ? $root.google.cloud.bigquery.analyticshub.v1.DiscoveryType[message.discoveryType] === undefined ? message.discoveryType : $root.google.cloud.bigquery.analyticshub.v1.DiscoveryType[message.discoveryType] : message.discoveryType; + if (options.oneofs) + object._discoveryType = "discoveryType"; + } return object; }; @@ -2958,6 +3040,7 @@ * @property {google.cloud.bigquery.analyticshub.v1.IPublisher|null} [publisher] Listing publisher * @property {string|null} [requestAccess] Listing requestAccess * @property {google.cloud.bigquery.analyticshub.v1.Listing.IRestrictedExportConfig|null} [restrictedExportConfig] Listing restrictedExportConfig + * @property {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null} [discoveryType] Listing discoveryType */ /** @@ -3080,6 +3163,14 @@ */ Listing.prototype.restrictedExportConfig = null; + /** + * Listing discoveryType. + * @member {google.cloud.bigquery.analyticshub.v1.DiscoveryType|null|undefined} discoveryType + * @memberof google.cloud.bigquery.analyticshub.v1.Listing + * @instance + */ + Listing.prototype.discoveryType = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3094,6 +3185,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Listing _discoveryType. + * @member {"discoveryType"|undefined} _discoveryType + * @memberof google.cloud.bigquery.analyticshub.v1.Listing + * @instance + */ + Object.defineProperty(Listing.prototype, "_discoveryType", { + get: $util.oneOfGetter($oneOfFields = ["discoveryType"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Listing instance using the specified properties. * @function create @@ -3148,6 +3250,8 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.requestAccess); if (message.restrictedExportConfig != null && Object.hasOwnProperty.call(message, "restrictedExportConfig")) $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.encode(message.restrictedExportConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.discoveryType != null && Object.hasOwnProperty.call(message, "discoveryType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.discoveryType); return writer; }; @@ -3241,6 +3345,10 @@ message.restrictedExportConfig = $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.decode(reader, reader.uint32()); break; } + case 14: { + message.discoveryType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3359,6 +3467,17 @@ if (error) return "restrictedExportConfig." + error; } + if (message.discoveryType != null && message.hasOwnProperty("discoveryType")) { + properties._discoveryType = 1; + switch (message.discoveryType) { + default: + return "discoveryType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } return null; }; @@ -3520,6 +3639,26 @@ throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.restrictedExportConfig: object expected"); message.restrictedExportConfig = $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.fromObject(object.restrictedExportConfig); } + switch (object.discoveryType) { + default: + if (typeof object.discoveryType === "number") { + message.discoveryType = object.discoveryType; + break; + } + break; + case "DISCOVERY_TYPE_UNSPECIFIED": + case 0: + message.discoveryType = 0; + break; + case "DISCOVERY_TYPE_PRIVATE": + case 1: + message.discoveryType = 1; + break; + case "DISCOVERY_TYPE_PUBLIC": + case 2: + message.discoveryType = 2; + break; + } return message; }; @@ -3589,6 +3728,11 @@ object.requestAccess = message.requestAccess; if (message.restrictedExportConfig != null && message.hasOwnProperty("restrictedExportConfig")) object.restrictedExportConfig = $root.google.cloud.bigquery.analyticshub.v1.Listing.RestrictedExportConfig.toObject(message.restrictedExportConfig, options); + if (message.discoveryType != null && message.hasOwnProperty("discoveryType")) { + object.discoveryType = options.enums === String ? $root.google.cloud.bigquery.analyticshub.v1.DiscoveryType[message.discoveryType] === undefined ? message.discoveryType : $root.google.cloud.bigquery.analyticshub.v1.DiscoveryType[message.discoveryType] : message.discoveryType; + if (options.oneofs) + object._discoveryType = "discoveryType"; + } return object; }; @@ -3626,6 +3770,7 @@ * @interface IBigQueryDatasetSource * @property {string|null} [dataset] BigQueryDatasetSource dataset * @property {Array.|null} [selectedResources] BigQueryDatasetSource selectedResources + * @property {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy|null} [restrictedExportPolicy] BigQueryDatasetSource restrictedExportPolicy */ /** @@ -3660,6 +3805,14 @@ */ BigQueryDatasetSource.prototype.selectedResources = $util.emptyArray; + /** + * BigQueryDatasetSource restrictedExportPolicy. + * @member {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy|null|undefined} restrictedExportPolicy + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource + * @instance + */ + BigQueryDatasetSource.prototype.restrictedExportPolicy = null; + /** * Creates a new BigQueryDatasetSource instance using the specified properties. * @function create @@ -3689,6 +3842,8 @@ if (message.selectedResources != null && message.selectedResources.length) for (var i = 0; i < message.selectedResources.length; ++i) $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource.encode(message.selectedResources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.restrictedExportPolicy != null && Object.hasOwnProperty.call(message, "restrictedExportPolicy")) + $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.encode(message.restrictedExportPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -3733,6 +3888,10 @@ message.selectedResources.push($root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource.decode(reader, reader.uint32())); break; } + case 3: { + message.restrictedExportPolicy = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3780,6 +3939,11 @@ return "selectedResources." + error; } } + if (message.restrictedExportPolicy != null && message.hasOwnProperty("restrictedExportPolicy")) { + var error = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.verify(message.restrictedExportPolicy); + if (error) + return "restrictedExportPolicy." + error; + } return null; }; @@ -3807,6 +3971,11 @@ message.selectedResources[i] = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource.fromObject(object.selectedResources[i]); } } + if (object.restrictedExportPolicy != null) { + if (typeof object.restrictedExportPolicy !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.restrictedExportPolicy: object expected"); + message.restrictedExportPolicy = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.fromObject(object.restrictedExportPolicy); + } return message; }; @@ -3825,8 +3994,10 @@ var object = {}; if (options.arrays || options.defaults) object.selectedResources = []; - if (options.defaults) + if (options.defaults) { object.dataset = ""; + object.restrictedExportPolicy = null; + } if (message.dataset != null && message.hasOwnProperty("dataset")) object.dataset = message.dataset; if (message.selectedResources && message.selectedResources.length) { @@ -3834,6 +4005,8 @@ for (var j = 0; j < message.selectedResources.length; ++j) object.selectedResources[j] = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.SelectedResource.toObject(message.selectedResources[j], options); } + if (message.restrictedExportPolicy != null && message.hasOwnProperty("restrictedExportPolicy")) + object.restrictedExportPolicy = $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.toObject(message.restrictedExportPolicy, options); return object; }; @@ -4084,6 +4257,271 @@ return SelectedResource; })(); + BigQueryDatasetSource.RestrictedExportPolicy = (function() { + + /** + * Properties of a RestrictedExportPolicy. + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource + * @interface IRestrictedExportPolicy + * @property {google.protobuf.IBoolValue|null} [enabled] RestrictedExportPolicy enabled + * @property {google.protobuf.IBoolValue|null} [restrictDirectTableAccess] RestrictedExportPolicy restrictDirectTableAccess + * @property {google.protobuf.IBoolValue|null} [restrictQueryResult] RestrictedExportPolicy restrictQueryResult + */ + + /** + * Constructs a new RestrictedExportPolicy. + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource + * @classdesc Represents a RestrictedExportPolicy. + * @implements IRestrictedExportPolicy + * @constructor + * @param {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy=} [properties] Properties to set + */ + function RestrictedExportPolicy(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]]; + } + + /** + * RestrictedExportPolicy enabled. + * @member {google.protobuf.IBoolValue|null|undefined} enabled + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @instance + */ + RestrictedExportPolicy.prototype.enabled = null; + + /** + * RestrictedExportPolicy restrictDirectTableAccess. + * @member {google.protobuf.IBoolValue|null|undefined} restrictDirectTableAccess + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @instance + */ + RestrictedExportPolicy.prototype.restrictDirectTableAccess = null; + + /** + * RestrictedExportPolicy restrictQueryResult. + * @member {google.protobuf.IBoolValue|null|undefined} restrictQueryResult + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @instance + */ + RestrictedExportPolicy.prototype.restrictQueryResult = null; + + /** + * Creates a new RestrictedExportPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy=} [properties] Properties to set + * @returns {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy} RestrictedExportPolicy instance + */ + RestrictedExportPolicy.create = function create(properties) { + return new RestrictedExportPolicy(properties); + }; + + /** + * Encodes the specified RestrictedExportPolicy message. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy} message RestrictedExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestrictedExportPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.restrictDirectTableAccess != null && Object.hasOwnProperty.call(message, "restrictDirectTableAccess")) + $root.google.protobuf.BoolValue.encode(message.restrictDirectTableAccess, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.restrictQueryResult != null && Object.hasOwnProperty.call(message, "restrictQueryResult")) + $root.google.protobuf.BoolValue.encode(message.restrictQueryResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestrictedExportPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.IRestrictedExportPolicy} message RestrictedExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestrictedExportPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestrictedExportPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy} RestrictedExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestrictedExportPolicy.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.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.restrictDirectTableAccess = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.restrictQueryResult = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestrictedExportPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy} RestrictedExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestrictedExportPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestrictedExportPolicy message. + * @function verify + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestrictedExportPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.enabled); + if (error) + return "enabled." + error; + } + if (message.restrictDirectTableAccess != null && message.hasOwnProperty("restrictDirectTableAccess")) { + var error = $root.google.protobuf.BoolValue.verify(message.restrictDirectTableAccess); + if (error) + return "restrictDirectTableAccess." + error; + } + if (message.restrictQueryResult != null && message.hasOwnProperty("restrictQueryResult")) { + var error = $root.google.protobuf.BoolValue.verify(message.restrictQueryResult); + if (error) + return "restrictQueryResult." + error; + } + return null; + }; + + /** + * Creates a RestrictedExportPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy} RestrictedExportPolicy + */ + RestrictedExportPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy) + return object; + var message = new $root.google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy(); + if (object.enabled != null) { + if (typeof object.enabled !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.enabled: object expected"); + message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); + } + if (object.restrictDirectTableAccess != null) { + if (typeof object.restrictDirectTableAccess !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.restrictDirectTableAccess: object expected"); + message.restrictDirectTableAccess = $root.google.protobuf.BoolValue.fromObject(object.restrictDirectTableAccess); + } + if (object.restrictQueryResult != null) { + if (typeof object.restrictQueryResult !== "object") + throw TypeError(".google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy.restrictQueryResult: object expected"); + message.restrictQueryResult = $root.google.protobuf.BoolValue.fromObject(object.restrictQueryResult); + } + return message; + }; + + /** + * Creates a plain object from a RestrictedExportPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy} message RestrictedExportPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestrictedExportPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = null; + object.restrictDirectTableAccess = null; + object.restrictQueryResult = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + if (message.restrictDirectTableAccess != null && message.hasOwnProperty("restrictDirectTableAccess")) + object.restrictDirectTableAccess = $root.google.protobuf.BoolValue.toObject(message.restrictDirectTableAccess, options); + if (message.restrictQueryResult != null && message.hasOwnProperty("restrictQueryResult")) + object.restrictQueryResult = $root.google.protobuf.BoolValue.toObject(message.restrictQueryResult, options); + return object; + }; + + /** + * Converts this RestrictedExportPolicy to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @instance + * @returns {Object.} JSON object + */ + RestrictedExportPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestrictedExportPolicy + * @function getTypeUrl + * @memberof google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestrictedExportPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.analyticshub.v1.Listing.BigQueryDatasetSource.RestrictedExportPolicy"; + }; + + return RestrictedExportPolicy; + })(); + return BigQueryDatasetSource; })(); diff --git a/packages/google-cloud-bigquery-analyticshub/protos/protos.json b/packages/google-cloud-bigquery-analyticshub/protos/protos.json index 5850db297e86..15360a77b08e 100644 --- a/packages/google-cloud-bigquery-analyticshub/protos/protos.json +++ b/packages/google-cloud-bigquery-analyticshub/protos/protos.json @@ -493,11 +493,25 @@ } } }, + "DiscoveryType": { + "values": { + "DISCOVERY_TYPE_UNSPECIFIED": 0, + "DISCOVERY_TYPE_PRIVATE": 1, + "DISCOVERY_TYPE_PUBLIC": 2 + } + }, "DataExchange": { "options": { "(google.api.resource).type": "analyticshub.googleapis.com/DataExchange", "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataExchanges/{data_exchange}" }, + "oneofs": { + "_discoveryType": { + "oneof": [ + "discoveryType" + ] + } + }, "fields": { "name": { "type": "string", @@ -554,6 +568,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "discoveryType": { + "type": "DiscoveryType", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } } }, @@ -718,6 +740,11 @@ "oneof": [ "bigqueryDataset" ] + }, + "_discoveryType": { + "oneof": [ + "discoveryType" + ] } }, "fields": { @@ -812,6 +839,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "discoveryType": { + "type": "DiscoveryType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { @@ -831,6 +866,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "restrictedExportPolicy": { + "type": "RestrictedExportPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -852,6 +894,31 @@ } } } + }, + "RestrictedExportPolicy": { + "fields": { + "enabled": { + "type": "google.protobuf.BoolValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "restrictDirectTableAccess": { + "type": "google.protobuf.BoolValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "restrictQueryResult": { + "type": "google.protobuf.BoolValue", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -1272,7 +1339,10 @@ "fields": { "destinationDataset": { "type": "DestinationDataset", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } }, "name": { "type": "string", diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.list_subscriptions.js b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.list_subscriptions.js index 7ec9135dfaa1..d5484eecc5d5 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.list_subscriptions.js +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.list_subscriptions.js @@ -34,7 +34,17 @@ function main(parent) { */ // const parent = 'abc123' /** - * The filter expression may be used to filter by Data Exchange or Listing. + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * * `listing` + * * `data_exchange` + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" */ // const filter = 'abc123' /** diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.subscribe_listing.js b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.subscribe_listing.js index 6d4bd64b53ac..77012a20740a 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.subscribe_listing.js +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/analytics_hub_service.subscribe_listing.js @@ -20,7 +20,7 @@ 'use strict'; -function main(name) { +function main(destinationDataset, name) { // [START analyticshub_v1_generated_AnalyticsHubService_SubscribeListing_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * BigQuery destination dataset to create for the subscriber. + * Input only. BigQuery destination dataset to create for the subscriber. */ // const destinationDataset = {} /** @@ -47,6 +47,7 @@ function main(name) { async function callSubscribeListing() { // Construct request const request = { + destinationDataset, name, }; diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index 3aca83318c39..34392b13b83e 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -510,7 +510,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 59, "type": "FULL" } ], @@ -686,7 +686,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 78, "type": "FULL" } ], diff --git a/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts b/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts index 68afce811cf0..a855460cc0e8 100644 --- a/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts +++ b/packages/google-cloud-bigquery-analyticshub/src/v1/analytics_hub_service_client.ts @@ -1308,7 +1308,7 @@ export class AnalyticsHubServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.bigquery.analyticshub.v1.DestinationDataset} request.destinationDataset - * BigQuery destination dataset to create for the subscriber. + * Input only. BigQuery destination dataset to create for the subscriber. * @param {string} request.name * Required. Resource name of the listing that you want to subscribe to. * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. @@ -2881,7 +2881,21 @@ export class AnalyticsHubServiceClient { * Required. The parent resource path of the subscription. * e.g. projects/myproject/locations/US * @param {string} request.filter - * The filter expression may be used to filter by Data Exchange or Listing. + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * + * * `listing` + * * `data_exchange` + * + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" * @param {number} request.pageSize * The maximum number of results to return in a single response page. * @param {string} request.pageToken @@ -2981,7 +2995,21 @@ export class AnalyticsHubServiceClient { * Required. The parent resource path of the subscription. * e.g. projects/myproject/locations/US * @param {string} request.filter - * The filter expression may be used to filter by Data Exchange or Listing. + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * + * * `listing` + * * `data_exchange` + * + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" * @param {number} request.pageSize * The maximum number of results to return in a single response page. * @param {string} request.pageToken @@ -3029,7 +3057,21 @@ export class AnalyticsHubServiceClient { * Required. The parent resource path of the subscription. * e.g. projects/myproject/locations/US * @param {string} request.filter - * The filter expression may be used to filter by Data Exchange or Listing. + * An expression for filtering the results of the request. Eligible + * fields for filtering are: + * + * * `listing` + * * `data_exchange` + * + * Alternatively, a literal wrapped in double quotes may be provided. + * This will be checked for an exact match against both fields above. + * + * In all cases, the full Data Exchange or Listing resource name must + * be provided. Some example of using filters: + * + * * data_exchange="projects/myproject/locations/us/dataExchanges/123" + * * listing="projects/123/locations/us/dataExchanges/456/listings/789" + * * "projects/myproject/locations/us/dataExchanges/123" * @param {number} request.pageSize * The maximum number of results to return in a single response page. * @param {string} request.pageToken From 284535d7d160055e09f92c54792819193b843a4a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 12:58:18 +0200 Subject: [PATCH 09/17] chore(deps): update dependency gapic-tools to v0.4.4 (#5530) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [gapic-tools](https://togithub.com/googleapis/gax-nodejs) ([source](https://togithub.com/googleapis/gax-nodejs/tree/HEAD/gapic-tools)) | [`0.4.3` -> `0.4.4`](https://renovatebot.com/diffs/npm/gapic-tools/0.4.3/0.4.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/gapic-tools/0.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gapic-tools/0.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gapic-tools/0.4.3/0.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gapic-tools/0.4.3/0.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/gax-nodejs (gapic-tools) ### [`v0.4.4`](https://togithub.com/googleapis/gax-nodejs/releases/tag/gapic-tools-v0.4.4): gapic-tools: v0.4.4 [Compare Source](https://togithub.com/googleapis/gax-nodejs/compare/gapic-tools-v0.4.3...gapic-tools-v0.4.4) ##### Bug Fixes - **deps:** remove rimraf in favor of native node rm function ([#​1626](https://togithub.com/googleapis/gax-nodejs/issues/1626)) ([dd87646](https://togithub.com/googleapis/gax-nodejs/commit/dd87646618d5026549920e224df7f85cbb5ff6a8)) - Use a hashed id for default root name ([#​1575](https://togithub.com/googleapis/gax-nodejs/issues/1575)) ([e3cf430](https://togithub.com/googleapis/gax-nodejs/commit/e3cf430d02bc855df27edf3e0f93454ca8196fdf))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/google-cloud-node). --- .../google-cloud-commerce-consumer-procurement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-commerce-consumer-procurement/package.json b/packages/google-cloud-commerce-consumer-procurement/package.json index 8dc807ee2ea9..308afb4e59c9 100644 --- a/packages/google-cloud-commerce-consumer-procurement/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/package.json @@ -53,7 +53,7 @@ "@types/sinon": "^17.0.0", "c8": "^9.0.0", "gts": "^5.0.0", - "gapic-tools": "0.4.3", + "gapic-tools": "0.4.4", "jsdoc": "^4.0.0", "jsdoc-fresh": "^3.0.0", "jsdoc-region-tag": "^3.0.0", From 89832091d214555b274df86d817866a33b559e05 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:52:00 -0400 Subject: [PATCH 10/17] feat: add model and contents fields to ComputeTokensRequest v1 (#5517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add UpdateDeploymentResourcePool method to DeploymentResourcePoolService v1 feat: add private_service_connect_config and service_attachment fields to DedicatedServingEndpoint v1 feat: add satisfies_pzs and satisfies_pzi fields to Model v1 docs: update comments of AutoscalingSpec v1 feat: add deploy_metadata to PublisherModel.Deploy v1 feat: add satisfies_pzs and satisfies_pzi fields to Tensorboard v1 PiperOrigin-RevId: 647776070 Source-Link: https://github.com/googleapis/googleapis/commit/f1b4053bee0af22befbd5c644edbb97364073886 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b46291b3f586629e557455684d4373bc1cf721c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjFiNDYyOTFiM2Y1ODY2MjllNTU3NDU1Njg0ZDQzNzNiYzFjZjcyMWMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add UpdateDeploymentResourcePool method to DeploymentResourcePoolService v1beta1 feat: add use_effective_order field to BleuSpec v1beta1 feat: add satisfies_pzs and satisfies_pzi fields to Model v1beta1 docs: update comments of AutoscalingSpec v1beta1 feat: add deploy_metadata to PublisherModel.Deploy v1beta1 feat: add satisfies_pzs and satisfies_pzi fields to Tensorboard v1beta1 PiperOrigin-RevId: 648431398 Source-Link: https://github.com/googleapis/googleapis/commit/d6c462ec5e848496bed82fc26efcbad9a29b4666 Source-Link: https://github.com/googleapis/googleapis-gen/commit/71389b9e0c0f74d03c8cf1afc1211bd701802686 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjcxMzg5YjllMGMwZjc0ZDAzYzhjZjFhZmMxMjExYmQ3MDE4MDI2ODYifQ== * feat: add model and contents fields to ComputeTokensRequest v1beta1 feat: add role field to TokensInfo v1beta1 PiperOrigin-RevId: 649170978 Source-Link: https://github.com/googleapis/googleapis/commit/b8df4aca3c89f86e919c2e30d46a91426f98e68e Source-Link: https://github.com/googleapis/googleapis-gen/commit/ae423635302f7a7c4ab253064f88680a91a51068 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImFlNDIzNjM1MzAyZjdhN2M0YWIyNTMwNjRmODg2ODBhOTFhNTEwNjgifQ== * feat: add model and contents fields to ComputeTokensRequest v1 feat: add role field to TokensInfo v1 PiperOrigin-RevId: 649172160 Source-Link: https://github.com/googleapis/googleapis/commit/7c0323f788be4cd534fdfff96d061352e6085484 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b8b968159af79e4359212fb2a2751a80982b4f97 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImI4Yjk2ODE1OWFmNzllNDM1OTIxMmZiMmEyNzUxYTgwOTgyYjRmOTcifQ== * chore: run post processor manually --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Sofia Leon --- packages/google-cloud-aiplatform/README.md | 2 + .../v1/deployment_resource_pool_service.proto | 32 + .../aiplatform/v1/feature_online_store.proto | 14 + .../aiplatform/v1/llm_utility_service.proto | 16 +- .../google/cloud/aiplatform/v1/model.proto | 6 + .../aiplatform/v1/persistent_resource.proto | 10 +- .../cloud/aiplatform/v1/publisher_model.proto | 12 + .../cloud/aiplatform/v1/tensorboard.proto | 6 + .../deployment_resource_pool_service.proto | 32 + .../v1beta1/evaluation_service.proto | 5 +- .../cloud/aiplatform/v1beta1/extension.proto | 2 +- .../v1beta1/llm_utility_service.proto | 16 +- .../cloud/aiplatform/v1beta1/model.proto | 6 + .../v1beta1/persistent_resource.proto | 10 +- .../aiplatform/v1beta1/publisher_model.proto | 12 + .../aiplatform/v1beta1/tensorboard.proto | 6 + .../protos/protos.d.ts | 568 ++++++ .../google-cloud-aiplatform/protos/protos.js | 1570 ++++++++++++++++- .../protos/protos.json | 274 ++- .../google-cloud-aiplatform/samples/README.md | 36 + ...service.update_deployment_resource_pool.js | 71 + .../v1/llm_utility_service.compute_tokens.js | 15 +- ...t_metadata_google.cloud.aiplatform.v1.json | 54 +- ...service.update_deployment_resource_pool.js | 71 + .../llm_utility_service.compute_tokens.js | 15 +- ...adata_google.cloud.aiplatform.v1beta1.json | 54 +- ...deployment_resource_pool_service_client.ts | 164 ++ ...t_resource_pool_service_client_config.json | 4 + .../src/v1/gapic_metadata.json | 10 + .../src/v1/llm_utility_service_client.ts | 10 +- ...deployment_resource_pool_service_client.ts | 164 ++ ...t_resource_pool_service_client_config.json | 4 + .../src/v1beta1/gapic_metadata.json | 10 + .../src/v1beta1/llm_utility_service_client.ts | 10 +- ...pic_deployment_resource_pool_service_v1.ts | 220 +++ ...eployment_resource_pool_service_v1beta1.ts | 220 +++ 36 files changed, 3698 insertions(+), 33 deletions(-) create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js create mode 100644 packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index adf6a329d957..6ed3db785faf 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -126,6 +126,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Deployment_resource_pool_service.get_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.get_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.get_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | | Deployment_resource_pool_service.list_deployment_resource_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.list_deployment_resource_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.list_deployment_resource_pools.js,packages/google-cloud-aiplatform/samples/README.md) | | Deployment_resource_pool_service.query_deployed_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.query_deployed_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.query_deployed_models.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.update_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | @@ -417,6 +418,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Deployment_resource_pool_service.get_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | | Deployment_resource_pool_service.list_deployment_resource_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js,packages/google-cloud-aiplatform/samples/README.md) | | Deployment_resource_pool_service.query_deployed_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.update_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_resource_pool_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_resource_pool_service.proto index 75a221c68e4f..7d42ed15003e 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_resource_pool_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/deployment_resource_pool_service.proto @@ -26,6 +26,7 @@ import "google/cloud/aiplatform/v1/endpoint.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -74,6 +75,21 @@ service DeploymentResourcePoolService { option (google.api.method_signature) = "parent"; } + // Update a DeploymentResourcePool. + rpc UpdateDeploymentResourcePool(UpdateDeploymentResourcePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}" + body: "deployment_resource_pool" + }; + option (google.api.method_signature) = + "deployment_resource_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DeploymentResourcePool" + metadata_type: "UpdateDeploymentResourcePoolOperationMetadata" + }; + } + // Delete a DeploymentResourcePool. rpc DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest) returns (google.longrunning.Operation) { @@ -175,6 +191,22 @@ message ListDeploymentResourcePoolsResponse { string next_page_token = 2; } +// Request message for UpdateDeploymentResourcePool method. +message UpdateDeploymentResourcePoolRequest { + // Required. The DeploymentResourcePool to update. + // + // The DeploymentResourcePool's `name` field is used to identify the + // DeploymentResourcePool to update. + // Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + DeploymentResourcePool deployment_resource_pool = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + // Runtime operation information for UpdateDeploymentResourcePool method. message UpdateDeploymentResourcePoolOperationMetadata { // The operation generic information. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto index 1a8760a9432b..4e6231173658 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto @@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/service_networking.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; @@ -72,6 +73,19 @@ message FeatureOnlineStore { // this FeatureOnlineStore string public_endpoint_domain_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Private service connect config. The private service connection + // is available only for Optimized storage type, not for embedding + // management now. If + // [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + // set to true, customers will use private service connection to send + // request. Otherwise, the connection will set to public endpoint. + PrivateServiceConnectConfig private_service_connect_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the service attachment resource. Populated if + // private service connect is enabled and after FeatureViewSync is created. + string service_attachment = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Possible states a featureOnlineStore can have. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/llm_utility_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/llm_utility_service.proto index e63a7e7da0e5..e6e8d8e8dd10 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/llm_utility_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/llm_utility_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/content.proto"; import "google/cloud/aiplatform/v1/prediction_service.proto"; import "google/protobuf/struct.proto"; @@ -75,11 +76,19 @@ message ComputeTokensRequest { } ]; - // Required. The instances that are the input to token computing API call. + // Optional. The instances that are the input to token computing API call. // Schema is identical to the prediction schema of the text model, even for // the non-text models, like chat models, or Codey models. repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = REQUIRED]; + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the publisher model requested to serve the + // prediction. Format: + // projects/{project}/locations/{location}/publishers/*/models/* + string model = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input content. + repeated Content contents = 4 [(google.api.field_behavior) = OPTIONAL]; } // Tokens info with a list of tokens and the corresponding list of token ids. @@ -89,6 +98,9 @@ message TokensInfo { // A list of token ids from the input. repeated int64 token_ids = 2; + + // Optional. Optional fields for the role from the corresponding Content. + string role = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ComputeTokens RPC call. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto index 99c223223359..ad721bc7c2e5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto @@ -469,6 +469,12 @@ message Model { // only supports specifing the Model Garden models and Genie models. BaseModelSource base_model_source = 50 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 51 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 52 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains information about the Large Model. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/persistent_resource.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/persistent_resource.proto index 8efb54f30963..83707aa22408 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/persistent_resource.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/persistent_resource.proto @@ -163,7 +163,13 @@ message ResourcePool { // The min/max number of replicas allowed if enabling autoscaling message AutoscalingSpec { // Optional. min replicas in the node pool, - // must be ≤ replica_count and < max_replica_count or will throw error + // must be ≤ replica_count and < max_replica_count or will throw error. + // For autoscaling enabled Ray-on-Vertex, we allow min_replica_count of a + // resource_pool to be 0 to match the OSS Ray + // behavior(https://docs.ray.io/en/latest/cluster/vms/user-guides/configuring-autoscaling.html#cluster-config-parameters). + // As for Persistent Resource, the min_replica_count must be > 0, we added + // a corresponding validation inside + // CreatePersistentResourceRequestValidator.java. optional int64 min_replica_count = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -194,7 +200,7 @@ message ResourcePool { // this resource pool. Will replace idle_replica_count. int64 used_replica_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Optional spec to configure GKE autoscaling + // Optional. Optional spec to configure GKE or Ray-on-Vertex autoscaling AutoscalingSpec autoscaling_spec = 7 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto index 667613f31b48..bf99e150f473 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/publisher_model.proto @@ -115,6 +115,14 @@ message PublisherModel { // Model metadata that is needed for UploadModel or // DeployModel/CreateEndpoint requests. message Deploy { + // Metadata information about the deployment for managing deployment + // config. + message DeployMetadata { + // Optional. Labels for the deployment. For managing deployment config + // like verifying, source of deployment config, etc. + map labels = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The prediction (for example, the machine) resources that the // DeployedModel uses. oneof prediction_resources { @@ -154,6 +162,10 @@ message PublisherModel { optional string deploy_task_name = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Metadata information about this deployment config. + optional DeployMetadata deploy_metadata = 11 + [(google.api.field_behavior) = OPTIONAL]; + // Required. The title of the regional resource reference. string title = 8 [(google.api.field_behavior) = REQUIRED]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto index ec8dd6388963..887888326144 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto @@ -93,4 +93,10 @@ message Tensorboard { // TensorBoard instance to be default will mark all other TensorBoard // instances (if any) as non default. bool is_default = 12; + + // Output only. Reserved for future use. + bool satisfies_pzs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto index 7a45bc8bdf58..86394bd95a46 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto @@ -26,6 +26,7 @@ import "google/cloud/aiplatform/v1beta1/endpoint.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; @@ -74,6 +75,21 @@ service DeploymentResourcePoolService { option (google.api.method_signature) = "parent"; } + // Update a DeploymentResourcePool. + rpc UpdateDeploymentResourcePool(UpdateDeploymentResourcePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}" + body: "deployment_resource_pool" + }; + option (google.api.method_signature) = + "deployment_resource_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DeploymentResourcePool" + metadata_type: "UpdateDeploymentResourcePoolOperationMetadata" + }; + } + // Delete a DeploymentResourcePool. rpc DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest) returns (google.longrunning.Operation) { @@ -175,6 +191,22 @@ message ListDeploymentResourcePoolsResponse { string next_page_token = 2; } +// Request message for UpdateDeploymentResourcePool method. +message UpdateDeploymentResourcePoolRequest { + // Required. The DeploymentResourcePool to update. + // + // The DeploymentResourcePool's `name` field is used to identify the + // DeploymentResourcePool to update. + // Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + DeploymentResourcePool deployment_resource_pool = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + // Runtime operation information for UpdateDeploymentResourcePool method. message UpdateDeploymentResourcePoolOperationMetadata { // The operation generic information. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto index 818daa91c81a..beac5d5cddad 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto @@ -281,7 +281,10 @@ message BleuInstance { // Spec for bleu score metric - calculates the precision of n-grams in the // prediction as compared to reference - returns a score ranging between 0 to 1. -message BleuSpec {} +message BleuSpec { + // Optional. Whether to use_effective_order to compute bleu score. + bool use_effective_order = 1 [(google.api.field_behavior) = OPTIONAL]; +} // Results for bleu metric. message BleuResults { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/extension.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/extension.proto index 98b0e427112f..a9ef88fb6bda 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/extension.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/extension.proto @@ -358,7 +358,7 @@ message RuntimeConfig { // Code execution runtime configurations for code interpreter extension. CodeInterpreterRuntimeConfig code_interpreter_runtime_config = 2; - // Runtime configuration for Vertext AI Search extension. + // Runtime configuration for Vertex AI Search extension. VertexAISearchRuntimeConfig vertex_ai_search_runtime_config = 6; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto index 02fa86a6c0d9..f5f554937cc0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/content.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; @@ -61,11 +62,19 @@ message ComputeTokensRequest { } ]; - // Required. The instances that are the input to token computing API call. + // Optional. The instances that are the input to token computing API call. // Schema is identical to the prediction schema of the text model, even for // the non-text models, like chat models, or Codey models. repeated google.protobuf.Value instances = 2 - [(google.api.field_behavior) = REQUIRED]; + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the publisher model requested to serve the + // prediction. Format: + // projects/{project}/locations/{location}/publishers/*/models/* + string model = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input content. + repeated Content contents = 4 [(google.api.field_behavior) = OPTIONAL]; } // Tokens info with a list of tokens and the corresponding list of token ids. @@ -75,6 +84,9 @@ message TokensInfo { // A list of token ids from the input. repeated int64 token_ids = 2; + + // Optional. Optional fields for the role from the corresponding Content. + string role = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for ComputeTokens RPC call. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto index 1a96665350e2..2059db6494a1 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto @@ -428,6 +428,12 @@ message Model { // only supports specifing the Model Garden models and Genie models. BaseModelSource base_model_source = 50 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 51 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 52 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Contains information about the Large Model. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto index e3f2e947d062..78a279edf4e5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto @@ -163,7 +163,13 @@ message ResourcePool { // The min/max number of replicas allowed if enabling autoscaling message AutoscalingSpec { // Optional. min replicas in the node pool, - // must be ≤ replica_count and < max_replica_count or will throw error + // must be ≤ replica_count and < max_replica_count or will throw error. + // For autoscaling enabled Ray-on-Vertex, we allow min_replica_count of a + // resource_pool to be 0 to match the OSS Ray + // behavior(https://docs.ray.io/en/latest/cluster/vms/user-guides/configuring-autoscaling.html#cluster-config-parameters). + // As for Persistent Resource, the min_replica_count must be > 0, we added + // a corresponding validation inside + // CreatePersistentResourceRequestValidator.java. optional int64 min_replica_count = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -194,7 +200,7 @@ message ResourcePool { // this resource pool. Will replace idle_replica_count. int64 used_replica_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Optional spec to configure GKE autoscaling + // Optional. Optional spec to configure GKE or Ray-on-Vertex autoscaling AutoscalingSpec autoscaling_spec = 7 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto index b45dea407ea8..eff93af47e04 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto @@ -125,6 +125,14 @@ message PublisherModel { // Model metadata that is needed for UploadModel or // DeployModel/CreateEndpoint requests. message Deploy { + // Metadata information about the deployment for managing deployment + // config. + message DeployMetadata { + // Optional. Labels for the deployment. For managing deployment config + // like verifying, source of deployment config, etc. + map labels = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The prediction (for example, the machine) resources that the // DeployedModel uses. oneof prediction_resources { @@ -164,6 +172,10 @@ message PublisherModel { optional string deploy_task_name = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Metadata information about this deployment config. + optional DeployMetadata deploy_metadata = 11 + [(google.api.field_behavior) = OPTIONAL]; + // Required. The title of the regional resource reference. string title = 8 [(google.api.field_behavior) = REQUIRED]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto index d4e2e44d7e82..b24a295152bb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto @@ -93,4 +93,10 @@ message Tensorboard { // TensorBoard instance to be default will mark all other TensorBoard // instances (if any) as non default. bool is_default = 12; + + // Output only. Reserved for future use. + bool satisfies_pzs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index d879750aeb34..f301d7b3961f 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -6740,6 +6740,12 @@ export namespace google { /** Model baseModelSource */ baseModelSource?: (google.cloud.aiplatform.v1.Model.IBaseModelSource|null); + + /** Model satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Model satisfiesPzi */ + satisfiesPzi?: (boolean|null); } /** Represents a Model. */ @@ -6844,6 +6850,12 @@ export namespace google { /** Model baseModelSource. */ public baseModelSource?: (google.cloud.aiplatform.v1.Model.IBaseModelSource|null); + /** Model satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Model satisfiesPzi. */ + public satisfiesPzi: boolean; + /** * Creates a new Model instance using the specified properties. * @param [properties] Properties to set @@ -18465,6 +18477,20 @@ export namespace google { */ public listDeploymentResourcePools(request: google.cloud.aiplatform.v1.IListDeploymentResourcePoolsRequest): Promise; + /** + * Calls UpdateDeploymentResourcePool. + * @param request UpdateDeploymentResourcePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDeploymentResourcePool(request: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, callback: google.cloud.aiplatform.v1.DeploymentResourcePoolService.UpdateDeploymentResourcePoolCallback): void; + + /** + * Calls UpdateDeploymentResourcePool. + * @param request UpdateDeploymentResourcePoolRequest message or plain object + * @returns Promise + */ + public updateDeploymentResourcePool(request: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest): Promise; + /** * Calls DeleteDeploymentResourcePool. * @param request DeleteDeploymentResourcePoolRequest message or plain object @@ -18517,6 +18543,13 @@ export namespace google { */ type ListDeploymentResourcePoolsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1.ListDeploymentResourcePoolsResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1.DeploymentResourcePoolService|updateDeploymentResourcePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDeploymentResourcePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1.DeploymentResourcePoolService|deleteDeploymentResourcePool}. * @param error Error, if any @@ -19047,6 +19080,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpdateDeploymentResourcePoolRequest. */ + interface IUpdateDeploymentResourcePoolRequest { + + /** UpdateDeploymentResourcePoolRequest deploymentResourcePool */ + deploymentResourcePool?: (google.cloud.aiplatform.v1.IDeploymentResourcePool|null); + + /** UpdateDeploymentResourcePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDeploymentResourcePoolRequest. */ + class UpdateDeploymentResourcePoolRequest implements IUpdateDeploymentResourcePoolRequest { + + /** + * Constructs a new UpdateDeploymentResourcePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest); + + /** UpdateDeploymentResourcePoolRequest deploymentResourcePool. */ + public deploymentResourcePool?: (google.cloud.aiplatform.v1.IDeploymentResourcePool|null); + + /** UpdateDeploymentResourcePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDeploymentResourcePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeploymentResourcePoolRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest): google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @param message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @param message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeploymentResourcePoolRequest + * @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.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeploymentResourcePoolRequest + * @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.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest; + + /** + * Verifies an UpdateDeploymentResourcePoolRequest 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 UpdateDeploymentResourcePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeploymentResourcePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest; + + /** + * Creates a plain object from an UpdateDeploymentResourcePoolRequest message. Also converts values to other types if specified. + * @param message UpdateDeploymentResourcePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeploymentResourcePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeploymentResourcePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an UpdateDeploymentResourcePoolOperationMetadata. */ interface IUpdateDeploymentResourcePoolOperationMetadata { @@ -24584,6 +24720,12 @@ export namespace google { /** DedicatedServingEndpoint publicEndpointDomainName */ publicEndpointDomainName?: (string|null); + + /** DedicatedServingEndpoint privateServiceConnectConfig */ + privateServiceConnectConfig?: (google.cloud.aiplatform.v1.IPrivateServiceConnectConfig|null); + + /** DedicatedServingEndpoint serviceAttachment */ + serviceAttachment?: (string|null); } /** Represents a DedicatedServingEndpoint. */ @@ -24598,6 +24740,12 @@ export namespace google { /** DedicatedServingEndpoint publicEndpointDomainName. */ public publicEndpointDomainName: string; + /** DedicatedServingEndpoint privateServiceConnectConfig. */ + public privateServiceConnectConfig?: (google.cloud.aiplatform.v1.IPrivateServiceConnectConfig|null); + + /** DedicatedServingEndpoint serviceAttachment. */ + public serviceAttachment: string; + /** * Creates a new DedicatedServingEndpoint instance using the specified properties. * @param [properties] Properties to set @@ -58424,6 +58572,12 @@ export namespace google { /** ComputeTokensRequest instances */ instances?: (google.protobuf.IValue[]|null); + + /** ComputeTokensRequest model */ + model?: (string|null); + + /** ComputeTokensRequest contents */ + contents?: (google.cloud.aiplatform.v1.IContent[]|null); } /** Represents a ComputeTokensRequest. */ @@ -58441,6 +58595,12 @@ export namespace google { /** ComputeTokensRequest instances. */ public instances: google.protobuf.IValue[]; + /** ComputeTokensRequest model. */ + public model: string; + + /** ComputeTokensRequest contents. */ + public contents: google.cloud.aiplatform.v1.IContent[]; + /** * Creates a new ComputeTokensRequest instance using the specified properties. * @param [properties] Properties to set @@ -58527,6 +58687,9 @@ export namespace google { /** TokensInfo tokenIds */ tokenIds?: ((number|Long|string)[]|null); + + /** TokensInfo role */ + role?: (string|null); } /** Represents a TokensInfo. */ @@ -58544,6 +58707,9 @@ export namespace google { /** TokensInfo tokenIds. */ public tokenIds: (number|Long|string)[]; + /** TokensInfo role. */ + public role: string; + /** * Creates a new TokensInfo instance using the specified properties. * @param [properties] Properties to set @@ -73026,6 +73192,9 @@ export namespace google { /** Deploy deployTaskName */ deployTaskName?: (string|null); + /** Deploy deployMetadata */ + deployMetadata?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null); + /** Deploy title */ title?: (string|null); @@ -73066,6 +73235,9 @@ export namespace google { /** Deploy deployTaskName. */ public deployTaskName?: (string|null); + /** Deploy deployMetadata. */ + public deployMetadata?: (google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null); + /** Deploy title. */ public title: string; @@ -73078,6 +73250,9 @@ export namespace google { /** Deploy _deployTaskName. */ public _deployTaskName?: "deployTaskName"; + /** Deploy _deployMetadata. */ + public _deployMetadata?: "deployMetadata"; + /** * Creates a new Deploy instance using the specified properties. * @param [properties] Properties to set @@ -73156,6 +73331,106 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Deploy { + + /** Properties of a DeployMetadata. */ + interface IDeployMetadata { + + /** DeployMetadata labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a DeployMetadata. */ + class DeployMetadata implements IDeployMetadata { + + /** + * Constructs a new DeployMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata); + + /** DeployMetadata labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new DeployMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata): google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Encodes the specified DeployMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @param message DeployMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @param message DeployMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployMetadata + * @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.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployMetadata + * @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.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Verifies a DeployMetadata 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 DeployMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Creates a plain object from a DeployMetadata message. Also converts values to other types if specified. + * @param message DeployMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a DeployGke. */ interface IDeployGke { @@ -95795,6 +96070,12 @@ export namespace google { /** Tensorboard isDefault */ isDefault?: (boolean|null); + + /** Tensorboard satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Tensorboard satisfiesPzi */ + satisfiesPzi?: (boolean|null); } /** Represents a Tensorboard. */ @@ -95839,6 +96120,12 @@ export namespace google { /** Tensorboard isDefault. */ public isDefault: boolean; + /** Tensorboard satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Tensorboard satisfiesPzi. */ + public satisfiesPzi: boolean; + /** * Creates a new Tensorboard instance using the specified properties. * @param [properties] Properties to set @@ -114707,6 +114994,12 @@ export namespace google { /** Model baseModelSource */ baseModelSource?: (google.cloud.aiplatform.v1beta1.Model.IBaseModelSource|null); + + /** Model satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Model satisfiesPzi */ + satisfiesPzi?: (boolean|null); } /** Represents a Model. */ @@ -114805,6 +115098,12 @@ export namespace google { /** Model baseModelSource. */ public baseModelSource?: (google.cloud.aiplatform.v1beta1.Model.IBaseModelSource|null); + /** Model satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Model satisfiesPzi. */ + public satisfiesPzi: boolean; + /** * Creates a new Model instance using the specified properties. * @param [properties] Properties to set @@ -127700,6 +127999,20 @@ export namespace google { */ public listDeploymentResourcePools(request: google.cloud.aiplatform.v1beta1.IListDeploymentResourcePoolsRequest): Promise; + /** + * Calls UpdateDeploymentResourcePool. + * @param request UpdateDeploymentResourcePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDeploymentResourcePool(request: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, callback: google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.UpdateDeploymentResourcePoolCallback): void; + + /** + * Calls UpdateDeploymentResourcePool. + * @param request UpdateDeploymentResourcePoolRequest message or plain object + * @returns Promise + */ + public updateDeploymentResourcePool(request: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest): Promise; + /** * Calls DeleteDeploymentResourcePool. * @param request DeleteDeploymentResourcePoolRequest message or plain object @@ -127752,6 +128065,13 @@ export namespace google { */ type ListDeploymentResourcePoolsCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) => void; + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService|updateDeploymentResourcePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDeploymentResourcePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService|deleteDeploymentResourcePool}. * @param error Error, if any @@ -128282,6 +128602,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpdateDeploymentResourcePoolRequest. */ + interface IUpdateDeploymentResourcePoolRequest { + + /** UpdateDeploymentResourcePoolRequest deploymentResourcePool */ + deploymentResourcePool?: (google.cloud.aiplatform.v1beta1.IDeploymentResourcePool|null); + + /** UpdateDeploymentResourcePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDeploymentResourcePoolRequest. */ + class UpdateDeploymentResourcePoolRequest implements IUpdateDeploymentResourcePoolRequest { + + /** + * Constructs a new UpdateDeploymentResourcePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest); + + /** UpdateDeploymentResourcePoolRequest deploymentResourcePool. */ + public deploymentResourcePool?: (google.cloud.aiplatform.v1beta1.IDeploymentResourcePool|null); + + /** UpdateDeploymentResourcePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDeploymentResourcePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeploymentResourcePoolRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest): google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @param message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @param message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeploymentResourcePoolRequest + * @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.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeploymentResourcePoolRequest + * @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.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest; + + /** + * Verifies an UpdateDeploymentResourcePoolRequest 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 UpdateDeploymentResourcePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeploymentResourcePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest; + + /** + * Creates a plain object from an UpdateDeploymentResourcePoolRequest message. Also converts values to other types if specified. + * @param message UpdateDeploymentResourcePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeploymentResourcePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeploymentResourcePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an UpdateDeploymentResourcePoolOperationMetadata. */ interface IUpdateDeploymentResourcePoolOperationMetadata { @@ -133606,6 +134029,9 @@ export namespace google { /** Properties of a BleuSpec. */ interface IBleuSpec { + + /** BleuSpec useEffectiveOrder */ + useEffectiveOrder?: (boolean|null); } /** Represents a BleuSpec. */ @@ -133617,6 +134043,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuSpec); + /** BleuSpec useEffectiveOrder. */ + public useEffectiveOrder: boolean; + /** * Creates a new BleuSpec instance using the specified properties. * @param [properties] Properties to set @@ -180178,6 +180607,12 @@ export namespace google { /** ComputeTokensRequest instances */ instances?: (google.protobuf.IValue[]|null); + + /** ComputeTokensRequest model */ + model?: (string|null); + + /** ComputeTokensRequest contents */ + contents?: (google.cloud.aiplatform.v1beta1.IContent[]|null); } /** Represents a ComputeTokensRequest. */ @@ -180195,6 +180630,12 @@ export namespace google { /** ComputeTokensRequest instances. */ public instances: google.protobuf.IValue[]; + /** ComputeTokensRequest model. */ + public model: string; + + /** ComputeTokensRequest contents. */ + public contents: google.cloud.aiplatform.v1beta1.IContent[]; + /** * Creates a new ComputeTokensRequest instance using the specified properties. * @param [properties] Properties to set @@ -180281,6 +180722,9 @@ export namespace google { /** TokensInfo tokenIds */ tokenIds?: ((number|Long|string)[]|null); + + /** TokensInfo role */ + role?: (string|null); } /** Represents a TokensInfo. */ @@ -180298,6 +180742,9 @@ export namespace google { /** TokensInfo tokenIds. */ public tokenIds: (number|Long|string)[]; + /** TokensInfo role. */ + public role: string; + /** * Creates a new TokensInfo instance using the specified properties. * @param [properties] Properties to set @@ -192324,6 +192771,9 @@ export namespace google { /** Deploy deployTaskName */ deployTaskName?: (string|null); + /** Deploy deployMetadata */ + deployMetadata?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null); + /** Deploy title */ title?: (string|null); @@ -192364,6 +192814,9 @@ export namespace google { /** Deploy deployTaskName. */ public deployTaskName?: (string|null); + /** Deploy deployMetadata. */ + public deployMetadata?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null); + /** Deploy title. */ public title: string; @@ -192376,6 +192829,9 @@ export namespace google { /** Deploy _deployTaskName. */ public _deployTaskName?: "deployTaskName"; + /** Deploy _deployMetadata. */ + public _deployMetadata?: "deployMetadata"; + /** * Creates a new Deploy instance using the specified properties. * @param [properties] Properties to set @@ -192454,6 +192910,106 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Deploy { + + /** Properties of a DeployMetadata. */ + interface IDeployMetadata { + + /** DeployMetadata labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a DeployMetadata. */ + class DeployMetadata implements IDeployMetadata { + + /** + * Constructs a new DeployMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata); + + /** DeployMetadata labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new DeployMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Encodes the specified DeployMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @param message DeployMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @param message DeployMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployMetadata + * @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.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployMetadata + * @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.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Verifies a DeployMetadata 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 DeployMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata; + + /** + * Creates a plain object from a DeployMetadata message. Also converts values to other types if specified. + * @param message DeployMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a DeployGke. */ interface IDeployGke { @@ -231501,6 +232057,12 @@ export namespace google { /** Tensorboard isDefault */ isDefault?: (boolean|null); + + /** Tensorboard satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Tensorboard satisfiesPzi */ + satisfiesPzi?: (boolean|null); } /** Represents a Tensorboard. */ @@ -231545,6 +232107,12 @@ export namespace google { /** Tensorboard isDefault. */ public isDefault: boolean; + /** Tensorboard satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Tensorboard satisfiesPzi. */ + public satisfiesPzi: boolean; + /** * Creates a new Tensorboard instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index a81c8c5b9aaa..0bb32f46abbb 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -16934,6 +16934,8 @@ * @property {google.cloud.aiplatform.v1.Model.IOriginalModelInfo|null} [originalModelInfo] Model originalModelInfo * @property {string|null} [metadataArtifact] Model metadataArtifact * @property {google.cloud.aiplatform.v1.Model.IBaseModelSource|null} [baseModelSource] Model baseModelSource + * @property {boolean|null} [satisfiesPzs] Model satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Model satisfiesPzi */ /** @@ -17206,6 +17208,22 @@ */ Model.prototype.baseModelSource = null; + /** + * Model satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.aiplatform.v1.Model + * @instance + */ + Model.prototype.satisfiesPzs = false; + + /** + * Model satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.aiplatform.v1.Model + * @instance + */ + Model.prototype.satisfiesPzi = false; + /** * Creates a new Model instance using the specified properties. * @function create @@ -17302,6 +17320,10 @@ writer.uint32(/* id 47, wireType 2 =*/378).string(message.pipelineJob); if (message.baseModelSource != null && Object.hasOwnProperty.call(message, "baseModelSource")) $root.google.cloud.aiplatform.v1.Model.BaseModelSource.encode(message.baseModelSource, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 52, wireType 0 =*/416).bool(message.satisfiesPzi); return writer; }; @@ -17496,6 +17518,14 @@ message.baseModelSource = $root.google.cloud.aiplatform.v1.Model.BaseModelSource.decode(reader, reader.uint32()); break; } + case 51: { + message.satisfiesPzs = reader.bool(); + break; + } + case 52: { + message.satisfiesPzi = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17690,6 +17720,12 @@ if (error) return "baseModelSource." + error; } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; return null; }; @@ -17869,6 +17905,10 @@ throw TypeError(".google.cloud.aiplatform.v1.Model.baseModelSource: object expected"); message.baseModelSource = $root.google.cloud.aiplatform.v1.Model.BaseModelSource.fromObject(object.baseModelSource); } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); return message; }; @@ -17920,6 +17960,8 @@ object.metadataArtifact = ""; object.pipelineJob = ""; object.baseModelSource = null; + object.satisfiesPzs = false; + object.satisfiesPzi = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -18005,6 +18047,10 @@ object.pipelineJob = message.pipelineJob; if (message.baseModelSource != null && message.hasOwnProperty("baseModelSource")) object.baseModelSource = $root.google.cloud.aiplatform.v1.Model.BaseModelSource.toObject(message.baseModelSource, options); + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; return object; }; @@ -47618,6 +47664,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.DeploymentResourcePoolService|updateDeploymentResourcePool}. + * @memberof google.cloud.aiplatform.v1.DeploymentResourcePoolService + * @typedef UpdateDeploymentResourcePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDeploymentResourcePool. + * @function updateDeploymentResourcePool + * @memberof google.cloud.aiplatform.v1.DeploymentResourcePoolService + * @instance + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest} request UpdateDeploymentResourcePoolRequest message or plain object + * @param {google.cloud.aiplatform.v1.DeploymentResourcePoolService.UpdateDeploymentResourcePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeploymentResourcePoolService.prototype.updateDeploymentResourcePool = function updateDeploymentResourcePool(request, callback) { + return this.rpcCall(updateDeploymentResourcePool, $root.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDeploymentResourcePool" }); + + /** + * Calls UpdateDeploymentResourcePool. + * @function updateDeploymentResourcePool + * @memberof google.cloud.aiplatform.v1.DeploymentResourcePoolService + * @instance + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest} request UpdateDeploymentResourcePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1.DeploymentResourcePoolService|deleteDeploymentResourcePool}. * @memberof google.cloud.aiplatform.v1.DeploymentResourcePoolService @@ -48851,6 +48930,243 @@ return ListDeploymentResourcePoolsResponse; })(); + v1.UpdateDeploymentResourcePoolRequest = (function() { + + /** + * Properties of an UpdateDeploymentResourcePoolRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IUpdateDeploymentResourcePoolRequest + * @property {google.cloud.aiplatform.v1.IDeploymentResourcePool|null} [deploymentResourcePool] UpdateDeploymentResourcePoolRequest deploymentResourcePool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeploymentResourcePoolRequest updateMask + */ + + /** + * Constructs a new UpdateDeploymentResourcePoolRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an UpdateDeploymentResourcePoolRequest. + * @implements IUpdateDeploymentResourcePoolRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest=} [properties] Properties to set + */ + function UpdateDeploymentResourcePoolRequest(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]]; + } + + /** + * UpdateDeploymentResourcePoolRequest deploymentResourcePool. + * @member {google.cloud.aiplatform.v1.IDeploymentResourcePool|null|undefined} deploymentResourcePool + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @instance + */ + UpdateDeploymentResourcePoolRequest.prototype.deploymentResourcePool = null; + + /** + * UpdateDeploymentResourcePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @instance + */ + UpdateDeploymentResourcePoolRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeploymentResourcePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest instance + */ + UpdateDeploymentResourcePoolRequest.create = function create(properties) { + return new UpdateDeploymentResourcePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentResourcePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deploymentResourcePool != null && Object.hasOwnProperty.call(message, "deploymentResourcePool")) + $root.google.cloud.aiplatform.v1.DeploymentResourcePool.encode(message.deploymentResourcePool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentResourcePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentResourcePoolRequest.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.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deploymentResourcePool = $root.google.cloud.aiplatform.v1.DeploymentResourcePool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentResourcePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeploymentResourcePoolRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeploymentResourcePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deploymentResourcePool != null && message.hasOwnProperty("deploymentResourcePool")) { + var error = $root.google.cloud.aiplatform.v1.DeploymentResourcePool.verify(message.deploymentResourcePool); + if (error) + return "deploymentResourcePool." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDeploymentResourcePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + */ + UpdateDeploymentResourcePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest(); + if (object.deploymentResourcePool != null) { + if (typeof object.deploymentResourcePool !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.deploymentResourcePool: object expected"); + message.deploymentResourcePool = $root.google.cloud.aiplatform.v1.DeploymentResourcePool.fromObject(object.deploymentResourcePool); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDeploymentResourcePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeploymentResourcePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deploymentResourcePool = null; + object.updateMask = null; + } + if (message.deploymentResourcePool != null && message.hasOwnProperty("deploymentResourcePool")) + object.deploymentResourcePool = $root.google.cloud.aiplatform.v1.DeploymentResourcePool.toObject(message.deploymentResourcePool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDeploymentResourcePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeploymentResourcePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDeploymentResourcePoolRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeploymentResourcePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest"; + }; + + return UpdateDeploymentResourcePoolRequest; + })(); + v1.UpdateDeploymentResourcePoolOperationMetadata = (function() { /** @@ -62867,6 +63183,8 @@ * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore * @interface IDedicatedServingEndpoint * @property {string|null} [publicEndpointDomainName] DedicatedServingEndpoint publicEndpointDomainName + * @property {google.cloud.aiplatform.v1.IPrivateServiceConnectConfig|null} [privateServiceConnectConfig] DedicatedServingEndpoint privateServiceConnectConfig + * @property {string|null} [serviceAttachment] DedicatedServingEndpoint serviceAttachment */ /** @@ -62892,6 +63210,22 @@ */ DedicatedServingEndpoint.prototype.publicEndpointDomainName = ""; + /** + * DedicatedServingEndpoint privateServiceConnectConfig. + * @member {google.cloud.aiplatform.v1.IPrivateServiceConnectConfig|null|undefined} privateServiceConnectConfig + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @instance + */ + DedicatedServingEndpoint.prototype.privateServiceConnectConfig = null; + + /** + * DedicatedServingEndpoint serviceAttachment. + * @member {string} serviceAttachment + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @instance + */ + DedicatedServingEndpoint.prototype.serviceAttachment = ""; + /** * Creates a new DedicatedServingEndpoint instance using the specified properties. * @function create @@ -62918,6 +63252,10 @@ writer = $Writer.create(); if (message.publicEndpointDomainName != null && Object.hasOwnProperty.call(message, "publicEndpointDomainName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicEndpointDomainName); + if (message.privateServiceConnectConfig != null && Object.hasOwnProperty.call(message, "privateServiceConnectConfig")) + $root.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.encode(message.privateServiceConnectConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceAttachment != null && Object.hasOwnProperty.call(message, "serviceAttachment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceAttachment); return writer; }; @@ -62956,6 +63294,14 @@ message.publicEndpointDomainName = reader.string(); break; } + case 3: { + message.privateServiceConnectConfig = $root.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceAttachment = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -62994,6 +63340,14 @@ if (message.publicEndpointDomainName != null && message.hasOwnProperty("publicEndpointDomainName")) if (!$util.isString(message.publicEndpointDomainName)) return "publicEndpointDomainName: string expected"; + if (message.privateServiceConnectConfig != null && message.hasOwnProperty("privateServiceConnectConfig")) { + var error = $root.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.verify(message.privateServiceConnectConfig); + if (error) + return "privateServiceConnectConfig." + error; + } + if (message.serviceAttachment != null && message.hasOwnProperty("serviceAttachment")) + if (!$util.isString(message.serviceAttachment)) + return "serviceAttachment: string expected"; return null; }; @@ -63011,6 +63365,13 @@ var message = new $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint(); if (object.publicEndpointDomainName != null) message.publicEndpointDomainName = String(object.publicEndpointDomainName); + if (object.privateServiceConnectConfig != null) { + if (typeof object.privateServiceConnectConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.privateServiceConnectConfig: object expected"); + message.privateServiceConnectConfig = $root.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.fromObject(object.privateServiceConnectConfig); + } + if (object.serviceAttachment != null) + message.serviceAttachment = String(object.serviceAttachment); return message; }; @@ -63027,10 +63388,17 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.publicEndpointDomainName = ""; + object.privateServiceConnectConfig = null; + object.serviceAttachment = ""; + } if (message.publicEndpointDomainName != null && message.hasOwnProperty("publicEndpointDomainName")) object.publicEndpointDomainName = message.publicEndpointDomainName; + if (message.privateServiceConnectConfig != null && message.hasOwnProperty("privateServiceConnectConfig")) + object.privateServiceConnectConfig = $root.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.toObject(message.privateServiceConnectConfig, options); + if (message.serviceAttachment != null && message.hasOwnProperty("serviceAttachment")) + object.serviceAttachment = message.serviceAttachment; return object; }; @@ -144328,6 +144696,8 @@ * @interface IComputeTokensRequest * @property {string|null} [endpoint] ComputeTokensRequest endpoint * @property {Array.|null} [instances] ComputeTokensRequest instances + * @property {string|null} [model] ComputeTokensRequest model + * @property {Array.|null} [contents] ComputeTokensRequest contents */ /** @@ -144340,6 +144710,7 @@ */ function ComputeTokensRequest(properties) { this.instances = []; + this.contents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -144362,6 +144733,22 @@ */ ComputeTokensRequest.prototype.instances = $util.emptyArray; + /** + * ComputeTokensRequest model. + * @member {string} model + * @memberof google.cloud.aiplatform.v1.ComputeTokensRequest + * @instance + */ + ComputeTokensRequest.prototype.model = ""; + + /** + * ComputeTokensRequest contents. + * @member {Array.} contents + * @memberof google.cloud.aiplatform.v1.ComputeTokensRequest + * @instance + */ + ComputeTokensRequest.prototype.contents = $util.emptyArray; + /** * Creates a new ComputeTokensRequest instance using the specified properties. * @function create @@ -144391,6 +144778,11 @@ if (message.instances != null && message.instances.length) for (var i = 0; i < message.instances.length; ++i) $root.google.protobuf.Value.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.model); + if (message.contents != null && message.contents.length) + for (var i = 0; i < message.contents.length; ++i) + $root.google.cloud.aiplatform.v1.Content.encode(message.contents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -144435,6 +144827,16 @@ message.instances.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; } + case 3: { + message.model = reader.string(); + break; + } + case 4: { + if (!(message.contents && message.contents.length)) + message.contents = []; + message.contents.push($root.google.cloud.aiplatform.v1.Content.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -144482,6 +144884,18 @@ return "instances." + error; } } + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) { + if (!Array.isArray(message.contents)) + return "contents: array expected"; + for (var i = 0; i < message.contents.length; ++i) { + var error = $root.google.cloud.aiplatform.v1.Content.verify(message.contents[i]); + if (error) + return "contents." + error; + } + } return null; }; @@ -144509,6 +144923,18 @@ message.instances[i] = $root.google.protobuf.Value.fromObject(object.instances[i]); } } + if (object.model != null) + message.model = String(object.model); + if (object.contents) { + if (!Array.isArray(object.contents)) + throw TypeError(".google.cloud.aiplatform.v1.ComputeTokensRequest.contents: array expected"); + message.contents = []; + for (var i = 0; i < object.contents.length; ++i) { + if (typeof object.contents[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ComputeTokensRequest.contents: object expected"); + message.contents[i] = $root.google.cloud.aiplatform.v1.Content.fromObject(object.contents[i]); + } + } return message; }; @@ -144525,10 +144951,14 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.instances = []; - if (options.defaults) + object.contents = []; + } + if (options.defaults) { object.endpoint = ""; + object.model = ""; + } if (message.endpoint != null && message.hasOwnProperty("endpoint")) object.endpoint = message.endpoint; if (message.instances && message.instances.length) { @@ -144536,6 +144966,13 @@ for (var j = 0; j < message.instances.length; ++j) object.instances[j] = $root.google.protobuf.Value.toObject(message.instances[j], options); } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.contents && message.contents.length) { + object.contents = []; + for (var j = 0; j < message.contents.length; ++j) + object.contents[j] = $root.google.cloud.aiplatform.v1.Content.toObject(message.contents[j], options); + } return object; }; @@ -144576,6 +145013,7 @@ * @interface ITokensInfo * @property {Array.|null} [tokens] TokensInfo tokens * @property {Array.|null} [tokenIds] TokensInfo tokenIds + * @property {string|null} [role] TokensInfo role */ /** @@ -144611,6 +145049,14 @@ */ TokensInfo.prototype.tokenIds = $util.emptyArray; + /** + * TokensInfo role. + * @member {string} role + * @memberof google.cloud.aiplatform.v1.TokensInfo + * @instance + */ + TokensInfo.prototype.role = ""; + /** * Creates a new TokensInfo instance using the specified properties. * @function create @@ -144644,6 +145090,8 @@ writer.int64(message.tokenIds[i]); writer.ldelim(); } + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.role); return writer; }; @@ -144695,6 +145143,10 @@ message.tokenIds.push(reader.int64()); break; } + case 3: { + message.role = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -144744,6 +145196,9 @@ if (!$util.isInteger(message.tokenIds[i]) && !(message.tokenIds[i] && $util.isInteger(message.tokenIds[i].low) && $util.isInteger(message.tokenIds[i].high))) return "tokenIds: integer|Long[] expected"; } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; return null; }; @@ -144783,6 +145238,8 @@ else if (typeof object.tokenIds[i] === "object") message.tokenIds[i] = new $util.LongBits(object.tokenIds[i].low >>> 0, object.tokenIds[i].high >>> 0).toNumber(); } + if (object.role != null) + message.role = String(object.role); return message; }; @@ -144803,6 +145260,8 @@ object.tokens = []; object.tokenIds = []; } + if (options.defaults) + object.role = ""; if (message.tokens && message.tokens.length) { object.tokens = []; for (var j = 0; j < message.tokens.length; ++j) @@ -144816,6 +145275,8 @@ else object.tokenIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.tokenIds[j]) : options.longs === Number ? new $util.LongBits(message.tokenIds[j].low >>> 0, message.tokenIds[j].high >>> 0).toNumber() : message.tokenIds[j]; } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; return object; }; @@ -178535,6 +178996,7 @@ * @property {google.cloud.aiplatform.v1.IModelContainerSpec|null} [containerSpec] Deploy containerSpec * @property {string|null} [artifactUri] Deploy artifactUri * @property {string|null} [deployTaskName] Deploy deployTaskName + * @property {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null} [deployMetadata] Deploy deployMetadata * @property {string|null} [title] Deploy title * @property {string|null} [publicArtifactUri] Deploy publicArtifactUri */ @@ -178618,6 +179080,14 @@ */ Deploy.prototype.deployTaskName = null; + /** + * Deploy deployMetadata. + * @member {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null|undefined} deployMetadata + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.deployMetadata = null; + /** * Deploy title. * @member {string} title @@ -178659,6 +179129,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Deploy _deployMetadata. + * @member {"deployMetadata"|undefined} _deployMetadata + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @instance + */ + Object.defineProperty(Deploy.prototype, "_deployMetadata", { + get: $util.oneOfGetter($oneOfFields = ["deployMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Deploy instance using the specified properties. * @function create @@ -178703,6 +179184,8 @@ writer.uint32(/* id 9, wireType 2 =*/74).string(message.publicArtifactUri); if (message.deployTaskName != null && Object.hasOwnProperty.call(message, "deployTaskName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.deployTaskName); + if (message.deployMetadata != null && Object.hasOwnProperty.call(message, "deployMetadata")) + $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.encode(message.deployMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -178769,6 +179252,10 @@ message.deployTaskName = reader.string(); break; } + case 11: { + message.deployMetadata = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.decode(reader, reader.uint32()); + break; + } case 8: { message.title = reader.string(); break; @@ -178859,6 +179346,14 @@ if (!$util.isString(message.deployTaskName)) return "deployTaskName: string expected"; } + if (message.deployMetadata != null && message.hasOwnProperty("deployMetadata")) { + properties._deployMetadata = 1; + { + var error = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify(message.deployMetadata); + if (error) + return "deployMetadata." + error; + } + } if (message.title != null && message.hasOwnProperty("title")) if (!$util.isString(message.title)) return "title: string expected"; @@ -178908,6 +179403,11 @@ message.artifactUri = String(object.artifactUri); if (object.deployTaskName != null) message.deployTaskName = String(object.deployTaskName); + if (object.deployMetadata != null) { + if (typeof object.deployMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.deployMetadata: object expected"); + message.deployMetadata = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.fromObject(object.deployMetadata); + } if (object.title != null) message.title = String(object.title); if (object.publicArtifactUri != null) @@ -178968,6 +179468,11 @@ if (options.oneofs) object._deployTaskName = "deployTaskName"; } + if (message.deployMetadata != null && message.hasOwnProperty("deployMetadata")) { + object.deployMetadata = $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.toObject(message.deployMetadata, options); + if (options.oneofs) + object._deployMetadata = "deployMetadata"; + } return object; }; @@ -178997,6 +179502,244 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy"; }; + Deploy.DeployMetadata = (function() { + + /** + * Properties of a DeployMetadata. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @interface IDeployMetadata + * @property {Object.|null} [labels] DeployMetadata labels + */ + + /** + * Constructs a new DeployMetadata. + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy + * @classdesc Represents a DeployMetadata. + * @implements IDeployMetadata + * @constructor + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata=} [properties] Properties to set + */ + function DeployMetadata(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployMetadata labels. + * @member {Object.} labels + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @instance + */ + DeployMetadata.prototype.labels = $util.emptyObject; + + /** + * Creates a new DeployMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata instance + */ + DeployMetadata.create = function create(properties) { + return new DeployMetadata(properties); + }; + + /** + * Encodes the specified DeployMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata} message DeployMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeployMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.IDeployMetadata} message DeployMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployMetadata.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.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a DeployMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + */ + DeployMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a DeployMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata} message DeployMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this DeployMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata"; + }; + + return DeployMetadata; + })(); + return Deploy; })(); @@ -232965,6 +233708,8 @@ * @property {Object.|null} [labels] Tensorboard labels * @property {string|null} [etag] Tensorboard etag * @property {boolean|null} [isDefault] Tensorboard isDefault + * @property {boolean|null} [satisfiesPzs] Tensorboard satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Tensorboard satisfiesPzi */ /** @@ -233071,6 +233816,22 @@ */ Tensorboard.prototype.isDefault = false; + /** + * Tensorboard satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.aiplatform.v1.Tensorboard + * @instance + */ + Tensorboard.prototype.satisfiesPzs = false; + + /** + * Tensorboard satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.aiplatform.v1.Tensorboard + * @instance + */ + Tensorboard.prototype.satisfiesPzi = false; + /** * Creates a new Tensorboard instance using the specified properties. * @function create @@ -233118,6 +233879,10 @@ $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isDefault); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.satisfiesPzi); return writer; }; @@ -233215,6 +233980,14 @@ message.isDefault = reader.bool(); break; } + case 13: { + message.satisfiesPzs = reader.bool(); + break; + } + case 14: { + message.satisfiesPzi = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -233294,6 +234067,12 @@ if (message.isDefault != null && message.hasOwnProperty("isDefault")) if (typeof message.isDefault !== "boolean") return "isDefault: boolean expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; return null; }; @@ -233345,6 +234124,10 @@ message.etag = String(object.etag); if (object.isDefault != null) message.isDefault = Boolean(object.isDefault); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); return message; }; @@ -233374,6 +234157,8 @@ object.blobStoragePathPrefix = ""; object.encryptionSpec = null; object.isDefault = false; + object.satisfiesPzs = false; + object.satisfiesPzi = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -233401,6 +234186,10 @@ object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); if (message.isDefault != null && message.hasOwnProperty("isDefault")) object.isDefault = message.isDefault; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; return object; }; @@ -278657,6 +279446,8 @@ * @property {google.cloud.aiplatform.v1beta1.Model.IOriginalModelInfo|null} [originalModelInfo] Model originalModelInfo * @property {string|null} [metadataArtifact] Model metadataArtifact * @property {google.cloud.aiplatform.v1beta1.Model.IBaseModelSource|null} [baseModelSource] Model baseModelSource + * @property {boolean|null} [satisfiesPzs] Model satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Model satisfiesPzi */ /** @@ -278913,6 +279704,22 @@ */ Model.prototype.baseModelSource = null; + /** + * Model satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.aiplatform.v1beta1.Model + * @instance + */ + Model.prototype.satisfiesPzs = false; + + /** + * Model satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.aiplatform.v1beta1.Model + * @instance + */ + Model.prototype.satisfiesPzi = false; + /** * Creates a new Model instance using the specified properties. * @function create @@ -279005,6 +279812,10 @@ writer.uint32(/* id 44, wireType 2 =*/354).string(message.metadataArtifact); if (message.baseModelSource != null && Object.hasOwnProperty.call(message, "baseModelSource")) $root.google.cloud.aiplatform.v1beta1.Model.BaseModelSource.encode(message.baseModelSource, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 51, wireType 0 =*/408).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 52, wireType 0 =*/416).bool(message.satisfiesPzi); return writer; }; @@ -279191,6 +280002,14 @@ message.baseModelSource = $root.google.cloud.aiplatform.v1beta1.Model.BaseModelSource.decode(reader, reader.uint32()); break; } + case 51: { + message.satisfiesPzs = reader.bool(); + break; + } + case 52: { + message.satisfiesPzi = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -279377,6 +280196,12 @@ if (error) return "baseModelSource." + error; } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; return null; }; @@ -279549,6 +280374,10 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.Model.baseModelSource: object expected"); message.baseModelSource = $root.google.cloud.aiplatform.v1beta1.Model.BaseModelSource.fromObject(object.baseModelSource); } + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); return message; }; @@ -279598,6 +280427,8 @@ object.modelSourceInfo = null; object.metadataArtifact = ""; object.baseModelSource = null; + object.satisfiesPzs = false; + object.satisfiesPzi = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -279679,6 +280510,10 @@ object.metadataArtifact = message.metadataArtifact; if (message.baseModelSource != null && message.hasOwnProperty("baseModelSource")) object.baseModelSource = $root.google.cloud.aiplatform.v1beta1.Model.BaseModelSource.toObject(message.baseModelSource, options); + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; return object; }; @@ -312603,6 +313438,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService|updateDeploymentResourcePool}. + * @memberof google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService + * @typedef UpdateDeploymentResourcePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDeploymentResourcePool. + * @function updateDeploymentResourcePool + * @memberof google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest} request UpdateDeploymentResourcePoolRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.UpdateDeploymentResourcePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DeploymentResourcePoolService.prototype.updateDeploymentResourcePool = function updateDeploymentResourcePool(request, callback) { + return this.rpcCall(updateDeploymentResourcePool, $root.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDeploymentResourcePool" }); + + /** + * Calls UpdateDeploymentResourcePool. + * @function updateDeploymentResourcePool + * @memberof google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest} request UpdateDeploymentResourcePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService|deleteDeploymentResourcePool}. * @memberof google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService @@ -313836,6 +314704,243 @@ return ListDeploymentResourcePoolsResponse; })(); + v1beta1.UpdateDeploymentResourcePoolRequest = (function() { + + /** + * Properties of an UpdateDeploymentResourcePoolRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IUpdateDeploymentResourcePoolRequest + * @property {google.cloud.aiplatform.v1beta1.IDeploymentResourcePool|null} [deploymentResourcePool] UpdateDeploymentResourcePoolRequest deploymentResourcePool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeploymentResourcePoolRequest updateMask + */ + + /** + * Constructs a new UpdateDeploymentResourcePoolRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an UpdateDeploymentResourcePoolRequest. + * @implements IUpdateDeploymentResourcePoolRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest=} [properties] Properties to set + */ + function UpdateDeploymentResourcePoolRequest(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]]; + } + + /** + * UpdateDeploymentResourcePoolRequest deploymentResourcePool. + * @member {google.cloud.aiplatform.v1beta1.IDeploymentResourcePool|null|undefined} deploymentResourcePool + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @instance + */ + UpdateDeploymentResourcePoolRequest.prototype.deploymentResourcePool = null; + + /** + * UpdateDeploymentResourcePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @instance + */ + UpdateDeploymentResourcePoolRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeploymentResourcePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest instance + */ + UpdateDeploymentResourcePoolRequest.create = function create(properties) { + return new UpdateDeploymentResourcePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentResourcePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deploymentResourcePool != null && Object.hasOwnProperty.call(message, "deploymentResourcePool")) + $root.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.encode(message.deploymentResourcePool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDeploymentResourcePoolRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeploymentResourcePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentResourcePoolRequest.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.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deploymentResourcePool = $root.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeploymentResourcePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeploymentResourcePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeploymentResourcePoolRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeploymentResourcePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deploymentResourcePool != null && message.hasOwnProperty("deploymentResourcePool")) { + var error = $root.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.verify(message.deploymentResourcePool); + if (error) + return "deploymentResourcePool." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDeploymentResourcePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest} UpdateDeploymentResourcePoolRequest + */ + UpdateDeploymentResourcePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest(); + if (object.deploymentResourcePool != null) { + if (typeof object.deploymentResourcePool !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.deploymentResourcePool: object expected"); + message.deploymentResourcePool = $root.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.fromObject(object.deploymentResourcePool); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDeploymentResourcePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest} message UpdateDeploymentResourcePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeploymentResourcePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deploymentResourcePool = null; + object.updateMask = null; + } + if (message.deploymentResourcePool != null && message.hasOwnProperty("deploymentResourcePool")) + object.deploymentResourcePool = $root.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.toObject(message.deploymentResourcePool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDeploymentResourcePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeploymentResourcePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDeploymentResourcePoolRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeploymentResourcePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest"; + }; + + return UpdateDeploymentResourcePoolRequest; + })(); + v1beta1.UpdateDeploymentResourcePoolOperationMetadata = (function() { /** @@ -327493,6 +328598,7 @@ * Properties of a BleuSpec. * @memberof google.cloud.aiplatform.v1beta1 * @interface IBleuSpec + * @property {boolean|null} [useEffectiveOrder] BleuSpec useEffectiveOrder */ /** @@ -327510,6 +328616,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * BleuSpec useEffectiveOrder. + * @member {boolean} useEffectiveOrder + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @instance + */ + BleuSpec.prototype.useEffectiveOrder = false; + /** * Creates a new BleuSpec instance using the specified properties. * @function create @@ -327534,6 +328648,8 @@ BleuSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.useEffectiveOrder != null && Object.hasOwnProperty.call(message, "useEffectiveOrder")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useEffectiveOrder); return writer; }; @@ -327568,6 +328684,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.useEffectiveOrder = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -327603,6 +328723,9 @@ BleuSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.useEffectiveOrder != null && message.hasOwnProperty("useEffectiveOrder")) + if (typeof message.useEffectiveOrder !== "boolean") + return "useEffectiveOrder: boolean expected"; return null; }; @@ -327617,7 +328740,10 @@ BleuSpec.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuSpec) return object; - return new $root.google.cloud.aiplatform.v1beta1.BleuSpec(); + var message = new $root.google.cloud.aiplatform.v1beta1.BleuSpec(); + if (object.useEffectiveOrder != null) + message.useEffectiveOrder = Boolean(object.useEffectiveOrder); + return message; }; /** @@ -327629,8 +328755,15 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BleuSpec.toObject = function toObject() { - return {}; + BleuSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.useEffectiveOrder = false; + if (message.useEffectiveOrder != null && message.hasOwnProperty("useEffectiveOrder")) + object.useEffectiveOrder = message.useEffectiveOrder; + return object; }; /** @@ -438932,6 +440065,8 @@ * @interface IComputeTokensRequest * @property {string|null} [endpoint] ComputeTokensRequest endpoint * @property {Array.|null} [instances] ComputeTokensRequest instances + * @property {string|null} [model] ComputeTokensRequest model + * @property {Array.|null} [contents] ComputeTokensRequest contents */ /** @@ -438944,6 +440079,7 @@ */ function ComputeTokensRequest(properties) { this.instances = []; + this.contents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -438966,6 +440102,22 @@ */ ComputeTokensRequest.prototype.instances = $util.emptyArray; + /** + * ComputeTokensRequest model. + * @member {string} model + * @memberof google.cloud.aiplatform.v1beta1.ComputeTokensRequest + * @instance + */ + ComputeTokensRequest.prototype.model = ""; + + /** + * ComputeTokensRequest contents. + * @member {Array.} contents + * @memberof google.cloud.aiplatform.v1beta1.ComputeTokensRequest + * @instance + */ + ComputeTokensRequest.prototype.contents = $util.emptyArray; + /** * Creates a new ComputeTokensRequest instance using the specified properties. * @function create @@ -438995,6 +440147,11 @@ if (message.instances != null && message.instances.length) for (var i = 0; i < message.instances.length; ++i) $root.google.protobuf.Value.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.model); + if (message.contents != null && message.contents.length) + for (var i = 0; i < message.contents.length; ++i) + $root.google.cloud.aiplatform.v1beta1.Content.encode(message.contents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -439039,6 +440196,16 @@ message.instances.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; } + case 3: { + message.model = reader.string(); + break; + } + case 4: { + if (!(message.contents && message.contents.length)) + message.contents = []; + message.contents.push($root.google.cloud.aiplatform.v1beta1.Content.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -439086,6 +440253,18 @@ return "instances." + error; } } + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.contents != null && message.hasOwnProperty("contents")) { + if (!Array.isArray(message.contents)) + return "contents: array expected"; + for (var i = 0; i < message.contents.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.Content.verify(message.contents[i]); + if (error) + return "contents." + error; + } + } return null; }; @@ -439113,6 +440292,18 @@ message.instances[i] = $root.google.protobuf.Value.fromObject(object.instances[i]); } } + if (object.model != null) + message.model = String(object.model); + if (object.contents) { + if (!Array.isArray(object.contents)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ComputeTokensRequest.contents: array expected"); + message.contents = []; + for (var i = 0; i < object.contents.length; ++i) { + if (typeof object.contents[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ComputeTokensRequest.contents: object expected"); + message.contents[i] = $root.google.cloud.aiplatform.v1beta1.Content.fromObject(object.contents[i]); + } + } return message; }; @@ -439129,10 +440320,14 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.instances = []; - if (options.defaults) + object.contents = []; + } + if (options.defaults) { object.endpoint = ""; + object.model = ""; + } if (message.endpoint != null && message.hasOwnProperty("endpoint")) object.endpoint = message.endpoint; if (message.instances && message.instances.length) { @@ -439140,6 +440335,13 @@ for (var j = 0; j < message.instances.length; ++j) object.instances[j] = $root.google.protobuf.Value.toObject(message.instances[j], options); } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.contents && message.contents.length) { + object.contents = []; + for (var j = 0; j < message.contents.length; ++j) + object.contents[j] = $root.google.cloud.aiplatform.v1beta1.Content.toObject(message.contents[j], options); + } return object; }; @@ -439180,6 +440382,7 @@ * @interface ITokensInfo * @property {Array.|null} [tokens] TokensInfo tokens * @property {Array.|null} [tokenIds] TokensInfo tokenIds + * @property {string|null} [role] TokensInfo role */ /** @@ -439215,6 +440418,14 @@ */ TokensInfo.prototype.tokenIds = $util.emptyArray; + /** + * TokensInfo role. + * @member {string} role + * @memberof google.cloud.aiplatform.v1beta1.TokensInfo + * @instance + */ + TokensInfo.prototype.role = ""; + /** * Creates a new TokensInfo instance using the specified properties. * @function create @@ -439248,6 +440459,8 @@ writer.int64(message.tokenIds[i]); writer.ldelim(); } + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.role); return writer; }; @@ -439299,6 +440512,10 @@ message.tokenIds.push(reader.int64()); break; } + case 3: { + message.role = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -439348,6 +440565,9 @@ if (!$util.isInteger(message.tokenIds[i]) && !(message.tokenIds[i] && $util.isInteger(message.tokenIds[i].low) && $util.isInteger(message.tokenIds[i].high))) return "tokenIds: integer|Long[] expected"; } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; return null; }; @@ -439387,6 +440607,8 @@ else if (typeof object.tokenIds[i] === "object") message.tokenIds[i] = new $util.LongBits(object.tokenIds[i].low >>> 0, object.tokenIds[i].high >>> 0).toNumber(); } + if (object.role != null) + message.role = String(object.role); return message; }; @@ -439407,6 +440629,8 @@ object.tokens = []; object.tokenIds = []; } + if (options.defaults) + object.role = ""; if (message.tokens && message.tokens.length) { object.tokens = []; for (var j = 0; j < message.tokens.length; ++j) @@ -439420,6 +440644,8 @@ else object.tokenIds[j] = options.longs === String ? $util.Long.prototype.toString.call(message.tokenIds[j]) : options.longs === Number ? new $util.LongBits(message.tokenIds[j].low >>> 0, message.tokenIds[j].high >>> 0).toNumber() : message.tokenIds[j]; } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; return object; }; @@ -467262,6 +468488,7 @@ * @property {google.cloud.aiplatform.v1beta1.IModelContainerSpec|null} [containerSpec] Deploy containerSpec * @property {string|null} [artifactUri] Deploy artifactUri * @property {string|null} [deployTaskName] Deploy deployTaskName + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null} [deployMetadata] Deploy deployMetadata * @property {string|null} [title] Deploy title * @property {string|null} [publicArtifactUri] Deploy publicArtifactUri */ @@ -467345,6 +468572,14 @@ */ Deploy.prototype.deployTaskName = null; + /** + * Deploy deployMetadata. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata|null|undefined} deployMetadata + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.deployMetadata = null; + /** * Deploy title. * @member {string} title @@ -467386,6 +468621,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Deploy _deployMetadata. + * @member {"deployMetadata"|undefined} _deployMetadata + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Object.defineProperty(Deploy.prototype, "_deployMetadata", { + get: $util.oneOfGetter($oneOfFields = ["deployMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Deploy instance using the specified properties. * @function create @@ -467430,6 +468676,8 @@ writer.uint32(/* id 9, wireType 2 =*/74).string(message.publicArtifactUri); if (message.deployTaskName != null && Object.hasOwnProperty.call(message, "deployTaskName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.deployTaskName); + if (message.deployMetadata != null && Object.hasOwnProperty.call(message, "deployMetadata")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.encode(message.deployMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -467496,6 +468744,10 @@ message.deployTaskName = reader.string(); break; } + case 11: { + message.deployMetadata = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.decode(reader, reader.uint32()); + break; + } case 8: { message.title = reader.string(); break; @@ -467586,6 +468838,14 @@ if (!$util.isString(message.deployTaskName)) return "deployTaskName: string expected"; } + if (message.deployMetadata != null && message.hasOwnProperty("deployMetadata")) { + properties._deployMetadata = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify(message.deployMetadata); + if (error) + return "deployMetadata." + error; + } + } if (message.title != null && message.hasOwnProperty("title")) if (!$util.isString(message.title)) return "title: string expected"; @@ -467635,6 +468895,11 @@ message.artifactUri = String(object.artifactUri); if (object.deployTaskName != null) message.deployTaskName = String(object.deployTaskName); + if (object.deployMetadata != null) { + if (typeof object.deployMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.deployMetadata: object expected"); + message.deployMetadata = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.fromObject(object.deployMetadata); + } if (object.title != null) message.title = String(object.title); if (object.publicArtifactUri != null) @@ -467695,6 +468960,11 @@ if (options.oneofs) object._deployTaskName = "deployTaskName"; } + if (message.deployMetadata != null && message.hasOwnProperty("deployMetadata")) { + object.deployMetadata = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.toObject(message.deployMetadata, options); + if (options.oneofs) + object._deployMetadata = "deployMetadata"; + } return object; }; @@ -467724,6 +468994,244 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy"; }; + Deploy.DeployMetadata = (function() { + + /** + * Properties of a DeployMetadata. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @interface IDeployMetadata + * @property {Object.|null} [labels] DeployMetadata labels + */ + + /** + * Constructs a new DeployMetadata. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @classdesc Represents a DeployMetadata. + * @implements IDeployMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata=} [properties] Properties to set + */ + function DeployMetadata(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployMetadata labels. + * @member {Object.} labels + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @instance + */ + DeployMetadata.prototype.labels = $util.emptyObject; + + /** + * Creates a new DeployMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata instance + */ + DeployMetadata.create = function create(properties) { + return new DeployMetadata(properties); + }; + + /** + * Encodes the specified DeployMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata} message DeployMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeployMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.IDeployMetadata} message DeployMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployMetadata.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.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a DeployMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata} DeployMetadata + */ + DeployMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata(); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a DeployMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata} message DeployMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this DeployMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.DeployMetadata"; + }; + + return DeployMetadata; + })(); + return Deploy; })(); @@ -561073,6 +562581,8 @@ * @property {Object.|null} [labels] Tensorboard labels * @property {string|null} [etag] Tensorboard etag * @property {boolean|null} [isDefault] Tensorboard isDefault + * @property {boolean|null} [satisfiesPzs] Tensorboard satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Tensorboard satisfiesPzi */ /** @@ -561179,6 +562689,22 @@ */ Tensorboard.prototype.isDefault = false; + /** + * Tensorboard satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.aiplatform.v1beta1.Tensorboard + * @instance + */ + Tensorboard.prototype.satisfiesPzs = false; + + /** + * Tensorboard satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.aiplatform.v1beta1.Tensorboard + * @instance + */ + Tensorboard.prototype.satisfiesPzi = false; + /** * Creates a new Tensorboard instance using the specified properties. * @function create @@ -561226,6 +562752,10 @@ $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isDefault); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.satisfiesPzi); return writer; }; @@ -561323,6 +562853,14 @@ message.isDefault = reader.bool(); break; } + case 13: { + message.satisfiesPzs = reader.bool(); + break; + } + case 14: { + message.satisfiesPzi = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -561402,6 +562940,12 @@ if (message.isDefault != null && message.hasOwnProperty("isDefault")) if (typeof message.isDefault !== "boolean") return "isDefault: boolean expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; return null; }; @@ -561453,6 +562997,10 @@ message.etag = String(object.etag); if (object.isDefault != null) message.isDefault = Boolean(object.isDefault); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); return message; }; @@ -561482,6 +563030,8 @@ object.blobStoragePathPrefix = ""; object.encryptionSpec = null; object.isDefault = false; + object.satisfiesPzs = false; + object.satisfiesPzi = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -561509,6 +563059,10 @@ object.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.toObject(message.encryptionSpec, options); if (message.isDefault != null && message.hasOwnProperty("isDefault")) object.isDefault = message.isDefault; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; return object; }; diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 05f5bb4af035..90364769667b 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -1757,6 +1757,20 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "satisfiesPzs": { + "type": "bool", + "id": 51, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 52, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -5199,6 +5213,34 @@ } ] }, + "UpdateDeploymentResourcePool": { + "requestType": "UpdateDeploymentResourcePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}", + "(google.api.http).body": "deployment_resource_pool", + "(google.api.method_signature)": "deployment_resource_pool,update_mask", + "(google.longrunning.operation_info).response_type": "DeploymentResourcePool", + "(google.longrunning.operation_info).metadata_type": "UpdateDeploymentResourcePoolOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}", + "body": "deployment_resource_pool" + } + }, + { + "(google.api.method_signature)": "deployment_resource_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeploymentResourcePool", + "metadata_type": "UpdateDeploymentResourcePoolOperationMetadata" + } + } + ] + }, "DeleteDeploymentResourcePool": { "requestType": "DeleteDeploymentResourcePoolRequest", "responseType": "google.longrunning.Operation", @@ -5324,6 +5366,24 @@ } } }, + "UpdateDeploymentResourcePoolRequest": { + "fields": { + "deploymentResourcePool": { + "type": "DeploymentResourcePool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "UpdateDeploymentResourcePoolOperationMetadata": { "fields": { "genericMetadata": { @@ -6870,6 +6930,20 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "privateServiceConnectConfig": { + "type": "PrivateServiceConnectConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAttachment": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -15801,7 +15875,22 @@ "type": "google.protobuf.Value", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "model": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "contents": { + "rule": "repeated", + "type": "Content", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -15817,6 +15906,13 @@ "rule": "repeated", "type": "int64", "id": 2 + }, + "role": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -19527,6 +19623,11 @@ "oneof": [ "deployTaskName" ] + }, + "_deployMetadata": { + "oneof": [ + "deployMetadata" + ] } }, "fields": { @@ -19578,6 +19679,14 @@ "proto3_optional": true } }, + "deployMetadata": { + "type": "DeployMetadata", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "title": { "type": "string", "id": 8, @@ -19592,6 +19701,20 @@ "(google.api.field_behavior)": "OPTIONAL" } } + }, + "nested": { + "DeployMetadata": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } } }, "DeployGke": { @@ -25360,6 +25483,20 @@ "isDefault": { "type": "bool", "id": 12 + }, + "satisfiesPzs": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -30079,6 +30216,20 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "satisfiesPzs": { + "type": "bool", + "id": 51, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 52, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -33939,6 +34090,34 @@ } ] }, + "UpdateDeploymentResourcePool": { + "requestType": "UpdateDeploymentResourcePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}", + "(google.api.http).body": "deployment_resource_pool", + "(google.api.method_signature)": "deployment_resource_pool,update_mask", + "(google.longrunning.operation_info).response_type": "DeploymentResourcePool", + "(google.longrunning.operation_info).metadata_type": "UpdateDeploymentResourcePoolOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{deployment_resource_pool.name=projects/*/locations/*/deploymentResourcePools/*}", + "body": "deployment_resource_pool" + } + }, + { + "(google.api.method_signature)": "deployment_resource_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeploymentResourcePool", + "metadata_type": "UpdateDeploymentResourcePoolOperationMetadata" + } + } + ] + }, "DeleteDeploymentResourcePool": { "requestType": "DeleteDeploymentResourcePoolRequest", "responseType": "google.longrunning.Operation", @@ -34064,6 +34243,24 @@ } } }, + "UpdateDeploymentResourcePoolRequest": { + "fields": { + "deploymentResourcePool": { + "type": "DeploymentResourcePool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "UpdateDeploymentResourcePoolOperationMetadata": { "fields": { "genericMetadata": { @@ -35529,7 +35726,15 @@ } }, "BleuSpec": { - "fields": {} + "fields": { + "useEffectiveOrder": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, "BleuResults": { "fields": { @@ -47833,7 +48038,22 @@ "type": "google.protobuf.Value", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "model": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "contents": { + "rule": "repeated", + "type": "Content", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -47849,6 +48069,13 @@ "rule": "repeated", "type": "int64", "id": 2 + }, + "role": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -50903,6 +51130,11 @@ "oneof": [ "deployTaskName" ] + }, + "_deployMetadata": { + "oneof": [ + "deployMetadata" + ] } }, "fields": { @@ -50954,6 +51186,14 @@ "proto3_optional": true } }, + "deployMetadata": { + "type": "DeployMetadata", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "title": { "type": "string", "id": 8, @@ -50968,6 +51208,20 @@ "(google.api.field_behavior)": "OPTIONAL" } } + }, + "nested": { + "DeployMetadata": { + "fields": { + "labels": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } } }, "DeployGke": { @@ -60443,6 +60697,20 @@ "isDefault": { "type": "bool", "id": 12 + }, + "satisfiesPzs": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 1ed31fa1f924..43a62d35e168 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -36,6 +36,7 @@ * [Deployment_resource_pool_service.get_deployment_resource_pool](#deployment_resource_pool_service.get_deployment_resource_pool) * [Deployment_resource_pool_service.list_deployment_resource_pools](#deployment_resource_pool_service.list_deployment_resource_pools) * [Deployment_resource_pool_service.query_deployed_models](#deployment_resource_pool_service.query_deployed_models) + * [Deployment_resource_pool_service.update_deployment_resource_pool](#deployment_resource_pool_service.update_deployment_resource_pool) * [Endpoint_service.create_endpoint](#endpoint_service.create_endpoint) * [Endpoint_service.delete_endpoint](#endpoint_service.delete_endpoint) * [Endpoint_service.deploy_model](#endpoint_service.deploy_model) @@ -327,6 +328,7 @@ * [Deployment_resource_pool_service.get_deployment_resource_pool](#deployment_resource_pool_service.get_deployment_resource_pool) * [Deployment_resource_pool_service.list_deployment_resource_pools](#deployment_resource_pool_service.list_deployment_resource_pools) * [Deployment_resource_pool_service.query_deployed_models](#deployment_resource_pool_service.query_deployed_models) + * [Deployment_resource_pool_service.update_deployment_resource_pool](#deployment_resource_pool_service.update_deployment_resource_pool) * [Endpoint_service.create_endpoint](#endpoint_service.create_endpoint) * [Endpoint_service.delete_endpoint](#endpoint_service.delete_endpoint) * [Endpoint_service.deploy_model](#endpoint_service.deploy_model) @@ -1067,6 +1069,23 @@ __Usage:__ +### Deployment_resource_pool_service.update_deployment_resource_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js` + + +----- + + + + ### Endpoint_service.create_endpoint View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js). @@ -6014,6 +6033,23 @@ __Usage:__ +### Deployment_resource_pool_service.update_deployment_resource_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js` + + +----- + + + + ### Endpoint_service.create_endpoint View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js b/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js new file mode 100644 index 000000000000..4eff333f0a97 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(deploymentResourcePool, updateMask) { + // [START aiplatform_v1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The DeploymentResourcePool to update. + * The DeploymentResourcePool's `name` field is used to identify the + * DeploymentResourcePool to update. + * Format: + * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + */ + // const deploymentResourcePool = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Aiplatform library + const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new DeploymentResourcePoolServiceClient(); + + async function callUpdateDeploymentResourcePool() { + // Construct request + const request = { + deploymentResourcePool, + updateMask, + }; + + // Run request + const [operation] = await aiplatformClient.updateDeploymentResourcePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDeploymentResourcePool(); + // [END aiplatform_v1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/llm_utility_service.compute_tokens.js b/packages/google-cloud-aiplatform/samples/generated/v1/llm_utility_service.compute_tokens.js index 3b87d6e56cfa..be19cafe4981 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/llm_utility_service.compute_tokens.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/llm_utility_service.compute_tokens.js @@ -20,7 +20,7 @@ 'use strict'; -function main(endpoint, instances) { +function main(endpoint) { // [START aiplatform_v1_generated_LlmUtilityService_ComputeTokens_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -34,11 +34,21 @@ function main(endpoint, instances) { */ // const endpoint = 'abc123' /** - * Required. The instances that are the input to token computing API call. + * Optional. The instances that are the input to token computing API call. * Schema is identical to the prediction schema of the text model, even for * the non-text models, like chat models, or Codey models. */ // const instances = [1,2,3,4] + /** + * Optional. The name of the publisher model requested to serve the + * prediction. Format: + * projects/{project}/locations/{location}/publishers/* /models/* + */ + // const model = 'abc123' + /** + * Optional. Input content. + */ + // const contents = [1,2,3,4] // Imports the Aiplatform library const {LlmUtilityServiceClient} = require('@google-cloud/aiplatform').v1; @@ -50,7 +60,6 @@ function main(endpoint, instances) { // Construct request const request = { endpoint, - instances, }; // Run request diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index 45e82e0c575f..ed18bc17f329 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1091,6 +1091,50 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async", + "title": "DatasetService updateDeploymentResourcePool Sample", + "origin": "API_DEFINITION", + "description": " Update a DeploymentResourcePool.", + "canonical": true, + "file": "deployment_resource_pool_service.update_deployment_resource_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeploymentResourcePool", + "fullName": "google.cloud.aiplatform.v1.DeploymentResourcePoolService.UpdateDeploymentResourcePool", + "async": true, + "parameters": [ + { + "name": "deployment_resource_pool", + "type": ".google.cloud.aiplatform.v1.DeploymentResourcePool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DeploymentResourcePoolServiceClient", + "fullName": "google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient" + }, + "method": { + "shortName": "UpdateDeploymentResourcePool", + "fullName": "google.cloud.aiplatform.v1.DeploymentResourcePoolService.UpdateDeploymentResourcePool", + "service": { + "shortName": "DeploymentResourcePoolService", + "fullName": "google.cloud.aiplatform.v1.DeploymentResourcePoolService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_DeploymentResourcePoolService_DeleteDeploymentResourcePool_async", "title": "DatasetService deleteDeploymentResourcePool Sample", @@ -6390,7 +6434,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 70, "type": "FULL" } ], @@ -6406,6 +6450,14 @@ { "name": "instances", "type": "TYPE_MESSAGE[]" + }, + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_MESSAGE[]" } ], "resultType": ".google.cloud.aiplatform.v1.ComputeTokensResponse", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js new file mode 100644 index 000000000000..22a0623ffcc1 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(deploymentResourcePool, updateMask) { + // [START aiplatform_v1beta1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The DeploymentResourcePool to update. + * The DeploymentResourcePool's `name` field is used to identify the + * DeploymentResourcePool to update. + * Format: + * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + */ + // const deploymentResourcePool = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Aiplatform library + const {DeploymentResourcePoolServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new DeploymentResourcePoolServiceClient(); + + async function callUpdateDeploymentResourcePool() { + // Construct request + const request = { + deploymentResourcePool, + updateMask, + }; + + // Run request + const [operation] = await aiplatformClient.updateDeploymentResourcePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDeploymentResourcePool(); + // [END aiplatform_v1beta1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.compute_tokens.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.compute_tokens.js index 0a87bc7f9091..c7efd02269f0 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.compute_tokens.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.compute_tokens.js @@ -20,7 +20,7 @@ 'use strict'; -function main(endpoint, instances) { +function main(endpoint) { // [START aiplatform_v1beta1_generated_LlmUtilityService_ComputeTokens_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -34,11 +34,21 @@ function main(endpoint, instances) { */ // const endpoint = 'abc123' /** - * Required. The instances that are the input to token computing API call. + * Optional. The instances that are the input to token computing API call. * Schema is identical to the prediction schema of the text model, even for * the non-text models, like chat models, or Codey models. */ // const instances = [1,2,3,4] + /** + * Optional. The name of the publisher model requested to serve the + * prediction. Format: + * projects/{project}/locations/{location}/publishers/* /models/* + */ + // const model = 'abc123' + /** + * Optional. Input content. + */ + // const contents = [1,2,3,4] // Imports the Aiplatform library const {LlmUtilityServiceClient} = require('@google-cloud/aiplatform').v1beta1; @@ -50,7 +60,6 @@ function main(endpoint, instances) { // Construct request const request = { endpoint, - instances, }; // Run request diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 02bac7c6b745..5f48ad890db4 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -1091,6 +1091,50 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async", + "title": "DatasetService updateDeploymentResourcePool Sample", + "origin": "API_DEFINITION", + "description": " Update a DeploymentResourcePool.", + "canonical": true, + "file": "deployment_resource_pool_service.update_deployment_resource_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeploymentResourcePool", + "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.UpdateDeploymentResourcePool", + "async": true, + "parameters": [ + { + "name": "deployment_resource_pool", + "type": ".google.cloud.aiplatform.v1beta1.DeploymentResourcePool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DeploymentResourcePoolServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient" + }, + "method": { + "shortName": "UpdateDeploymentResourcePool", + "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.UpdateDeploymentResourcePool", + "service": { + "shortName": "DeploymentResourcePoolService", + "fullName": "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_DeploymentResourcePoolService_DeleteDeploymentResourcePool_async", "title": "DatasetService deleteDeploymentResourcePool Sample", @@ -7050,7 +7094,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 70, "type": "FULL" } ], @@ -7066,6 +7110,14 @@ { "name": "instances", "type": "TYPE_MESSAGE[]" + }, + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "contents", + "type": "TYPE_MESSAGE[]" } ], "resultType": ".google.cloud.aiplatform.v1beta1.ComputeTokensResponse", diff --git a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts index 7762c4b5e65c..b8b8cd0dd5a3 100644 --- a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts @@ -1904,6 +1904,12 @@ export class DeploymentResourcePoolServiceClient { const createDeploymentResourcePoolMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolOperationMetadata' ) as gax.protobuf.Type; + const updateDeploymentResourcePoolResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.DeploymentResourcePool' + ) as gax.protobuf.Type; + const updateDeploymentResourcePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolOperationMetadata' + ) as gax.protobuf.Type; const deleteDeploymentResourcePoolResponse = protoFilesRoot.lookup( '.google.protobuf.Empty' ) as gax.protobuf.Type; @@ -1921,6 +1927,15 @@ export class DeploymentResourcePoolServiceClient { createDeploymentResourcePoolMetadata ) ), + updateDeploymentResourcePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDeploymentResourcePoolResponse.decode.bind( + updateDeploymentResourcePoolResponse + ), + updateDeploymentResourcePoolMetadata.decode.bind( + updateDeploymentResourcePoolMetadata + ) + ), deleteDeploymentResourcePool: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteDeploymentResourcePoolResponse.decode.bind( @@ -1986,6 +2001,7 @@ export class DeploymentResourcePoolServiceClient { 'createDeploymentResourcePool', 'getDeploymentResourcePool', 'listDeploymentResourcePools', + 'updateDeploymentResourcePool', 'deleteDeploymentResourcePool', 'queryDeployedModels', ]; @@ -2358,6 +2374,154 @@ export class DeploymentResourcePoolServiceClient { protos.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolOperationMetadata >; } + /** + * Update a DeploymentResourcePool. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1.DeploymentResourcePool} request.deploymentResourcePool + * Required. The DeploymentResourcePool to update. + * + * The DeploymentResourcePool's `name` field is used to identify the + * DeploymentResourcePool to update. + * Format: + * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js + * region_tag:aiplatform_v1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async + */ + updateDeploymentResourcePool( + request?: protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateDeploymentResourcePool( + request: protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeploymentResourcePool( + request: protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeploymentResourcePool( + request?: protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'deployment_resource_pool.name': + request.deploymentResourcePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDeploymentResourcePool( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateDeploymentResourcePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/deployment_resource_pool_service.update_deployment_resource_pool.js + * region_tag:aiplatform_v1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async + */ + async checkUpdateDeploymentResourcePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1.DeploymentResourcePool, + protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateDeploymentResourcePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1.DeploymentResourcePool, + protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolOperationMetadata + >; + } /** * Delete a DeploymentResourcePool. * diff --git a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client_config.json index 8fa925270562..b8ffaa0be677 100644 --- a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client_config.json @@ -32,6 +32,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "UpdateDeploymentResourcePool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeleteDeploymentResourcePool": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index 50b149531224..56a176c5ed9a 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -248,6 +248,11 @@ "createDeploymentResourcePool" ] }, + "UpdateDeploymentResourcePool": { + "methods": [ + "updateDeploymentResourcePool" + ] + }, "DeleteDeploymentResourcePool": { "methods": [ "deleteDeploymentResourcePool" @@ -282,6 +287,11 @@ "createDeploymentResourcePool" ] }, + "UpdateDeploymentResourcePool": { + "methods": [ + "updateDeploymentResourcePool" + ] + }, "DeleteDeploymentResourcePool": { "methods": [ "deleteDeploymentResourcePool" diff --git a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts index f14c1f76b884..43a89091c951 100644 --- a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts @@ -625,10 +625,16 @@ export class LlmUtilityServiceClient { * @param {string} request.endpoint * Required. The name of the Endpoint requested to get lists of tokens and * token ids. - * @param {number[]} request.instances - * Required. The instances that are the input to token computing API call. + * @param {number[]} [request.instances] + * Optional. The instances that are the input to token computing API call. * Schema is identical to the prediction schema of the text model, even for * the non-text models, like chat models, or Codey models. + * @param {string} [request.model] + * Optional. The name of the publisher model requested to serve the + * prediction. Format: + * projects/{project}/locations/{location}/publishers/* /models/* + * @param {number[]} [request.contents] + * Optional. Input content. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index 3dd23ab5b7ab..563f46c6c041 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts @@ -2164,6 +2164,12 @@ export class DeploymentResourcePoolServiceClient { const createDeploymentResourcePoolMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata' ) as gax.protobuf.Type; + const updateDeploymentResourcePoolResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeploymentResourcePool' + ) as gax.protobuf.Type; + const updateDeploymentResourcePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata' + ) as gax.protobuf.Type; const deleteDeploymentResourcePoolResponse = protoFilesRoot.lookup( '.google.protobuf.Empty' ) as gax.protobuf.Type; @@ -2181,6 +2187,15 @@ export class DeploymentResourcePoolServiceClient { createDeploymentResourcePoolMetadata ) ), + updateDeploymentResourcePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDeploymentResourcePoolResponse.decode.bind( + updateDeploymentResourcePoolResponse + ), + updateDeploymentResourcePoolMetadata.decode.bind( + updateDeploymentResourcePoolMetadata + ) + ), deleteDeploymentResourcePool: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteDeploymentResourcePoolResponse.decode.bind( @@ -2246,6 +2261,7 @@ export class DeploymentResourcePoolServiceClient { 'createDeploymentResourcePool', 'getDeploymentResourcePool', 'listDeploymentResourcePools', + 'updateDeploymentResourcePool', 'deleteDeploymentResourcePool', 'queryDeployedModels', ]; @@ -2618,6 +2634,154 @@ export class DeploymentResourcePoolServiceClient { protos.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata >; } + /** + * Update a DeploymentResourcePool. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1beta1.DeploymentResourcePool} request.deploymentResourcePool + * Required. The DeploymentResourcePool to update. + * + * The DeploymentResourcePool's `name` field is used to identify the + * DeploymentResourcePool to update. + * Format: + * `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js + * region_tag:aiplatform_v1beta1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async + */ + updateDeploymentResourcePool( + request?: protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateDeploymentResourcePool( + request: protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeploymentResourcePool( + request: protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDeploymentResourcePool( + request?: protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'deployment_resource_pool.name': + request.deploymentResourcePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDeploymentResourcePool( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateDeploymentResourcePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/deployment_resource_pool_service.update_deployment_resource_pool.js + * region_tag:aiplatform_v1beta1_generated_DeploymentResourcePoolService_UpdateDeploymentResourcePool_async + */ + async checkUpdateDeploymentResourcePoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateDeploymentResourcePool, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + >; + } /** * Delete a DeploymentResourcePool. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client_config.json index 060fe05281cb..2baf85ca01c5 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client_config.json @@ -32,6 +32,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "UpdateDeploymentResourcePool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeleteDeploymentResourcePool": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 697aa0a3c455..48fb0c5bf932 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -248,6 +248,11 @@ "createDeploymentResourcePool" ] }, + "UpdateDeploymentResourcePool": { + "methods": [ + "updateDeploymentResourcePool" + ] + }, "DeleteDeploymentResourcePool": { "methods": [ "deleteDeploymentResourcePool" @@ -282,6 +287,11 @@ "createDeploymentResourcePool" ] }, + "UpdateDeploymentResourcePool": { + "methods": [ + "updateDeploymentResourcePool" + ] + }, "DeleteDeploymentResourcePool": { "methods": [ "deleteDeploymentResourcePool" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts index 0da862483aab..c3088c1d30f5 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts @@ -555,10 +555,16 @@ export class LlmUtilityServiceClient { * @param {string} request.endpoint * Required. The name of the Endpoint requested to get lists of tokens and * token ids. - * @param {number[]} request.instances - * Required. The instances that are the input to token computing API call. + * @param {number[]} [request.instances] + * Optional. The instances that are the input to token computing API call. * Schema is identical to the prediction schema of the text model, even for * the non-text models, like chat models, or Codey models. + * @param {string} [request.model] + * Optional. The name of the publisher model requested to serve the + * prediction. Format: + * projects/{project}/locations/{location}/publishers/* /models/* + * @param {number[]} [request.contents] + * Optional. Input content. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1.ts index ec7948859d94..d98114bdd0e2 100644 --- a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1.ts @@ -736,6 +736,226 @@ describe('v1.DeploymentResourcePoolServiceClient', () => { }); }); + describe('updateDeploymentResourcePool', () => { + it('invokes updateDeploymentResourcePool without error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeploymentResourcePool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeploymentResourcePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool without error using callback', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeploymentResourcePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeploymentResourcePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1.IUpdateDeploymentResourcePoolOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool with call error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeploymentResourcePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDeploymentResourcePool(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool with LRO error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeploymentResourcePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDeploymentResourcePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDeploymentResourcePoolProgress without error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateDeploymentResourcePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDeploymentResourcePoolProgress with error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateDeploymentResourcePoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('deleteDeploymentResourcePool', () => { it('invokes deleteDeploymentResourcePool without error', async () => { const client = diff --git a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts index 9fbfe9687a56..978006ae7f72 100644 --- a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts @@ -736,6 +736,226 @@ describe('v1beta1.DeploymentResourcePoolServiceClient', () => { }); }); + describe('updateDeploymentResourcePool', () => { + it('invokes updateDeploymentResourcePool without error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeploymentResourcePool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeploymentResourcePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool without error using callback', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeploymentResourcePool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeploymentResourcePool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1beta1.IDeploymentResourcePool, + protos.google.cloud.aiplatform.v1beta1.IUpdateDeploymentResourcePoolOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool with call error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeploymentResourcePool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDeploymentResourcePool(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeploymentResourcePool with LRO error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest() + ); + request.deploymentResourcePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolRequest', + ['deploymentResourcePool', 'name'] + ); + request.deploymentResourcePool.name = defaultValue1; + const expectedHeaderRequestParams = `deployment_resource_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeploymentResourcePool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDeploymentResourcePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeploymentResourcePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDeploymentResourcePoolProgress without error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateDeploymentResourcePoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDeploymentResourcePoolProgress with error', async () => { + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateDeploymentResourcePoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('deleteDeploymentResourcePool', () => { it('invokes deleteDeploymentResourcePool without error', async () => { const client = From 9a80089d974280420e269f24aba563f4adceb4c3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:35:19 -0400 Subject: [PATCH 11/17] feat: [chat] Add doc for Discoverable Space support for GA launch (#5525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add doc for Discoverable Space support for GA launch docs: Update resource naming formats PiperOrigin-RevId: 649131985 Source-Link: https://github.com/googleapis/googleapis/commit/fd67cace09a9cefcd8db46eee9d174d520416389 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7c31c51ce57a4b3bf8aa11bde5c1544ae689873c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6IjdjMzFjNTFjZTU3YTRiM2JmOGFhMTFiZGU1YzE1NDRhZTY4OTg3M2MifQ== * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../protos/google/chat/v1/attachment.proto | 4 +- .../protos/google/chat/v1/chat_service.proto | 8 + .../protos/google/chat/v1/membership.proto | 10 +- .../protos/google/chat/v1/space.proto | 69 +++- packages/google-chat/protos/protos.d.ts | 125 +++++++ packages/google-chat/protos/protos.js | 318 ++++++++++++++++++ packages/google-chat/protos/protos.json | 43 ++- .../v1/chat_service.get_attachment.js | 2 +- .../generated/v1/chat_service.get_space.js | 2 +- .../v1/chat_service.list_memberships.js | 7 +- .../generated/v1/chat_service.update_space.js | 25 +- .../v1/snippet_metadata_google.chat.v1.json | 6 +- .../google-chat/src/v1/chat_service_client.ts | 70 +++- 13 files changed, 653 insertions(+), 36 deletions(-) diff --git a/packages/google-chat/protos/google/chat/v1/attachment.proto b/packages/google-chat/protos/google/chat/v1/attachment.proto index 2831a00a1a29..c500959e5b77 100644 --- a/packages/google-chat/protos/google/chat/v1/attachment.proto +++ b/packages/google-chat/protos/google/chat/v1/attachment.proto @@ -48,7 +48,7 @@ message Attachment { } // Resource name of the attachment, in the form - // `spaces/*/messages/*/attachments/*`. + // `spaces/{space}/messages/{message}/attachments/{attachment}`. string name = 1; // Output only. The original file name for the content, not the full path. @@ -103,7 +103,7 @@ message AttachmentDataRef { // Request to get an attachment. message GetAttachmentRequest { // Required. Resource name of the attachment, in the form - // `spaces/*/messages/*/attachments/*`. + // `spaces/{space}/messages/{message}/attachments/{attachment}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "chat.googleapis.com/Attachment" } diff --git a/packages/google-chat/protos/google/chat/v1/chat_service.proto b/packages/google-chat/protos/google/chat/v1/chat_service.proto index 9de4895a392c..1687e11d44e5 100644 --- a/packages/google-chat/protos/google/chat/v1/chat_service.proto +++ b/packages/google-chat/protos/google/chat/v1/chat_service.proto @@ -42,6 +42,11 @@ option ruby_package = "Google::Apps::Chat::V1"; service ChatService { option (google.api.default_host) = "chat.googleapis.com"; option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chat.admin.delete," + "https://www.googleapis.com/auth/chat.admin.memberships," + "https://www.googleapis.com/auth/chat.admin.memberships.readonly," + "https://www.googleapis.com/auth/chat.admin.spaces," + "https://www.googleapis.com/auth/chat.admin.spaces.readonly," "https://www.googleapis.com/auth/chat.bot," "https://www.googleapis.com/auth/chat.delete," "https://www.googleapis.com/auth/chat.import," @@ -253,6 +258,9 @@ service ChatService { // Lists spaces visible to the caller or authenticated user. Group chats // and DMs aren't listed until the first message is sent. // + // To list all named spaces by Google Workspace organization, use the + // [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) + // method using Workspace administrator privileges instead. rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) { option (google.api.http) = { get: "/v1/spaces" diff --git a/packages/google-chat/protos/google/chat/v1/membership.proto b/packages/google-chat/protos/google/chat/v1/membership.proto index 6706f45520ee..1441df09b614 100644 --- a/packages/google-chat/protos/google/chat/v1/membership.proto +++ b/packages/google-chat/protos/google/chat/v1/membership.proto @@ -215,16 +215,23 @@ message ListMembershipsRequest { // // To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. // - // To filter by type, set `member.type` to `HUMAN` or `BOT`. + // To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer + // Preview: You can also filter for `member.type` using the `!=` operator. // // To filter by both role and type, use the `AND` operator. To filter by // either role or type, use the `OR` operator. // + // Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + // when `use_admin_access` is set to true. Other member type filters will be + // rejected. + // // For example, the following queries are valid: // // ``` // role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" // member.type = "HUMAN" AND role = "ROLE_MANAGER" + // + // member.type != "BOT" // ``` // // The following queries are invalid: @@ -234,7 +241,6 @@ message ListMembershipsRequest { // role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" // ``` // - // // Invalid queries are rejected by the server with an `INVALID_ARGUMENT` // error. string filter = 5 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-chat/protos/google/chat/v1/space.proto b/packages/google-chat/protos/google/chat/v1/space.proto index b5fa106f6ed9..6bc022a90ab1 100644 --- a/packages/google-chat/protos/google/chat/v1/space.proto +++ b/packages/google-chat/protos/google/chat/v1/space.proto @@ -103,6 +103,39 @@ message Space { string guidelines = 2; } + // Represents the [access + // setting](https://support.google.com/chat/answer/11971020) of the space. + message AccessSettings { + // Represents the access state of the space. + enum AccessState { + // Access state is unknown or not supported in this API. + ACCESS_STATE_UNSPECIFIED = 0; + + // Space is discoverable by added or invited members or groups. + PRIVATE = 1; + + // Space is discoverable by the selected [target + // audience](https://support.google.com/a/answer/9934697), as well as + // added or invited members or groups. + DISCOVERABLE = 2; + } + + // Output only. Indicates the access state of the space. + AccessState access_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The resource name of the [target + // audience](https://support.google.com/a/answer/9934697) who can discover + // the space, join the space, and preview the messages in the space. For + // details, see [Make a space discoverable to a target + // audience](https://developers.google.com/workspace/chat/space-target-audience). + // + // Format: `audiences/{audience}` + // + // To use the default target audience for the Google Workspace organization, + // set to `audiences/default`. + string audience = 3 [(google.api.field_behavior) = OPTIONAL]; + } + // Resource name of the space. // // Format: `spaces/{space}` @@ -192,6 +225,14 @@ message Space { // // To support admin install, your Chat app must feature direct messaging. bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Specifies the [access + // setting](https://support.google.com/chat/answer/11971020) of the space. + // Only populated when the `space_type` is `SPACE`. + AccessSettings access_settings = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI for a user to access the space. + string space_uri = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A request to create a named space. @@ -270,7 +311,7 @@ message ListSpacesResponse { // A request to return a single space. message GetSpaceRequest { - // Required. Resource name of the space, in the form "spaces/*". + // Required. Resource name of the space, in the form `spaces/{space}`. // // Format: `spaces/{space}` string name = 1 [ @@ -325,6 +366,7 @@ message UpdateSpaceRequest { // the display name is optional if the existing space already has the `SPACE` // type. Trying to update the space type in other ways results in an invalid // argument error). + // `space_type` is not supported with admin access. // // - `space_details` // @@ -333,12 +375,27 @@ message UpdateSpaceRequest { // allows users to change their history // setting](https://support.google.com/a/answer/7664184). // Warning: mutually exclusive with all other field paths.) + // `space_history_state` is not supported with admin access. + // + // - `access_settings.audience` (Supports changing the [access + // setting](https://support.google.com/chat/answer/11971020) of who can + // discover the space, join the space, and preview the messages in space. If + // no audience is specified in the access setting, the space's access setting + // is updated to private. Warning: mutually exclusive with all other field + // paths.) + // `access_settings.audience` is not supported with admin access. // - // - Developer Preview: `access_settings.audience` (Supports changing the - // [access setting](https://support.google.com/chat/answer/11971020) of a - // space. If no audience is specified in the access setting, the space's - // access setting is updated to restricted. Warning: mutually exclusive with - // all other field paths.) + // - Developer Preview: Supports changing the [permission + // settings](https://support.google.com/chat/answer/13340792) of a space, + // supported field paths + // include: `permission_settings.manage_members_and_groups`, + // `permission_settings.modify_space_details`, + // `permission_settings.toggle_history`, + // `permission_settings.use_at_mention_all`, + // `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, + // `permission_settings.reply_messages` + // (Warning: mutually exclusive with all other non-permission settings field + // paths). `permission_settings` is not supported with admin access. google.protobuf.FieldMask update_mask = 2; } diff --git a/packages/google-chat/protos/protos.d.ts b/packages/google-chat/protos/protos.d.ts index c0c9cb8776e0..e9bcbd3003a6 100644 --- a/packages/google-chat/protos/protos.d.ts +++ b/packages/google-chat/protos/protos.d.ts @@ -17563,6 +17563,12 @@ export namespace google { /** Space adminInstalled */ adminInstalled?: (boolean|null); + + /** Space accessSettings */ + accessSettings?: (google.chat.v1.Space.IAccessSettings|null); + + /** Space spaceUri */ + spaceUri?: (string|null); } /** Represents a Space. */ @@ -17613,6 +17619,12 @@ export namespace google { /** Space adminInstalled. */ public adminInstalled: boolean; + /** Space accessSettings. */ + public accessSettings?: (google.chat.v1.Space.IAccessSettings|null); + + /** Space spaceUri. */ + public spaceUri: string; + /** * Creates a new Space instance using the specified properties. * @param [properties] Properties to set @@ -17818,6 +17830,119 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AccessSettings. */ + interface IAccessSettings { + + /** AccessSettings accessState */ + accessState?: (google.chat.v1.Space.AccessSettings.AccessState|keyof typeof google.chat.v1.Space.AccessSettings.AccessState|null); + + /** AccessSettings audience */ + audience?: (string|null); + } + + /** Represents an AccessSettings. */ + class AccessSettings implements IAccessSettings { + + /** + * Constructs a new AccessSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.chat.v1.Space.IAccessSettings); + + /** AccessSettings accessState. */ + public accessState: (google.chat.v1.Space.AccessSettings.AccessState|keyof typeof google.chat.v1.Space.AccessSettings.AccessState); + + /** AccessSettings audience. */ + public audience: string; + + /** + * Creates a new AccessSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessSettings instance + */ + public static create(properties?: google.chat.v1.Space.IAccessSettings): google.chat.v1.Space.AccessSettings; + + /** + * Encodes the specified AccessSettings message. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages. + * @param message AccessSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.chat.v1.Space.IAccessSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessSettings message, length delimited. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages. + * @param message AccessSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.chat.v1.Space.IAccessSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessSettings + * @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.chat.v1.Space.AccessSettings; + + /** + * Decodes an AccessSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessSettings + * @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.chat.v1.Space.AccessSettings; + + /** + * Verifies an AccessSettings 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 AccessSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessSettings + */ + public static fromObject(object: { [k: string]: any }): google.chat.v1.Space.AccessSettings; + + /** + * Creates a plain object from an AccessSettings message. Also converts values to other types if specified. + * @param message AccessSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.chat.v1.Space.AccessSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessSettings { + + /** AccessState enum. */ + enum AccessState { + ACCESS_STATE_UNSPECIFIED = 0, + PRIVATE = 1, + DISCOVERABLE = 2 + } + } } /** Properties of a CreateSpaceRequest. */ diff --git a/packages/google-chat/protos/protos.js b/packages/google-chat/protos/protos.js index 24fdc8b53426..eba9f205e911 100644 --- a/packages/google-chat/protos/protos.js +++ b/packages/google-chat/protos/protos.js @@ -45215,6 +45215,8 @@ * @property {boolean|null} [importMode] Space importMode * @property {google.protobuf.ITimestamp|null} [createTime] Space createTime * @property {boolean|null} [adminInstalled] Space adminInstalled + * @property {google.chat.v1.Space.IAccessSettings|null} [accessSettings] Space accessSettings + * @property {string|null} [spaceUri] Space spaceUri */ /** @@ -45336,6 +45338,22 @@ */ Space.prototype.adminInstalled = false; + /** + * Space accessSettings. + * @member {google.chat.v1.Space.IAccessSettings|null|undefined} accessSettings + * @memberof google.chat.v1.Space + * @instance + */ + Space.prototype.accessSettings = null; + + /** + * Space spaceUri. + * @member {string} spaceUri + * @memberof google.chat.v1.Space + * @instance + */ + Space.prototype.spaceUri = ""; + /** * Creates a new Space instance using the specified properties. * @function create @@ -45386,6 +45404,10 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.adminInstalled != null && Object.hasOwnProperty.call(message, "adminInstalled")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.adminInstalled); + if (message.accessSettings != null && Object.hasOwnProperty.call(message, "accessSettings")) + $root.google.chat.v1.Space.AccessSettings.encode(message.accessSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.spaceUri != null && Object.hasOwnProperty.call(message, "spaceUri")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.spaceUri); return writer; }; @@ -45472,6 +45494,14 @@ message.adminInstalled = reader.bool(); break; } + case 23: { + message.accessSettings = $root.google.chat.v1.Space.AccessSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.spaceUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -45576,6 +45606,14 @@ if (message.adminInstalled != null && message.hasOwnProperty("adminInstalled")) if (typeof message.adminInstalled !== "boolean") return "adminInstalled: boolean expected"; + if (message.accessSettings != null && message.hasOwnProperty("accessSettings")) { + var error = $root.google.chat.v1.Space.AccessSettings.verify(message.accessSettings); + if (error) + return "accessSettings." + error; + } + if (message.spaceUri != null && message.hasOwnProperty("spaceUri")) + if (!$util.isString(message.spaceUri)) + return "spaceUri: string expected"; return null; }; @@ -45703,6 +45741,13 @@ } if (object.adminInstalled != null) message.adminInstalled = Boolean(object.adminInstalled); + if (object.accessSettings != null) { + if (typeof object.accessSettings !== "object") + throw TypeError(".google.chat.v1.Space.accessSettings: object expected"); + message.accessSettings = $root.google.chat.v1.Space.AccessSettings.fromObject(object.accessSettings); + } + if (object.spaceUri != null) + message.spaceUri = String(object.spaceUri); return message; }; @@ -45733,6 +45778,8 @@ object.importMode = false; object.createTime = null; object.adminInstalled = false; + object.accessSettings = null; + object.spaceUri = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -45760,6 +45807,10 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.adminInstalled != null && message.hasOwnProperty("adminInstalled")) object.adminInstalled = message.adminInstalled; + if (message.accessSettings != null && message.hasOwnProperty("accessSettings")) + object.accessSettings = $root.google.chat.v1.Space.AccessSettings.toObject(message.accessSettings, options); + if (message.spaceUri != null && message.hasOwnProperty("spaceUri")) + object.spaceUri = message.spaceUri; return object; }; @@ -46068,6 +46119,273 @@ return SpaceDetails; })(); + Space.AccessSettings = (function() { + + /** + * Properties of an AccessSettings. + * @memberof google.chat.v1.Space + * @interface IAccessSettings + * @property {google.chat.v1.Space.AccessSettings.AccessState|null} [accessState] AccessSettings accessState + * @property {string|null} [audience] AccessSettings audience + */ + + /** + * Constructs a new AccessSettings. + * @memberof google.chat.v1.Space + * @classdesc Represents an AccessSettings. + * @implements IAccessSettings + * @constructor + * @param {google.chat.v1.Space.IAccessSettings=} [properties] Properties to set + */ + function AccessSettings(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]]; + } + + /** + * AccessSettings accessState. + * @member {google.chat.v1.Space.AccessSettings.AccessState} accessState + * @memberof google.chat.v1.Space.AccessSettings + * @instance + */ + AccessSettings.prototype.accessState = 0; + + /** + * AccessSettings audience. + * @member {string} audience + * @memberof google.chat.v1.Space.AccessSettings + * @instance + */ + AccessSettings.prototype.audience = ""; + + /** + * Creates a new AccessSettings instance using the specified properties. + * @function create + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {google.chat.v1.Space.IAccessSettings=} [properties] Properties to set + * @returns {google.chat.v1.Space.AccessSettings} AccessSettings instance + */ + AccessSettings.create = function create(properties) { + return new AccessSettings(properties); + }; + + /** + * Encodes the specified AccessSettings message. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages. + * @function encode + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {google.chat.v1.Space.IAccessSettings} message AccessSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessState != null && Object.hasOwnProperty.call(message, "accessState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.accessState); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audience); + return writer; + }; + + /** + * Encodes the specified AccessSettings message, length delimited. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {google.chat.v1.Space.IAccessSettings} message AccessSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessSettings message from the specified reader or buffer. + * @function decode + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.chat.v1.Space.AccessSettings} AccessSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessSettings.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.chat.v1.Space.AccessSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accessState = reader.int32(); + break; + } + case 3: { + message.audience = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.chat.v1.Space.AccessSettings} AccessSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessSettings message. + * @function verify + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessState != null && message.hasOwnProperty("accessState")) + switch (message.accessState) { + default: + return "accessState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + return null; + }; + + /** + * Creates an AccessSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {Object.} object Plain object + * @returns {google.chat.v1.Space.AccessSettings} AccessSettings + */ + AccessSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.chat.v1.Space.AccessSettings) + return object; + var message = new $root.google.chat.v1.Space.AccessSettings(); + switch (object.accessState) { + default: + if (typeof object.accessState === "number") { + message.accessState = object.accessState; + break; + } + break; + case "ACCESS_STATE_UNSPECIFIED": + case 0: + message.accessState = 0; + break; + case "PRIVATE": + case 1: + message.accessState = 1; + break; + case "DISCOVERABLE": + case 2: + message.accessState = 2; + break; + } + if (object.audience != null) + message.audience = String(object.audience); + return message; + }; + + /** + * Creates a plain object from an AccessSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {google.chat.v1.Space.AccessSettings} message AccessSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.accessState = options.enums === String ? "ACCESS_STATE_UNSPECIFIED" : 0; + object.audience = ""; + } + if (message.accessState != null && message.hasOwnProperty("accessState")) + object.accessState = options.enums === String ? $root.google.chat.v1.Space.AccessSettings.AccessState[message.accessState] === undefined ? message.accessState : $root.google.chat.v1.Space.AccessSettings.AccessState[message.accessState] : message.accessState; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + return object; + }; + + /** + * Converts this AccessSettings to JSON. + * @function toJSON + * @memberof google.chat.v1.Space.AccessSettings + * @instance + * @returns {Object.} JSON object + */ + AccessSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessSettings + * @function getTypeUrl + * @memberof google.chat.v1.Space.AccessSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.chat.v1.Space.AccessSettings"; + }; + + /** + * AccessState enum. + * @name google.chat.v1.Space.AccessSettings.AccessState + * @enum {number} + * @property {number} ACCESS_STATE_UNSPECIFIED=0 ACCESS_STATE_UNSPECIFIED value + * @property {number} PRIVATE=1 PRIVATE value + * @property {number} DISCOVERABLE=2 DISCOVERABLE value + */ + AccessSettings.AccessState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE"] = 1; + values[valuesById[2] = "DISCOVERABLE"] = 2; + return values; + })(); + + return AccessSettings; + })(); + return Space; })(); diff --git a/packages/google-chat/protos/protos.json b/packages/google-chat/protos/protos.json index a0837f051d23..ece51785c7f7 100644 --- a/packages/google-chat/protos/protos.json +++ b/packages/google-chat/protos/protos.json @@ -2754,7 +2754,7 @@ "ChatService": { "options": { "(google.api.default_host)": "chat.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly" + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly" }, "methods": { "CreateMessage": { @@ -4575,6 +4575,20 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "accessSettings": { + "type": "AccessSettings", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "spaceUri": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -4612,6 +4626,33 @@ "id": 2 } } + }, + "AccessSettings": { + "fields": { + "accessState": { + "type": "AccessState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audience": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AccessState": { + "values": { + "ACCESS_STATE_UNSPECIFIED": 0, + "PRIVATE": 1, + "DISCOVERABLE": 2 + } + } + } } } }, diff --git a/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js b/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js index a875c5b84c4e..78a8821b6e7d 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js +++ b/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Resource name of the attachment, in the form - * `spaces/* /messages/* /attachments/*`. + * `spaces/{space}/messages/{message}/attachments/{attachment}`. */ // const name = 'abc123' diff --git a/packages/google-chat/samples/generated/v1/chat_service.get_space.js b/packages/google-chat/samples/generated/v1/chat_service.get_space.js index b8a1d714e097..a9c882af8f7b 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.get_space.js +++ b/packages/google-chat/samples/generated/v1/chat_service.get_space.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Resource name of the space, in the form "spaces/*". + * Required. Resource name of the space, in the form `spaces/{space}`. * Format: `spaces/{space}` */ // const name = 'abc123' diff --git a/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js b/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js index 7d2877aba2af..39667b2983a2 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js +++ b/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js @@ -58,13 +58,18 @@ function main(parent) { * and type * (`member.type` (https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. - * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer + * Preview: You can also filter for `member.type` using the `!=` operator. * To filter by both role and type, use the `AND` operator. To filter by * either role or type, use the `OR` operator. + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. * For example, the following queries are valid: * ``` * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * member.type != "BOT" * ``` * The following queries are invalid: * ``` diff --git a/packages/google-chat/samples/generated/v1/chat_service.update_space.js b/packages/google-chat/samples/generated/v1/chat_service.update_space.js index fe72589a3458..a04e266f0c2a 100644 --- a/packages/google-chat/samples/generated/v1/chat_service.update_space.js +++ b/packages/google-chat/samples/generated/v1/chat_service.update_space.js @@ -53,17 +53,32 @@ function main(space) { * the display name is optional if the existing space already has the `SPACE` * type. Trying to update the space type in other ways results in an invalid * argument error). + * `space_type` is not supported with admin access. * - `space_details` * - `space_history_state` (Supports turning history on or off for the * space (https://support.google.com/chat/answer/7664687) if the organization * allows users to change their history * setting (https://support.google.com/a/answer/7664184). * Warning: mutually exclusive with all other field paths.) - * - Developer Preview: `access_settings.audience` (Supports changing the - * access setting (https://support.google.com/chat/answer/11971020) of a - * space. If no audience is specified in the access setting, the space's - * access setting is updated to restricted. Warning: mutually exclusive with - * all other field paths.) + * `space_history_state` is not supported with admin access. + * - `access_settings.audience` (Supports changing the access + * setting (https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in space. If + * no audience is specified in the access setting, the space's access setting + * is updated to private. Warning: mutually exclusive with all other field + * paths.) + * `access_settings.audience` is not supported with admin access. + * - Developer Preview: Supports changing the permission + * settings (https://support.google.com/chat/answer/13340792) of a space, + * supported field paths + * include: `permission_settings.manage_members_and_groups`, + * `permission_settings.modify_space_details`, + * `permission_settings.toggle_history`, + * `permission_settings.use_at_mention_all`, + * `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, + * `permission_settings.reply_messages` + * (Warning: mutually exclusive with all other non-permission settings field + * paths). `permission_settings` is not supported with admin access. */ // const updateMask = {} diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index c38d546e3fc9..6e3b4567cff0 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -142,7 +142,7 @@ "segments": [ { "start": 25, - "end": 118, + "end": 123, "type": "FULL" } ], @@ -451,7 +451,7 @@ "regionTag": "chat_v1_generated_ChatService_ListSpaces_async", "title": "ChatService listSpaces Sample", "origin": "API_DEFINITION", - "description": " Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", + "description": " Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) method using Workspace administrator privileges instead.", "canonical": true, "file": "chat_service.list_spaces.js", "language": "JAVASCRIPT", @@ -638,7 +638,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 102, "type": "FULL" } ], diff --git a/packages/google-chat/src/v1/chat_service_client.ts b/packages/google-chat/src/v1/chat_service_client.ts index 3a46d1fa67e2..a992ebc577a8 100644 --- a/packages/google-chat/src/v1/chat_service_client.ts +++ b/packages/google-chat/src/v1/chat_service_client.ts @@ -422,6 +422,11 @@ export class ChatServiceClient { */ static get scopes() { return [ + 'https://www.googleapis.com/auth/chat.admin.delete', + 'https://www.googleapis.com/auth/chat.admin.memberships', + 'https://www.googleapis.com/auth/chat.admin.memberships.readonly', + 'https://www.googleapis.com/auth/chat.admin.spaces', + 'https://www.googleapis.com/auth/chat.admin.spaces.readonly', 'https://www.googleapis.com/auth/chat.bot', 'https://www.googleapis.com/auth/chat.delete', 'https://www.googleapis.com/auth/chat.import', @@ -1037,7 +1042,7 @@ export class ChatServiceClient { * The request object that will be sent. * @param {string} request.name * Required. Resource name of the attachment, in the form - * `spaces/* /messages/* /attachments/*`. + * `spaces/{space}/messages/{message}/attachments/{attachment}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1222,7 +1227,7 @@ export class ChatServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the space, in the form "spaces/*". + * Required. Resource name of the space, in the form `spaces/{space}`. * * Format: `spaces/{space}` * @param {object} [options] @@ -1630,6 +1635,7 @@ export class ChatServiceClient { * the display name is optional if the existing space already has the `SPACE` * type. Trying to update the space type in other ways results in an invalid * argument error). + * `space_type` is not supported with admin access. * * - `space_details` * @@ -1638,12 +1644,27 @@ export class ChatServiceClient { * allows users to change their history * setting](https://support.google.com/a/answer/7664184). * Warning: mutually exclusive with all other field paths.) - * - * - Developer Preview: `access_settings.audience` (Supports changing the - * [access setting](https://support.google.com/chat/answer/11971020) of a - * space. If no audience is specified in the access setting, the space's - * access setting is updated to restricted. Warning: mutually exclusive with - * all other field paths.) + * `space_history_state` is not supported with admin access. + * + * - `access_settings.audience` (Supports changing the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in space. If + * no audience is specified in the access setting, the space's access setting + * is updated to private. Warning: mutually exclusive with all other field + * paths.) + * `access_settings.audience` is not supported with admin access. + * + * - Developer Preview: Supports changing the [permission + * settings](https://support.google.com/chat/answer/13340792) of a space, + * supported field paths + * include: `permission_settings.manage_members_and_groups`, + * `permission_settings.modify_space_details`, + * `permission_settings.toggle_history`, + * `permission_settings.use_at_mention_all`, + * `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, + * `permission_settings.reply_messages` + * (Warning: mutually exclusive with all other non-permission settings field + * paths). `permission_settings` is not supported with admin access. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3281,16 +3302,23 @@ export class ChatServiceClient { * * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. * - * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer + * Preview: You can also filter for `member.type` using the `!=` operator. * * To filter by both role and type, use the `AND` operator. To filter by * either role or type, use the `OR` operator. * + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * * For example, the following queries are valid: * * ``` * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * + * member.type != "BOT" * ``` * * The following queries are invalid: @@ -3300,7 +3328,6 @@ export class ChatServiceClient { * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" * ``` * - * * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` * error. * @param {boolean} [request.showGroups] @@ -3435,16 +3462,23 @@ export class ChatServiceClient { * * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. * - * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer + * Preview: You can also filter for `member.type` using the `!=` operator. * * To filter by both role and type, use the `AND` operator. To filter by * either role or type, use the `OR` operator. * + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * * For example, the following queries are valid: * * ``` * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * + * member.type != "BOT" * ``` * * The following queries are invalid: @@ -3454,7 +3488,6 @@ export class ChatServiceClient { * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" * ``` * - * * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` * error. * @param {boolean} [request.showGroups] @@ -3545,16 +3578,23 @@ export class ChatServiceClient { * * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. * - * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer + * Preview: You can also filter for `member.type` using the `!=` operator. * * To filter by both role and type, use the `AND` operator. To filter by * either role or type, use the `OR` operator. * + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * * For example, the following queries are valid: * * ``` * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * + * member.type != "BOT" * ``` * * The following queries are invalid: @@ -3564,7 +3604,6 @@ export class ChatServiceClient { * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" * ``` * - * * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` * error. * @param {boolean} [request.showGroups] @@ -3634,6 +3673,9 @@ export class ChatServiceClient { * Lists spaces visible to the caller or authenticated user. Group chats * and DMs aren't listed until the first message is sent. * + * To list all named spaces by Google Workspace organization, use the + * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) + * method using Workspace administrator privileges instead. * * @param {Object} request * The request object that will be sent. From b0dc1b2ef66334394613c6e92a4c5b0ebb8e0faf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:49:25 -0400 Subject: [PATCH 12/17] feat: [discoveryengine] add Chunk resource in the search response (#5526) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Chunk resource in the search response feat: add NO_RELEVANT_CONTENT to Answer API feat: support AlloyDB Connector docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 649156977 Source-Link: https://github.com/googleapis/googleapis/commit/ff081c977ecd64c60e31d365a05f2cb17d0b8b0b Source-Link: https://github.com/googleapis/googleapis-gen/commit/bbee86257e17d550e7956d42a95d9c1fe5021c88 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiYmJlZTg2MjU3ZTE3ZDU1MGU3OTU2ZDQyYTk1ZDljMWZlNTAyMWM4OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-discoveryengine/README.md | 2 + .../cloud/discoveryengine/v1/answer.proto | 13 + .../cloud/discoveryengine/v1/chunk.proto | 119 + .../cloud/discoveryengine/v1/common.proto | 5 - .../cloud/discoveryengine/v1/completion.proto | 31 + .../v1/completion_service.proto | 38 + .../v1/conversational_search_service.proto | 35 + .../cloud/discoveryengine/v1/document.proto | 2 +- .../v1/document_processing_config.proto | 39 +- .../discoveryengine/v1/import_config.proto | 108 + .../discoveryengine/v1/purge_config.proto | 38 + .../discoveryengine/v1/search_service.proto | 204 +- .../v1/user_event_service.proto | 3 + .../protos/protos.d.ts | 5378 ++-- .../protos/protos.js | 22269 ++++++++++------ .../protos/protos.json | 556 +- .../samples/README.md | 36 + ...n_service.import_completion_suggestions.js | 80 + ...on_service.purge_completion_suggestions.js | 64 + ...versational_search_service.answer_query.js | 18 + .../v1/document_service.import_documents.js | 4 + .../generated/v1/search_service.search.js | 43 + ...adata_google.cloud.discoveryengine.v1.json | 126 +- .../src/v1/completion_service_client.ts | 597 + .../v1/completion_service_client_config.json | 10 + .../src/v1/completion_service_proto_list.json | 1 + .../src/v1/control_service_client.ts | 268 + .../src/v1/control_service_proto_list.json | 1 + .../conversational_search_service_client.ts | 286 + ...versational_search_service_proto_list.json | 1 + .../src/v1/data_store_service_client.ts | 268 + .../src/v1/data_store_service_proto_list.json | 1 + .../src/v1/document_service_client.ts | 270 + .../src/v1/document_service_proto_list.json | 1 + .../src/v1/engine_service_client.ts | 268 + .../src/v1/engine_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 20 + .../v1/grounded_generation_service_client.ts | 268 + ...rounded_generation_service_proto_list.json | 1 + .../src/v1/project_service_client.ts | 268 + .../src/v1/project_service_proto_list.json | 1 + .../src/v1/rank_service_client.ts | 268 + .../src/v1/rank_service_proto_list.json | 1 + .../src/v1/recommendation_service_client.ts | 268 + .../v1/recommendation_service_proto_list.json | 1 + .../src/v1/schema_service_client.ts | 268 + .../src/v1/schema_service_proto_list.json | 1 + .../src/v1/search_service_client.ts | 391 + .../src/v1/search_service_proto_list.json | 1 + .../v1/site_search_engine_service_client.ts | 268 + ...site_search_engine_service_proto_list.json | 1 + .../src/v1/user_event_service_client.ts | 268 + .../src/v1/user_event_service_proto_list.json | 1 + .../test/gapic_completion_service_v1.ts | 706 + .../test/gapic_control_service_v1.ts | 310 + .../gapic_conversational_search_service_v1.ts | 316 + .../test/gapic_data_store_service_v1.ts | 310 + .../test/gapic_document_service_v1.ts | 310 + .../test/gapic_engine_service_v1.ts | 310 + .../gapic_grounded_generation_service_v1.ts | 312 + .../test/gapic_project_service_v1.ts | 310 + .../test/gapic_rank_service_v1.ts | 310 + .../test/gapic_recommendation_service_v1.ts | 312 + .../test/gapic_schema_service_v1.ts | 310 + .../test/gapic_search_service_v1.ts | 310 + .../gapic_site_search_engine_service_v1.ts | 312 + .../test/gapic_user_event_service_v1.ts | 310 + 67 files changed, 28464 insertions(+), 9763 deletions(-) create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js diff --git a/packages/google-cloud-discoveryengine/README.md b/packages/google-cloud-discoveryengine/README.md index 3f96c07417f2..b5a1c9265923 100644 --- a/packages/google-cloud-discoveryengine/README.md +++ b/packages/google-cloud-discoveryengine/README.md @@ -126,7 +126,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js,packages/google-cloud-discoveryengine/samples/README.md) | +| Completion_service.import_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) | | Completion_service.import_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) | +| Completion_service.purge_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) | | Completion_service.purge_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) | | Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js,packages/google-cloud-discoveryengine/samples/README.md) | | Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js,packages/google-cloud-discoveryengine/samples/README.md) | diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto index c555f66e87b8..f24e88174ed4 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/answer.proto @@ -188,6 +188,13 @@ message Answer { // If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, // populate chunk info. repeated ChunkInfo chunk_info = 5; + + // Data representation. + // The structured JSON data for the document. + // It's populated from the struct data from the Document (code + // pointer: http://shortn/_objzAfIiHq), or the Chunk in search result + // (code pointer: http://shortn/_Ipo6KFFGBL). + google.protobuf.Struct struct_data = 6; } // Search results observed by the search action, it can be snippets info @@ -296,6 +303,12 @@ message Answer { // Google skips the answer if there is a potential policy violation // detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4; + + // The no relevant content case. + // + // Google skips the answer if there is no relevant content in the + // retrieved search results. + NO_RELEVANT_CONTENT = 5; } // Immutable. Fully qualified name diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto new file mode 100644 index 000000000000..06541029e659 --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/chunk.proto @@ -0,0 +1,119 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "ChunkProto"; +option java_package = "com.google.cloud.discoveryengine.v1"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1"; + +// Chunk captures all raw metadata information of items to be recommended or +// searched in the chunk mode. +message Chunk { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Chunk" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + }; + + // Document metadata contains the information of the document of the current + // chunk. + message DocumentMetadata { + // Uri of the document. + string uri = 1; + + // Title of the document. + string title = 2; + + // Data representation. + // The structured JSON data for the document. It should conform to the + // registered [Schema][google.cloud.discoveryengine.v1.Schema] or an + // `INVALID_ARGUMENT` error is thrown. + google.protobuf.Struct struct_data = 3; + } + + // Page span of the chunk. + message PageSpan { + // The start page of the chunk. + int32 page_start = 1; + + // The end page of the chunk. + int32 page_end = 2; + } + + // Metadata of the current chunk. This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + message ChunkMetadata { + // The previous chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + repeated Chunk previous_chunks = 1; + + // The next chunks of the current chunk. The number is controlled by + // [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks]. + // This field is only populated on + // [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] + // API. + repeated Chunk next_chunks = 2; + } + + // The full resource name of the chunk. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1; + + // Unique chunk ID of the current chunk. + string id = 2; + + // Content is a string from a document (parsed content). + string content = 3; + + // Output only. Represents the relevance score based on similarity. + // Higher score indicates higher chunk relevance. + // The score is in range [-1.0, 1.0]. + // Only populated on [SearchService.SearchResponse][]. + optional double relevance_score = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Metadata of the document from the current chunk. + DocumentMetadata document_metadata = 5; + + // Output only. This field is OUTPUT_ONLY. + // It contains derived data that are not in the original input document. + google.protobuf.Struct derived_struct_data = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Page span of the chunk. + PageSpan page_span = 6; + + // Output only. Metadata of the current chunk. + ChunkMetadata chunk_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto index 06bf007b9235..f4891639aa52 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/common.proto @@ -57,11 +57,6 @@ option (google.api.resource_definition) = { type: "healthcare.googleapis.com/FhirStore" pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" }; -option (google.api.resource_definition) = { - type: "discoveryengine.googleapis.com/Chunk" - pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" - pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" -}; // The industry vertical associated with the // [DataStore][google.cloud.discoveryengine.v1.DataStore]. diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto index 1c5c6a6eca38..17fbd56bbb02 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion.proto @@ -50,3 +50,34 @@ message SuggestionDenyListEntry { // exact phrase, or block any suggestions containing this phrase. MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED]; } + +// Autocomplete suggestions that are imported from Customer. +message CompletionSuggestion { + // Ranking metrics of this suggestion. + oneof ranking_info { + // Global score of this suggestion. Control how this suggestion would be + // scored / ranked. + double global_score = 2; + + // Frequency of this suggestion. Will be used to rank suggestions when score + // is not available. + int64 frequency = 3; + } + + // Required. The suggestion text. + string suggestion = 1 [(google.api.field_behavior) = REQUIRED]; + + // BCP-47 language code of this suggestion. + string language_code = 4; + + // If two suggestions have the same groupId, they will not be + // returned together. Instead the one ranked higher will be returned. This can + // be used to deduplicate semantically identical suggestions. + string group_id = 5; + + // The score of this suggestion within its group. + double group_score = 6; + + // Alternative matching phrases for this suggestion. + repeated string alternative_phrases = 7; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto index 72c8eb86eede..c498a2db9519 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/completion_service.proto @@ -86,6 +86,44 @@ service CompletionService { metadata_type: "google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata" }; } + + // Imports + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // for a DataStore. + rpc ImportCompletionSuggestions(ImportCompletionSuggestionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse" + metadata_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + }; + } + + // Permanently deletes all + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // for a DataStore. + rpc PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse" + metadata_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + }; + } } // Request message for diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto index e8f57b2576f9..7bb0bc12c739 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto @@ -583,6 +583,17 @@ message AnswerQueryRequest { // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. string order_by = 4; + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is + // specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + // See [parse and chunk + // documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + // Specs defining dataStores to filter on in a search call and // configurations for those dataStores. This is only considered for // engines with multiple dataStores use case. For single dataStore within @@ -706,6 +717,11 @@ message AnswerQueryRequest { message QueryRephraserSpec { // Disable query rephraser. bool disable = 1; + + // Max rephrase steps. + // The max number is 5 steps. + // If not set or set to < 1, it will be set to 1 by default. + int32 max_rephrase_steps = 2; } // Query classification specification. @@ -777,6 +793,25 @@ message AnswerQueryRequest { // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. string user_pseudo_id = 12; + + // The user labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Google Cloud + // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map user_labels = 13; } // Response message for diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto index d6fbcec3dcf6..5c9af32e8e03 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document.proto @@ -54,7 +54,7 @@ message Document { // The URI of the content. Only Cloud Storage URIs (e.g. // `gs://bucket-name/path/to/file`) are supported. The maximum file size - // is 2.5 MB for text-based formats, 100 MB for other formats. + // is 2.5 MB for text-based formats, 200 MB for other formats. string uri = 3; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto index e9ab67ef89b7..cef0e861db4d 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/document_processing_config.proto @@ -41,6 +41,30 @@ message DocumentProcessingConfig { pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig" }; + // Configuration for chunking config. + message ChunkingConfig { + // Configuration for the layout based chunking. + message LayoutBasedChunkingConfig { + // The token size limit for each chunk. + // + // Supported values: 100-500 (inclusive). + // Default value: 500. + int32 chunk_size = 1; + + // Whether to include appending different levels of headings to chunks + // from the middle of the document to prevent context loss. + // + // Default value: False. + bool include_ancestor_headings = 2; + } + + // Additional configs that defines the behavior of the chunking. + oneof chunk_mode { + // Configuration for the layout based chunking. + LayoutBasedChunkingConfig layout_based_chunking_config = 1; + } + } + // Related configurations applied to a specific type of document parser. message ParsingConfig { // The digital parsing configurations for documents. @@ -57,6 +81,9 @@ message DocumentProcessingConfig { bool use_native_text = 2; } + // The layout parsing configurations for documents. + message LayoutParsingConfig {} + // Configs for document processing types. oneof type_dedicated_config { // Configurations applied to digital parser. @@ -65,6 +92,9 @@ message DocumentProcessingConfig { // Configurations applied to OCR parser. Currently it only applies to // PDFs. OcrParsingConfig ocr_parsing_config = 2; + + // Configurations applied to layout parser. + LayoutParsingConfig layout_parsing_config = 3; } } @@ -73,6 +103,9 @@ message DocumentProcessingConfig { // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. string name = 1; + // Whether chunking mode is enabled. + ChunkingConfig chunking_config = 3; + // Configurations for default Document parser. // If not specified, we will configure it as default DigitalParsingConfig, and // the default parsing config will be applied to all file types for Document @@ -85,8 +118,10 @@ message DocumentProcessingConfig { // * `pdf`: Override parsing config for PDF files, either digital parsing, ocr // parsing or layout parsing is supported. // * `html`: Override parsing config for HTML files, only digital parsing and - // or layout parsing are supported. + // layout parsing are supported. // * `docx`: Override parsing config for DOCX files, only digital parsing and - // or layout parsing are supported. + // layout parsing are supported. + // * `pptx`: Override parsing config for PPTX files, only digital parsing and + // layout parsing are supported. map parsing_config_overrides = 5; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto index 386f22ac444a..171a0c1dc8ec 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/import_config.proto @@ -325,6 +325,38 @@ message CloudSqlSource { bool offload = 6; } +// AlloyDB source import data from. +message AlloyDbSource { + // The project ID that the AlloyDB source is in + // with a length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + string project_id = 1; + + // Required. The AlloyDB location to copy the data from with a length limit of + // 256 characters. + string location_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB cluster to copy the data from with a length limit of + // 256 characters. + string cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB database to copy the data from with a length limit of + // 256 characters. + string database_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB table to copy the data from with a length limit of + // 256 characters. + string table_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // AlloyDB export to a specific Cloud Storage directory. + // + // Ensure that the AlloyDB service account has the necessary Cloud + // Storage Admin permissions to access the specified Cloud Storage directory. + string gcs_staging_dir = 6; +} + // Firestore source import data from. message FirestoreSource { // The project ID that the Cloud SQL source is in with a length limit of 128 @@ -498,6 +530,9 @@ message ImportDocumentsRequest { // Firestore input source. FirestoreSource firestore_source = 13; + // AlloyDB input source. + AlloyDbSource alloy_db_source = 14; + // Cloud Bigtable input source. BigtableSource bigtable_source = 15; } @@ -662,3 +697,76 @@ message ImportSuggestionDenyListEntriesMetadata { // finish time. google.protobuf.Timestamp update_time = 2; } + +// Request message for +// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] +// method. +message ImportCompletionSuggestionsRequest { + // The inline source for CompletionSuggestions. + message InlineSource { + // Required. A list of all denylist entries to import. Max of 1000 items. + repeated CompletionSuggestion suggestions = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // The source of the autocomplete suggestions. + oneof source { + // The Inline source for suggestion entries. + InlineSource inline_source = 2; + + // Cloud Storage location for the input content. + GcsSource gcs_source = 3; + + // BigQuery input source. + BigQuerySource bigquery_source = 4; + } + + // Required. The parent data store resource name for which to import customer + // autocomplete suggestions. + // + // Follows pattern `projects/*/locations/*/collections/*/dataStores/*` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // The desired location of errors incurred during the Import. + ImportErrorConfig error_config = 5; +} + +// Response of the +// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions] +// method. If the long running operation is done, this message is returned by +// the google.longrunning.Operations.response field if the operation is +// successful. +message ImportCompletionSuggestionsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // The desired location of errors incurred during the Import. + ImportErrorConfig error_config = 2; +} + +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message ImportCompletionSuggestionsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // successfully imported. + int64 success_count = 3; + + // Count of + // [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s + // that failed to be imported. + int64 failure_count = 4; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto index 2db39b26d00b..2101b6952649 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/purge_config.proto @@ -125,3 +125,41 @@ message PurgeSuggestionDenyListEntriesMetadata { // finish time. google.protobuf.Timestamp update_time = 2; } + +// Request message for +// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] +// method. +message PurgeCompletionSuggestionsRequest { + // Required. The parent data store resource name for which to purge completion + // suggestions. Follows pattern + // projects/*/locations/*/collections/*/dataStores/*. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; +} + +// Response message for +// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions] +// method. +message PurgeCompletionSuggestionsResponse { + // Whether the completion suggestions were successfully purged. + bool purge_succeeded = 1; + + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 2; +} + +// Metadata related to the progress of the PurgeCompletionSuggestions +// operation. This is returned by the google.longrunning.Operation.metadata +// field. +message PurgeCompletionSuggestionsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto index 098a4b67ca6b..290f1e4550fa 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/search_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1/chunk.proto"; import "google/cloud/discoveryengine/v1/common.proto"; import "google/cloud/discoveryengine/v1/document.proto"; import "google/protobuf/struct.proto"; @@ -70,8 +71,8 @@ message SearchRequest { } // A struct to define data stores to filter on in a search call and - // configurations for those data stores. A maximum of 1 DataStoreSpec per - // data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + // configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` + // error is returned. message DataStoreSpec { // Required. Full resource name of // [DataStore][google.cloud.discoveryengine.v1.DataStore], such as @@ -150,6 +151,9 @@ message SearchRequest { // Maximum facet values that are returned for this facet. If // unspecified, defaults to 20. The maximum allowed value is 300. Values // above 300 are coerced to 300. + // For aggregation in healthcare search, when the [FacetKey.key] is + // "healthcare_aggregation_key", the limit will be overridden to + // 10,000 internally, regardless of the value set here. // // If this field is negative, an `INVALID_ARGUMENT` is returned. int32 limit = 2; @@ -367,8 +371,9 @@ message SearchRequest { // // At most 10 results for documents mode, or 50 for chunks mode, can be // used to generate a summary. The chunks mode is used when - // [SearchRequest.ContentSearchSpec.search_result_mode][] is set to - // [CHUNKS][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. int32 summary_result_count = 1; // Specifies whether to include citations in the summary. The default @@ -491,6 +496,41 @@ message SearchRequest { int32 num_next_segments = 5; } + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + message ChunkSpec { + // The number of previous chunks to be returned of the current chunk. The + // maximum allowed value is 3. + // If not specified, no previous chunks will be returned. + int32 num_previous_chunks = 1; + + // The number of next chunks to be returned of the current chunk. The + // maximum allowed value is 3. + // If not specified, no next chunks will be returned. + int32 num_next_chunks = 2; + } + + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + enum SearchResultMode { + // Default value. + SEARCH_RESULT_MODE_UNSPECIFIED = 0; + + // Returns documents in the search result. + DOCUMENTS = 1; + + // Returns chunks in the search result. Only available if the + // [DataStore.DocumentProcessingConfig.chunking_config][] is specified. + CHUNKS = 2; + } + // If `snippetSpec` is not specified, snippets are not included in the // search response. SnippetSpec snippet_spec = 1; @@ -502,6 +542,85 @@ message SearchRequest { // If there is no extractive_content_spec provided, there will be no // extractive answer in the search response. ExtractiveContentSpec extractive_content_spec = 3; + + // Specifies the search result mode. If unspecified, the + // search result mode is based on + // [DataStore.DocumentProcessingConfig.chunking_config][]: + // * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified, + // it defaults to `CHUNKS`. + // * Otherwise, it defaults to `DOCUMENTS`. + SearchResultMode search_result_mode = 4; + + // Specifies the chunk spec to be returned from the search response. + // Only available if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] + ChunkSpec chunk_spec = 5; + } + + // Specification for search as you type in search requests. + message SearchAsYouTypeSpec { + // Enum describing under which condition search as you type should occur. + enum Condition { + // Server behavior defaults to + // [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + CONDITION_UNSPECIFIED = 0; + + // Disables Search As You Type. + DISABLED = 1; + + // Enables Search As You Type. + ENABLED = 2; + } + + // The condition under which search as you type should occur. + // Default to + // [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED]. + Condition condition = 1; + } + + // Session specification. + // + // Multi-turn Search feature is currently at private GA stage. Please use + // v1alpha or v1beta version instead before we launch this feature to public + // GA. Or ask for allowlisting through Google Support team. + message SessionSpec { + // If set, the search result gets stored to the "turn" specified by this + // query ID. + // + // Example: Let's say the session looks like this: + // session { + // name: ".../sessions/xxx" + // turns { + // query { text: "What is foo?" query_id: ".../questions/yyy" } + // answer: "Foo is ..." + // } + // turns { + // query { text: "How about bar then?" query_id: ".../questions/zzz" } + // } + // } + // + // The user can call /search API with a request like this: + // + // session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } + // + // Then, the API stores the search result, associated with the last turn. + // The stored search result can be used by a subsequent /answer API call + // (with the session ID and the query ID specified). Also, it is possible + // to call /search and /answer in parallel with the same session ID & query + // ID. + string query_id = 1; + + // The number of top search results to persist. The persisted search results + // can be used for the subsequent /answer api call. + // + // This field is simliar to the `summary_result_count` field in + // [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. + // + // At most 10 results for documents mode, or 50 for chunks mode. + optional int32 search_result_persistence_count = 2; } // Required. The resource name of the Search serving config, such as @@ -617,6 +736,13 @@ message SearchRequest { // is used to deduce `device_type` for analytics. UserInfo user_info = 21; + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see [Standard + // fields](https://cloud.google.com/apis/design/standard_fields). This field + // helps to better interpret the query. If a value isn't specified, the query + // language code is automatically detected, which may not be accurate. + string language_code = 35; + // Facet specifications for faceted search. If empty, no facets are returned. // // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` @@ -694,6 +820,46 @@ message SearchRequest { // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. map user_labels = 22; + + // Search as you type configuration. Only supported for the + // [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1.IndustryVertical.MEDIA] + // vertical. + SearchAsYouTypeSpec search_as_you_type_spec = 31; + + // The session resource name. Optional. + // + // Session allows users to do multi-turn /search API calls or coordination + // between /search API calls and /answer API calls. + // + // Example #1 (multi-turn /search API calls): + // 1. Call /search API with the auto-session mode (see below). + // 2. Call /search API with the session ID generated in the first call. + // Here, the previous search query gets considered in query + // standing. I.e., if the first query is "How did Alphabet do in 2022?" + // and the current query is "How about 2023?", the current query will + // be interpreted as "How did Alphabet do in 2023?". + // + // Example #2 (coordination between /search API calls and /answer API calls): + // 1. Call /search API with the auto-session mode (see below). + // 2. Call /answer API with the session ID generated in the first call. + // Here, the answer generation happens in the context of the search + // results from the first search call. + // + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. + // + // Multi-turn Search feature is currently at private GA stage. Please use + // v1alpha or v1beta version instead before we launch this feature to public + // GA. Or ask for allowlisting through Google Support team. + string session = 41 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Session" + }]; + + // Session specification. + // + // Can be used only when `session` is set. + SessionSpec session_spec = 42; } // Response message for @@ -709,6 +875,12 @@ message SearchResponse { // The document data snippet in the search response. Only fields that are // marked as `retrievable` are populated. Document document = 2; + + // The chunk data in the search response if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + Chunk chunk = 18; } // A facet result. @@ -890,6 +1062,23 @@ message SearchResponse { int64 pinned_result_count = 2; } + // Information about the session. + message SessionInfo { + // Name of the session. + // If the auto-session mode is used (when + // [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] + // ends with "-"), this field holds the newly generated session name. + string name = 1; + + // Query ID that corresponds to this search API call. + // One session can have multiple turns, each with a unique query ID. + // + // By specifying the session name and this query ID in the Answer API call, + // the answer generation happens in the context of the search results from + // this search call. + string query_id = 2; + } + // A list of matched documents. The order represents the ranking. repeated SearchResult results = 1; @@ -936,4 +1125,11 @@ message SearchResponse { // Query expansion information for the returned results. QueryExpansionInfo query_expansion_info = 14; + + // Session information. + // + // Only set if + // [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session] + // is provided. See its description for more details. + SessionInfo session_info = 19; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto index 942912ee0d3d..7ec0f7ca6337 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1/user_event_service.proto @@ -67,6 +67,9 @@ service UserEventService { additional_bindings { get: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/userEvents:collect" + } }; } diff --git a/packages/google-cloud-discoveryengine/protos/protos.d.ts b/packages/google-cloud-discoveryengine/protos/protos.d.ts index 175cc758ead3..30d1e8a47d17 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.d.ts +++ b/packages/google-cloud-discoveryengine/protos/protos.d.ts @@ -1407,6 +1407,9 @@ export namespace google { /** SearchResult chunkInfo */ chunkInfo?: (google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.IChunkInfo[]|null); + + /** SearchResult structData */ + structData?: (google.protobuf.IStruct|null); } /** Represents a SearchResult. */ @@ -1433,6 +1436,9 @@ export namespace google { /** SearchResult chunkInfo. */ public chunkInfo: google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.IChunkInfo[]; + /** SearchResult structData. */ + public structData?: (google.protobuf.IStruct|null); + /** * Creates a new SearchResult instance using the specified properties. * @param [properties] Properties to set @@ -1967,256 +1973,717 @@ export namespace google { ADVERSARIAL_QUERY_IGNORED = 1, NON_ANSWER_SEEKING_QUERY_IGNORED = 2, OUT_OF_DOMAIN_QUERY_IGNORED = 3, - POTENTIAL_POLICY_VIOLATION = 4 + POTENTIAL_POLICY_VIOLATION = 4, + NO_RELEVANT_CONTENT = 5 } } - /** IndustryVertical enum. */ - enum IndustryVertical { - INDUSTRY_VERTICAL_UNSPECIFIED = 0, - GENERIC = 1, - MEDIA = 2, - HEALTHCARE_FHIR = 7 - } - - /** SolutionType enum. */ - enum SolutionType { - SOLUTION_TYPE_UNSPECIFIED = 0, - SOLUTION_TYPE_RECOMMENDATION = 1, - SOLUTION_TYPE_SEARCH = 2, - SOLUTION_TYPE_CHAT = 3, - SOLUTION_TYPE_GENERATIVE_CHAT = 4 - } + /** Properties of a Chunk. */ + interface IChunk { - /** SearchUseCase enum. */ - enum SearchUseCase { - SEARCH_USE_CASE_UNSPECIFIED = 0, - SEARCH_USE_CASE_SEARCH = 1, - SEARCH_USE_CASE_BROWSE = 2 - } + /** Chunk name */ + name?: (string|null); - /** SearchTier enum. */ - enum SearchTier { - SEARCH_TIER_UNSPECIFIED = 0, - SEARCH_TIER_STANDARD = 1, - SEARCH_TIER_ENTERPRISE = 2 - } + /** Chunk id */ + id?: (string|null); - /** SearchAddOn enum. */ - enum SearchAddOn { - SEARCH_ADD_ON_UNSPECIFIED = 0, - SEARCH_ADD_ON_LLM = 1 - } + /** Chunk content */ + content?: (string|null); - /** Properties of an Interval. */ - interface IInterval { + /** Chunk relevanceScore */ + relevanceScore?: (number|null); - /** Interval minimum */ - minimum?: (number|null); + /** Chunk documentMetadata */ + documentMetadata?: (google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null); - /** Interval exclusiveMinimum */ - exclusiveMinimum?: (number|null); + /** Chunk derivedStructData */ + derivedStructData?: (google.protobuf.IStruct|null); - /** Interval maximum */ - maximum?: (number|null); + /** Chunk pageSpan */ + pageSpan?: (google.cloud.discoveryengine.v1.Chunk.IPageSpan|null); - /** Interval exclusiveMaximum */ - exclusiveMaximum?: (number|null); + /** Chunk chunkMetadata */ + chunkMetadata?: (google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null); } - /** Represents an Interval. */ - class Interval implements IInterval { + /** Represents a Chunk. */ + class Chunk implements IChunk { /** - * Constructs a new Interval. + * Constructs a new Chunk. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IInterval); + constructor(properties?: google.cloud.discoveryengine.v1.IChunk); - /** Interval minimum. */ - public minimum?: (number|null); + /** Chunk name. */ + public name: string; - /** Interval exclusiveMinimum. */ - public exclusiveMinimum?: (number|null); + /** Chunk id. */ + public id: string; - /** Interval maximum. */ - public maximum?: (number|null); + /** Chunk content. */ + public content: string; - /** Interval exclusiveMaximum. */ - public exclusiveMaximum?: (number|null); + /** Chunk relevanceScore. */ + public relevanceScore?: (number|null); - /** Interval min. */ - public min?: ("minimum"|"exclusiveMinimum"); + /** Chunk documentMetadata. */ + public documentMetadata?: (google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null); - /** Interval max. */ - public max?: ("maximum"|"exclusiveMaximum"); + /** Chunk derivedStructData. */ + public derivedStructData?: (google.protobuf.IStruct|null); + + /** Chunk pageSpan. */ + public pageSpan?: (google.cloud.discoveryengine.v1.Chunk.IPageSpan|null); + + /** Chunk chunkMetadata. */ + public chunkMetadata?: (google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null); + + /** Chunk _relevanceScore. */ + public _relevanceScore?: "relevanceScore"; /** - * Creates a new Interval instance using the specified properties. + * Creates a new Chunk instance using the specified properties. * @param [properties] Properties to set - * @returns Interval instance + * @returns Chunk instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IInterval): google.cloud.discoveryengine.v1.Interval; + public static create(properties?: google.cloud.discoveryengine.v1.IChunk): google.cloud.discoveryengine.v1.Chunk; /** - * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode + * Encodes the specified Chunk message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. + * @param message Chunk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IChunk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. - * @param message Interval message or plain object to encode + * Encodes the specified Chunk message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. + * @param message Chunk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IChunk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Interval message from the specified reader or buffer. + * Decodes a Chunk message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Interval + * @returns Chunk * @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.cloud.discoveryengine.v1.Interval; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.Chunk; /** - * Decodes an Interval message from the specified reader or buffer, length delimited. + * Decodes a Chunk message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Interval + * @returns Chunk * @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.cloud.discoveryengine.v1.Interval; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Chunk; /** - * Verifies an Interval message. + * Verifies a Chunk 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 Interval message from a plain object. Also converts values to their respective internal types. + * Creates a Chunk message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Interval + * @returns Chunk */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Interval; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk; /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. - * @param message Interval + * Creates a plain object from a Chunk message. Also converts values to other types if specified. + * @param message Chunk * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.Chunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Interval to JSON. + * Converts this Chunk to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Interval + * Gets the default type url for Chunk * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomAttribute. */ - interface ICustomAttribute { + namespace Chunk { - /** CustomAttribute text */ - text?: (string[]|null); + /** Properties of a DocumentMetadata. */ + interface IDocumentMetadata { - /** CustomAttribute numbers */ - numbers?: (number[]|null); - } + /** DocumentMetadata uri */ + uri?: (string|null); - /** Represents a CustomAttribute. */ - class CustomAttribute implements ICustomAttribute { + /** DocumentMetadata title */ + title?: (string|null); - /** - * Constructs a new CustomAttribute. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.ICustomAttribute); + /** DocumentMetadata structData */ + structData?: (google.protobuf.IStruct|null); + } - /** CustomAttribute text. */ - public text: string[]; + /** Represents a DocumentMetadata. */ + class DocumentMetadata implements IDocumentMetadata { - /** CustomAttribute numbers. */ - public numbers: number[]; + /** + * Constructs a new DocumentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata); - /** - * Creates a new CustomAttribute instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomAttribute instance - */ - public static create(properties?: google.cloud.discoveryengine.v1.ICustomAttribute): google.cloud.discoveryengine.v1.CustomAttribute; + /** DocumentMetadata uri. */ + public uri: string; - /** - * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @param message CustomAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + /** DocumentMetadata title. */ + public title: string; - /** - * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @param message CustomAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + /** DocumentMetadata structData. */ + public structData?: (google.protobuf.IStruct|null); - /** - * Decodes a CustomAttribute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomAttribute - * @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.cloud.discoveryengine.v1.CustomAttribute; + /** + * Creates a new DocumentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; - /** - * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomAttribute - * @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.cloud.discoveryengine.v1.CustomAttribute; + /** + * Encodes the specified DocumentMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @param message DocumentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CustomAttribute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified DocumentMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @param message DocumentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomAttribute - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CustomAttribute; + /** + * Decodes a DocumentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentMetadata + * @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.cloud.discoveryengine.v1.Chunk.DocumentMetadata; - /** - * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. - * @param message CustomAttribute - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a DocumentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentMetadata + * @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.cloud.discoveryengine.v1.Chunk.DocumentMetadata; + + /** + * Verifies a DocumentMetadata 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 DocumentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.DocumentMetadata; + + /** + * Creates a plain object from a DocumentMetadata message. Also converts values to other types if specified. + * @param message DocumentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.DocumentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PageSpan. */ + interface IPageSpan { + + /** PageSpan pageStart */ + pageStart?: (number|null); + + /** PageSpan pageEnd */ + pageEnd?: (number|null); + } + + /** Represents a PageSpan. */ + class PageSpan implements IPageSpan { + + /** + * Constructs a new PageSpan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IPageSpan); + + /** PageSpan pageStart. */ + public pageStart: number; + + /** PageSpan pageEnd. */ + public pageEnd: number; + + /** + * Creates a new PageSpan instance using the specified properties. + * @param [properties] Properties to set + * @returns PageSpan instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IPageSpan): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Encodes the specified PageSpan message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @param message PageSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IPageSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PageSpan message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @param message PageSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IPageSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PageSpan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PageSpan + * @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.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Decodes a PageSpan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PageSpan + * @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.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Verifies a PageSpan 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 PageSpan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageSpan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.PageSpan; + + /** + * Creates a plain object from a PageSpan message. Also converts values to other types if specified. + * @param message PageSpan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.PageSpan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PageSpan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PageSpan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChunkMetadata. */ + interface IChunkMetadata { + + /** ChunkMetadata previousChunks */ + previousChunks?: (google.cloud.discoveryengine.v1.IChunk[]|null); + + /** ChunkMetadata nextChunks */ + nextChunks?: (google.cloud.discoveryengine.v1.IChunk[]|null); + } + + /** Represents a ChunkMetadata. */ + class ChunkMetadata implements IChunkMetadata { + + /** + * Constructs a new ChunkMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata); + + /** ChunkMetadata previousChunks. */ + public previousChunks: google.cloud.discoveryengine.v1.IChunk[]; + + /** ChunkMetadata nextChunks. */ + public nextChunks: google.cloud.discoveryengine.v1.IChunk[]; + + /** + * Creates a new ChunkMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Encodes the specified ChunkMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @param message ChunkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @param message ChunkMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.Chunk.IChunkMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkMetadata + * @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.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkMetadata + * @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.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Verifies a ChunkMetadata 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 ChunkMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Chunk.ChunkMetadata; + + /** + * Creates a plain object from a ChunkMetadata message. Also converts values to other types if specified. + * @param message ChunkMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Chunk.ChunkMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** IndustryVertical enum. */ + enum IndustryVertical { + INDUSTRY_VERTICAL_UNSPECIFIED = 0, + GENERIC = 1, + MEDIA = 2, + HEALTHCARE_FHIR = 7 + } + + /** SolutionType enum. */ + enum SolutionType { + SOLUTION_TYPE_UNSPECIFIED = 0, + SOLUTION_TYPE_RECOMMENDATION = 1, + SOLUTION_TYPE_SEARCH = 2, + SOLUTION_TYPE_CHAT = 3, + SOLUTION_TYPE_GENERATIVE_CHAT = 4 + } + + /** SearchUseCase enum. */ + enum SearchUseCase { + SEARCH_USE_CASE_UNSPECIFIED = 0, + SEARCH_USE_CASE_SEARCH = 1, + SEARCH_USE_CASE_BROWSE = 2 + } + + /** SearchTier enum. */ + enum SearchTier { + SEARCH_TIER_UNSPECIFIED = 0, + SEARCH_TIER_STANDARD = 1, + SEARCH_TIER_ENTERPRISE = 2 + } + + /** SearchAddOn enum. */ + enum SearchAddOn { + SEARCH_ADD_ON_UNSPECIFIED = 0, + SEARCH_ADD_ON_LLM = 1 + } + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval minimum */ + minimum?: (number|null); + + /** Interval exclusiveMinimum */ + exclusiveMinimum?: (number|null); + + /** Interval maximum */ + maximum?: (number|null); + + /** Interval exclusiveMaximum */ + exclusiveMaximum?: (number|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IInterval); + + /** Interval minimum. */ + public minimum?: (number|null); + + /** Interval exclusiveMinimum. */ + public exclusiveMinimum?: (number|null); + + /** Interval maximum. */ + public maximum?: (number|null); + + /** Interval exclusiveMaximum. */ + public exclusiveMaximum?: (number|null); + + /** Interval min. */ + public min?: ("minimum"|"exclusiveMinimum"); + + /** Interval max. */ + public max?: ("maximum"|"exclusiveMaximum"); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IInterval): google.cloud.discoveryengine.v1.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @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.cloud.discoveryengine.v1.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @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.cloud.discoveryengine.v1.Interval; + + /** + * Verifies an Interval 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomAttribute. */ + interface ICustomAttribute { + + /** CustomAttribute text */ + text?: (string[]|null); + + /** CustomAttribute numbers */ + numbers?: (number[]|null); + } + + /** Represents a CustomAttribute. */ + class CustomAttribute implements ICustomAttribute { + + /** + * Constructs a new CustomAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICustomAttribute); + + /** CustomAttribute text. */ + public text: string[]; + + /** CustomAttribute numbers. */ + public numbers: number[]; + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomAttribute instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICustomAttribute): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @param message CustomAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomAttribute + * @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.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomAttribute + * @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.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Verifies a CustomAttribute 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 CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomAttribute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CustomAttribute; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @param message CustomAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CustomAttribute to JSON. @@ -2448,6 +2915,142 @@ export namespace google { } } + /** Properties of a CompletionSuggestion. */ + interface ICompletionSuggestion { + + /** CompletionSuggestion globalScore */ + globalScore?: (number|null); + + /** CompletionSuggestion frequency */ + frequency?: (number|Long|string|null); + + /** CompletionSuggestion suggestion */ + suggestion?: (string|null); + + /** CompletionSuggestion languageCode */ + languageCode?: (string|null); + + /** CompletionSuggestion groupId */ + groupId?: (string|null); + + /** CompletionSuggestion groupScore */ + groupScore?: (number|null); + + /** CompletionSuggestion alternativePhrases */ + alternativePhrases?: (string[]|null); + } + + /** Represents a CompletionSuggestion. */ + class CompletionSuggestion implements ICompletionSuggestion { + + /** + * Constructs a new CompletionSuggestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICompletionSuggestion); + + /** CompletionSuggestion globalScore. */ + public globalScore?: (number|null); + + /** CompletionSuggestion frequency. */ + public frequency?: (number|Long|string|null); + + /** CompletionSuggestion suggestion. */ + public suggestion: string; + + /** CompletionSuggestion languageCode. */ + public languageCode: string; + + /** CompletionSuggestion groupId. */ + public groupId: string; + + /** CompletionSuggestion groupScore. */ + public groupScore: number; + + /** CompletionSuggestion alternativePhrases. */ + public alternativePhrases: string[]; + + /** CompletionSuggestion rankingInfo. */ + public rankingInfo?: ("globalScore"|"frequency"); + + /** + * Creates a new CompletionSuggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns CompletionSuggestion instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICompletionSuggestion): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Encodes the specified CompletionSuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @param message CompletionSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICompletionSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompletionSuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @param message CompletionSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompletionSuggestion + * @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.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompletionSuggestion + * @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.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Verifies a CompletionSuggestion 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 CompletionSuggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompletionSuggestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionSuggestion; + + /** + * Creates a plain object from a CompletionSuggestion message. Also converts values to other types if specified. + * @param message CompletionSuggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CompletionSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompletionSuggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompletionSuggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents a CompletionService */ class CompletionService extends $protobuf.rpc.Service { @@ -2509,6 +3112,34 @@ export namespace google { * @returns Promise */ public purgeSuggestionDenyListEntries(request: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): Promise; + + /** + * Calls ImportCompletionSuggestions. + * @param request ImportCompletionSuggestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importCompletionSuggestions(request: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, callback: google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestionsCallback): void; + + /** + * Calls ImportCompletionSuggestions. + * @param request ImportCompletionSuggestionsRequest message or plain object + * @returns Promise + */ + public importCompletionSuggestions(request: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest): Promise; + + /** + * Calls PurgeCompletionSuggestions. + * @param request PurgeCompletionSuggestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public purgeCompletionSuggestions(request: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, callback: google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestionsCallback): void; + + /** + * Calls PurgeCompletionSuggestions. + * @param request PurgeCompletionSuggestionsRequest message or plain object + * @returns Promise + */ + public purgeCompletionSuggestions(request: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest): Promise; } namespace CompletionService { @@ -2533,6 +3164,20 @@ export namespace google { * @param [response] Operation */ type PurgeSuggestionDenyListEntriesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importCompletionSuggestions}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportCompletionSuggestionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeCompletionSuggestions}. + * @param error Error, if any + * @param [response] Operation + */ + type PurgeCompletionSuggestionsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CompleteQueryRequest. */ @@ -3838,81 +4483,208 @@ export namespace google { /** CloudSqlSource gcsStagingDir. */ public gcsStagingDir: string; - /** CloudSqlSource offload. */ - public offload: boolean; + /** CloudSqlSource offload. */ + public offload: boolean; + + /** + * Creates a new CloudSqlSource instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlSource instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ICloudSqlSource): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * @param message CloudSqlSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * @param message CloudSqlSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlSource + * @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.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlSource + * @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.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Verifies a CloudSqlSource 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 CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CloudSqlSource; + + /** + * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. + * @param message CloudSqlSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.CloudSqlSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDbSource. */ + interface IAlloyDbSource { + + /** AlloyDbSource projectId */ + projectId?: (string|null); + + /** AlloyDbSource locationId */ + locationId?: (string|null); + + /** AlloyDbSource clusterId */ + clusterId?: (string|null); + + /** AlloyDbSource databaseId */ + databaseId?: (string|null); + + /** AlloyDbSource tableId */ + tableId?: (string|null); + + /** AlloyDbSource gcsStagingDir */ + gcsStagingDir?: (string|null); + } + + /** Represents an AlloyDbSource. */ + class AlloyDbSource implements IAlloyDbSource { + + /** + * Constructs a new AlloyDbSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IAlloyDbSource); + + /** AlloyDbSource projectId. */ + public projectId: string; + + /** AlloyDbSource locationId. */ + public locationId: string; + + /** AlloyDbSource clusterId. */ + public clusterId: string; + + /** AlloyDbSource databaseId. */ + public databaseId: string; + + /** AlloyDbSource tableId. */ + public tableId: string; + + /** AlloyDbSource gcsStagingDir. */ + public gcsStagingDir: string; /** - * Creates a new CloudSqlSource instance using the specified properties. + * Creates a new AlloyDbSource instance using the specified properties. * @param [properties] Properties to set - * @returns CloudSqlSource instance + * @returns AlloyDbSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ICloudSqlSource): google.cloud.discoveryengine.v1.CloudSqlSource; + public static create(properties?: google.cloud.discoveryengine.v1.IAlloyDbSource): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. - * @param message CloudSqlSource message or plain object to encode + * Encodes the specified AlloyDbSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @param message AlloyDbSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IAlloyDbSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. - * @param message CloudSqlSource message or plain object to encode + * Encodes the specified AlloyDbSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @param message AlloyDbSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICloudSqlSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IAlloyDbSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudSqlSource message from the specified reader or buffer. + * Decodes an AlloyDbSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudSqlSource + * @returns AlloyDbSource * @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.cloud.discoveryengine.v1.CloudSqlSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * Decodes an AlloyDbSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudSqlSource + * @returns AlloyDbSource * @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.cloud.discoveryengine.v1.CloudSqlSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Verifies a CloudSqlSource message. + * Verifies an AlloyDbSource 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 CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * Creates an AlloyDbSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudSqlSource + * @returns AlloyDbSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CloudSqlSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.AlloyDbSource; /** - * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. - * @param message CloudSqlSource + * Creates a plain object from an AlloyDbSource message. Also converts values to other types if specified. + * @param message AlloyDbSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.CloudSqlSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.AlloyDbSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudSqlSource to JSON. + * Converts this AlloyDbSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudSqlSource + * Gets the default type url for AlloyDbSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4343,557 +5115,885 @@ export namespace google { */ public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ImportUserEventsResponse. */ + interface IImportUserEventsResponse { + + /** ImportUserEventsResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); + + /** ImportUserEventsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportUserEventsResponse joinedEventsCount */ + joinedEventsCount?: (number|Long|string|null); + + /** ImportUserEventsResponse unjoinedEventsCount */ + unjoinedEventsCount?: (number|Long|string|null); + } + + /** Represents an ImportUserEventsResponse. */ + class ImportUserEventsResponse implements IImportUserEventsResponse { + + /** + * Constructs a new ImportUserEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse); + + /** ImportUserEventsResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; + + /** ImportUserEventsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportUserEventsResponse joinedEventsCount. */ + public joinedEventsCount: (number|Long|string); + + /** ImportUserEventsResponse unjoinedEventsCount. */ + public unjoinedEventsCount: (number|Long|string); + + /** + * Creates a new ImportUserEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportUserEventsResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportUserEventsResponse + * @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.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportUserEventsResponse + * @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.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Verifies an ImportUserEventsResponse 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 ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportUserEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + + /** + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * @param message ImportUserEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportUserEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportUserEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportUserEventsMetadata. */ + interface IImportUserEventsMetadata { + + /** ImportUserEventsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** ImportUserEventsMetadata failureCount */ + failureCount?: (number|Long|string|null); + } + + /** Represents an ImportUserEventsMetadata. */ + class ImportUserEventsMetadata implements IImportUserEventsMetadata { + + /** + * Constructs a new ImportUserEventsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata); + + /** ImportUserEventsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportUserEventsMetadata successCount. */ + public successCount: (number|Long|string); + + /** ImportUserEventsMetadata failureCount. */ + public failureCount: (number|Long|string); + + /** + * Creates a new ImportUserEventsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportUserEventsMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportUserEventsMetadata + * @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.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportUserEventsMetadata + * @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.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Verifies an ImportUserEventsMetadata 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 ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportUserEventsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + + /** + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. + * @param message ImportUserEventsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportUserEventsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ImportUserEventsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsResponse. */ - interface IImportUserEventsResponse { + /** Properties of an ImportDocumentsMetadata. */ + interface IImportDocumentsMetadata { - /** ImportUserEventsResponse errorSamples */ - errorSamples?: (google.rpc.IStatus[]|null); + /** ImportDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse joinedEventsCount */ - joinedEventsCount?: (number|Long|string|null); + /** ImportDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); - /** ImportUserEventsResponse unjoinedEventsCount */ - unjoinedEventsCount?: (number|Long|string|null); + /** ImportDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); + + /** ImportDocumentsMetadata totalCount */ + totalCount?: (number|Long|string|null); } - /** Represents an ImportUserEventsResponse. */ - class ImportUserEventsResponse implements IImportUserEventsResponse { + /** Represents an ImportDocumentsMetadata. */ + class ImportDocumentsMetadata implements IImportDocumentsMetadata { /** - * Constructs a new ImportUserEventsResponse. + * Constructs a new ImportDocumentsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata); - /** ImportUserEventsResponse errorSamples. */ - public errorSamples: google.rpc.IStatus[]; + /** ImportDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** ImportUserEventsResponse joinedEventsCount. */ - public joinedEventsCount: (number|Long|string); + /** ImportDocumentsMetadata successCount. */ + public successCount: (number|Long|string); - /** ImportUserEventsResponse unjoinedEventsCount. */ - public unjoinedEventsCount: (number|Long|string); + /** ImportDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); + + /** ImportDocumentsMetadata totalCount. */ + public totalCount: (number|Long|string); /** - * Creates a new ImportUserEventsResponse instance using the specified properties. + * Creates a new ImportDocumentsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsResponse instance + * @returns ImportDocumentsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsResponse): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata * @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.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata * @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.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Verifies an ImportUserEventsResponse message. + * Verifies an ImportDocumentsMetadata 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 ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsResponse + * @returns ImportDocumentsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. - * @param message ImportUserEventsResponse + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @param message ImportDocumentsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this ImportDocumentsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for ImportDocumentsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsMetadata. */ - interface IImportUserEventsMetadata { + /** Properties of an ImportDocumentsRequest. */ + interface IImportDocumentsRequest { - /** ImportUserEventsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - /** ImportUserEventsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportUserEventsMetadata successCount */ - successCount?: (number|Long|string|null); + /** ImportDocumentsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - /** ImportUserEventsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** ImportDocumentsRequest fhirStoreSource */ + fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); + + /** ImportDocumentsRequest spannerSource */ + spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); + + /** ImportDocumentsRequest cloudSqlSource */ + cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); + + /** ImportDocumentsRequest firestoreSource */ + firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); + + /** ImportDocumentsRequest alloyDbSource */ + alloyDbSource?: (google.cloud.discoveryengine.v1.IAlloyDbSource|null); + + /** ImportDocumentsRequest bigtableSource */ + bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); + + /** ImportDocumentsRequest parent */ + parent?: (string|null); + + /** ImportDocumentsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode */ + reconciliationMode?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null); + + /** ImportDocumentsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportDocumentsRequest autoGenerateIds */ + autoGenerateIds?: (boolean|null); + + /** ImportDocumentsRequest idField */ + idField?: (string|null); } - /** Represents an ImportUserEventsMetadata. */ - class ImportUserEventsMetadata implements IImportUserEventsMetadata { + /** Represents an ImportDocumentsRequest. */ + class ImportDocumentsRequest implements IImportDocumentsRequest { /** - * Constructs a new ImportUserEventsMetadata. + * Constructs a new ImportDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest); - /** ImportUserEventsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - /** ImportUserEventsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsRequest gcsSource. */ + public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportUserEventsMetadata successCount. */ - public successCount: (number|Long|string); + /** ImportDocumentsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - /** ImportUserEventsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportDocumentsRequest fhirStoreSource. */ + public fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); + + /** ImportDocumentsRequest spannerSource. */ + public spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); + + /** ImportDocumentsRequest cloudSqlSource. */ + public cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); + + /** ImportDocumentsRequest firestoreSource. */ + public firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); + + /** ImportDocumentsRequest alloyDbSource. */ + public alloyDbSource?: (google.cloud.discoveryengine.v1.IAlloyDbSource|null); + + /** ImportDocumentsRequest bigtableSource. */ + public bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); + + /** ImportDocumentsRequest parent. */ + public parent: string; + + /** ImportDocumentsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode. */ + public reconciliationMode: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode); + + /** ImportDocumentsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportDocumentsRequest autoGenerateIds. */ + public autoGenerateIds: boolean; + + /** ImportDocumentsRequest idField. */ + public idField: string; + + /** ImportDocumentsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"alloyDbSource"|"bigtableSource"); /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. + * Creates a new ImportDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsMetadata instance + * @returns ImportDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportUserEventsMetadata): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest * @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.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest * @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.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Verifies an ImportUserEventsMetadata message. + * Verifies an ImportDocumentsRequest 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 ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsMetadata + * @returns ImportDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportUserEventsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest; /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. - * @param message ImportUserEventsMetadata + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @param message ImportDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsMetadata to JSON. + * Converts this ImportDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsMetadata + * Gets the default type url for ImportDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsMetadata. */ - interface IImportDocumentsMetadata { + namespace ImportDocumentsRequest { - /** ImportDocumentsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an InlineSource. */ + interface IInlineSource { - /** ImportDocumentsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** InlineSource documents */ + documents?: (google.cloud.discoveryengine.v1.IDocument[]|null); + } - /** ImportDocumentsMetadata successCount */ - successCount?: (number|Long|string|null); + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { - /** ImportDocumentsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource); - /** ImportDocumentsMetadata totalCount */ - totalCount?: (number|Long|string|null); + /** InlineSource documents. */ + public documents: google.cloud.discoveryengine.v1.IDocument[]; + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Verifies an InlineSource 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ReconciliationMode enum. */ + enum ReconciliationMode { + RECONCILIATION_MODE_UNSPECIFIED = 0, + INCREMENTAL = 1, + FULL = 2 + } } - /** Represents an ImportDocumentsMetadata. */ - class ImportDocumentsMetadata implements IImportDocumentsMetadata { + /** Properties of an ImportDocumentsResponse. */ + interface IImportDocumentsResponse { - /** - * Constructs a new ImportDocumentsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata); + /** ImportDocumentsResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); - /** ImportDocumentsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportDocumentsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + } - /** ImportDocumentsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents an ImportDocumentsResponse. */ + class ImportDocumentsResponse implements IImportDocumentsResponse { - /** ImportDocumentsMetadata successCount. */ - public successCount: (number|Long|string); + /** + * Constructs a new ImportDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse); - /** ImportDocumentsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportDocumentsResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; - /** ImportDocumentsMetadata totalCount. */ - public totalCount: (number|Long|string); + /** ImportDocumentsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * Creates a new ImportDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsMetadata instance + * @returns ImportDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsMetadata): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse * @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.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse * @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.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportDocumentsResponse 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 ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsMetadata + * @returns ImportDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsResponse; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. - * @param message ImportDocumentsMetadata + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * @param message ImportDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportDocumentsResponse to JSON. * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportDocumentsMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportDocumentsRequest. */ - interface IImportDocumentsRequest { - - /** ImportDocumentsRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); - - /** ImportDocumentsRequest gcsSource */ - gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - - /** ImportDocumentsRequest bigquerySource */ - bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - - /** ImportDocumentsRequest fhirStoreSource */ - fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); - - /** ImportDocumentsRequest spannerSource */ - spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); - - /** ImportDocumentsRequest cloudSqlSource */ - cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); - - /** ImportDocumentsRequest firestoreSource */ - firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); - - /** ImportDocumentsRequest bigtableSource */ - bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); - - /** ImportDocumentsRequest parent */ - parent?: (string|null); + */ + public toJSON(): { [k: string]: any }; - /** ImportDocumentsRequest errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** + * Gets the default type url for ImportDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ImportDocumentsRequest reconciliationMode */ - reconciliationMode?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null); + /** Properties of an ImportSuggestionDenyListEntriesRequest. */ + interface IImportSuggestionDenyListEntriesRequest { - /** ImportDocumentsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ImportSuggestionDenyListEntriesRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); - /** ImportDocumentsRequest autoGenerateIds */ - autoGenerateIds?: (boolean|null); + /** ImportSuggestionDenyListEntriesRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportDocumentsRequest idField */ - idField?: (string|null); + /** ImportSuggestionDenyListEntriesRequest parent */ + parent?: (string|null); } - /** Represents an ImportDocumentsRequest. */ - class ImportDocumentsRequest implements IImportDocumentsRequest { + /** Represents an ImportSuggestionDenyListEntriesRequest. */ + class ImportSuggestionDenyListEntriesRequest implements IImportSuggestionDenyListEntriesRequest { /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new ImportSuggestionDenyListEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest); - /** ImportDocumentsRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null); + /** ImportSuggestionDenyListEntriesRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); - /** ImportDocumentsRequest gcsSource. */ + /** ImportSuggestionDenyListEntriesRequest gcsSource. */ public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportDocumentsRequest bigquerySource. */ - public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); - - /** ImportDocumentsRequest fhirStoreSource. */ - public fhirStoreSource?: (google.cloud.discoveryengine.v1.IFhirStoreSource|null); - - /** ImportDocumentsRequest spannerSource. */ - public spannerSource?: (google.cloud.discoveryengine.v1.ISpannerSource|null); - - /** ImportDocumentsRequest cloudSqlSource. */ - public cloudSqlSource?: (google.cloud.discoveryengine.v1.ICloudSqlSource|null); - - /** ImportDocumentsRequest firestoreSource. */ - public firestoreSource?: (google.cloud.discoveryengine.v1.IFirestoreSource|null); - - /** ImportDocumentsRequest bigtableSource. */ - public bigtableSource?: (google.cloud.discoveryengine.v1.IBigtableSource|null); - - /** ImportDocumentsRequest parent. */ + /** ImportSuggestionDenyListEntriesRequest parent. */ public parent: string; - /** ImportDocumentsRequest errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); - - /** ImportDocumentsRequest reconciliationMode. */ - public reconciliationMode: (google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode); - - /** ImportDocumentsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** ImportDocumentsRequest autoGenerateIds. */ - public autoGenerateIds: boolean; - - /** ImportDocumentsRequest idField. */ - public idField: string; - - /** ImportDocumentsRequest source. */ - public source?: ("inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"bigtableSource"); + /** ImportSuggestionDenyListEntriesRequest source. */ + public source?: ("inlineSource"|"gcsSource"); /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsRequest instance + * @returns ImportSuggestionDenyListEntriesRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsRequest): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest * @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.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest * @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.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Verifies an ImportDocumentsRequest message. + * Verifies an ImportSuggestionDenyListEntriesRequest 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 ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsRequest + * @returns ImportSuggestionDenyListEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @param message ImportDocumentsRequest + * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this ImportSuggestionDenyListEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsRequest + * Gets the default type url for ImportSuggestionDenyListEntriesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportDocumentsRequest { + namespace ImportSuggestionDenyListEntriesRequest { /** Properties of an InlineSource. */ interface IInlineSource { - /** InlineSource documents */ - documents?: (google.cloud.discoveryengine.v1.IDocument[]|null); + /** InlineSource entries */ + entries?: (google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]|null); } /** Represents an InlineSource. */ @@ -4903,33 +6003,33 @@ export namespace google { * Constructs a new InlineSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource); + constructor(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource); - /** InlineSource documents. */ - public documents: google.cloud.discoveryengine.v1.IDocument[]; + /** InlineSource entries. */ + public entries: google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]; /** * Creates a new InlineSource instance using the specified properties. * @param [properties] Properties to set * @returns InlineSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static create(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an InlineSource message from the specified reader or buffer. @@ -4939,7 +6039,7 @@ export namespace google { * @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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. @@ -4948,7 +6048,7 @@ export namespace google { * @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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Verifies an InlineSource message. @@ -4962,7 +6062,7 @@ export namespace google { * @param object Plain object * @returns InlineSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. @@ -4970,252 +6070,366 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ImportSuggestionDenyListEntriesResponse. */ + interface IImportSuggestionDenyListEntriesResponse { + + /** ImportSuggestionDenyListEntriesResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); + + /** ImportSuggestionDenyListEntriesResponse importedEntriesCount */ + importedEntriesCount?: (number|Long|string|null); + + /** ImportSuggestionDenyListEntriesResponse failedEntriesCount */ + failedEntriesCount?: (number|Long|string|null); + } + + /** Represents an ImportSuggestionDenyListEntriesResponse. */ + class ImportSuggestionDenyListEntriesResponse implements IImportSuggestionDenyListEntriesResponse { + + /** + * Constructs a new ImportSuggestionDenyListEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse); + + /** ImportSuggestionDenyListEntriesResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; + + /** ImportSuggestionDenyListEntriesResponse importedEntriesCount. */ + public importedEntriesCount: (number|Long|string); + + /** ImportSuggestionDenyListEntriesResponse failedEntriesCount. */ + public failedEntriesCount: (number|Long|string); + + /** + * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportSuggestionDenyListEntriesResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportSuggestionDenyListEntriesResponse + * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportSuggestionDenyListEntriesResponse + * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + + /** + * Verifies an ImportSuggestionDenyListEntriesResponse 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 ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportSuggestionDenyListEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReconciliationMode enum. */ - enum ReconciliationMode { - RECONCILIATION_MODE_UNSPECIFIED = 0, - INCREMENTAL = 1, - FULL = 2 - } + /** + * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsResponse. */ - interface IImportDocumentsResponse { + /** Properties of an ImportSuggestionDenyListEntriesMetadata. */ + interface IImportSuggestionDenyListEntriesMetadata { - /** ImportDocumentsResponse errorSamples */ - errorSamples?: (google.rpc.IStatus[]|null); + /** ImportSuggestionDenyListEntriesMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ImportDocumentsResponse errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportSuggestionDenyListEntriesMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an ImportDocumentsResponse. */ - class ImportDocumentsResponse implements IImportDocumentsResponse { + /** Represents an ImportSuggestionDenyListEntriesMetadata. */ + class ImportSuggestionDenyListEntriesMetadata implements IImportSuggestionDenyListEntriesMetadata { /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new ImportSuggestionDenyListEntriesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata); - /** ImportDocumentsResponse errorSamples. */ - public errorSamples: google.rpc.IStatus[]; + /** ImportSuggestionDenyListEntriesMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ImportDocumentsResponse errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + /** ImportSuggestionDenyListEntriesMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsResponse instance + * @returns ImportSuggestionDenyListEntriesMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportDocumentsResponse): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata * @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.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata * @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.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportSuggestionDenyListEntriesMetadata 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 ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsResponse + * @returns ImportSuggestionDenyListEntriesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. - * @param message ImportDocumentsResponse + * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * @param message ImportSuggestionDenyListEntriesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportSuggestionDenyListEntriesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportSuggestionDenyListEntriesRequest. */ - interface IImportSuggestionDenyListEntriesRequest { + /** Properties of an ImportCompletionSuggestionsRequest. */ + interface IImportCompletionSuggestionsRequest { - /** ImportSuggestionDenyListEntriesRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); + /** ImportCompletionSuggestionsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null); - /** ImportSuggestionDenyListEntriesRequest gcsSource */ + /** ImportCompletionSuggestionsRequest gcsSource */ gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportSuggestionDenyListEntriesRequest parent */ + /** ImportCompletionSuggestionsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); + + /** ImportCompletionSuggestionsRequest parent */ parent?: (string|null); + + /** ImportCompletionSuggestionsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); } - /** Represents an ImportSuggestionDenyListEntriesRequest. */ - class ImportSuggestionDenyListEntriesRequest implements IImportSuggestionDenyListEntriesRequest { + /** Represents an ImportCompletionSuggestionsRequest. */ + class ImportCompletionSuggestionsRequest implements IImportCompletionSuggestionsRequest { /** - * Constructs a new ImportSuggestionDenyListEntriesRequest. + * Constructs a new ImportCompletionSuggestionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest); - /** ImportSuggestionDenyListEntriesRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null); + /** ImportCompletionSuggestionsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null); - /** ImportSuggestionDenyListEntriesRequest gcsSource. */ + /** ImportCompletionSuggestionsRequest gcsSource. */ public gcsSource?: (google.cloud.discoveryengine.v1.IGcsSource|null); - /** ImportSuggestionDenyListEntriesRequest parent. */ + /** ImportCompletionSuggestionsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1.IBigQuerySource|null); + + /** ImportCompletionSuggestionsRequest parent. */ public parent: string; - /** ImportSuggestionDenyListEntriesRequest source. */ - public source?: ("inlineSource"|"gcsSource"); + /** ImportCompletionSuggestionsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); + + /** ImportCompletionSuggestionsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); /** - * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new ImportCompletionSuggestionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesRequest instance + * @returns ImportCompletionSuggestionsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. + * @param message ImportCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. + * @param message ImportCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Verifies an ImportSuggestionDenyListEntriesRequest message. + * Verifies an ImportCompletionSuggestionsRequest 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 ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesRequest + * @returns ImportCompletionSuggestionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesRequest + * Creates a plain object from an ImportCompletionSuggestionsRequest message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesRequest to JSON. + * Converts this ImportCompletionSuggestionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesRequest + * Gets the default type url for ImportCompletionSuggestionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportSuggestionDenyListEntriesRequest { + namespace ImportCompletionSuggestionsRequest { /** Properties of an InlineSource. */ interface IInlineSource { - /** InlineSource entries */ - entries?: (google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]|null); + /** InlineSource suggestions */ + suggestions?: (google.cloud.discoveryengine.v1.ICompletionSuggestion[]|null); } /** Represents an InlineSource. */ @@ -5225,33 +6439,33 @@ export namespace google { * Constructs a new InlineSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource); + constructor(properties?: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource); - /** InlineSource entries. */ - public entries: google.cloud.discoveryengine.v1.ISuggestionDenyListEntry[]; + /** InlineSource suggestions. */ + public suggestions: google.cloud.discoveryengine.v1.ICompletionSuggestion[]; /** * Creates a new InlineSource instance using the specified properties. * @param [properties] Properties to set * @returns InlineSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static create(properties?: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an InlineSource message from the specified reader or buffer. @@ -5261,7 +6475,7 @@ export namespace google { * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. @@ -5270,7 +6484,7 @@ export namespace google { * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Verifies an InlineSource message. @@ -5284,7 +6498,7 @@ export namespace google { * @param object Plain object * @returns InlineSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource; /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. @@ -5292,7 +6506,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this InlineSource to JSON. @@ -5309,212 +6523,218 @@ export namespace google { } } - /** Properties of an ImportSuggestionDenyListEntriesResponse. */ - interface IImportSuggestionDenyListEntriesResponse { + /** Properties of an ImportCompletionSuggestionsResponse. */ + interface IImportCompletionSuggestionsResponse { - /** ImportSuggestionDenyListEntriesResponse errorSamples */ + /** ImportCompletionSuggestionsResponse errorSamples */ errorSamples?: (google.rpc.IStatus[]|null); - /** ImportSuggestionDenyListEntriesResponse importedEntriesCount */ - importedEntriesCount?: (number|Long|string|null); - - /** ImportSuggestionDenyListEntriesResponse failedEntriesCount */ - failedEntriesCount?: (number|Long|string|null); + /** ImportCompletionSuggestionsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); } - /** Represents an ImportSuggestionDenyListEntriesResponse. */ - class ImportSuggestionDenyListEntriesResponse implements IImportSuggestionDenyListEntriesResponse { + /** Represents an ImportCompletionSuggestionsResponse. */ + class ImportCompletionSuggestionsResponse implements IImportCompletionSuggestionsResponse { /** - * Constructs a new ImportSuggestionDenyListEntriesResponse. + * Constructs a new ImportCompletionSuggestionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse); - /** ImportSuggestionDenyListEntriesResponse errorSamples. */ + /** ImportCompletionSuggestionsResponse errorSamples. */ public errorSamples: google.rpc.IStatus[]; - /** ImportSuggestionDenyListEntriesResponse importedEntriesCount. */ - public importedEntriesCount: (number|Long|string); - - /** ImportSuggestionDenyListEntriesResponse failedEntriesCount. */ - public failedEntriesCount: (number|Long|string); + /** ImportCompletionSuggestionsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1.IImportErrorConfig|null); /** - * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new ImportCompletionSuggestionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesResponse instance + * @returns ImportCompletionSuggestionsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @param message ImportCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @param message ImportCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Verifies an ImportSuggestionDenyListEntriesResponse message. + * Verifies an ImportCompletionSuggestionsResponse 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 ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesResponse + * @returns ImportCompletionSuggestionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesResponse + * Creates a plain object from an ImportCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * Converts this ImportCompletionSuggestionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * Gets the default type url for ImportCompletionSuggestionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportSuggestionDenyListEntriesMetadata. */ - interface IImportSuggestionDenyListEntriesMetadata { + /** Properties of an ImportCompletionSuggestionsMetadata. */ + interface IImportCompletionSuggestionsMetadata { - /** ImportSuggestionDenyListEntriesMetadata createTime */ + /** ImportCompletionSuggestionsMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** ImportSuggestionDenyListEntriesMetadata updateTime */ + /** ImportCompletionSuggestionsMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** ImportCompletionSuggestionsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** ImportCompletionSuggestionsMetadata failureCount */ + failureCount?: (number|Long|string|null); } - /** Represents an ImportSuggestionDenyListEntriesMetadata. */ - class ImportSuggestionDenyListEntriesMetadata implements IImportSuggestionDenyListEntriesMetadata { + /** Represents an ImportCompletionSuggestionsMetadata. */ + class ImportCompletionSuggestionsMetadata implements IImportCompletionSuggestionsMetadata { /** - * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * Constructs a new ImportCompletionSuggestionsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata); - /** ImportSuggestionDenyListEntriesMetadata createTime. */ + /** ImportCompletionSuggestionsMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** ImportSuggestionDenyListEntriesMetadata updateTime. */ + /** ImportCompletionSuggestionsMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportCompletionSuggestionsMetadata successCount. */ + public successCount: (number|Long|string); + + /** ImportCompletionSuggestionsMetadata failureCount. */ + public failureCount: (number|Long|string); + /** - * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new ImportCompletionSuggestionsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSuggestionDenyListEntriesMetadata instance + * @returns ImportCompletionSuggestionsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. + * @param message ImportCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified ImportCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. + * @param message ImportCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata * @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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Verifies an ImportSuggestionDenyListEntriesMetadata message. + * Verifies an ImportCompletionSuggestionsMetadata 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 ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSuggestionDenyListEntriesMetadata + * @returns ImportCompletionSuggestionsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. - * @param message ImportSuggestionDenyListEntriesMetadata + * Creates a plain object from an ImportCompletionSuggestionsMetadata message. Also converts values to other types if specified. + * @param message ImportCompletionSuggestionsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. + * Converts this ImportCompletionSuggestionsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesMetadata + * Gets the default type url for ImportCompletionSuggestionsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -5747,1707 +6967,2010 @@ export namespace google { */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.Document.Content; - /** - * Verifies a Content message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Content 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 Content message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Content + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Document.Content; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.Document.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Content to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Content + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserEvent. */ + interface IUserEvent { + + /** UserEvent eventType */ + eventType?: (string|null); + + /** UserEvent userPseudoId */ + userPseudoId?: (string|null); + + /** UserEvent engine */ + engine?: (string|null); + + /** UserEvent dataStore */ + dataStore?: (string|null); + + /** UserEvent eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); + + /** UserEvent userInfo */ + userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + + /** UserEvent directUserRequest */ + directUserRequest?: (boolean|null); + + /** UserEvent sessionId */ + sessionId?: (string|null); + + /** UserEvent pageInfo */ + pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + + /** UserEvent attributionToken */ + attributionToken?: (string|null); + + /** UserEvent filter */ + filter?: (string|null); + + /** UserEvent documents */ + documents?: (google.cloud.discoveryengine.v1.IDocumentInfo[]|null); + + /** UserEvent panel */ + panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + + /** UserEvent searchInfo */ + searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + + /** UserEvent completionInfo */ + completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + + /** UserEvent transactionInfo */ + transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + + /** UserEvent tagIds */ + tagIds?: (string[]|null); + + /** UserEvent promotionIds */ + promotionIds?: (string[]|null); + + /** UserEvent attributes */ + attributes?: ({ [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }|null); + + /** UserEvent mediaInfo */ + mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + } + + /** Represents a UserEvent. */ + class UserEvent implements IUserEvent { + + /** + * Constructs a new UserEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IUserEvent); + + /** UserEvent eventType. */ + public eventType: string; + + /** UserEvent userPseudoId. */ + public userPseudoId: string; + + /** UserEvent engine. */ + public engine: string; + + /** UserEvent dataStore. */ + public dataStore: string; + + /** UserEvent eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** UserEvent userInfo. */ + public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + + /** UserEvent directUserRequest. */ + public directUserRequest: boolean; + + /** UserEvent sessionId. */ + public sessionId: string; + + /** UserEvent pageInfo. */ + public pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + + /** UserEvent attributionToken. */ + public attributionToken: string; + + /** UserEvent filter. */ + public filter: string; + + /** UserEvent documents. */ + public documents: google.cloud.discoveryengine.v1.IDocumentInfo[]; + + /** UserEvent panel. */ + public panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + + /** UserEvent searchInfo. */ + public searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + + /** UserEvent completionInfo. */ + public completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + + /** UserEvent transactionInfo. */ + public transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + + /** UserEvent tagIds. */ + public tagIds: string[]; + + /** UserEvent promotionIds. */ + public promotionIds: string[]; + + /** UserEvent attributes. */ + public attributes: { [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }; + + /** UserEvent mediaInfo. */ + public mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + + /** + * Creates a new UserEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns UserEvent instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IUserEvent): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserEvent + * @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.cloud.discoveryengine.v1.UserEvent; + + /** + * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserEvent + * @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.cloud.discoveryengine.v1.UserEvent; + + /** + * Verifies a UserEvent 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 UserEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.UserEvent; + + /** + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. + * @param message UserEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PageInfo. */ + interface IPageInfo { - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Content - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.Document.Content; + /** PageInfo pageviewId */ + pageviewId?: (string|null); - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @param message Content - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.Document.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PageInfo pageCategory */ + pageCategory?: (string|null); - /** - * Converts this Content to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** PageInfo uri */ + uri?: (string|null); - /** - * Gets the default type url for Content - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** PageInfo referrerUri */ + referrerUri?: (string|null); } - /** Properties of a UserEvent. */ - interface IUserEvent { - - /** UserEvent eventType */ - eventType?: (string|null); + /** Represents a PageInfo. */ + class PageInfo implements IPageInfo { - /** UserEvent userPseudoId */ - userPseudoId?: (string|null); + /** + * Constructs a new PageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IPageInfo); - /** UserEvent engine */ - engine?: (string|null); + /** PageInfo pageviewId. */ + public pageviewId: string; - /** UserEvent dataStore */ - dataStore?: (string|null); + /** PageInfo pageCategory. */ + public pageCategory: string; - /** UserEvent eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); + /** PageInfo uri. */ + public uri: string; - /** UserEvent userInfo */ - userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** PageInfo referrerUri. */ + public referrerUri: string; - /** UserEvent directUserRequest */ - directUserRequest?: (boolean|null); + /** + * Creates a new PageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PageInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IPageInfo): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent sessionId */ - sessionId?: (string|null); + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent pageInfo */ - pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + /** + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent attributionToken */ - attributionToken?: (string|null); + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PageInfo + * @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.cloud.discoveryengine.v1.PageInfo; - /** UserEvent filter */ - filter?: (string|null); + /** + * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PageInfo + * @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.cloud.discoveryengine.v1.PageInfo; - /** UserEvent documents */ - documents?: (google.cloud.discoveryengine.v1.IDocumentInfo[]|null); + /** + * Verifies a PageInfo 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); - /** UserEvent panel */ - panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PageInfo; - /** UserEvent searchInfo */ - searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @param message PageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UserEvent completionInfo */ - completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + /** + * Converts this PageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UserEvent transactionInfo */ - transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + /** + * Gets the default type url for PageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UserEvent tagIds */ - tagIds?: (string[]|null); + /** Properties of a SearchInfo. */ + interface ISearchInfo { - /** UserEvent promotionIds */ - promotionIds?: (string[]|null); + /** SearchInfo searchQuery */ + searchQuery?: (string|null); - /** UserEvent attributes */ - attributes?: ({ [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }|null); + /** SearchInfo orderBy */ + orderBy?: (string|null); - /** UserEvent mediaInfo */ - mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + /** SearchInfo offset */ + offset?: (number|null); } - /** Represents a UserEvent. */ - class UserEvent implements IUserEvent { + /** Represents a SearchInfo. */ + class SearchInfo implements ISearchInfo { /** - * Constructs a new UserEvent. + * Constructs a new SearchInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IUserEvent); + constructor(properties?: google.cloud.discoveryengine.v1.ISearchInfo); - /** UserEvent eventType. */ - public eventType: string; + /** SearchInfo searchQuery. */ + public searchQuery: string; - /** UserEvent userPseudoId. */ - public userPseudoId: string; + /** SearchInfo orderBy. */ + public orderBy: string; - /** UserEvent engine. */ - public engine: string; + /** SearchInfo offset. */ + public offset?: (number|null); - /** UserEvent dataStore. */ - public dataStore: string; + /** SearchInfo _offset. */ + public _offset?: "offset"; - /** UserEvent eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new SearchInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.ISearchInfo): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent userInfo. */ - public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent directUserRequest. */ - public directUserRequest: boolean; + /** + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** UserEvent sessionId. */ - public sessionId: string; + /** + * Decodes a SearchInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchInfo + * @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.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent pageInfo. */ - public pageInfo?: (google.cloud.discoveryengine.v1.IPageInfo|null); + /** + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchInfo + * @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.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent attributionToken. */ - public attributionToken: string; + /** + * Verifies a SearchInfo 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); - /** UserEvent filter. */ - public filter: string; + /** + * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchInfo; - /** UserEvent documents. */ - public documents: google.cloud.discoveryengine.v1.IDocumentInfo[]; + /** + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * @param message SearchInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UserEvent panel. */ - public panel?: (google.cloud.discoveryengine.v1.IPanelInfo|null); + /** + * Converts this SearchInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UserEvent searchInfo. */ - public searchInfo?: (google.cloud.discoveryengine.v1.ISearchInfo|null); + /** + * Gets the default type url for SearchInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UserEvent completionInfo. */ - public completionInfo?: (google.cloud.discoveryengine.v1.ICompletionInfo|null); + /** Properties of a CompletionInfo. */ + interface ICompletionInfo { - /** UserEvent transactionInfo. */ - public transactionInfo?: (google.cloud.discoveryengine.v1.ITransactionInfo|null); + /** CompletionInfo selectedSuggestion */ + selectedSuggestion?: (string|null); - /** UserEvent tagIds. */ - public tagIds: string[]; + /** CompletionInfo selectedPosition */ + selectedPosition?: (number|null); + } - /** UserEvent promotionIds. */ - public promotionIds: string[]; + /** Represents a CompletionInfo. */ + class CompletionInfo implements ICompletionInfo { - /** UserEvent attributes. */ - public attributes: { [k: string]: google.cloud.discoveryengine.v1.ICustomAttribute }; + /** + * Constructs a new CompletionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.ICompletionInfo); - /** UserEvent mediaInfo. */ - public mediaInfo?: (google.cloud.discoveryengine.v1.IMediaInfo|null); + /** CompletionInfo selectedSuggestion. */ + public selectedSuggestion: string; + + /** CompletionInfo selectedPosition. */ + public selectedPosition: number; /** - * Creates a new UserEvent instance using the specified properties. + * Creates a new CompletionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns UserEvent instance + * @returns CompletionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IUserEvent): google.cloud.discoveryengine.v1.UserEvent; + public static create(properties?: google.cloud.discoveryengine.v1.ICompletionInfo): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserEvent + * @returns CompletionInfo * @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.cloud.discoveryengine.v1.UserEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserEvent + * @returns CompletionInfo * @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.cloud.discoveryengine.v1.UserEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Verifies a UserEvent message. + * Verifies a CompletionInfo 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 UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserEvent + * @returns CompletionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.UserEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionInfo; /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. - * @param message UserEvent + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * @param message CompletionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserEvent to JSON. + * Converts this CompletionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserEvent + * Gets the default type url for CompletionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PageInfo. */ - interface IPageInfo { + /** Properties of a TransactionInfo. */ + interface ITransactionInfo { - /** PageInfo pageviewId */ - pageviewId?: (string|null); + /** TransactionInfo value */ + value?: (number|null); - /** PageInfo pageCategory */ - pageCategory?: (string|null); + /** TransactionInfo currency */ + currency?: (string|null); - /** PageInfo uri */ - uri?: (string|null); + /** TransactionInfo transactionId */ + transactionId?: (string|null); - /** PageInfo referrerUri */ - referrerUri?: (string|null); + /** TransactionInfo tax */ + tax?: (number|null); + + /** TransactionInfo cost */ + cost?: (number|null); + + /** TransactionInfo discountValue */ + discountValue?: (number|null); } - /** Represents a PageInfo. */ - class PageInfo implements IPageInfo { + /** Represents a TransactionInfo. */ + class TransactionInfo implements ITransactionInfo { /** - * Constructs a new PageInfo. + * Constructs a new TransactionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPageInfo); + constructor(properties?: google.cloud.discoveryengine.v1.ITransactionInfo); - /** PageInfo pageviewId. */ - public pageviewId: string; + /** TransactionInfo value. */ + public value?: (number|null); - /** PageInfo pageCategory. */ - public pageCategory: string; + /** TransactionInfo currency. */ + public currency: string; - /** PageInfo uri. */ - public uri: string; + /** TransactionInfo transactionId. */ + public transactionId: string; - /** PageInfo referrerUri. */ - public referrerUri: string; + /** TransactionInfo tax. */ + public tax?: (number|null); + + /** TransactionInfo cost. */ + public cost?: (number|null); + + /** TransactionInfo discountValue. */ + public discountValue?: (number|null); + + /** TransactionInfo _value. */ + public _value?: "value"; + + /** TransactionInfo _tax. */ + public _tax?: "tax"; + + /** TransactionInfo _cost. */ + public _cost?: "cost"; + + /** TransactionInfo _discountValue. */ + public _discountValue?: "discountValue"; /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new TransactionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns PageInfo instance + * @returns TransactionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPageInfo): google.cloud.discoveryengine.v1.PageInfo; + public static create(properties?: google.cloud.discoveryengine.v1.ITransactionInfo): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes a TransactionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PageInfo + * @returns TransactionInfo * @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.cloud.discoveryengine.v1.PageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PageInfo + * @returns TransactionInfo * @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.cloud.discoveryengine.v1.PageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Verifies a PageInfo message. + * Verifies a TransactionInfo 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 PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PageInfo + * @returns TransactionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PageInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.TransactionInfo; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. - * @param message PageInfo + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * @param message TransactionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PageInfo to JSON. + * Converts this TransactionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PageInfo + * Gets the default type url for TransactionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchInfo. */ - interface ISearchInfo { + /** Properties of a DocumentInfo. */ + interface IDocumentInfo { - /** SearchInfo searchQuery */ - searchQuery?: (string|null); + /** DocumentInfo id */ + id?: (string|null); - /** SearchInfo orderBy */ - orderBy?: (string|null); + /** DocumentInfo name */ + name?: (string|null); - /** SearchInfo offset */ - offset?: (number|null); + /** DocumentInfo uri */ + uri?: (string|null); + + /** DocumentInfo quantity */ + quantity?: (number|null); + + /** DocumentInfo promotionIds */ + promotionIds?: (string[]|null); } - /** Represents a SearchInfo. */ - class SearchInfo implements ISearchInfo { + /** Represents a DocumentInfo. */ + class DocumentInfo implements IDocumentInfo { /** - * Constructs a new SearchInfo. + * Constructs a new DocumentInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ISearchInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IDocumentInfo); - /** SearchInfo searchQuery. */ - public searchQuery: string; + /** DocumentInfo id. */ + public id?: (string|null); - /** SearchInfo orderBy. */ - public orderBy: string; + /** DocumentInfo name. */ + public name?: (string|null); - /** SearchInfo offset. */ - public offset?: (number|null); + /** DocumentInfo uri. */ + public uri?: (string|null); - /** SearchInfo _offset. */ - public _offset?: "offset"; + /** DocumentInfo quantity. */ + public quantity?: (number|null); + + /** DocumentInfo promotionIds. */ + public promotionIds: string[]; + + /** DocumentInfo documentDescriptor. */ + public documentDescriptor?: ("id"|"name"|"uri"); + + /** DocumentInfo _quantity. */ + public _quantity?: "quantity"; /** - * Creates a new SearchInfo instance using the specified properties. + * Creates a new DocumentInfo instance using the specified properties. * @param [properties] Properties to set - * @returns SearchInfo instance + * @returns DocumentInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ISearchInfo): google.cloud.discoveryengine.v1.SearchInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IDocumentInfo): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchInfo message from the specified reader or buffer. + * Decodes a DocumentInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchInfo + * @returns DocumentInfo * @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.cloud.discoveryengine.v1.SearchInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchInfo + * @returns DocumentInfo * @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.cloud.discoveryengine.v1.SearchInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Verifies a SearchInfo message. + * Verifies a DocumentInfo 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 SearchInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchInfo + * @returns DocumentInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentInfo; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. - * @param message SearchInfo + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * @param message DocumentInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchInfo to JSON. + * Converts this DocumentInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchInfo + * Gets the default type url for DocumentInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CompletionInfo. */ - interface ICompletionInfo { + /** Properties of a PanelInfo. */ + interface IPanelInfo { - /** CompletionInfo selectedSuggestion */ - selectedSuggestion?: (string|null); + /** PanelInfo panelId */ + panelId?: (string|null); - /** CompletionInfo selectedPosition */ - selectedPosition?: (number|null); + /** PanelInfo displayName */ + displayName?: (string|null); + + /** PanelInfo panelPosition */ + panelPosition?: (number|null); + + /** PanelInfo totalPanels */ + totalPanels?: (number|null); } - /** Represents a CompletionInfo. */ - class CompletionInfo implements ICompletionInfo { + /** Represents a PanelInfo. */ + class PanelInfo implements IPanelInfo { /** - * Constructs a new CompletionInfo. + * Constructs a new PanelInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ICompletionInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IPanelInfo); - /** CompletionInfo selectedSuggestion. */ - public selectedSuggestion: string; + /** PanelInfo panelId. */ + public panelId: string; - /** CompletionInfo selectedPosition. */ - public selectedPosition: number; + /** PanelInfo displayName. */ + public displayName: string; + + /** PanelInfo panelPosition. */ + public panelPosition?: (number|null); + + /** PanelInfo totalPanels. */ + public totalPanels?: (number|null); + + /** PanelInfo _panelPosition. */ + public _panelPosition?: "panelPosition"; + + /** PanelInfo _totalPanels. */ + public _totalPanels?: "totalPanels"; /** - * Creates a new CompletionInfo instance using the specified properties. + * Creates a new PanelInfo instance using the specified properties. * @param [properties] Properties to set - * @returns CompletionInfo instance + * @returns PanelInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ICompletionInfo): google.cloud.discoveryengine.v1.CompletionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPanelInfo): google.cloud.discoveryengine.v1.PanelInfo; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompletionInfo message from the specified reader or buffer. + * Decodes a PanelInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompletionInfo + * @returns PanelInfo * @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.cloud.discoveryengine.v1.CompletionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PanelInfo; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompletionInfo + * @returns PanelInfo * @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.cloud.discoveryengine.v1.CompletionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PanelInfo; /** - * Verifies a CompletionInfo message. + * Verifies a PanelInfo 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 CompletionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompletionInfo + * @returns PanelInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.CompletionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PanelInfo; /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. - * @param message CompletionInfo + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * @param message PanelInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompletionInfo to JSON. + * Converts this PanelInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompletionInfo + * Gets the default type url for PanelInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransactionInfo. */ - interface ITransactionInfo { - - /** TransactionInfo value */ - value?: (number|null); - - /** TransactionInfo currency */ - currency?: (string|null); - - /** TransactionInfo transactionId */ - transactionId?: (string|null); - - /** TransactionInfo tax */ - tax?: (number|null); + /** Properties of a MediaInfo. */ + interface IMediaInfo { - /** TransactionInfo cost */ - cost?: (number|null); + /** MediaInfo mediaProgressDuration */ + mediaProgressDuration?: (google.protobuf.IDuration|null); - /** TransactionInfo discountValue */ - discountValue?: (number|null); + /** MediaInfo mediaProgressPercentage */ + mediaProgressPercentage?: (number|null); } - /** Represents a TransactionInfo. */ - class TransactionInfo implements ITransactionInfo { + /** Represents a MediaInfo. */ + class MediaInfo implements IMediaInfo { /** - * Constructs a new TransactionInfo. + * Constructs a new MediaInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.ITransactionInfo); - - /** TransactionInfo value. */ - public value?: (number|null); - - /** TransactionInfo currency. */ - public currency: string; - - /** TransactionInfo transactionId. */ - public transactionId: string; - - /** TransactionInfo tax. */ - public tax?: (number|null); - - /** TransactionInfo cost. */ - public cost?: (number|null); - - /** TransactionInfo discountValue. */ - public discountValue?: (number|null); - - /** TransactionInfo _value. */ - public _value?: "value"; + constructor(properties?: google.cloud.discoveryengine.v1.IMediaInfo); - /** TransactionInfo _tax. */ - public _tax?: "tax"; + /** MediaInfo mediaProgressDuration. */ + public mediaProgressDuration?: (google.protobuf.IDuration|null); - /** TransactionInfo _cost. */ - public _cost?: "cost"; + /** MediaInfo mediaProgressPercentage. */ + public mediaProgressPercentage?: (number|null); - /** TransactionInfo _discountValue. */ - public _discountValue?: "discountValue"; + /** MediaInfo _mediaProgressPercentage. */ + public _mediaProgressPercentage?: "mediaProgressPercentage"; /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new MediaInfo instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionInfo instance + * @returns MediaInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.ITransactionInfo): google.cloud.discoveryengine.v1.TransactionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IMediaInfo): google.cloud.discoveryengine.v1.MediaInfo; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a MediaInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionInfo + * @returns MediaInfo * @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.cloud.discoveryengine.v1.TransactionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.MediaInfo; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionInfo + * @returns MediaInfo * @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.cloud.discoveryengine.v1.TransactionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.MediaInfo; /** - * Verifies a TransactionInfo message. + * Verifies a MediaInfo 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 TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionInfo + * @returns MediaInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.TransactionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.MediaInfo; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. - * @param message TransactionInfo + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * @param message MediaInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionInfo to JSON. + * Converts this MediaInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for MediaInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DocumentInfo. */ - interface IDocumentInfo { - - /** DocumentInfo id */ - id?: (string|null); - - /** DocumentInfo name */ - name?: (string|null); + /** Properties of a PurgeDocumentsRequest. */ + interface IPurgeDocumentsRequest { - /** DocumentInfo uri */ - uri?: (string|null); + /** PurgeDocumentsRequest parent */ + parent?: (string|null); - /** DocumentInfo quantity */ - quantity?: (number|null); + /** PurgeDocumentsRequest filter */ + filter?: (string|null); - /** DocumentInfo promotionIds */ - promotionIds?: (string[]|null); + /** PurgeDocumentsRequest force */ + force?: (boolean|null); } - /** Represents a DocumentInfo. */ - class DocumentInfo implements IDocumentInfo { + /** Represents a PurgeDocumentsRequest. */ + class PurgeDocumentsRequest implements IPurgeDocumentsRequest { /** - * Constructs a new DocumentInfo. + * Constructs a new PurgeDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IDocumentInfo); - - /** DocumentInfo id. */ - public id?: (string|null); - - /** DocumentInfo name. */ - public name?: (string|null); - - /** DocumentInfo uri. */ - public uri?: (string|null); - - /** DocumentInfo quantity. */ - public quantity?: (number|null); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest); - /** DocumentInfo promotionIds. */ - public promotionIds: string[]; + /** PurgeDocumentsRequest parent. */ + public parent: string; - /** DocumentInfo documentDescriptor. */ - public documentDescriptor?: ("id"|"name"|"uri"); + /** PurgeDocumentsRequest filter. */ + public filter: string; - /** DocumentInfo _quantity. */ - public _quantity?: "quantity"; + /** PurgeDocumentsRequest force. */ + public force: boolean; /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new PurgeDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentInfo instance + * @returns PurgeDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IDocumentInfo): google.cloud.discoveryengine.v1.DocumentInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentInfo + * @returns PurgeDocumentsRequest * @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.cloud.discoveryengine.v1.DocumentInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentInfo + * @returns PurgeDocumentsRequest * @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.cloud.discoveryengine.v1.DocumentInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Verifies a DocumentInfo message. + * Verifies a PurgeDocumentsRequest 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 DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentInfo + * @returns PurgeDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. - * @param message DocumentInfo + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * @param message PurgeDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentInfo to JSON. + * Converts this PurgeDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for PurgeDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PanelInfo. */ - interface IPanelInfo { - - /** PanelInfo panelId */ - panelId?: (string|null); - - /** PanelInfo displayName */ - displayName?: (string|null); + /** Properties of a PurgeDocumentsResponse. */ + interface IPurgeDocumentsResponse { - /** PanelInfo panelPosition */ - panelPosition?: (number|null); + /** PurgeDocumentsResponse purgeCount */ + purgeCount?: (number|Long|string|null); - /** PanelInfo totalPanels */ - totalPanels?: (number|null); + /** PurgeDocumentsResponse purgeSample */ + purgeSample?: (string[]|null); } - /** Represents a PanelInfo. */ - class PanelInfo implements IPanelInfo { + /** Represents a PurgeDocumentsResponse. */ + class PurgeDocumentsResponse implements IPurgeDocumentsResponse { /** - * Constructs a new PanelInfo. + * Constructs a new PurgeDocumentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPanelInfo); - - /** PanelInfo panelId. */ - public panelId: string; - - /** PanelInfo displayName. */ - public displayName: string; - - /** PanelInfo panelPosition. */ - public panelPosition?: (number|null); - - /** PanelInfo totalPanels. */ - public totalPanels?: (number|null); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse); - /** PanelInfo _panelPosition. */ - public _panelPosition?: "panelPosition"; + /** PurgeDocumentsResponse purgeCount. */ + public purgeCount: (number|Long|string); - /** PanelInfo _totalPanels. */ - public _totalPanels?: "totalPanels"; + /** PurgeDocumentsResponse purgeSample. */ + public purgeSample: string[]; /** - * Creates a new PanelInfo instance using the specified properties. + * Creates a new PurgeDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PanelInfo instance + * @returns PurgeDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPanelInfo): google.cloud.discoveryengine.v1.PanelInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PanelInfo + * @returns PurgeDocumentsResponse * @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.cloud.discoveryengine.v1.PanelInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PanelInfo + * @returns PurgeDocumentsResponse * @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.cloud.discoveryengine.v1.PanelInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Verifies a PanelInfo message. + * Verifies a PurgeDocumentsResponse 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 PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PanelInfo + * @returns PurgeDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PanelInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. - * @param message PanelInfo + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * @param message PurgeDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PanelInfo to JSON. + * Converts this PurgeDocumentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for PurgeDocumentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MediaInfo. */ - interface IMediaInfo { + /** Properties of a PurgeDocumentsMetadata. */ + interface IPurgeDocumentsMetadata { - /** MediaInfo mediaProgressDuration */ - mediaProgressDuration?: (google.protobuf.IDuration|null); + /** PurgeDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** MediaInfo mediaProgressPercentage */ - mediaProgressPercentage?: (number|null); + /** PurgeDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** PurgeDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); + + /** PurgeDocumentsMetadata ignoredCount */ + ignoredCount?: (number|Long|string|null); } - /** Represents a MediaInfo. */ - class MediaInfo implements IMediaInfo { + /** Represents a PurgeDocumentsMetadata. */ + class PurgeDocumentsMetadata implements IPurgeDocumentsMetadata { /** - * Constructs a new MediaInfo. + * Constructs a new PurgeDocumentsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IMediaInfo); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata); + + /** PurgeDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** MediaInfo mediaProgressDuration. */ - public mediaProgressDuration?: (google.protobuf.IDuration|null); + /** PurgeDocumentsMetadata successCount. */ + public successCount: (number|Long|string); - /** MediaInfo mediaProgressPercentage. */ - public mediaProgressPercentage?: (number|null); + /** PurgeDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); - /** MediaInfo _mediaProgressPercentage. */ - public _mediaProgressPercentage?: "mediaProgressPercentage"; + /** PurgeDocumentsMetadata ignoredCount. */ + public ignoredCount: (number|Long|string); /** - * Creates a new MediaInfo instance using the specified properties. + * Creates a new PurgeDocumentsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns MediaInfo instance + * @returns PurgeDocumentsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IMediaInfo): google.cloud.discoveryengine.v1.MediaInfo; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MediaInfo + * @returns PurgeDocumentsMetadata * @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.cloud.discoveryengine.v1.MediaInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MediaInfo + * @returns PurgeDocumentsMetadata * @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.cloud.discoveryengine.v1.MediaInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Verifies a MediaInfo message. + * Verifies a PurgeDocumentsMetadata 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 MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MediaInfo + * @returns PurgeDocumentsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.MediaInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. - * @param message MediaInfo + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * @param message PurgeDocumentsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MediaInfo to JSON. + * Converts this PurgeDocumentsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for PurgeDocumentsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsRequest. */ - interface IPurgeDocumentsRequest { + /** Properties of a PurgeSuggestionDenyListEntriesRequest. */ + interface IPurgeSuggestionDenyListEntriesRequest { - /** PurgeDocumentsRequest parent */ + /** PurgeSuggestionDenyListEntriesRequest parent */ parent?: (string|null); - - /** PurgeDocumentsRequest filter */ - filter?: (string|null); - - /** PurgeDocumentsRequest force */ - force?: (boolean|null); } - /** Represents a PurgeDocumentsRequest. */ - class PurgeDocumentsRequest implements IPurgeDocumentsRequest { + /** Represents a PurgeSuggestionDenyListEntriesRequest. */ + class PurgeSuggestionDenyListEntriesRequest implements IPurgeSuggestionDenyListEntriesRequest { /** - * Constructs a new PurgeDocumentsRequest. + * Constructs a new PurgeSuggestionDenyListEntriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest); - /** PurgeDocumentsRequest parent. */ + /** PurgeSuggestionDenyListEntriesRequest parent. */ public parent: string; - /** PurgeDocumentsRequest filter. */ - public filter: string; - - /** PurgeDocumentsRequest force. */ - public force: boolean; - /** - * Creates a new PurgeDocumentsRequest instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsRequest instance + * @returns PurgeSuggestionDenyListEntriesRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. - * @param message PurgeDocumentsRequest message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. - * @param message PurgeDocumentsRequest message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest * @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.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest * @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.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Verifies a PurgeDocumentsRequest message. + * Verifies a PurgeSuggestionDenyListEntriesRequest 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 PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsRequest + * @returns PurgeSuggestionDenyListEntriesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; /** - * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. - * @param message PurgeDocumentsRequest + * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsRequest to JSON. + * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsRequest + * Gets the default type url for PurgeSuggestionDenyListEntriesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsResponse. */ - interface IPurgeDocumentsResponse { + /** Properties of a PurgeSuggestionDenyListEntriesResponse. */ + interface IPurgeSuggestionDenyListEntriesResponse { - /** PurgeDocumentsResponse purgeCount */ + /** PurgeSuggestionDenyListEntriesResponse purgeCount */ purgeCount?: (number|Long|string|null); - /** PurgeDocumentsResponse purgeSample */ - purgeSample?: (string[]|null); + /** PurgeSuggestionDenyListEntriesResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); } - /** Represents a PurgeDocumentsResponse. */ - class PurgeDocumentsResponse implements IPurgeDocumentsResponse { + /** Represents a PurgeSuggestionDenyListEntriesResponse. */ + class PurgeSuggestionDenyListEntriesResponse implements IPurgeSuggestionDenyListEntriesResponse { /** - * Constructs a new PurgeDocumentsResponse. + * Constructs a new PurgeSuggestionDenyListEntriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse); - /** PurgeDocumentsResponse purgeCount. */ + /** PurgeSuggestionDenyListEntriesResponse purgeCount. */ public purgeCount: (number|Long|string); - /** PurgeDocumentsResponse purgeSample. */ - public purgeSample: string[]; + /** PurgeSuggestionDenyListEntriesResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; /** - * Creates a new PurgeDocumentsResponse instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsResponse instance + * @returns PurgeSuggestionDenyListEntriesResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. - * @param message PurgeDocumentsResponse message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. - * @param message PurgeDocumentsResponse message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse * @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.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse * @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.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Verifies a PurgeDocumentsResponse message. + * Verifies a PurgeSuggestionDenyListEntriesResponse 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 PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsResponse + * @returns PurgeSuggestionDenyListEntriesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; /** - * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. - * @param message PurgeDocumentsResponse + * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsResponse to JSON. + * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsResponse + * Gets the default type url for PurgeSuggestionDenyListEntriesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeDocumentsMetadata. */ - interface IPurgeDocumentsMetadata { + /** Properties of a PurgeSuggestionDenyListEntriesMetadata. */ + interface IPurgeSuggestionDenyListEntriesMetadata { - /** PurgeDocumentsMetadata createTime */ + /** PurgeSuggestionDenyListEntriesMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata updateTime */ + /** PurgeSuggestionDenyListEntriesMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - - /** PurgeDocumentsMetadata successCount */ - successCount?: (number|Long|string|null); - - /** PurgeDocumentsMetadata failureCount */ - failureCount?: (number|Long|string|null); - - /** PurgeDocumentsMetadata ignoredCount */ - ignoredCount?: (number|Long|string|null); } - /** Represents a PurgeDocumentsMetadata. */ - class PurgeDocumentsMetadata implements IPurgeDocumentsMetadata { + /** Represents a PurgeSuggestionDenyListEntriesMetadata. */ + class PurgeSuggestionDenyListEntriesMetadata implements IPurgeSuggestionDenyListEntriesMetadata { /** - * Constructs a new PurgeDocumentsMetadata. + * Constructs a new PurgeSuggestionDenyListEntriesMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata); - /** PurgeDocumentsMetadata createTime. */ + /** PurgeSuggestionDenyListEntriesMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata updateTime. */ + /** PurgeSuggestionDenyListEntriesMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** PurgeDocumentsMetadata successCount. */ - public successCount: (number|Long|string); - - /** PurgeDocumentsMetadata failureCount. */ - public failureCount: (number|Long|string); - - /** PurgeDocumentsMetadata ignoredCount. */ - public ignoredCount: (number|Long|string); - /** - * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeDocumentsMetadata instance + * @returns PurgeSuggestionDenyListEntriesMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; - /** - * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. - * @param message PurgeDocumentsMetadata message or plain object to encode + /** + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. - * @param message PurgeDocumentsMetadata message or plain object to encode + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata * @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.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata * @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.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Verifies a PurgeDocumentsMetadata message. + * Verifies a PurgeSuggestionDenyListEntriesMetadata 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 PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeDocumentsMetadata + * @returns PurgeSuggestionDenyListEntriesMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeDocumentsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; /** - * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. - * @param message PurgeDocumentsMetadata + * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * @param message PurgeSuggestionDenyListEntriesMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeDocumentsMetadata to JSON. + * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeDocumentsMetadata + * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesRequest. */ - interface IPurgeSuggestionDenyListEntriesRequest { + /** Properties of a PurgeCompletionSuggestionsRequest. */ + interface IPurgeCompletionSuggestionsRequest { - /** PurgeSuggestionDenyListEntriesRequest parent */ + /** PurgeCompletionSuggestionsRequest parent */ parent?: (string|null); } - /** Represents a PurgeSuggestionDenyListEntriesRequest. */ - class PurgeSuggestionDenyListEntriesRequest implements IPurgeSuggestionDenyListEntriesRequest { + /** Represents a PurgeCompletionSuggestionsRequest. */ + class PurgeCompletionSuggestionsRequest implements IPurgeCompletionSuggestionsRequest { /** - * Constructs a new PurgeSuggestionDenyListEntriesRequest. + * Constructs a new PurgeCompletionSuggestionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest); - /** PurgeSuggestionDenyListEntriesRequest parent. */ + /** PurgeCompletionSuggestionsRequest parent. */ public parent: string; /** - * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesRequest instance + * @returns PurgeCompletionSuggestionsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. + * @param message PurgeCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. + * @param message PurgeCompletionSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Verifies a PurgeSuggestionDenyListEntriesRequest message. + * Verifies a PurgeCompletionSuggestionsRequest 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 PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesRequest + * @returns PurgeCompletionSuggestionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesRequest + * Creates a plain object from a PurgeCompletionSuggestionsRequest message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. + * Converts this PurgeCompletionSuggestionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesRequest + * Gets the default type url for PurgeCompletionSuggestionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesResponse. */ - interface IPurgeSuggestionDenyListEntriesResponse { + /** Properties of a PurgeCompletionSuggestionsResponse. */ + interface IPurgeCompletionSuggestionsResponse { - /** PurgeSuggestionDenyListEntriesResponse purgeCount */ - purgeCount?: (number|Long|string|null); + /** PurgeCompletionSuggestionsResponse purgeSucceeded */ + purgeSucceeded?: (boolean|null); - /** PurgeSuggestionDenyListEntriesResponse errorSamples */ + /** PurgeCompletionSuggestionsResponse errorSamples */ errorSamples?: (google.rpc.IStatus[]|null); } - /** Represents a PurgeSuggestionDenyListEntriesResponse. */ - class PurgeSuggestionDenyListEntriesResponse implements IPurgeSuggestionDenyListEntriesResponse { + /** Represents a PurgeCompletionSuggestionsResponse. */ + class PurgeCompletionSuggestionsResponse implements IPurgeCompletionSuggestionsResponse { /** - * Constructs a new PurgeSuggestionDenyListEntriesResponse. + * Constructs a new PurgeCompletionSuggestionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse); - /** PurgeSuggestionDenyListEntriesResponse purgeCount. */ - public purgeCount: (number|Long|string); + /** PurgeCompletionSuggestionsResponse purgeSucceeded. */ + public purgeSucceeded: boolean; - /** PurgeSuggestionDenyListEntriesResponse errorSamples. */ + /** PurgeCompletionSuggestionsResponse errorSamples. */ public errorSamples: google.rpc.IStatus[]; /** - * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesResponse instance + * @returns PurgeCompletionSuggestionsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. + * @param message PurgeCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. + * @param message PurgeCompletionSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Verifies a PurgeSuggestionDenyListEntriesResponse message. + * Verifies a PurgeCompletionSuggestionsResponse 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 PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesResponse + * @returns PurgeCompletionSuggestionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesResponse + * Creates a plain object from a PurgeCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. + * Converts this PurgeCompletionSuggestionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesResponse + * Gets the default type url for PurgeCompletionSuggestionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PurgeSuggestionDenyListEntriesMetadata. */ - interface IPurgeSuggestionDenyListEntriesMetadata { + /** Properties of a PurgeCompletionSuggestionsMetadata. */ + interface IPurgeCompletionSuggestionsMetadata { - /** PurgeSuggestionDenyListEntriesMetadata createTime */ + /** PurgeCompletionSuggestionsMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** PurgeSuggestionDenyListEntriesMetadata updateTime */ + /** PurgeCompletionSuggestionsMetadata updateTime */ updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a PurgeSuggestionDenyListEntriesMetadata. */ - class PurgeSuggestionDenyListEntriesMetadata implements IPurgeSuggestionDenyListEntriesMetadata { + /** Represents a PurgeCompletionSuggestionsMetadata. */ + class PurgeCompletionSuggestionsMetadata implements IPurgeCompletionSuggestionsMetadata { /** - * Constructs a new PurgeSuggestionDenyListEntriesMetadata. + * Constructs a new PurgeCompletionSuggestionsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata); + constructor(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata); - /** PurgeSuggestionDenyListEntriesMetadata createTime. */ + /** PurgeCompletionSuggestionsMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** PurgeSuggestionDenyListEntriesMetadata updateTime. */ + /** PurgeCompletionSuggestionsMetadata updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PurgeSuggestionDenyListEntriesMetadata instance + * @returns PurgeCompletionSuggestionsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static create(properties?: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. + * @param message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. - * @param message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * Encodes the specified PurgeCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. + * @param message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata * @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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Verifies a PurgeSuggestionDenyListEntriesMetadata message. + * Verifies a PurgeCompletionSuggestionsMetadata 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 PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PurgeSuggestionDenyListEntriesMetadata + * @returns PurgeCompletionSuggestionsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. - * @param message PurgeSuggestionDenyListEntriesMetadata + * Creates a plain object from a PurgeCompletionSuggestionsMetadata message. Also converts values to other types if specified. + * @param message PurgeCompletionSuggestionsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. + * Converts this PurgeCompletionSuggestionsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata + * Gets the default type url for PurgeCompletionSuggestionsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -9718,6 +11241,9 @@ export namespace google { /** SearchRequest userInfo */ userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** SearchRequest languageCode */ + languageCode?: (string|null); + /** SearchRequest facetSpecs */ facetSpecs?: (google.cloud.discoveryengine.v1.SearchRequest.IFacetSpec[]|null); @@ -9744,6 +11270,15 @@ export namespace google { /** SearchRequest userLabels */ userLabels?: ({ [k: string]: string }|null); + + /** SearchRequest searchAsYouTypeSpec */ + searchAsYouTypeSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null); + + /** SearchRequest session */ + session?: (string|null); + + /** SearchRequest sessionSpec */ + sessionSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null); } /** Represents a SearchRequest. */ @@ -9791,6 +11326,9 @@ export namespace google { /** SearchRequest userInfo. */ public userInfo?: (google.cloud.discoveryengine.v1.IUserInfo|null); + /** SearchRequest languageCode. */ + public languageCode: string; + /** SearchRequest facetSpecs. */ public facetSpecs: google.cloud.discoveryengine.v1.SearchRequest.IFacetSpec[]; @@ -9818,6 +11356,15 @@ export namespace google { /** SearchRequest userLabels. */ public userLabels: { [k: string]: string }; + /** SearchRequest searchAsYouTypeSpec. */ + public searchAsYouTypeSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null); + + /** SearchRequest session. */ + public session: string; + + /** SearchRequest sessionSpec. */ + public sessionSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null); + /** * Creates a new SearchRequest instance using the specified properties. * @param [properties] Properties to set @@ -10780,6 +12327,12 @@ export namespace google { /** ContentSearchSpec extractiveContentSpec */ extractiveContentSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null); + + /** ContentSearchSpec searchResultMode */ + searchResultMode?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null); + + /** ContentSearchSpec chunkSpec */ + chunkSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null); } /** Represents a ContentSearchSpec. */ @@ -10800,6 +12353,12 @@ export namespace google { /** ContentSearchSpec extractiveContentSpec. */ public extractiveContentSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null); + /** ContentSearchSpec searchResultMode. */ + public searchResultMode: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode); + + /** ContentSearchSpec chunkSpec. */ + public chunkSpec?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null); + /** * Creates a new ContentSearchSpec instance using the specified properties. * @param [properties] Properties to set @@ -11418,33 +12977,356 @@ export namespace google { public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtractiveContentSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec; + + /** + * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * @param message ExtractiveContentSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtractiveContentSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtractiveContentSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChunkSpec. */ + interface IChunkSpec { + + /** ChunkSpec numPreviousChunks */ + numPreviousChunks?: (number|null); + + /** ChunkSpec numNextChunks */ + numNextChunks?: (number|null); + } + + /** Represents a ChunkSpec. */ + class ChunkSpec implements IChunkSpec { + + /** + * Constructs a new ChunkSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec); + + /** ChunkSpec numPreviousChunks. */ + public numPreviousChunks: number; + + /** ChunkSpec numNextChunks. */ + public numNextChunks: number; + + /** + * Creates a new ChunkSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Encodes the specified ChunkSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @param message ChunkSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @param message ChunkSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkSpec + * @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.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Decodes a ChunkSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkSpec + * @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.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; + + /** + * Verifies a ChunkSpec 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 ChunkSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtractiveContentSpec + * @returns ChunkSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec; /** - * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. - * @param message ExtractiveContentSpec + * Creates a plain object from a ChunkSpec message. Also converts values to other types if specified. + * @param message ChunkSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtractiveContentSpec to JSON. + * Converts this ChunkSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtractiveContentSpec + * Gets the default type url for ChunkSpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** SearchResultMode enum. */ + enum SearchResultMode { + SEARCH_RESULT_MODE_UNSPECIFIED = 0, + DOCUMENTS = 1, + CHUNKS = 2 + } + } + + /** Properties of a SearchAsYouTypeSpec. */ + interface ISearchAsYouTypeSpec { + + /** SearchAsYouTypeSpec condition */ + condition?: (google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|null); + } + + /** Represents a SearchAsYouTypeSpec. */ + class SearchAsYouTypeSpec implements ISearchAsYouTypeSpec { + + /** + * Constructs a new SearchAsYouTypeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec); + + /** SearchAsYouTypeSpec condition. */ + public condition: (google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition); + + /** + * Creates a new SearchAsYouTypeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchAsYouTypeSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Encodes the specified SearchAsYouTypeSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @param message SearchAsYouTypeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchAsYouTypeSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @param message SearchAsYouTypeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchAsYouTypeSpec + * @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.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchAsYouTypeSpec + * @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.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Verifies a SearchAsYouTypeSpec 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 SearchAsYouTypeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchAsYouTypeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec; + + /** + * Creates a plain object from a SearchAsYouTypeSpec message. Also converts values to other types if specified. + * @param message SearchAsYouTypeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchAsYouTypeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchAsYouTypeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchAsYouTypeSpec { + + /** Condition enum. */ + enum Condition { + CONDITION_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + } + + /** Properties of a SessionSpec. */ + interface ISessionSpec { + + /** SessionSpec queryId */ + queryId?: (string|null); + + /** SessionSpec searchResultPersistenceCount */ + searchResultPersistenceCount?: (number|null); + } + + /** Represents a SessionSpec. */ + class SessionSpec implements ISessionSpec { + + /** + * Constructs a new SessionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec); + + /** SessionSpec queryId. */ + public queryId: string; + + /** SessionSpec searchResultPersistenceCount. */ + public searchResultPersistenceCount?: (number|null); + + /** SessionSpec _searchResultPersistenceCount. */ + public _searchResultPersistenceCount?: "searchResultPersistenceCount"; + + /** + * Creates a new SessionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSpec + * @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.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSpec + * @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.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Verifies a SessionSpec 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 SessionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchRequest.SessionSpec; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @param message SessionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchRequest.SessionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11477,6 +13359,9 @@ export namespace google { /** SearchResponse queryExpansionInfo */ queryExpansionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null); + + /** SearchResponse sessionInfo */ + sessionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null); } /** Represents a SearchResponse. */ @@ -11515,6 +13400,9 @@ export namespace google { /** SearchResponse queryExpansionInfo. */ public queryExpansionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null); + /** SearchResponse sessionInfo. */ + public sessionInfo?: (google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null); + /** * Creates a new SearchResponse instance using the specified properties. * @param [properties] Properties to set @@ -11603,6 +13491,9 @@ export namespace google { /** SearchResult document */ document?: (google.cloud.discoveryengine.v1.IDocument|null); + + /** SearchResult chunk */ + chunk?: (google.cloud.discoveryengine.v1.IChunk|null); } /** Represents a SearchResult. */ @@ -11620,6 +13511,9 @@ export namespace google { /** SearchResult document. */ public document?: (google.cloud.discoveryengine.v1.IDocument|null); + /** SearchResult chunk. */ + public chunk?: (google.cloud.discoveryengine.v1.IChunk|null); + /** * Creates a new SearchResult instance using the specified properties. * @param [properties] Properties to set @@ -12786,103 +14680,206 @@ export namespace google { } } - /** Properties of a QueryExpansionInfo. */ - interface IQueryExpansionInfo { + /** Properties of a QueryExpansionInfo. */ + interface IQueryExpansionInfo { + + /** QueryExpansionInfo expandedQuery */ + expandedQuery?: (boolean|null); + + /** QueryExpansionInfo pinnedResultCount */ + pinnedResultCount?: (number|Long|string|null); + } + + /** Represents a QueryExpansionInfo. */ + class QueryExpansionInfo implements IQueryExpansionInfo { + + /** + * Constructs a new QueryExpansionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo); + + /** QueryExpansionInfo expandedQuery. */ + public expandedQuery: boolean; + + /** QueryExpansionInfo pinnedResultCount. */ + public pinnedResultCount: (number|Long|string); + + /** + * Creates a new QueryExpansionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryExpansionInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Encodes the specified QueryExpansionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. + * @param message QueryExpansionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryExpansionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. + * @param message QueryExpansionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryExpansionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryExpansionInfo + * @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.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Decodes a QueryExpansionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryExpansionInfo + * @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.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Verifies a QueryExpansionInfo 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 QueryExpansionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryExpansionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + + /** + * Creates a plain object from a QueryExpansionInfo message. Also converts values to other types if specified. + * @param message QueryExpansionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryExpansionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryExpansionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionInfo. */ + interface ISessionInfo { - /** QueryExpansionInfo expandedQuery */ - expandedQuery?: (boolean|null); + /** SessionInfo name */ + name?: (string|null); - /** QueryExpansionInfo pinnedResultCount */ - pinnedResultCount?: (number|Long|string|null); + /** SessionInfo queryId */ + queryId?: (string|null); } - /** Represents a QueryExpansionInfo. */ - class QueryExpansionInfo implements IQueryExpansionInfo { + /** Represents a SessionInfo. */ + class SessionInfo implements ISessionInfo { /** - * Constructs a new QueryExpansionInfo. + * Constructs a new SessionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo); + constructor(properties?: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo); - /** QueryExpansionInfo expandedQuery. */ - public expandedQuery: boolean; + /** SessionInfo name. */ + public name: string; - /** QueryExpansionInfo pinnedResultCount. */ - public pinnedResultCount: (number|Long|string); + /** SessionInfo queryId. */ + public queryId: string; /** - * Creates a new QueryExpansionInfo instance using the specified properties. + * Creates a new SessionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns QueryExpansionInfo instance + * @returns SessionInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static create(properties?: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Encodes the specified QueryExpansionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. - * @param message QueryExpansionInfo message or plain object to encode + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryExpansionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.verify|verify} messages. - * @param message QueryExpansionInfo message or plain object to encode + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @param message SessionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryExpansionInfo message from the specified reader or buffer. + * Decodes a SessionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryExpansionInfo + * @returns SessionInfo * @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.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Decodes a QueryExpansionInfo message from the specified reader or buffer, length delimited. + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryExpansionInfo + * @returns SessionInfo * @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.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Verifies a QueryExpansionInfo message. + * Verifies a SessionInfo 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 QueryExpansionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryExpansionInfo + * @returns SessionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.SearchResponse.SessionInfo; /** - * Creates a plain object from a QueryExpansionInfo message. Also converts values to other types if specified. - * @param message QueryExpansionInfo + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @param message SessionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1.SearchResponse.SessionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryExpansionInfo to JSON. + * Converts this SessionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryExpansionInfo + * Gets the default type url for SessionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -14097,6 +16094,9 @@ export namespace google { /** AnswerQueryRequest userPseudoId */ userPseudoId?: (string|null); + + /** AnswerQueryRequest userLabels */ + userLabels?: ({ [k: string]: string }|null); } /** Represents an AnswerQueryRequest. */ @@ -14138,6 +16138,9 @@ export namespace google { /** AnswerQueryRequest userPseudoId. */ public userPseudoId: string; + /** AnswerQueryRequest userLabels. */ + public userLabels: { [k: string]: string }; + /** * Creates a new AnswerQueryRequest instance using the specified properties. * @param [properties] Properties to set @@ -14868,6 +16871,9 @@ export namespace google { /** SearchParams orderBy */ orderBy?: (string|null); + /** SearchParams searchResultMode */ + searchResultMode?: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null); + /** SearchParams dataStoreSpecs */ dataStoreSpecs?: (google.cloud.discoveryengine.v1.SearchRequest.IDataStoreSpec[]|null); } @@ -14893,6 +16899,9 @@ export namespace google { /** SearchParams orderBy. */ public orderBy: string; + /** SearchParams searchResultMode. */ + public searchResultMode: (google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|keyof typeof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode); + /** SearchParams dataStoreSpecs. */ public dataStoreSpecs: google.cloud.discoveryengine.v1.SearchRequest.IDataStoreSpec[]; @@ -15943,6 +17952,9 @@ export namespace google { /** QueryRephraserSpec disable */ disable?: (boolean|null); + + /** QueryRephraserSpec maxRephraseSteps */ + maxRephraseSteps?: (number|null); } /** Represents a QueryRephraserSpec. */ @@ -15957,6 +17969,9 @@ export namespace google { /** QueryRephraserSpec disable. */ public disable: boolean; + /** QueryRephraserSpec maxRephraseSteps. */ + public maxRephraseSteps: number; + /** * Creates a new QueryRephraserSpec instance using the specified properties. * @param [properties] Properties to set @@ -17374,110 +19389,322 @@ export namespace google { /** DocumentProcessingConfig name */ name?: (string|null); - /** DocumentProcessingConfig defaultParsingConfig */ - defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + /** DocumentProcessingConfig chunkingConfig */ + chunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null); + + /** DocumentProcessingConfig defaultParsingConfig */ + defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + + /** DocumentProcessingConfig parsingConfigOverrides */ + parsingConfigOverrides?: ({ [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }|null); + } + + /** Represents a DocumentProcessingConfig. */ + class DocumentProcessingConfig implements IDocumentProcessingConfig { + + /** + * Constructs a new DocumentProcessingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig); + + /** DocumentProcessingConfig name. */ + public name: string; + + /** DocumentProcessingConfig chunkingConfig. */ + public chunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null); + + /** DocumentProcessingConfig defaultParsingConfig. */ + public defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + + /** DocumentProcessingConfig parsingConfigOverrides. */ + public parsingConfigOverrides: { [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }; + + /** + * Creates a new DocumentProcessingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentProcessingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Encodes the specified DocumentProcessingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @param message DocumentProcessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @param message DocumentProcessingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentProcessingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentProcessingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Verifies a DocumentProcessingConfig 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 DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentProcessingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + + /** + * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. + * @param message DocumentProcessingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentProcessingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentProcessingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DocumentProcessingConfig { + + /** Properties of a ChunkingConfig. */ + interface IChunkingConfig { + + /** ChunkingConfig layoutBasedChunkingConfig */ + layoutBasedChunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null); + } + + /** Represents a ChunkingConfig. */ + class ChunkingConfig implements IChunkingConfig { + + /** + * Constructs a new ChunkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig); + + /** ChunkingConfig layoutBasedChunkingConfig. */ + public layoutBasedChunkingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null); + + /** ChunkingConfig chunkMode. */ + public chunkMode?: "layoutBasedChunkingConfig"; + + /** + * Creates a new ChunkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Encodes the specified ChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @param message ChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @param message ChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Verifies a ChunkingConfig 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 ChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig; + + /** + * Creates a plain object from a ChunkingConfig message. Also converts values to other types if specified. + * @param message ChunkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChunkingConfig { - /** DocumentProcessingConfig parsingConfigOverrides */ - parsingConfigOverrides?: ({ [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }|null); - } + /** Properties of a LayoutBasedChunkingConfig. */ + interface ILayoutBasedChunkingConfig { - /** Represents a DocumentProcessingConfig. */ - class DocumentProcessingConfig implements IDocumentProcessingConfig { + /** LayoutBasedChunkingConfig chunkSize */ + chunkSize?: (number|null); - /** - * Constructs a new DocumentProcessingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig); + /** LayoutBasedChunkingConfig includeAncestorHeadings */ + includeAncestorHeadings?: (boolean|null); + } - /** DocumentProcessingConfig name. */ - public name: string; + /** Represents a LayoutBasedChunkingConfig. */ + class LayoutBasedChunkingConfig implements ILayoutBasedChunkingConfig { - /** DocumentProcessingConfig defaultParsingConfig. */ - public defaultParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null); + /** + * Constructs a new LayoutBasedChunkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig); - /** DocumentProcessingConfig parsingConfigOverrides. */ - public parsingConfigOverrides: { [k: string]: google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig }; + /** LayoutBasedChunkingConfig chunkSize. */ + public chunkSize: number; - /** - * Creates a new DocumentProcessingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DocumentProcessingConfig instance - */ - public static create(properties?: google.cloud.discoveryengine.v1.IDocumentProcessingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** LayoutBasedChunkingConfig includeAncestorHeadings. */ + public includeAncestorHeadings: boolean; - /** - * Encodes the specified DocumentProcessingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @param message DocumentProcessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new LayoutBasedChunkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LayoutBasedChunkingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @param message DocumentProcessingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1.IDocumentProcessingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LayoutBasedChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @param message LayoutBasedChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DocumentProcessingConfig - * @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.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Encodes the specified LayoutBasedChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @param message LayoutBasedChunkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DocumentProcessingConfig - * @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.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LayoutBasedChunkingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Verifies a DocumentProcessingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LayoutBasedChunkingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DocumentProcessingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig; + /** + * Verifies a LayoutBasedChunkingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. - * @param message DocumentProcessingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a LayoutBasedChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LayoutBasedChunkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig; - /** - * Converts this DocumentProcessingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a LayoutBasedChunkingConfig message. Also converts values to other types if specified. + * @param message LayoutBasedChunkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for DocumentProcessingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this LayoutBasedChunkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace DocumentProcessingConfig { + /** + * Gets the default type url for LayoutBasedChunkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } /** Properties of a ParsingConfig. */ interface IParsingConfig { @@ -17487,6 +19714,9 @@ export namespace google { /** ParsingConfig ocrParsingConfig */ ocrParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null); + + /** ParsingConfig layoutParsingConfig */ + layoutParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null); } /** Represents a ParsingConfig. */ @@ -17504,8 +19734,11 @@ export namespace google { /** ParsingConfig ocrParsingConfig. */ public ocrParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null); + /** ParsingConfig layoutParsingConfig. */ + public layoutParsingConfig?: (google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null); + /** ParsingConfig typeDedicatedConfig. */ - public typeDedicatedConfig?: ("digitalParsingConfig"|"ocrParsingConfig"); + public typeDedicatedConfig?: ("digitalParsingConfig"|"ocrParsingConfig"|"layoutParsingConfig"); /** * Creates a new ParsingConfig instance using the specified properties. @@ -17780,6 +20013,97 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a LayoutParsingConfig. */ + interface ILayoutParsingConfig { + } + + /** Represents a LayoutParsingConfig. */ + class LayoutParsingConfig implements ILayoutParsingConfig { + + /** + * Constructs a new LayoutParsingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig); + + /** + * Creates a new LayoutParsingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LayoutParsingConfig instance + */ + public static create(properties?: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Encodes the specified LayoutParsingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @param message LayoutParsingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LayoutParsingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @param message LayoutParsingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LayoutParsingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LayoutParsingConfig + * @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.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Verifies a LayoutParsingConfig 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 LayoutParsingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LayoutParsingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig; + + /** + * Creates a plain object from a LayoutParsingConfig message. Also converts values to other types if specified. + * @param message LayoutParsingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LayoutParsingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LayoutParsingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } diff --git a/packages/google-cloud-discoveryengine/protos/protos.js b/packages/google-cloud-discoveryengine/protos/protos.js index 257c9be5a3a5..6b2b3d3acc19 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.js +++ b/packages/google-cloud-discoveryengine/protos/protos.js @@ -442,6 +442,7 @@ case 2: case 3: case 4: + case 5: break; } } @@ -571,6 +572,10 @@ case 4: message.answerSkippedReasons[i] = 4; break; + case "NO_RELEVANT_CONTENT": + case 5: + message.answerSkippedReasons[i] = 5; + break; } } if (object.createTime != null) { @@ -3602,6 +3607,7 @@ * @property {string|null} [title] SearchResult title * @property {Array.|null} [snippetInfo] SearchResult snippetInfo * @property {Array.|null} [chunkInfo] SearchResult chunkInfo + * @property {google.protobuf.IStruct|null} [structData] SearchResult structData */ /** @@ -3661,6 +3667,14 @@ */ SearchResult.prototype.chunkInfo = $util.emptyArray; + /** + * SearchResult structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult + * @instance + */ + SearchResult.prototype.structData = null; + /** * Creates a new SearchResult instance using the specified properties. * @function create @@ -3697,6 +3711,8 @@ if (message.chunkInfo != null && message.chunkInfo.length) for (var i = 0; i < message.chunkInfo.length; ++i) $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.encode(message.chunkInfo[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -3755,6 +3771,10 @@ message.chunkInfo.push($root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.decode(reader, reader.uint32())); break; } + case 6: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3817,6 +3837,11 @@ return "chunkInfo." + error; } } + if (message.structData != null && message.hasOwnProperty("structData")) { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } return null; }; @@ -3858,6 +3883,11 @@ message.chunkInfo[i] = $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.fromObject(object.chunkInfo[i]); } } + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + } return message; }; @@ -3882,6 +3912,7 @@ object.document = ""; object.uri = ""; object.title = ""; + object.structData = null; } if (message.document != null && message.hasOwnProperty("document")) object.document = message.document; @@ -3899,6 +3930,8 @@ for (var j = 0; j < message.chunkInfo.length; ++j) object.chunkInfo[j] = $root.google.cloud.discoveryengine.v1.Answer.Step.Action.Observation.SearchResult.ChunkInfo.toObject(message.chunkInfo[j], options); } + if (message.structData != null && message.hasOwnProperty("structData")) + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); return object; }; @@ -4972,6 +5005,7 @@ * @property {number} NON_ANSWER_SEEKING_QUERY_IGNORED=2 NON_ANSWER_SEEKING_QUERY_IGNORED value * @property {number} OUT_OF_DOMAIN_QUERY_IGNORED=3 OUT_OF_DOMAIN_QUERY_IGNORED value * @property {number} POTENTIAL_POLICY_VIOLATION=4 POTENTIAL_POLICY_VIOLATION value + * @property {number} NO_RELEVANT_CONTENT=5 NO_RELEVANT_CONTENT value */ Answer.AnswerSkippedReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4980,117 +5014,38 @@ values[valuesById[2] = "NON_ANSWER_SEEKING_QUERY_IGNORED"] = 2; values[valuesById[3] = "OUT_OF_DOMAIN_QUERY_IGNORED"] = 3; values[valuesById[4] = "POTENTIAL_POLICY_VIOLATION"] = 4; + values[valuesById[5] = "NO_RELEVANT_CONTENT"] = 5; return values; })(); return Answer; })(); - /** - * IndustryVertical enum. - * @name google.cloud.discoveryengine.v1.IndustryVertical - * @enum {number} - * @property {number} INDUSTRY_VERTICAL_UNSPECIFIED=0 INDUSTRY_VERTICAL_UNSPECIFIED value - * @property {number} GENERIC=1 GENERIC value - * @property {number} MEDIA=2 MEDIA value - * @property {number} HEALTHCARE_FHIR=7 HEALTHCARE_FHIR value - */ - v1.IndustryVertical = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INDUSTRY_VERTICAL_UNSPECIFIED"] = 0; - values[valuesById[1] = "GENERIC"] = 1; - values[valuesById[2] = "MEDIA"] = 2; - values[valuesById[7] = "HEALTHCARE_FHIR"] = 7; - return values; - })(); - - /** - * SolutionType enum. - * @name google.cloud.discoveryengine.v1.SolutionType - * @enum {number} - * @property {number} SOLUTION_TYPE_UNSPECIFIED=0 SOLUTION_TYPE_UNSPECIFIED value - * @property {number} SOLUTION_TYPE_RECOMMENDATION=1 SOLUTION_TYPE_RECOMMENDATION value - * @property {number} SOLUTION_TYPE_SEARCH=2 SOLUTION_TYPE_SEARCH value - * @property {number} SOLUTION_TYPE_CHAT=3 SOLUTION_TYPE_CHAT value - * @property {number} SOLUTION_TYPE_GENERATIVE_CHAT=4 SOLUTION_TYPE_GENERATIVE_CHAT value - */ - v1.SolutionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SOLUTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SOLUTION_TYPE_RECOMMENDATION"] = 1; - values[valuesById[2] = "SOLUTION_TYPE_SEARCH"] = 2; - values[valuesById[3] = "SOLUTION_TYPE_CHAT"] = 3; - values[valuesById[4] = "SOLUTION_TYPE_GENERATIVE_CHAT"] = 4; - return values; - })(); - - /** - * SearchUseCase enum. - * @name google.cloud.discoveryengine.v1.SearchUseCase - * @enum {number} - * @property {number} SEARCH_USE_CASE_UNSPECIFIED=0 SEARCH_USE_CASE_UNSPECIFIED value - * @property {number} SEARCH_USE_CASE_SEARCH=1 SEARCH_USE_CASE_SEARCH value - * @property {number} SEARCH_USE_CASE_BROWSE=2 SEARCH_USE_CASE_BROWSE value - */ - v1.SearchUseCase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_USE_CASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_USE_CASE_SEARCH"] = 1; - values[valuesById[2] = "SEARCH_USE_CASE_BROWSE"] = 2; - return values; - })(); - - /** - * SearchTier enum. - * @name google.cloud.discoveryengine.v1.SearchTier - * @enum {number} - * @property {number} SEARCH_TIER_UNSPECIFIED=0 SEARCH_TIER_UNSPECIFIED value - * @property {number} SEARCH_TIER_STANDARD=1 SEARCH_TIER_STANDARD value - * @property {number} SEARCH_TIER_ENTERPRISE=2 SEARCH_TIER_ENTERPRISE value - */ - v1.SearchTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_TIER_STANDARD"] = 1; - values[valuesById[2] = "SEARCH_TIER_ENTERPRISE"] = 2; - return values; - })(); - - /** - * SearchAddOn enum. - * @name google.cloud.discoveryengine.v1.SearchAddOn - * @enum {number} - * @property {number} SEARCH_ADD_ON_UNSPECIFIED=0 SEARCH_ADD_ON_UNSPECIFIED value - * @property {number} SEARCH_ADD_ON_LLM=1 SEARCH_ADD_ON_LLM value - */ - v1.SearchAddOn = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_ADD_ON_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEARCH_ADD_ON_LLM"] = 1; - return values; - })(); - - v1.Interval = (function() { + v1.Chunk = (function() { /** - * Properties of an Interval. + * Properties of a Chunk. * @memberof google.cloud.discoveryengine.v1 - * @interface IInterval - * @property {number|null} [minimum] Interval minimum - * @property {number|null} [exclusiveMinimum] Interval exclusiveMinimum - * @property {number|null} [maximum] Interval maximum - * @property {number|null} [exclusiveMaximum] Interval exclusiveMaximum + * @interface IChunk + * @property {string|null} [name] Chunk name + * @property {string|null} [id] Chunk id + * @property {string|null} [content] Chunk content + * @property {number|null} [relevanceScore] Chunk relevanceScore + * @property {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null} [documentMetadata] Chunk documentMetadata + * @property {google.protobuf.IStruct|null} [derivedStructData] Chunk derivedStructData + * @property {google.cloud.discoveryengine.v1.Chunk.IPageSpan|null} [pageSpan] Chunk pageSpan + * @property {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null} [chunkMetadata] Chunk chunkMetadata */ /** - * Constructs a new Interval. + * Constructs a new Chunk. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an Interval. - * @implements IInterval + * @classdesc Represents a Chunk. + * @implements IChunk * @constructor - * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IChunk=} [properties] Properties to set */ - function Interval(properties) { + function Chunk(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5098,142 +5053,187 @@ } /** - * Interval minimum. - * @member {number|null|undefined} minimum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.minimum = null; + Chunk.prototype.name = ""; /** - * Interval exclusiveMinimum. - * @member {number|null|undefined} exclusiveMinimum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.exclusiveMinimum = null; + Chunk.prototype.id = ""; /** - * Interval maximum. - * @member {number|null|undefined} maximum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk content. + * @member {string} content + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.maximum = null; + Chunk.prototype.content = ""; /** - * Interval exclusiveMaximum. - * @member {number|null|undefined} exclusiveMaximum - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk relevanceScore. + * @member {number|null|undefined} relevanceScore + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Interval.prototype.exclusiveMaximum = null; + Chunk.prototype.relevanceScore = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Chunk documentMetadata. + * @member {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata|null|undefined} documentMetadata + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Chunk.prototype.documentMetadata = null; /** - * Interval min. - * @member {"minimum"|"exclusiveMinimum"|undefined} min - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk derivedStructData. + * @member {google.protobuf.IStruct|null|undefined} derivedStructData + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Object.defineProperty(Interval.prototype, "min", { - get: $util.oneOfGetter($oneOfFields = ["minimum", "exclusiveMinimum"]), - set: $util.oneOfSetter($oneOfFields) - }); + Chunk.prototype.derivedStructData = null; /** - * Interval max. - * @member {"maximum"|"exclusiveMaximum"|undefined} max - * @memberof google.cloud.discoveryengine.v1.Interval + * Chunk pageSpan. + * @member {google.cloud.discoveryengine.v1.Chunk.IPageSpan|null|undefined} pageSpan + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance */ - Object.defineProperty(Interval.prototype, "max", { - get: $util.oneOfGetter($oneOfFields = ["maximum", "exclusiveMaximum"]), + Chunk.prototype.pageSpan = null; + + /** + * Chunk chunkMetadata. + * @member {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata|null|undefined} chunkMetadata + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Chunk.prototype.chunkMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Chunk _relevanceScore. + * @member {"relevanceScore"|undefined} _relevanceScore + * @memberof google.cloud.discoveryengine.v1.Chunk + * @instance + */ + Object.defineProperty(Chunk.prototype, "_relevanceScore", { + get: $util.oneOfGetter($oneOfFields = ["relevanceScore"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Interval instance using the specified properties. + * Creates a new Chunk instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Interval} Interval instance + * @param {google.cloud.discoveryengine.v1.IChunk=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk instance */ - Interval.create = function create(properties) { - return new Interval(properties); + Chunk.create = function create(properties) { + return new Chunk(properties); }; /** - * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * Encodes the specified Chunk message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IChunk} message Chunk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interval.encode = function encode(message, writer) { + Chunk.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimum); - if (message.exclusiveMinimum != null && Object.hasOwnProperty.call(message, "exclusiveMinimum")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.exclusiveMinimum); - if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.maximum); - if (message.exclusiveMaximum != null && Object.hasOwnProperty.call(message, "exclusiveMaximum")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.exclusiveMaximum); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.content); + if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) + $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.documentMetadata != null && Object.hasOwnProperty.call(message, "documentMetadata")) + $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.encode(message.documentMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageSpan != null && Object.hasOwnProperty.call(message, "pageSpan")) + $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.encode(message.pageSpan, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.chunkMetadata != null && Object.hasOwnProperty.call(message, "chunkMetadata")) + $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.encode(message.chunkMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.relevanceScore != null && Object.hasOwnProperty.call(message, "relevanceScore")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.relevanceScore); return writer; }; /** - * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * Encodes the specified Chunk message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IChunk} message Chunk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Interval.encodeDelimited = function encodeDelimited(message, writer) { + Chunk.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Interval message from the specified reader or buffer. + * Decodes a Chunk message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interval.decode = function decode(reader, length) { + Chunk.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.cloud.discoveryengine.v1.Interval(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Chunk(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.minimum = reader.double(); + message.name = reader.string(); break; } case 2: { - message.exclusiveMinimum = reader.double(); + message.id = reader.string(); break; } case 3: { - message.maximum = reader.double(); + message.content = reader.string(); + break; + } + case 8: { + message.relevanceScore = reader.double(); + break; + } + case 5: { + message.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.decode(reader, reader.uint32()); break; } case 4: { - message.exclusiveMaximum = reader.double(); + message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.decode(reader, reader.uint32()); + break; + } + case 7: { + message.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.decode(reader, reader.uint32()); break; } default: @@ -5245,273 +5245,3593 @@ }; /** - * Decodes an Interval message from the specified reader or buffer, length delimited. + * Decodes a Chunk message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Interval.decodeDelimited = function decodeDelimited(reader) { + Chunk.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Interval message. + * Verifies a Chunk message. * @function verify - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Interval.verify = function verify(message) { + Chunk.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.minimum != null && message.hasOwnProperty("minimum")) { - properties.min = 1; - if (typeof message.minimum !== "number") - return "minimum: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.relevanceScore != null && message.hasOwnProperty("relevanceScore")) { + properties._relevanceScore = 1; + if (typeof message.relevanceScore !== "number") + return "relevanceScore: number expected"; } - if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { - if (properties.min === 1) - return "min: multiple values"; - properties.min = 1; - if (typeof message.exclusiveMinimum !== "number") - return "exclusiveMinimum: number expected"; + if (message.documentMetadata != null && message.hasOwnProperty("documentMetadata")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify(message.documentMetadata); + if (error) + return "documentMetadata." + error; } - if (message.maximum != null && message.hasOwnProperty("maximum")) { - properties.max = 1; - if (typeof message.maximum !== "number") - return "maximum: number expected"; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { + var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (error) + return "derivedStructData." + error; } - if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { - if (properties.max === 1) - return "max: multiple values"; - properties.max = 1; - if (typeof message.exclusiveMaximum !== "number") - return "exclusiveMaximum: number expected"; + if (message.pageSpan != null && message.hasOwnProperty("pageSpan")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.verify(message.pageSpan); + if (error) + return "pageSpan." + error; + } + if (message.chunkMetadata != null && message.hasOwnProperty("chunkMetadata")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify(message.chunkMetadata); + if (error) + return "chunkMetadata." + error; } return null; }; /** - * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * Creates a Chunk message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @returns {google.cloud.discoveryengine.v1.Chunk} Chunk */ - Interval.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Interval) + Chunk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk) return object; - var message = new $root.google.cloud.discoveryengine.v1.Interval(); - if (object.minimum != null) - message.minimum = Number(object.minimum); - if (object.exclusiveMinimum != null) - message.exclusiveMinimum = Number(object.exclusiveMinimum); - if (object.maximum != null) - message.maximum = Number(object.maximum); - if (object.exclusiveMaximum != null) - message.exclusiveMaximum = Number(object.exclusiveMaximum); + var message = new $root.google.cloud.discoveryengine.v1.Chunk(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.content != null) + message.content = String(object.content); + if (object.relevanceScore != null) + message.relevanceScore = Number(object.relevanceScore); + if (object.documentMetadata != null) { + if (typeof object.documentMetadata !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.documentMetadata: object expected"); + message.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.fromObject(object.documentMetadata); + } + if (object.derivedStructData != null) { + if (typeof object.derivedStructData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.derivedStructData: object expected"); + message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + } + if (object.pageSpan != null) { + if (typeof object.pageSpan !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.pageSpan: object expected"); + message.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.fromObject(object.pageSpan); + } + if (object.chunkMetadata != null) { + if (typeof object.chunkMetadata !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.chunkMetadata: object expected"); + message.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.fromObject(object.chunkMetadata); + } return message; }; /** - * Creates a plain object from an Interval message. Also converts values to other types if specified. + * Creates a plain object from a Chunk message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static - * @param {google.cloud.discoveryengine.v1.Interval} message Interval + * @param {google.cloud.discoveryengine.v1.Chunk} message Chunk * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Interval.toObject = function toObject(message, options) { + Chunk.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.minimum != null && message.hasOwnProperty("minimum")) { - object.minimum = options.json && !isFinite(message.minimum) ? String(message.minimum) : message.minimum; - if (options.oneofs) - object.min = "minimum"; - } - if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { - object.exclusiveMinimum = options.json && !isFinite(message.exclusiveMinimum) ? String(message.exclusiveMinimum) : message.exclusiveMinimum; - if (options.oneofs) - object.min = "exclusiveMinimum"; - } - if (message.maximum != null && message.hasOwnProperty("maximum")) { - object.maximum = options.json && !isFinite(message.maximum) ? String(message.maximum) : message.maximum; - if (options.oneofs) - object.max = "maximum"; + if (options.defaults) { + object.name = ""; + object.id = ""; + object.content = ""; + object.derivedStructData = null; + object.documentMetadata = null; + object.pageSpan = null; + object.chunkMetadata = null; } - if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { - object.exclusiveMaximum = options.json && !isFinite(message.exclusiveMaximum) ? String(message.exclusiveMaximum) : message.exclusiveMaximum; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) + object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); + if (message.documentMetadata != null && message.hasOwnProperty("documentMetadata")) + object.documentMetadata = $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.toObject(message.documentMetadata, options); + if (message.pageSpan != null && message.hasOwnProperty("pageSpan")) + object.pageSpan = $root.google.cloud.discoveryengine.v1.Chunk.PageSpan.toObject(message.pageSpan, options); + if (message.chunkMetadata != null && message.hasOwnProperty("chunkMetadata")) + object.chunkMetadata = $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.toObject(message.chunkMetadata, options); + if (message.relevanceScore != null && message.hasOwnProperty("relevanceScore")) { + object.relevanceScore = options.json && !isFinite(message.relevanceScore) ? String(message.relevanceScore) : message.relevanceScore; if (options.oneofs) - object.max = "exclusiveMaximum"; + object._relevanceScore = "relevanceScore"; } return object; }; /** - * Converts this Interval to JSON. + * Converts this Chunk to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @instance * @returns {Object.} JSON object */ - Interval.prototype.toJSON = function toJSON() { + Chunk.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Interval + * Gets the default type url for Chunk * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Interval + * @memberof google.cloud.discoveryengine.v1.Chunk * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Chunk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Interval"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk"; }; - return Interval; - })(); + Chunk.DocumentMetadata = (function() { - v1.CustomAttribute = (function() { + /** + * Properties of a DocumentMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IDocumentMetadata + * @property {string|null} [uri] DocumentMetadata uri + * @property {string|null} [title] DocumentMetadata title + * @property {google.protobuf.IStruct|null} [structData] DocumentMetadata structData + */ - /** - * Properties of a CustomAttribute. - * @memberof google.cloud.discoveryengine.v1 - * @interface ICustomAttribute - * @property {Array.|null} [text] CustomAttribute text - * @property {Array.|null} [numbers] CustomAttribute numbers - */ + /** + * Constructs a new DocumentMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a DocumentMetadata. + * @implements IDocumentMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata=} [properties] Properties to set + */ + function DocumentMetadata(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 CustomAttribute. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CustomAttribute. - * @implements ICustomAttribute - * @constructor - * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set - */ - function CustomAttribute(properties) { - this.text = []; - this.numbers = []; - 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]]; - } + /** + * DocumentMetadata uri. + * @member {string} uri + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.uri = ""; - /** - * CustomAttribute text. - * @member {Array.} text - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @instance - */ - CustomAttribute.prototype.text = $util.emptyArray; + /** + * DocumentMetadata title. + * @member {string} title + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.title = ""; - /** - * CustomAttribute numbers. - * @member {Array.} numbers - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @instance - */ - CustomAttribute.prototype.numbers = $util.emptyArray; + /** + * DocumentMetadata structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + */ + DocumentMetadata.prototype.structData = null; - /** - * Creates a new CustomAttribute instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute instance - */ - CustomAttribute.create = function create(properties) { - return new CustomAttribute(properties); - }; + /** + * Creates a new DocumentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata instance + */ + DocumentMetadata.create = function create(properties) { + return new DocumentMetadata(properties); + }; - /** - * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.CustomAttribute - * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + /** + * Encodes the specified DocumentMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata} message DocumentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DocumentMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IDocumentMetadata} message DocumentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMetadata.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.cloud.discoveryengine.v1.Chunk.DocumentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.structData != null && message.hasOwnProperty("structData")) { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } + return null; + }; + + /** + * Creates a DocumentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} DocumentMetadata + */ + DocumentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.title != null) + message.title = String(object.title); + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.DocumentMetadata.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + } + return message; + }; + + /** + * Creates a plain object from a DocumentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.DocumentMetadata} message DocumentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.title = ""; + object.structData = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.structData != null && message.hasOwnProperty("structData")) + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); + return object; + }; + + /** + * Converts this DocumentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @instance + * @returns {Object.} JSON object + */ + DocumentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.DocumentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.DocumentMetadata"; + }; + + return DocumentMetadata; + })(); + + Chunk.PageSpan = (function() { + + /** + * Properties of a PageSpan. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IPageSpan + * @property {number|null} [pageStart] PageSpan pageStart + * @property {number|null} [pageEnd] PageSpan pageEnd + */ + + /** + * Constructs a new PageSpan. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a PageSpan. + * @implements IPageSpan + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan=} [properties] Properties to set + */ + function PageSpan(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]]; + } + + /** + * PageSpan pageStart. + * @member {number} pageStart + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + */ + PageSpan.prototype.pageStart = 0; + + /** + * PageSpan pageEnd. + * @member {number} pageEnd + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + */ + PageSpan.prototype.pageEnd = 0; + + /** + * Creates a new PageSpan instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan instance + */ + PageSpan.create = function create(properties) { + return new PageSpan(properties); + }; + + /** + * Encodes the specified PageSpan message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan} message PageSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageStart != null && Object.hasOwnProperty.call(message, "pageStart")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageStart); + if (message.pageEnd != null && Object.hasOwnProperty.call(message, "pageEnd")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageEnd); + return writer; + }; + + /** + * Encodes the specified PageSpan message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.PageSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IPageSpan} message PageSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageSpan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageSpan.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.cloud.discoveryengine.v1.Chunk.PageSpan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageStart = reader.int32(); + break; + } + case 2: { + message.pageEnd = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageSpan message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageSpan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageStart != null && message.hasOwnProperty("pageStart")) + if (!$util.isInteger(message.pageStart)) + return "pageStart: integer expected"; + if (message.pageEnd != null && message.hasOwnProperty("pageEnd")) + if (!$util.isInteger(message.pageEnd)) + return "pageEnd: integer expected"; + return null; + }; + + /** + * Creates a PageSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.PageSpan} PageSpan + */ + PageSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.PageSpan) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.PageSpan(); + if (object.pageStart != null) + message.pageStart = object.pageStart | 0; + if (object.pageEnd != null) + message.pageEnd = object.pageEnd | 0; + return message; + }; + + /** + * Creates a plain object from a PageSpan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.PageSpan} message PageSpan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageSpan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageStart = 0; + object.pageEnd = 0; + } + if (message.pageStart != null && message.hasOwnProperty("pageStart")) + object.pageStart = message.pageStart; + if (message.pageEnd != null && message.hasOwnProperty("pageEnd")) + object.pageEnd = message.pageEnd; + return object; + }; + + /** + * Converts this PageSpan to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @instance + * @returns {Object.} JSON object + */ + PageSpan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PageSpan + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.PageSpan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.PageSpan"; + }; + + return PageSpan; + })(); + + Chunk.ChunkMetadata = (function() { + + /** + * Properties of a ChunkMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @interface IChunkMetadata + * @property {Array.|null} [previousChunks] ChunkMetadata previousChunks + * @property {Array.|null} [nextChunks] ChunkMetadata nextChunks + */ + + /** + * Constructs a new ChunkMetadata. + * @memberof google.cloud.discoveryengine.v1.Chunk + * @classdesc Represents a ChunkMetadata. + * @implements IChunkMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata=} [properties] Properties to set + */ + function ChunkMetadata(properties) { + this.previousChunks = []; + this.nextChunks = []; + 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]]; + } + + /** + * ChunkMetadata previousChunks. + * @member {Array.} previousChunks + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + */ + ChunkMetadata.prototype.previousChunks = $util.emptyArray; + + /** + * ChunkMetadata nextChunks. + * @member {Array.} nextChunks + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + */ + ChunkMetadata.prototype.nextChunks = $util.emptyArray; + + /** + * Creates a new ChunkMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata instance + */ + ChunkMetadata.create = function create(properties) { + return new ChunkMetadata(properties); + }; + + /** + * Encodes the specified ChunkMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata} message ChunkMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.previousChunks != null && message.previousChunks.length) + for (var i = 0; i < message.previousChunks.length; ++i) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.previousChunks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextChunks != null && message.nextChunks.length) + for (var i = 0; i < message.nextChunks.length; ++i) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.nextChunks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChunkMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.IChunkMetadata} message ChunkMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkMetadata.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.cloud.discoveryengine.v1.Chunk.ChunkMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.previousChunks && message.previousChunks.length)) + message.previousChunks = []; + message.previousChunks.push($root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.nextChunks && message.nextChunks.length)) + message.nextChunks = []; + message.nextChunks.push($root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.previousChunks != null && message.hasOwnProperty("previousChunks")) { + if (!Array.isArray(message.previousChunks)) + return "previousChunks: array expected"; + for (var i = 0; i < message.previousChunks.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.previousChunks[i]); + if (error) + return "previousChunks." + error; + } + } + if (message.nextChunks != null && message.hasOwnProperty("nextChunks")) { + if (!Array.isArray(message.nextChunks)) + return "nextChunks: array expected"; + for (var i = 0; i < message.nextChunks.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.nextChunks[i]); + if (error) + return "nextChunks." + error; + } + } + return null; + }; + + /** + * Creates a ChunkMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} ChunkMetadata + */ + ChunkMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata(); + if (object.previousChunks) { + if (!Array.isArray(object.previousChunks)) + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.previousChunks: array expected"); + message.previousChunks = []; + for (var i = 0; i < object.previousChunks.length; ++i) { + if (typeof object.previousChunks[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.previousChunks: object expected"); + message.previousChunks[i] = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.previousChunks[i]); + } + } + if (object.nextChunks) { + if (!Array.isArray(object.nextChunks)) + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.nextChunks: array expected"); + message.nextChunks = []; + for (var i = 0; i < object.nextChunks.length; ++i) { + if (typeof object.nextChunks[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Chunk.ChunkMetadata.nextChunks: object expected"); + message.nextChunks[i] = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.nextChunks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChunkMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {google.cloud.discoveryengine.v1.Chunk.ChunkMetadata} message ChunkMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.previousChunks = []; + object.nextChunks = []; + } + if (message.previousChunks && message.previousChunks.length) { + object.previousChunks = []; + for (var j = 0; j < message.previousChunks.length; ++j) + object.previousChunks[j] = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.previousChunks[j], options); + } + if (message.nextChunks && message.nextChunks.length) { + object.nextChunks = []; + for (var j = 0; j < message.nextChunks.length; ++j) + object.nextChunks[j] = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.nextChunks[j], options); + } + return object; + }; + + /** + * Converts this ChunkMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @instance + * @returns {Object.} JSON object + */ + ChunkMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Chunk.ChunkMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Chunk.ChunkMetadata"; + }; + + return ChunkMetadata; + })(); + + return Chunk; + })(); + + /** + * IndustryVertical enum. + * @name google.cloud.discoveryengine.v1.IndustryVertical + * @enum {number} + * @property {number} INDUSTRY_VERTICAL_UNSPECIFIED=0 INDUSTRY_VERTICAL_UNSPECIFIED value + * @property {number} GENERIC=1 GENERIC value + * @property {number} MEDIA=2 MEDIA value + * @property {number} HEALTHCARE_FHIR=7 HEALTHCARE_FHIR value + */ + v1.IndustryVertical = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_VERTICAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "GENERIC"] = 1; + values[valuesById[2] = "MEDIA"] = 2; + values[valuesById[7] = "HEALTHCARE_FHIR"] = 7; + return values; + })(); + + /** + * SolutionType enum. + * @name google.cloud.discoveryengine.v1.SolutionType + * @enum {number} + * @property {number} SOLUTION_TYPE_UNSPECIFIED=0 SOLUTION_TYPE_UNSPECIFIED value + * @property {number} SOLUTION_TYPE_RECOMMENDATION=1 SOLUTION_TYPE_RECOMMENDATION value + * @property {number} SOLUTION_TYPE_SEARCH=2 SOLUTION_TYPE_SEARCH value + * @property {number} SOLUTION_TYPE_CHAT=3 SOLUTION_TYPE_CHAT value + * @property {number} SOLUTION_TYPE_GENERATIVE_CHAT=4 SOLUTION_TYPE_GENERATIVE_CHAT value + */ + v1.SolutionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SOLUTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOLUTION_TYPE_RECOMMENDATION"] = 1; + values[valuesById[2] = "SOLUTION_TYPE_SEARCH"] = 2; + values[valuesById[3] = "SOLUTION_TYPE_CHAT"] = 3; + values[valuesById[4] = "SOLUTION_TYPE_GENERATIVE_CHAT"] = 4; + return values; + })(); + + /** + * SearchUseCase enum. + * @name google.cloud.discoveryengine.v1.SearchUseCase + * @enum {number} + * @property {number} SEARCH_USE_CASE_UNSPECIFIED=0 SEARCH_USE_CASE_UNSPECIFIED value + * @property {number} SEARCH_USE_CASE_SEARCH=1 SEARCH_USE_CASE_SEARCH value + * @property {number} SEARCH_USE_CASE_BROWSE=2 SEARCH_USE_CASE_BROWSE value + */ + v1.SearchUseCase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_USE_CASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_USE_CASE_SEARCH"] = 1; + values[valuesById[2] = "SEARCH_USE_CASE_BROWSE"] = 2; + return values; + })(); + + /** + * SearchTier enum. + * @name google.cloud.discoveryengine.v1.SearchTier + * @enum {number} + * @property {number} SEARCH_TIER_UNSPECIFIED=0 SEARCH_TIER_UNSPECIFIED value + * @property {number} SEARCH_TIER_STANDARD=1 SEARCH_TIER_STANDARD value + * @property {number} SEARCH_TIER_ENTERPRISE=2 SEARCH_TIER_ENTERPRISE value + */ + v1.SearchTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_TIER_STANDARD"] = 1; + values[valuesById[2] = "SEARCH_TIER_ENTERPRISE"] = 2; + return values; + })(); + + /** + * SearchAddOn enum. + * @name google.cloud.discoveryengine.v1.SearchAddOn + * @enum {number} + * @property {number} SEARCH_ADD_ON_UNSPECIFIED=0 SEARCH_ADD_ON_UNSPECIFIED value + * @property {number} SEARCH_ADD_ON_LLM=1 SEARCH_ADD_ON_LLM value + */ + v1.SearchAddOn = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_ADD_ON_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEARCH_ADD_ON_LLM"] = 1; + return values; + })(); + + v1.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.cloud.discoveryengine.v1 + * @interface IInterval + * @property {number|null} [minimum] Interval minimum + * @property {number|null} [exclusiveMinimum] Interval exclusiveMinimum + * @property {number|null} [maximum] Interval maximum + * @property {number|null} [exclusiveMaximum] Interval exclusiveMaximum + */ + + /** + * Constructs a new Interval. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + */ + function Interval(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]]; + } + + /** + * Interval minimum. + * @member {number|null|undefined} minimum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.minimum = null; + + /** + * Interval exclusiveMinimum. + * @member {number|null|undefined} exclusiveMinimum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.exclusiveMinimum = null; + + /** + * Interval maximum. + * @member {number|null|undefined} maximum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.maximum = null; + + /** + * Interval exclusiveMaximum. + * @member {number|null|undefined} exclusiveMaximum + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Interval.prototype.exclusiveMaximum = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Interval min. + * @member {"minimum"|"exclusiveMinimum"|undefined} min + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "min", { + get: $util.oneOfGetter($oneOfFields = ["minimum", "exclusiveMinimum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Interval max. + * @member {"maximum"|"exclusiveMaximum"|undefined} max + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "max", { + get: $util.oneOfGetter($oneOfFields = ["maximum", "exclusiveMaximum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimum); + if (message.exclusiveMinimum != null && Object.hasOwnProperty.call(message, "exclusiveMinimum")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.exclusiveMinimum); + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.maximum); + if (message.exclusiveMaximum != null && Object.hasOwnProperty.call(message, "exclusiveMaximum")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.exclusiveMaximum); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.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.cloud.discoveryengine.v1.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimum = reader.double(); + break; + } + case 2: { + message.exclusiveMinimum = reader.double(); + break; + } + case 3: { + message.maximum = reader.double(); + break; + } + case 4: { + message.exclusiveMaximum = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + properties.min = 1; + if (typeof message.minimum !== "number") + return "minimum: number expected"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + if (properties.min === 1) + return "min: multiple values"; + properties.min = 1; + if (typeof message.exclusiveMinimum !== "number") + return "exclusiveMinimum: number expected"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + properties.max = 1; + if (typeof message.maximum !== "number") + return "maximum: number expected"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + if (properties.max === 1) + return "max: multiple values"; + properties.max = 1; + if (typeof message.exclusiveMaximum !== "number") + return "exclusiveMaximum: number expected"; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Interval) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Interval(); + if (object.minimum != null) + message.minimum = Number(object.minimum); + if (object.exclusiveMinimum != null) + message.exclusiveMinimum = Number(object.exclusiveMinimum); + if (object.maximum != null) + message.maximum = Number(object.maximum); + if (object.exclusiveMaximum != null) + message.exclusiveMaximum = Number(object.exclusiveMaximum); + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {google.cloud.discoveryengine.v1.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + object.minimum = options.json && !isFinite(message.minimum) ? String(message.minimum) : message.minimum; + if (options.oneofs) + object.min = "minimum"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + object.exclusiveMinimum = options.json && !isFinite(message.exclusiveMinimum) ? String(message.exclusiveMinimum) : message.exclusiveMinimum; + if (options.oneofs) + object.min = "exclusiveMinimum"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + object.maximum = options.json && !isFinite(message.maximum) ? String(message.maximum) : message.maximum; + if (options.oneofs) + object.max = "maximum"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + object.exclusiveMaximum = options.json && !isFinite(message.exclusiveMaximum) ? String(message.exclusiveMaximum) : message.exclusiveMaximum; + if (options.oneofs) + object.max = "exclusiveMaximum"; + } + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Interval"; + }; + + return Interval; + })(); + + v1.CustomAttribute = (function() { + + /** + * Properties of a CustomAttribute. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICustomAttribute + * @property {Array.|null} [text] CustomAttribute text + * @property {Array.|null} [numbers] CustomAttribute numbers + */ + + /** + * Constructs a new CustomAttribute. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CustomAttribute. + * @implements ICustomAttribute + * @constructor + * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set + */ + function CustomAttribute(properties) { + this.text = []; + this.numbers = []; + 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]]; + } + + /** + * CustomAttribute text. + * @member {Array.} text + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + */ + CustomAttribute.prototype.text = $util.emptyArray; + + /** + * CustomAttribute numbers. + * @member {Array.} numbers + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + */ + CustomAttribute.prototype.numbers = $util.emptyArray; + + /** + * Creates a new CustomAttribute instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute instance + */ + CustomAttribute.create = function create(properties) { + return new CustomAttribute(properties); + }; + + /** + * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && message.text.length) + for (var i = 0; i < message.text.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); + if (message.numbers != null && message.numbers.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.numbers.length; ++i) + writer.double(message.numbers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.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.cloud.discoveryengine.v1.CustomAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.text && message.text.length)) + message.text = []; + message.text.push(reader.string()); + break; + } + case 2: { + if (!(message.numbers && message.numbers.length)) + message.numbers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.numbers.push(reader.double()); + } else + message.numbers.push(reader.double()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomAttribute message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + if (!Array.isArray(message.text)) + return "text: array expected"; + for (var i = 0; i < message.text.length; ++i) + if (!$util.isString(message.text[i])) + return "text: string[] expected"; + } + if (message.numbers != null && message.hasOwnProperty("numbers")) { + if (!Array.isArray(message.numbers)) + return "numbers: array expected"; + for (var i = 0; i < message.numbers.length; ++i) + if (typeof message.numbers[i] !== "number") + return "numbers: number[] expected"; + } + return null; + }; + + /** + * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + */ + CustomAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CustomAttribute) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + if (object.numbers) { + if (!Array.isArray(object.numbers)) + throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.numbers: array expected"); + message.numbers = []; + for (var i = 0; i < object.numbers.length; ++i) + message.numbers[i] = Number(object.numbers[i]); + } + return message; + }; + + /** + * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {google.cloud.discoveryengine.v1.CustomAttribute} message CustomAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.text = []; + object.numbers = []; + } + if (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + if (message.numbers && message.numbers.length) { + object.numbers = []; + for (var j = 0; j < message.numbers.length; ++j) + object.numbers[j] = options.json && !isFinite(message.numbers[j]) ? String(message.numbers[j]) : message.numbers[j]; + } + return object; + }; + + /** + * Converts this CustomAttribute to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @instance + * @returns {Object.} JSON object + */ + CustomAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomAttribute + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CustomAttribute"; + }; + + return CustomAttribute; + })(); + + v1.UserInfo = (function() { + + /** + * Properties of a UserInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IUserInfo + * @property {string|null} [userId] UserInfo userId + * @property {string|null} [userAgent] UserInfo userAgent + */ + + /** + * Constructs a new UserInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a UserInfo. + * @implements IUserInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + */ + function UserInfo(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]]; + } + + /** + * UserInfo userId. + * @member {string} userId + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + */ + UserInfo.prototype.userId = ""; + + /** + * UserInfo userAgent. + * @member {string} userAgent + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + */ + UserInfo.prototype.userAgent = ""; + + /** + * Creates a new UserInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo instance + */ + UserInfo.create = function create(properties) { + return new UserInfo(properties); + }; + + /** + * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userAgent); + return writer; + }; + + /** + * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInfo.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.cloud.discoveryengine.v1.UserInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userId = reader.string(); + break; + } + case 2: { + message.userAgent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (!$util.isString(message.userAgent)) + return "userAgent: string expected"; + return null; + }; + + /** + * Creates a UserInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + */ + UserInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.UserInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.UserInfo(); + if (object.userId != null) + message.userId = String(object.userId); + if (object.userAgent != null) + message.userAgent = String(object.userAgent); + return message; + }; + + /** + * Creates a plain object from a UserInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {google.cloud.discoveryengine.v1.UserInfo} message UserInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.userId = ""; + object.userAgent = ""; + } + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = message.userAgent; + return object; + }; + + /** + * Converts this UserInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @instance + * @returns {Object.} JSON object + */ + UserInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.UserInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserInfo"; + }; + + return UserInfo; + })(); + + v1.SuggestionDenyListEntry = (function() { + + /** + * Properties of a SuggestionDenyListEntry. + * @memberof google.cloud.discoveryengine.v1 + * @interface ISuggestionDenyListEntry + * @property {string|null} [blockPhrase] SuggestionDenyListEntry blockPhrase + * @property {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator|null} [matchOperator] SuggestionDenyListEntry matchOperator + */ + + /** + * Constructs a new SuggestionDenyListEntry. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a SuggestionDenyListEntry. + * @implements ISuggestionDenyListEntry + * @constructor + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + */ + function SuggestionDenyListEntry(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]]; + } + + /** + * SuggestionDenyListEntry blockPhrase. + * @member {string} blockPhrase + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + */ + SuggestionDenyListEntry.prototype.blockPhrase = ""; + + /** + * SuggestionDenyListEntry matchOperator. + * @member {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator} matchOperator + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + */ + SuggestionDenyListEntry.prototype.matchOperator = 0; + + /** + * Creates a new SuggestionDenyListEntry instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry instance + */ + SuggestionDenyListEntry.create = function create(properties) { + return new SuggestionDenyListEntry(properties); + }; + + /** + * Encodes the specified SuggestionDenyListEntry message. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionDenyListEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockPhrase != null && Object.hasOwnProperty.call(message, "blockPhrase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.blockPhrase); + if (message.matchOperator != null && Object.hasOwnProperty.call(message, "matchOperator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchOperator); + return writer; + }; + + /** + * Encodes the specified SuggestionDenyListEntry message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionDenyListEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionDenyListEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionDenyListEntry.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.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.blockPhrase = reader.string(); + break; + } + case 2: { + message.matchOperator = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionDenyListEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionDenyListEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionDenyListEntry message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionDenyListEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) + if (!$util.isString(message.blockPhrase)) + return "blockPhrase: string expected"; + if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) + switch (message.matchOperator) { + default: + return "matchOperator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SuggestionDenyListEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + */ + SuggestionDenyListEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + if (object.blockPhrase != null) + message.blockPhrase = String(object.blockPhrase); + switch (object.matchOperator) { + default: + if (typeof object.matchOperator === "number") { + message.matchOperator = object.matchOperator; + break; + } + break; + case "MATCH_OPERATOR_UNSPECIFIED": + case 0: + message.matchOperator = 0; + break; + case "EXACT_MATCH": + case 1: + message.matchOperator = 1; + break; + case "CONTAINS": + case 2: + message.matchOperator = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SuggestionDenyListEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} message SuggestionDenyListEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionDenyListEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockPhrase = ""; + object.matchOperator = options.enums === String ? "MATCH_OPERATOR_UNSPECIFIED" : 0; + } + if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) + object.blockPhrase = message.blockPhrase; + if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) + object.matchOperator = options.enums === String ? $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] === undefined ? message.matchOperator : $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] : message.matchOperator; + return object; + }; + + /** + * Converts this SuggestionDenyListEntry to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @instance + * @returns {Object.} JSON object + */ + SuggestionDenyListEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SuggestionDenyListEntry + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionDenyListEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SuggestionDenyListEntry"; + }; + + /** + * MatchOperator enum. + * @name google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator + * @enum {number} + * @property {number} MATCH_OPERATOR_UNSPECIFIED=0 MATCH_OPERATOR_UNSPECIFIED value + * @property {number} EXACT_MATCH=1 EXACT_MATCH value + * @property {number} CONTAINS=2 CONTAINS value + */ + SuggestionDenyListEntry.MatchOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT_MATCH"] = 1; + values[valuesById[2] = "CONTAINS"] = 2; + return values; + })(); + + return SuggestionDenyListEntry; + })(); + + v1.CompletionSuggestion = (function() { + + /** + * Properties of a CompletionSuggestion. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompletionSuggestion + * @property {number|null} [globalScore] CompletionSuggestion globalScore + * @property {number|Long|null} [frequency] CompletionSuggestion frequency + * @property {string|null} [suggestion] CompletionSuggestion suggestion + * @property {string|null} [languageCode] CompletionSuggestion languageCode + * @property {string|null} [groupId] CompletionSuggestion groupId + * @property {number|null} [groupScore] CompletionSuggestion groupScore + * @property {Array.|null} [alternativePhrases] CompletionSuggestion alternativePhrases + */ + + /** + * Constructs a new CompletionSuggestion. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionSuggestion. + * @implements ICompletionSuggestion + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion=} [properties] Properties to set + */ + function CompletionSuggestion(properties) { + this.alternativePhrases = []; + 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]]; + } + + /** + * CompletionSuggestion globalScore. + * @member {number|null|undefined} globalScore + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.globalScore = null; + + /** + * CompletionSuggestion frequency. + * @member {number|Long|null|undefined} frequency + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.frequency = null; + + /** + * CompletionSuggestion suggestion. + * @member {string} suggestion + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.suggestion = ""; + + /** + * CompletionSuggestion languageCode. + * @member {string} languageCode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.languageCode = ""; + + /** + * CompletionSuggestion groupId. + * @member {string} groupId + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.groupId = ""; + + /** + * CompletionSuggestion groupScore. + * @member {number} groupScore + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.groupScore = 0; + + /** + * CompletionSuggestion alternativePhrases. + * @member {Array.} alternativePhrases + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + CompletionSuggestion.prototype.alternativePhrases = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CompletionSuggestion rankingInfo. + * @member {"globalScore"|"frequency"|undefined} rankingInfo + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + */ + Object.defineProperty(CompletionSuggestion.prototype, "rankingInfo", { + get: $util.oneOfGetter($oneOfFields = ["globalScore", "frequency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompletionSuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion instance + */ + CompletionSuggestion.create = function create(properties) { + return new CompletionSuggestion(properties); + }; + + /** + * Encodes the specified CompletionSuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion} message CompletionSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompletionSuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.globalScore != null && Object.hasOwnProperty.call(message, "globalScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.globalScore); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.frequency); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupId); + if (message.groupScore != null && Object.hasOwnProperty.call(message, "groupScore")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.groupScore); + if (message.alternativePhrases != null && message.alternativePhrases.length) + for (var i = 0; i < message.alternativePhrases.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.alternativePhrases[i]); + return writer; + }; + + /** + * Encodes the specified CompletionSuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionSuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.ICompletionSuggestion} message CompletionSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompletionSuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompletionSuggestion.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.cloud.discoveryengine.v1.CompletionSuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.globalScore = reader.double(); + break; + } + case 3: { + message.frequency = reader.int64(); + break; + } + case 1: { + message.suggestion = reader.string(); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.groupId = reader.string(); + break; + } + case 6: { + message.groupScore = reader.double(); + break; + } + case 7: { + if (!(message.alternativePhrases && message.alternativePhrases.length)) + message.alternativePhrases = []; + message.alternativePhrases.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompletionSuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompletionSuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompletionSuggestion message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompletionSuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.globalScore != null && message.hasOwnProperty("globalScore")) { + properties.rankingInfo = 1; + if (typeof message.globalScore !== "number") + return "globalScore: number expected"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (properties.rankingInfo === 1) + return "rankingInfo: multiple values"; + properties.rankingInfo = 1; + if (!$util.isInteger(message.frequency) && !(message.frequency && $util.isInteger(message.frequency.low) && $util.isInteger(message.frequency.high))) + return "frequency: integer|Long expected"; + } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.groupScore != null && message.hasOwnProperty("groupScore")) + if (typeof message.groupScore !== "number") + return "groupScore: number expected"; + if (message.alternativePhrases != null && message.hasOwnProperty("alternativePhrases")) { + if (!Array.isArray(message.alternativePhrases)) + return "alternativePhrases: array expected"; + for (var i = 0; i < message.alternativePhrases.length; ++i) + if (!$util.isString(message.alternativePhrases[i])) + return "alternativePhrases: string[] expected"; + } + return null; + }; + + /** + * Creates a CompletionSuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompletionSuggestion} CompletionSuggestion + */ + CompletionSuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionSuggestion) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompletionSuggestion(); + if (object.globalScore != null) + message.globalScore = Number(object.globalScore); + if (object.frequency != null) + if ($util.Long) + (message.frequency = $util.Long.fromValue(object.frequency)).unsigned = false; + else if (typeof object.frequency === "string") + message.frequency = parseInt(object.frequency, 10); + else if (typeof object.frequency === "number") + message.frequency = object.frequency; + else if (typeof object.frequency === "object") + message.frequency = new $util.LongBits(object.frequency.low >>> 0, object.frequency.high >>> 0).toNumber(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.groupId != null) + message.groupId = String(object.groupId); + if (object.groupScore != null) + message.groupScore = Number(object.groupScore); + if (object.alternativePhrases) { + if (!Array.isArray(object.alternativePhrases)) + throw TypeError(".google.cloud.discoveryengine.v1.CompletionSuggestion.alternativePhrases: array expected"); + message.alternativePhrases = []; + for (var i = 0; i < object.alternativePhrases.length; ++i) + message.alternativePhrases[i] = String(object.alternativePhrases[i]); + } + return message; + }; + + /** + * Creates a plain object from a CompletionSuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompletionSuggestion} message CompletionSuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompletionSuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.alternativePhrases = []; + if (options.defaults) { + object.suggestion = ""; + object.languageCode = ""; + object.groupId = ""; + object.groupScore = 0; + } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.globalScore != null && message.hasOwnProperty("globalScore")) { + object.globalScore = options.json && !isFinite(message.globalScore) ? String(message.globalScore) : message.globalScore; + if (options.oneofs) + object.rankingInfo = "globalScore"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + if (typeof message.frequency === "number") + object.frequency = options.longs === String ? String(message.frequency) : message.frequency; + else + object.frequency = options.longs === String ? $util.Long.prototype.toString.call(message.frequency) : options.longs === Number ? new $util.LongBits(message.frequency.low >>> 0, message.frequency.high >>> 0).toNumber() : message.frequency; + if (options.oneofs) + object.rankingInfo = "frequency"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.groupScore != null && message.hasOwnProperty("groupScore")) + object.groupScore = options.json && !isFinite(message.groupScore) ? String(message.groupScore) : message.groupScore; + if (message.alternativePhrases && message.alternativePhrases.length) { + object.alternativePhrases = []; + for (var j = 0; j < message.alternativePhrases.length; ++j) + object.alternativePhrases[j] = message.alternativePhrases[j]; + } + return object; + }; + + /** + * Converts this CompletionSuggestion to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @instance + * @returns {Object.} JSON object + */ + CompletionSuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompletionSuggestion + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompletionSuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompletionSuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionSuggestion"; + }; + + return CompletionSuggestion; + })(); + + v1.CompletionService = (function() { + + /** + * Constructs a new CompletionService service. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function CompletionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CompletionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompletionService; + + /** + * Creates new CompletionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {CompletionService} RPC service. Useful where requests and/or responses are streamed. + */ + CompletionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|completeQuery}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef CompleteQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} [response] CompleteQueryResponse + */ + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.CompleteQueryCallback} callback Node-style callback called with the error, if any, and CompleteQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.completeQuery = function completeQuery(request, callback) { + return this.rpcCall(completeQuery, $root.google.cloud.discoveryengine.v1.CompleteQueryRequest, $root.google.cloud.discoveryengine.v1.CompleteQueryResponse, request, callback); + }, "name", { value: "CompleteQuery" }); + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importSuggestionDenyListEntries}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef ImportSuggestionDenyListEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportSuggestionDenyListEntries. + * @function importSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.importSuggestionDenyListEntries = function importSuggestionDenyListEntries(request, callback) { + return this.rpcCall(importSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportSuggestionDenyListEntries" }); + + /** + * Calls ImportSuggestionDenyListEntries. + * @function importSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeSuggestionDenyListEntries}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef PurgeSuggestionDenyListEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeSuggestionDenyListEntries. + * @function purgeSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.purgeSuggestionDenyListEntries = function purgeSuggestionDenyListEntries(request, callback) { + return this.rpcCall(purgeSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeSuggestionDenyListEntries" }); + + /** + * Calls PurgeSuggestionDenyListEntries. + * @function purgeSuggestionDenyListEntries + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importCompletionSuggestions}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef ImportCompletionSuggestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportCompletionSuggestions. + * @function importCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} request ImportCompletionSuggestionsRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestionsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.importCompletionSuggestions = function importCompletionSuggestions(request, callback) { + return this.rpcCall(importCompletionSuggestions, $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportCompletionSuggestions" }); + + /** + * Calls ImportCompletionSuggestions. + * @function importCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} request ImportCompletionSuggestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeCompletionSuggestions}. + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @typedef PurgeCompletionSuggestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeCompletionSuggestions. + * @function purgeCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} request PurgeCompletionSuggestionsRequest message or plain object + * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestionsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.purgeCompletionSuggestions = function purgeCompletionSuggestions(request, callback) { + return this.rpcCall(purgeCompletionSuggestions, $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeCompletionSuggestions" }); + + /** + * Calls PurgeCompletionSuggestions. + * @function purgeCompletionSuggestions + * @memberof google.cloud.discoveryengine.v1.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} request PurgeCompletionSuggestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CompletionService; + })(); + + v1.CompleteQueryRequest = (function() { + + /** + * Properties of a CompleteQueryRequest. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompleteQueryRequest + * @property {string|null} [dataStore] CompleteQueryRequest dataStore + * @property {string|null} [query] CompleteQueryRequest query + * @property {string|null} [queryModel] CompleteQueryRequest queryModel + * @property {string|null} [userPseudoId] CompleteQueryRequest userPseudoId + * @property {boolean|null} [includeTailSuggestions] CompleteQueryRequest includeTailSuggestions + */ + + /** + * Constructs a new CompleteQueryRequest. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompleteQueryRequest. + * @implements ICompleteQueryRequest + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + */ + function CompleteQueryRequest(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]]; + } + + /** + * CompleteQueryRequest dataStore. + * @member {string} dataStore + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.dataStore = ""; + + /** + * CompleteQueryRequest query. + * @member {string} query + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.query = ""; + + /** + * CompleteQueryRequest queryModel. + * @member {string} queryModel + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.queryModel = ""; + + /** + * CompleteQueryRequest userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.userPseudoId = ""; + + /** + * CompleteQueryRequest includeTailSuggestions. + * @member {boolean} includeTailSuggestions + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + */ + CompleteQueryRequest.prototype.includeTailSuggestions = false; + + /** + * Creates a new CompleteQueryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest instance + */ + CompleteQueryRequest.create = function create(properties) { + return new CompleteQueryRequest(properties); + }; + + /** + * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.queryModel != null && Object.hasOwnProperty.call(message, "queryModel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.queryModel); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userPseudoId); + if (message.includeTailSuggestions != null && Object.hasOwnProperty.call(message, "includeTailSuggestions")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeTailSuggestions); + return writer; + }; + + /** + * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryRequest.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.cloud.discoveryengine.v1.CompleteQueryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataStore = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.queryModel = reader.string(); + break; + } + case 4: { + message.userPseudoId = reader.string(); + break; + } + case 5: { + message.includeTailSuggestions = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteQueryRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteQueryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + if (!$util.isString(message.queryModel)) + return "queryModel: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) + if (typeof message.includeTailSuggestions !== "boolean") + return "includeTailSuggestions: boolean expected"; + return null; + }; + + /** + * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + */ + CompleteQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + if (object.query != null) + message.query = String(object.query); + if (object.queryModel != null) + message.queryModel = String(object.queryModel); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.includeTailSuggestions != null) + message.includeTailSuggestions = Boolean(object.includeTailSuggestions); + return message; + }; + + /** + * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryRequest} message CompleteQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteQueryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataStore = ""; + object.query = ""; + object.queryModel = ""; + object.userPseudoId = ""; + object.includeTailSuggestions = false; + } + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + object.queryModel = message.queryModel; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) + object.includeTailSuggestions = message.includeTailSuggestions; + return object; + }; + + /** + * Converts this CompleteQueryRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @instance + * @returns {Object.} JSON object + */ + CompleteQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteQueryRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryRequest"; + }; + + return CompleteQueryRequest; + })(); + + v1.CompleteQueryResponse = (function() { + + /** + * Properties of a CompleteQueryResponse. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompleteQueryResponse + * @property {Array.|null} [querySuggestions] CompleteQueryResponse querySuggestions + * @property {boolean|null} [tailMatchTriggered] CompleteQueryResponse tailMatchTriggered + */ + + /** + * Constructs a new CompleteQueryResponse. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompleteQueryResponse. + * @implements ICompleteQueryResponse + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set + */ + function CompleteQueryResponse(properties) { + this.querySuggestions = []; + 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]]; + } + + /** + * CompleteQueryResponse querySuggestions. + * @member {Array.} querySuggestions + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + */ + CompleteQueryResponse.prototype.querySuggestions = $util.emptyArray; + + /** + * CompleteQueryResponse tailMatchTriggered. + * @member {boolean} tailMatchTriggered + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + */ + CompleteQueryResponse.prototype.tailMatchTriggered = false; + + /** + * Creates a new CompleteQueryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse instance + */ + CompleteQueryResponse.create = function create(properties) { + return new CompleteQueryResponse(properties); + }; + + /** + * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.querySuggestions != null && message.querySuggestions.length) + for (var i = 0; i < message.querySuggestions.length; ++i) + $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.encode(message.querySuggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tailMatchTriggered != null && Object.hasOwnProperty.call(message, "tailMatchTriggered")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.tailMatchTriggered); + return writer; + }; + + /** + * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompleteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompleteQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryResponse.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.cloud.discoveryengine.v1.CompleteQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.querySuggestions && message.querySuggestions.length)) + message.querySuggestions = []; + message.querySuggestions.push($root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.tailMatchTriggered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompleteQueryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompleteQueryResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompleteQueryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.querySuggestions != null && message.hasOwnProperty("querySuggestions")) { + if (!Array.isArray(message.querySuggestions)) + return "querySuggestions: array expected"; + for (var i = 0; i < message.querySuggestions.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify(message.querySuggestions[i]); + if (error) + return "querySuggestions." + error; + } + } + if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) + if (typeof message.tailMatchTriggered !== "boolean") + return "tailMatchTriggered: boolean expected"; + return null; + }; + + /** + * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse + */ + CompleteQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); + if (object.querySuggestions) { + if (!Array.isArray(object.querySuggestions)) + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: array expected"); + message.querySuggestions = []; + for (var i = 0; i < object.querySuggestions.length; ++i) { + if (typeof object.querySuggestions[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: object expected"); + message.querySuggestions[i] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.fromObject(object.querySuggestions[i]); + } + } + if (object.tailMatchTriggered != null) + message.tailMatchTriggered = Boolean(object.tailMatchTriggered); + return message; + }; + + /** + * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} message CompleteQueryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompleteQueryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.querySuggestions = []; + if (options.defaults) + object.tailMatchTriggered = false; + if (message.querySuggestions && message.querySuggestions.length) { + object.querySuggestions = []; + for (var j = 0; j < message.querySuggestions.length; ++j) + object.querySuggestions[j] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.toObject(message.querySuggestions[j], options); + } + if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) + object.tailMatchTriggered = message.tailMatchTriggered; + return object; + }; + + /** + * Converts this CompleteQueryResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @instance + * @returns {Object.} JSON object + */ + CompleteQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompleteQueryResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompleteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse"; + }; + + CompleteQueryResponse.QuerySuggestion = (function() { + + /** + * Properties of a QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @interface IQuerySuggestion + * @property {string|null} [suggestion] QuerySuggestion suggestion + * @property {Array.|null} [completableFieldPaths] QuerySuggestion completableFieldPaths + */ + + /** + * Constructs a new QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse + * @classdesc Represents a QuerySuggestion. + * @implements IQuerySuggestion + * @constructor + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + */ + function QuerySuggestion(properties) { + this.completableFieldPaths = []; + 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]]; + } + + /** + * QuerySuggestion suggestion. + * @member {string} suggestion + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + */ + QuerySuggestion.prototype.suggestion = ""; + + /** + * QuerySuggestion completableFieldPaths. + * @member {Array.} completableFieldPaths + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + */ + QuerySuggestion.prototype.completableFieldPaths = $util.emptyArray; + + /** + * Creates a new QuerySuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion instance + */ + QuerySuggestion.create = function create(properties) { + return new QuerySuggestion(properties); + }; + + /** + * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.completableFieldPaths != null && message.completableFieldPaths.length) + for (var i = 0; i < message.completableFieldPaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.completableFieldPaths[i]); + return writer; + }; + + /** + * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.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.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.suggestion = reader.string(); + break; + } + case 2: { + if (!(message.completableFieldPaths && message.completableFieldPaths.length)) + message.completableFieldPaths = []; + message.completableFieldPaths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySuggestion message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.completableFieldPaths != null && message.hasOwnProperty("completableFieldPaths")) { + if (!Array.isArray(message.completableFieldPaths)) + return "completableFieldPaths: array expected"; + for (var i = 0; i < message.completableFieldPaths.length; ++i) + if (!$util.isString(message.completableFieldPaths[i])) + return "completableFieldPaths: string[] expected"; + } + return null; + }; + + /** + * Creates a QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + */ + QuerySuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.completableFieldPaths) { + if (!Array.isArray(object.completableFieldPaths)) + throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.completableFieldPaths: array expected"); + message.completableFieldPaths = []; + for (var i = 0; i < object.completableFieldPaths.length; ++i) + message.completableFieldPaths[i] = String(object.completableFieldPaths[i]); + } + return message; + }; + + /** + * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} message QuerySuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.completableFieldPaths = []; + if (options.defaults) + object.suggestion = ""; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.completableFieldPaths && message.completableFieldPaths.length) { + object.completableFieldPaths = []; + for (var j = 0; j < message.completableFieldPaths.length; ++j) + object.completableFieldPaths[j] = message.completableFieldPaths[j]; + } + return object; + }; + + /** + * Converts this QuerySuggestion to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @instance + * @returns {Object.} JSON object + */ + QuerySuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuerySuggestion + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuerySuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion"; + }; + + return QuerySuggestion; + })(); + + return CompleteQueryResponse; + })(); + + v1.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.discoveryengine.v1 + * @interface IGcsSource + * @property {Array.|null} [inputUris] GcsSource inputUris + * @property {string|null} [dataSchema] GcsSource dataSchema + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + this.inputUris = []; + 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]]; + } + + /** + * GcsSource inputUris. + * @member {Array.} inputUris + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @instance + */ + GcsSource.prototype.inputUris = $util.emptyArray; + + /** + * GcsSource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @instance + */ + GcsSource.prototype.dataSchema = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @static + * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.GcsSource + * @static + * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomAttribute.encode = function encode(message, writer) { + GcsSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && message.text.length) - for (var i = 0; i < message.text.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]); - if (message.numbers != null && message.numbers.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.numbers.length; ++i) - writer.double(message.numbers[i]); - writer.ldelim(); - } + if (message.inputUris != null && message.inputUris.length) + for (var i = 0; i < message.inputUris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); return writer; }; /** - * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CustomAttribute.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static - * @param {google.cloud.discoveryengine.v1.ICustomAttribute} message CustomAttribute message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomAttribute message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomAttribute.decode = function decode(reader, length) { + GcsSource.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.cloud.discoveryengine.v1.CustomAttribute(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.text && message.text.length)) - message.text = []; - message.text.push(reader.string()); + if (!(message.inputUris && message.inputUris.length)) + message.inputUris = []; + message.inputUris.push(reader.string()); break; } case 2: { - if (!(message.numbers && message.numbers.length)) - message.numbers = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.numbers.push(reader.double()); - } else - message.numbers.push(reader.double()); + message.dataSchema = reader.string(); break; } default: @@ -5523,156 +8843,148 @@ }; /** - * Decodes a CustomAttribute message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomAttribute.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomAttribute message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomAttribute.verify = function verify(message) { + GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - if (!Array.isArray(message.text)) - return "text: array expected"; - for (var i = 0; i < message.text.length; ++i) - if (!$util.isString(message.text[i])) - return "text: string[] expected"; - } - if (message.numbers != null && message.hasOwnProperty("numbers")) { - if (!Array.isArray(message.numbers)) - return "numbers: array expected"; - for (var i = 0; i < message.numbers.length; ++i) - if (typeof message.numbers[i] !== "number") - return "numbers: number[] expected"; + if (message.inputUris != null && message.hasOwnProperty("inputUris")) { + if (!Array.isArray(message.inputUris)) + return "inputUris: array expected"; + for (var i = 0; i < message.inputUris.length; ++i) + if (!$util.isString(message.inputUris[i])) + return "inputUris: string[] expected"; } + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; return null; }; /** - * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CustomAttribute} CustomAttribute + * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource */ - CustomAttribute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CustomAttribute) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.GcsSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.CustomAttribute(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - if (object.numbers) { - if (!Array.isArray(object.numbers)) - throw TypeError(".google.cloud.discoveryengine.v1.CustomAttribute.numbers: array expected"); - message.numbers = []; - for (var i = 0; i < object.numbers.length; ++i) - message.numbers[i] = Number(object.numbers[i]); + var message = new $root.google.cloud.discoveryengine.v1.GcsSource(); + if (object.inputUris) { + if (!Array.isArray(object.inputUris)) + throw TypeError(".google.cloud.discoveryengine.v1.GcsSource.inputUris: array expected"); + message.inputUris = []; + for (var i = 0; i < object.inputUris.length; ++i) + message.inputUris[i] = String(object.inputUris[i]); } + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static - * @param {google.cloud.discoveryengine.v1.CustomAttribute} message CustomAttribute + * @param {google.cloud.discoveryengine.v1.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomAttribute.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.text = []; - object.numbers = []; - } - if (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; - } - if (message.numbers && message.numbers.length) { - object.numbers = []; - for (var j = 0; j < message.numbers.length; ++j) - object.numbers[j] = options.json && !isFinite(message.numbers[j]) ? String(message.numbers[j]) : message.numbers[j]; + if (options.arrays || options.defaults) + object.inputUris = []; + if (options.defaults) + object.dataSchema = ""; + if (message.inputUris && message.inputUris.length) { + object.inputUris = []; + for (var j = 0; j < message.inputUris.length; ++j) + object.inputUris[j] = message.inputUris[j]; } + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this CustomAttribute to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @instance * @returns {Object.} JSON object */ - CustomAttribute.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomAttribute + * Gets the default type url for GcsSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CustomAttribute + * @memberof google.cloud.discoveryengine.v1.GcsSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CustomAttribute"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.GcsSource"; }; - return CustomAttribute; + return GcsSource; })(); - v1.UserInfo = (function() { + v1.BigQuerySource = (function() { /** - * Properties of a UserInfo. + * Properties of a BigQuerySource. * @memberof google.cloud.discoveryengine.v1 - * @interface IUserInfo - * @property {string|null} [userId] UserInfo userId - * @property {string|null} [userAgent] UserInfo userAgent + * @interface IBigQuerySource + * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate + * @property {string|null} [projectId] BigQuerySource projectId + * @property {string|null} [datasetId] BigQuerySource datasetId + * @property {string|null} [tableId] BigQuerySource tableId + * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir + * @property {string|null} [dataSchema] BigQuerySource dataSchema */ /** - * Constructs a new UserInfo. + * Constructs a new BigQuerySource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a UserInfo. - * @implements IUserInfo + * @classdesc Represents a BigQuerySource. + * @implements IBigQuerySource * @constructor - * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set */ - function UserInfo(properties) { + function BigQuerySource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5680,89 +8992,159 @@ } /** - * UserInfo userId. - * @member {string} userId - * @memberof google.cloud.discoveryengine.v1.UserInfo + * BigQuerySource partitionDate. + * @member {google.type.IDate|null|undefined} partitionDate + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance */ - UserInfo.prototype.userId = ""; + BigQuerySource.prototype.partitionDate = null; /** - * UserInfo userAgent. - * @member {string} userAgent - * @memberof google.cloud.discoveryengine.v1.UserInfo + * BigQuerySource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance */ - UserInfo.prototype.userAgent = ""; + BigQuerySource.prototype.projectId = ""; /** - * Creates a new UserInfo instance using the specified properties. + * BigQuerySource datasetId. + * @member {string} datasetId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.datasetId = ""; + + /** + * BigQuerySource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.tableId = ""; + + /** + * BigQuerySource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.gcsStagingDir = ""; + + /** + * BigQuerySource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + BigQuerySource.prototype.dataSchema = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQuerySource partition. + * @member {"partitionDate"|undefined} partition + * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @instance + */ + Object.defineProperty(BigQuerySource.prototype, "partition", { + get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQuerySource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo instance + * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource instance */ - UserInfo.create = function create(properties) { - return new UserInfo(properties); + BigQuerySource.create = function create(properties) { + return new BigQuerySource(properties); }; /** - * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserInfo.encode = function encode(message, writer) { + BigQuerySource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userAgent); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); + if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) + $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); return writer; }; /** - * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserInfo.verify|verify} messages. + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.IUserInfo} message UserInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserInfo.encodeDelimited = function encodeDelimited(message, writer) { + BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserInfo message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserInfo.decode = function decode(reader, length) { + BigQuerySource.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.cloud.discoveryengine.v1.UserInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } case 1: { - message.userId = reader.string(); + message.projectId = reader.string(); break; } case 2: { - message.userAgent = reader.string(); + message.datasetId = reader.string(); + break; + } + case 3: { + message.tableId = reader.string(); + break; + } + case 4: { + message.gcsStagingDir = reader.string(); + break; + } + case 6: { + message.dataSchema = reader.string(); break; } default: @@ -5774,132 +9156,178 @@ }; /** - * Decodes a UserInfo message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserInfo.decodeDelimited = function decodeDelimited(reader) { + BigQuerySource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserInfo message. + * Verifies a BigQuerySource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserInfo.verify = function verify(message) { + BigQuerySource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - if (!$util.isString(message.userAgent)) - return "userAgent: string expected"; + var properties = {}; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + properties.partition = 1; + { + var error = $root.google.type.Date.verify(message.partitionDate); + if (error) + return "partitionDate." + error; + } + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; return null; }; /** - * Creates a UserInfo message from a plain object. Also converts values to their respective internal types. + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.UserInfo} UserInfo + * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource */ - UserInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.UserInfo) + BigQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigQuerySource) return object; - var message = new $root.google.cloud.discoveryengine.v1.UserInfo(); - if (object.userId != null) - message.userId = String(object.userId); - if (object.userAgent != null) - message.userAgent = String(object.userAgent); + var message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); + if (object.partitionDate != null) { + if (typeof object.partitionDate !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigQuerySource.partitionDate: object expected"); + message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from a UserInfo message. Also converts values to other types if specified. + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1.UserInfo} message UserInfo + * @param {google.cloud.discoveryengine.v1.BigQuerySource} message BigQuerySource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserInfo.toObject = function toObject(message, options) { + BigQuerySource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.userId = ""; - object.userAgent = ""; + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + object.dataSchema = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); + if (options.oneofs) + object.partition = "partitionDate"; } - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = message.userAgent; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this UserInfo to JSON. + * Converts this BigQuerySource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @instance * @returns {Object.} JSON object */ - UserInfo.prototype.toJSON = function toJSON() { + BigQuerySource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserInfo + * Gets the default type url for BigQuerySource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.UserInfo + * @memberof google.cloud.discoveryengine.v1.BigQuerySource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigQuerySource"; }; - return UserInfo; + return BigQuerySource; })(); - v1.SuggestionDenyListEntry = (function() { + v1.SpannerSource = (function() { /** - * Properties of a SuggestionDenyListEntry. + * Properties of a SpannerSource. * @memberof google.cloud.discoveryengine.v1 - * @interface ISuggestionDenyListEntry - * @property {string|null} [blockPhrase] SuggestionDenyListEntry blockPhrase - * @property {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator|null} [matchOperator] SuggestionDenyListEntry matchOperator + * @interface ISpannerSource + * @property {string|null} [projectId] SpannerSource projectId + * @property {string|null} [instanceId] SpannerSource instanceId + * @property {string|null} [databaseId] SpannerSource databaseId + * @property {string|null} [tableId] SpannerSource tableId + * @property {boolean|null} [enableDataBoost] SpannerSource enableDataBoost */ /** - * Constructs a new SuggestionDenyListEntry. + * Constructs a new SpannerSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SuggestionDenyListEntry. - * @implements ISuggestionDenyListEntry + * @classdesc Represents a SpannerSource. + * @implements ISpannerSource * @constructor - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set */ - function SuggestionDenyListEntry(properties) { + function SpannerSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5907,89 +9335,131 @@ } /** - * SuggestionDenyListEntry blockPhrase. - * @member {string} blockPhrase - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * SpannerSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance */ - SuggestionDenyListEntry.prototype.blockPhrase = ""; + SpannerSource.prototype.projectId = ""; /** - * SuggestionDenyListEntry matchOperator. - * @member {google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator} matchOperator - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * SpannerSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance */ - SuggestionDenyListEntry.prototype.matchOperator = 0; + SpannerSource.prototype.instanceId = ""; /** - * Creates a new SuggestionDenyListEntry instance using the specified properties. + * SpannerSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.databaseId = ""; + + /** + * SpannerSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.tableId = ""; + + /** + * SpannerSource enableDataBoost. + * @member {boolean} enableDataBoost + * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @instance + */ + SpannerSource.prototype.enableDataBoost = false; + + /** + * Creates a new SpannerSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry instance + * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource instance */ - SuggestionDenyListEntry.create = function create(properties) { - return new SuggestionDenyListEntry(properties); + SpannerSource.create = function create(properties) { + return new SpannerSource(properties); }; /** - * Encodes the specified SuggestionDenyListEntry message. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * Encodes the specified SpannerSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionDenyListEntry.encode = function encode(message, writer) { + SpannerSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.blockPhrase != null && Object.hasOwnProperty.call(message, "blockPhrase")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.blockPhrase); - if (message.matchOperator != null && Object.hasOwnProperty.call(message, "matchOperator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matchOperator); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.enableDataBoost != null && Object.hasOwnProperty.call(message, "enableDataBoost")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableDataBoost); return writer; }; /** - * Encodes the specified SuggestionDenyListEntry message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify|verify} messages. + * Encodes the specified SpannerSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.ISuggestionDenyListEntry} message SuggestionDenyListEntry message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionDenyListEntry.encodeDelimited = function encodeDelimited(message, writer) { + SpannerSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionDenyListEntry message from the specified reader or buffer. + * Decodes a SpannerSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionDenyListEntry.decode = function decode(reader, length) { + SpannerSource.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.cloud.discoveryengine.v1.SuggestionDenyListEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.blockPhrase = reader.string(); + message.projectId = reader.string(); break; } case 2: { - message.matchOperator = reader.int32(); + message.instanceId = reader.string(); + break; + } + case 3: { + message.databaseId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 5: { + message.enableDataBoost = reader.bool(); break; } default: @@ -6001,309 +9471,157 @@ }; /** - * Decodes a SuggestionDenyListEntry message from the specified reader or buffer, length delimited. + * Decodes a SpannerSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionDenyListEntry.decodeDelimited = function decodeDelimited(reader) { + SpannerSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionDenyListEntry message. + * Verifies a SpannerSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionDenyListEntry.verify = function verify(message) { + SpannerSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) - if (!$util.isString(message.blockPhrase)) - return "blockPhrase: string expected"; - if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) - switch (message.matchOperator) { - default: - return "matchOperator: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) + if (typeof message.enableDataBoost !== "boolean") + return "enableDataBoost: boolean expected"; return null; }; /** - * Creates a SuggestionDenyListEntry message from a plain object. Also converts values to their respective internal types. + * Creates a SpannerSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} SuggestionDenyListEntry + * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource */ - SuggestionDenyListEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry) + SpannerSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SpannerSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry(); - if (object.blockPhrase != null) - message.blockPhrase = String(object.blockPhrase); - switch (object.matchOperator) { - default: - if (typeof object.matchOperator === "number") { - message.matchOperator = object.matchOperator; - break; - } - break; - case "MATCH_OPERATOR_UNSPECIFIED": - case 0: - message.matchOperator = 0; - break; - case "EXACT_MATCH": - case 1: - message.matchOperator = 1; - break; - case "CONTAINS": - case 2: - message.matchOperator = 2; - break; - } + var message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.enableDataBoost != null) + message.enableDataBoost = Boolean(object.enableDataBoost); return message; }; /** - * Creates a plain object from a SuggestionDenyListEntry message. Also converts values to other types if specified. + * Creates a plain object from a SpannerSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static - * @param {google.cloud.discoveryengine.v1.SuggestionDenyListEntry} message SuggestionDenyListEntry + * @param {google.cloud.discoveryengine.v1.SpannerSource} message SpannerSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionDenyListEntry.toObject = function toObject(message, options) { + SpannerSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.blockPhrase = ""; - object.matchOperator = options.enums === String ? "MATCH_OPERATOR_UNSPECIFIED" : 0; + object.projectId = ""; + object.instanceId = ""; + object.databaseId = ""; + object.tableId = ""; + object.enableDataBoost = false; } - if (message.blockPhrase != null && message.hasOwnProperty("blockPhrase")) - object.blockPhrase = message.blockPhrase; - if (message.matchOperator != null && message.hasOwnProperty("matchOperator")) - object.matchOperator = options.enums === String ? $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] === undefined ? message.matchOperator : $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator[message.matchOperator] : message.matchOperator; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) + object.enableDataBoost = message.enableDataBoost; return object; }; /** - * Converts this SuggestionDenyListEntry to JSON. + * Converts this SpannerSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @instance * @returns {Object.} JSON object */ - SuggestionDenyListEntry.prototype.toJSON = function toJSON() { + SpannerSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SuggestionDenyListEntry + * Gets the default type url for SpannerSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SuggestionDenyListEntry + * @memberof google.cloud.discoveryengine.v1.SpannerSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SuggestionDenyListEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpannerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SuggestionDenyListEntry"; - }; - - /** - * MatchOperator enum. - * @name google.cloud.discoveryengine.v1.SuggestionDenyListEntry.MatchOperator - * @enum {number} - * @property {number} MATCH_OPERATOR_UNSPECIFIED=0 MATCH_OPERATOR_UNSPECIFIED value - * @property {number} EXACT_MATCH=1 EXACT_MATCH value - * @property {number} CONTAINS=2 CONTAINS value - */ - SuggestionDenyListEntry.MatchOperator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT_MATCH"] = 1; - values[valuesById[2] = "CONTAINS"] = 2; - return values; - })(); - - return SuggestionDenyListEntry; - })(); - - v1.CompletionService = (function() { - - /** - * Constructs a new CompletionService service. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompletionService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function CompletionService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CompletionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompletionService; - - /** - * Creates new CompletionService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {CompletionService} RPC service. Useful where requests and/or responses are streamed. - */ - CompletionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SpannerSource"; }; - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|completeQuery}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef CompleteQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} [response] CompleteQueryResponse - */ - - /** - * Calls CompleteQuery. - * @function completeQuery - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.CompleteQueryCallback} callback Node-style callback called with the error, if any, and CompleteQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.completeQuery = function completeQuery(request, callback) { - return this.rpcCall(completeQuery, $root.google.cloud.discoveryengine.v1.CompleteQueryRequest, $root.google.cloud.discoveryengine.v1.CompleteQueryResponse, request, callback); - }, "name", { value: "CompleteQuery" }); - - /** - * Calls CompleteQuery. - * @function completeQuery - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} request CompleteQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|importSuggestionDenyListEntries}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef ImportSuggestionDenyListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportSuggestionDenyListEntries. - * @function importSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.ImportSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.importSuggestionDenyListEntries = function importSuggestionDenyListEntries(request, callback) { - return this.rpcCall(importSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportSuggestionDenyListEntries" }); - - /** - * Calls ImportSuggestionDenyListEntries. - * @function importSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} request ImportSuggestionDenyListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1.CompletionService|purgeSuggestionDenyListEntries}. - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @typedef PurgeSuggestionDenyListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls PurgeSuggestionDenyListEntries. - * @function purgeSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object - * @param {google.cloud.discoveryengine.v1.CompletionService.PurgeSuggestionDenyListEntriesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CompletionService.prototype.purgeSuggestionDenyListEntries = function purgeSuggestionDenyListEntries(request, callback) { - return this.rpcCall(purgeSuggestionDenyListEntries, $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "PurgeSuggestionDenyListEntries" }); - - /** - * Calls PurgeSuggestionDenyListEntries. - * @function purgeSuggestionDenyListEntries - * @memberof google.cloud.discoveryengine.v1.CompletionService - * @instance - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} request PurgeSuggestionDenyListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CompletionService; + return SpannerSource; })(); - v1.CompleteQueryRequest = (function() { + v1.BigtableOptions = (function() { /** - * Properties of a CompleteQueryRequest. + * Properties of a BigtableOptions. * @memberof google.cloud.discoveryengine.v1 - * @interface ICompleteQueryRequest - * @property {string|null} [dataStore] CompleteQueryRequest dataStore - * @property {string|null} [query] CompleteQueryRequest query - * @property {string|null} [queryModel] CompleteQueryRequest queryModel - * @property {string|null} [userPseudoId] CompleteQueryRequest userPseudoId - * @property {boolean|null} [includeTailSuggestions] CompleteQueryRequest includeTailSuggestions + * @interface IBigtableOptions + * @property {string|null} [keyFieldName] BigtableOptions keyFieldName + * @property {Object.|null} [families] BigtableOptions families */ /** - * Constructs a new CompleteQueryRequest. + * Constructs a new BigtableOptions. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompleteQueryRequest. - * @implements ICompleteQueryRequest + * @classdesc Represents a BigtableOptions. + * @implements IBigtableOptions * @constructor - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set */ - function CompleteQueryRequest(properties) { + function BigtableOptions(properties) { + this.families = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6311,131 +9629,111 @@ } /** - * CompleteQueryRequest dataStore. - * @member {string} dataStore - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.dataStore = ""; - - /** - * CompleteQueryRequest query. - * @member {string} query - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.query = ""; - - /** - * CompleteQueryRequest queryModel. - * @member {string} queryModel - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest - * @instance - */ - CompleteQueryRequest.prototype.queryModel = ""; - - /** - * CompleteQueryRequest userPseudoId. - * @member {string} userPseudoId - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * BigtableOptions keyFieldName. + * @member {string} keyFieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance */ - CompleteQueryRequest.prototype.userPseudoId = ""; + BigtableOptions.prototype.keyFieldName = ""; /** - * CompleteQueryRequest includeTailSuggestions. - * @member {boolean} includeTailSuggestions - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * BigtableOptions families. + * @member {Object.} families + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance */ - CompleteQueryRequest.prototype.includeTailSuggestions = false; + BigtableOptions.prototype.families = $util.emptyObject; /** - * Creates a new CompleteQueryRequest instance using the specified properties. + * Creates a new BigtableOptions instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest instance + * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions instance */ - CompleteQueryRequest.create = function create(properties) { - return new CompleteQueryRequest(properties); + BigtableOptions.create = function create(properties) { + return new BigtableOptions(properties); }; /** - * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * Encodes the specified BigtableOptions message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteQueryRequest.encode = function encode(message, writer) { + BigtableOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.queryModel != null && Object.hasOwnProperty.call(message, "queryModel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.queryModel); - if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.userPseudoId); - if (message.includeTailSuggestions != null && Object.hasOwnProperty.call(message, "includeTailSuggestions")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeTailSuggestions); + if (message.keyFieldName != null && Object.hasOwnProperty.call(message, "keyFieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyFieldName); + if (message.families != null && Object.hasOwnProperty.call(message, "families")) + for (var keys = Object.keys(message.families), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.encode(message.families[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.verify|verify} messages. + * Encodes the specified BigtableOptions message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + BigtableOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompleteQueryRequest message from the specified reader or buffer. + * Decodes a BigtableOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteQueryRequest.decode = function decode(reader, length) { + BigtableOptions.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.cloud.discoveryengine.v1.CompleteQueryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataStore = reader.string(); + message.keyFieldName = reader.string(); break; } case 2: { - message.query = reader.string(); - break; - } - case 3: { - message.queryModel = reader.string(); - break; - } - case 4: { - message.userPseudoId = reader.string(); - break; - } - case 5: { - message.includeTailSuggestions = reader.bool(); + if (message.families === $util.emptyObject) + message.families = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.families[key] = value; break; } default: @@ -6447,402 +9745,518 @@ }; /** - * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. + * Decodes a BigtableOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteQueryRequest.decodeDelimited = function decodeDelimited(reader) { + BigtableOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompleteQueryRequest message. + * Verifies a BigtableOptions message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompleteQueryRequest.verify = function verify(message) { + BigtableOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - if (!$util.isString(message.dataStore)) - return "dataStore: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.queryModel != null && message.hasOwnProperty("queryModel")) - if (!$util.isString(message.queryModel)) - return "queryModel: string expected"; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - if (!$util.isString(message.userPseudoId)) - return "userPseudoId: string expected"; - if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) - if (typeof message.includeTailSuggestions !== "boolean") - return "includeTailSuggestions: boolean expected"; + if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) + if (!$util.isString(message.keyFieldName)) + return "keyFieldName: string expected"; + if (message.families != null && message.hasOwnProperty("families")) { + if (!$util.isObject(message.families)) + return "families: object expected"; + var key = Object.keys(message.families); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify(message.families[key[i]]); + if (error) + return "families." + error; + } + } return null; }; /** - * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryRequest} CompleteQueryRequest + * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions */ - CompleteQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryRequest) + BigtableOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryRequest(); - if (object.dataStore != null) - message.dataStore = String(object.dataStore); - if (object.query != null) - message.query = String(object.query); - if (object.queryModel != null) - message.queryModel = String(object.queryModel); - if (object.userPseudoId != null) - message.userPseudoId = String(object.userPseudoId); - if (object.includeTailSuggestions != null) - message.includeTailSuggestions = Boolean(object.includeTailSuggestions); + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(); + if (object.keyFieldName != null) + message.keyFieldName = String(object.keyFieldName); + if (object.families) { + if (typeof object.families !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); + message.families = {}; + for (var keys = Object.keys(object.families), i = 0; i < keys.length; ++i) { + if (typeof object.families[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); + message.families[keys[i]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.fromObject(object.families[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. + * Creates a plain object from a BigtableOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryRequest} message CompleteQueryRequest + * @param {google.cloud.discoveryengine.v1.BigtableOptions} message BigtableOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompleteQueryRequest.toObject = function toObject(message, options) { + BigtableOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.dataStore = ""; - object.query = ""; - object.queryModel = ""; - object.userPseudoId = ""; - object.includeTailSuggestions = false; + if (options.objects || options.defaults) + object.families = {}; + if (options.defaults) + object.keyFieldName = ""; + if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) + object.keyFieldName = message.keyFieldName; + var keys2; + if (message.families && (keys2 = Object.keys(message.families)).length) { + object.families = {}; + for (var j = 0; j < keys2.length; ++j) + object.families[keys2[j]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.toObject(message.families[keys2[j]], options); } - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - object.dataStore = message.dataStore; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.queryModel != null && message.hasOwnProperty("queryModel")) - object.queryModel = message.queryModel; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - object.userPseudoId = message.userPseudoId; - if (message.includeTailSuggestions != null && message.hasOwnProperty("includeTailSuggestions")) - object.includeTailSuggestions = message.includeTailSuggestions; return object; }; /** - * Converts this CompleteQueryRequest to JSON. + * Converts this BigtableOptions to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @instance * @returns {Object.} JSON object */ - CompleteQueryRequest.prototype.toJSON = function toJSON() { + BigtableOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CompleteQueryRequest + * Gets the default type url for BigtableOptions * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryRequest + * @memberof google.cloud.discoveryengine.v1.BigtableOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CompleteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions"; }; - return CompleteQueryRequest; - })(); + BigtableOptions.BigtableColumnFamily = (function() { - v1.CompleteQueryResponse = (function() { + /** + * Properties of a BigtableColumnFamily. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @interface IBigtableColumnFamily + * @property {string|null} [fieldName] BigtableColumnFamily fieldName + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumnFamily encoding + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumnFamily type + * @property {Array.|null} [columns] BigtableColumnFamily columns + */ - /** - * Properties of a CompleteQueryResponse. - * @memberof google.cloud.discoveryengine.v1 - * @interface ICompleteQueryResponse - * @property {Array.|null} [querySuggestions] CompleteQueryResponse querySuggestions - * @property {boolean|null} [tailMatchTriggered] CompleteQueryResponse tailMatchTriggered - */ + /** + * Constructs a new BigtableColumnFamily. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @classdesc Represents a BigtableColumnFamily. + * @implements IBigtableColumnFamily + * @constructor + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set + */ + function BigtableColumnFamily(properties) { + this.columns = []; + 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 CompleteQueryResponse. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompleteQueryResponse. - * @implements ICompleteQueryResponse - * @constructor - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set - */ - function CompleteQueryResponse(properties) { - this.querySuggestions = []; - 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]]; - } + /** + * BigtableColumnFamily fieldName. + * @member {string} fieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.fieldName = ""; - /** - * CompleteQueryResponse querySuggestions. - * @member {Array.} querySuggestions - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - */ - CompleteQueryResponse.prototype.querySuggestions = $util.emptyArray; + /** + * BigtableColumnFamily encoding. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.encoding = 0; - /** - * CompleteQueryResponse tailMatchTriggered. - * @member {boolean} tailMatchTriggered - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - */ - CompleteQueryResponse.prototype.tailMatchTriggered = false; + /** + * BigtableColumnFamily type. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.type = 0; - /** - * Creates a new CompleteQueryResponse instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse instance - */ - CompleteQueryResponse.create = function create(properties) { - return new CompleteQueryResponse(properties); - }; + /** + * BigtableColumnFamily columns. + * @member {Array.} columns + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + */ + BigtableColumnFamily.prototype.columns = $util.emptyArray; - /** - * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.querySuggestions != null && message.querySuggestions.length) - for (var i = 0; i < message.querySuggestions.length; ++i) - $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.encode(message.querySuggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tailMatchTriggered != null && Object.hasOwnProperty.call(message, "tailMatchTriggered")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.tailMatchTriggered); - return writer; - }; + /** + * Creates a new BigtableColumnFamily instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily instance + */ + BigtableColumnFamily.create = function create(properties) { + return new BigtableColumnFamily(properties); + }; - /** - * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompleteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified BigtableColumnFamily message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigtableColumnFamily.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes a CompleteQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteQueryResponse.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.cloud.discoveryengine.v1.CompleteQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.querySuggestions && message.querySuggestions.length)) - message.querySuggestions = []; - message.querySuggestions.push($root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.decode(reader, reader.uint32())); + /** + * Encodes the specified BigtableColumnFamily message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigtableColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigtableColumnFamily message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigtableColumnFamily.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.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldName = reader.string(); + break; + } + case 2: { + message.encoding = reader.int32(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigtableColumnFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigtableColumnFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigtableColumnFamily message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigtableColumnFamily.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + return null; + }; + + /** + * Creates a BigtableColumnFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily + */ + BigtableColumnFamily.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily) + return object; + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; break; } - case 2: { - message.tailMatchTriggered = reader.bool(); + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "TEXT": + case 1: + message.encoding = 1; + break; + case "BINARY": + case 2: + message.encoding = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; break; } - default: - reader.skipType(tag & 7); + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "INTEGER": + case 3: + message.type = 3; + break; + case "VAR_INTEGER": + case 4: + message.type = 4; + break; + case "BIG_NUMERIC": + case 5: + message.type = 5; + break; + case "BOOLEAN": + case 6: + message.type = 6; + break; + case "JSON": + case 7: + message.type = 7; break; } - } - return message; - }; - - /** - * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompleteQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompleteQueryResponse message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompleteQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.querySuggestions != null && message.hasOwnProperty("querySuggestions")) { - if (!Array.isArray(message.querySuggestions)) - return "querySuggestions: array expected"; - for (var i = 0; i < message.querySuggestions.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify(message.querySuggestions[i]); - if (error) - return "querySuggestions." + error; + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: object expected"); + message.columns[i] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.fromObject(object.columns[i]); + } } - } - if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) - if (typeof message.tailMatchTriggered !== "boolean") - return "tailMatchTriggered: boolean expected"; - return null; - }; + return message; + }; - /** - * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse} CompleteQueryResponse - */ - CompleteQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse) - return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse(); - if (object.querySuggestions) { - if (!Array.isArray(object.querySuggestions)) - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: array expected"); - message.querySuggestions = []; - for (var i = 0; i < object.querySuggestions.length; ++i) { - if (typeof object.querySuggestions[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.querySuggestions: object expected"); - message.querySuggestions[i] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.fromObject(object.querySuggestions[i]); + /** + * Creates a plain object from a BigtableColumnFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} message BigtableColumnFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigtableColumnFamily.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) { + object.fieldName = ""; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } - } - if (object.tailMatchTriggered != null) - message.tailMatchTriggered = Boolean(object.tailMatchTriggered); - return message; - }; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.toObject(message.columns[j], options); + } + return object; + }; - /** - * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse} message CompleteQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompleteQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.querySuggestions = []; - if (options.defaults) - object.tailMatchTriggered = false; - if (message.querySuggestions && message.querySuggestions.length) { - object.querySuggestions = []; - for (var j = 0; j < message.querySuggestions.length; ++j) - object.querySuggestions[j] = $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.toObject(message.querySuggestions[j], options); - } - if (message.tailMatchTriggered != null && message.hasOwnProperty("tailMatchTriggered")) - object.tailMatchTriggered = message.tailMatchTriggered; - return object; - }; + /** + * Converts this BigtableColumnFamily to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @instance + * @returns {Object.} JSON object + */ + BigtableColumnFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CompleteQueryResponse to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @instance - * @returns {Object.} JSON object - */ - CompleteQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for BigtableColumnFamily + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigtableColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily"; + }; - /** - * Gets the default type url for CompleteQueryResponse - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompleteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse"; - }; + return BigtableColumnFamily; + })(); - CompleteQueryResponse.QuerySuggestion = (function() { + BigtableOptions.BigtableColumn = (function() { /** - * Properties of a QuerySuggestion. - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @interface IQuerySuggestion - * @property {string|null} [suggestion] QuerySuggestion suggestion - * @property {Array.|null} [completableFieldPaths] QuerySuggestion completableFieldPaths + * Properties of a BigtableColumn. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @interface IBigtableColumn + * @property {Uint8Array|null} [qualifier] BigtableColumn qualifier + * @property {string|null} [fieldName] BigtableColumn fieldName + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumn encoding + * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumn type */ /** - * Constructs a new QuerySuggestion. - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse - * @classdesc Represents a QuerySuggestion. - * @implements IQuerySuggestion + * Constructs a new BigtableColumn. + * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @classdesc Represents a BigtableColumn. + * @implements IBigtableColumn * @constructor - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set */ - function QuerySuggestion(properties) { - this.completableFieldPaths = []; + function BigtableColumn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6850,92 +10264,117 @@ } /** - * QuerySuggestion suggestion. - * @member {string} suggestion - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * BigtableColumn qualifier. + * @member {Uint8Array} qualifier + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance */ - QuerySuggestion.prototype.suggestion = ""; + BigtableColumn.prototype.qualifier = $util.newBuffer([]); /** - * QuerySuggestion completableFieldPaths. - * @member {Array.} completableFieldPaths - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * BigtableColumn fieldName. + * @member {string} fieldName + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance */ - QuerySuggestion.prototype.completableFieldPaths = $util.emptyArray; + BigtableColumn.prototype.fieldName = ""; /** - * Creates a new QuerySuggestion instance using the specified properties. + * BigtableColumn encoding. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn + * @instance + */ + BigtableColumn.prototype.encoding = 0; + + /** + * BigtableColumn type. + * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn + * @instance + */ + BigtableColumn.prototype.type = 0; + + /** + * Creates a new BigtableColumn instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion instance + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn instance */ - QuerySuggestion.create = function create(properties) { - return new QuerySuggestion(properties); + BigtableColumn.create = function create(properties) { + return new BigtableColumn(properties); }; /** - * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * Encodes the specified BigtableColumn message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySuggestion.encode = function encode(message, writer) { + BigtableColumn.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); - if (message.completableFieldPaths != null && message.completableFieldPaths.length) - for (var i = 0; i < message.completableFieldPaths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.completableFieldPaths[i]); + if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldName); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encoding); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); return writer; }; /** - * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * Encodes the specified BigtableColumn message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySuggestion.encodeDelimited = function encodeDelimited(message, writer) { + BigtableColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuerySuggestion message from the specified reader or buffer. + * Decodes a BigtableColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySuggestion.decode = function decode(reader, length) { + BigtableColumn.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.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.suggestion = reader.string(); + message.qualifier = reader.bytes(); break; } case 2: { - if (!(message.completableFieldPaths && message.completableFieldPaths.length)) - message.completableFieldPaths = []; - message.completableFieldPaths.push(reader.string()); + message.fieldName = reader.string(); + break; + } + case 3: { + message.encoding = reader.int32(); + break; + } + case 4: { + message.type = reader.int32(); break; } default: @@ -6947,394 +10386,277 @@ }; /** - * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * Decodes a BigtableColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySuggestion.decodeDelimited = function decodeDelimited(reader) { + BigtableColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuerySuggestion message. + * Verifies a BigtableColumn message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuerySuggestion.verify = function verify(message) { + BigtableColumn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - if (!$util.isString(message.suggestion)) - return "suggestion: string expected"; - if (message.completableFieldPaths != null && message.hasOwnProperty("completableFieldPaths")) { - if (!Array.isArray(message.completableFieldPaths)) - return "completableFieldPaths: array expected"; - for (var i = 0; i < message.completableFieldPaths.length; ++i) - if (!$util.isString(message.completableFieldPaths[i])) - return "completableFieldPaths: string[] expected"; - } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) + return "qualifier: buffer expected"; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } return null; }; /** - * Creates a QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn */ - QuerySuggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion) + BigtableColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion(); - if (object.suggestion != null) - message.suggestion = String(object.suggestion); - if (object.completableFieldPaths) { - if (!Array.isArray(object.completableFieldPaths)) - throw TypeError(".google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.completableFieldPaths: array expected"); - message.completableFieldPaths = []; - for (var i = 0; i < object.completableFieldPaths.length; ++i) - message.completableFieldPaths[i] = String(object.completableFieldPaths[i]); + var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); + if (object.qualifier != null) + if (typeof object.qualifier === "string") + $util.base64.decode(object.qualifier, message.qualifier = $util.newBuffer($util.base64.length(object.qualifier)), 0); + else if (object.qualifier.length >= 0) + message.qualifier = object.qualifier; + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "ENCODING_UNSPECIFIED": + case 0: + message.encoding = 0; + break; + case "TEXT": + case 1: + message.encoding = 1; + break; + case "BINARY": + case 2: + message.encoding = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STRING": + case 1: + message.type = 1; + break; + case "NUMBER": + case 2: + message.type = 2; + break; + case "INTEGER": + case 3: + message.type = 3; + break; + case "VAR_INTEGER": + case 4: + message.type = 4; + break; + case "BIG_NUMERIC": + case 5: + message.type = 5; + break; + case "BOOLEAN": + case 6: + message.type = 6; + break; + case "JSON": + case 7: + message.type = 7; + break; } return message; }; /** - * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * Creates a plain object from a BigtableColumn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static - * @param {google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion} message QuerySuggestion + * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} message BigtableColumn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuerySuggestion.toObject = function toObject(message, options) { + BigtableColumn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.completableFieldPaths = []; - if (options.defaults) - object.suggestion = ""; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - object.suggestion = message.suggestion; - if (message.completableFieldPaths && message.completableFieldPaths.length) { - object.completableFieldPaths = []; - for (var j = 0; j < message.completableFieldPaths.length; ++j) - object.completableFieldPaths[j] = message.completableFieldPaths[j]; + if (options.defaults) { + if (options.bytes === String) + object.qualifier = ""; + else { + object.qualifier = []; + if (options.bytes !== Array) + object.qualifier = $util.newBuffer(object.qualifier); + } + object.fieldName = ""; + object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } + if (message.qualifier != null && message.hasOwnProperty("qualifier")) + object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; return object; }; /** - * Converts this QuerySuggestion to JSON. + * Converts this BigtableColumn to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @instance * @returns {Object.} JSON object */ - QuerySuggestion.prototype.toJSON = function toJSON() { + BigtableColumn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QuerySuggestion + * Gets the default type url for BigtableColumn * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion + * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QuerySuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn"; }; - return QuerySuggestion; + return BigtableColumn; })(); - return CompleteQueryResponse; - })(); - - v1.GcsSource = (function() { - - /** - * Properties of a GcsSource. - * @memberof google.cloud.discoveryengine.v1 - * @interface IGcsSource - * @property {Array.|null} [inputUris] GcsSource inputUris - * @property {string|null} [dataSchema] GcsSource dataSchema - */ - - /** - * Constructs a new GcsSource. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource - * @constructor - * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set - */ - function GcsSource(properties) { - this.inputUris = []; - 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]]; - } - - /** - * GcsSource inputUris. - * @member {Array.} inputUris - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - */ - GcsSource.prototype.inputUris = $util.emptyArray; - - /** - * GcsSource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - */ - GcsSource.prototype.dataSchema = ""; - - /** - * Creates a new GcsSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource instance - */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); - }; - - /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputUris != null && message.inputUris.length) - for (var i = 0; i < message.inputUris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); - return writer; - }; - - /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.GcsSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.IGcsSource} message GcsSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSource.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.cloud.discoveryengine.v1.GcsSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.inputUris && message.inputUris.length)) - message.inputUris = []; - message.inputUris.push(reader.string()); - break; - } - case 2: { - message.dataSchema = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputUris != null && message.hasOwnProperty("inputUris")) { - if (!Array.isArray(message.inputUris)) - return "inputUris: array expected"; - for (var i = 0; i < message.inputUris.length; ++i) - if (!$util.isString(message.inputUris[i])) - return "inputUris: string[] expected"; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; - return null; - }; - - /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.GcsSource} GcsSource - */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.GcsSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1.GcsSource(); - if (object.inputUris) { - if (!Array.isArray(object.inputUris)) - throw TypeError(".google.cloud.discoveryengine.v1.GcsSource.inputUris: array expected"); - message.inputUris = []; - for (var i = 0; i < object.inputUris.length; ++i) - message.inputUris[i] = String(object.inputUris[i]); - } - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); - return message; - }; - - /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {google.cloud.discoveryengine.v1.GcsSource} message GcsSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputUris = []; - if (options.defaults) - object.dataSchema = ""; - if (message.inputUris && message.inputUris.length) { - object.inputUris = []; - for (var j = 0; j < message.inputUris.length; ++j) - object.inputUris[j] = message.inputUris[j]; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; - return object; - }; - /** - * Converts this GcsSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @instance - * @returns {Object.} JSON object + * Type enum. + * @name google.cloud.discoveryengine.v1.BigtableOptions.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} NUMBER=2 NUMBER value + * @property {number} INTEGER=3 INTEGER value + * @property {number} VAR_INTEGER=4 VAR_INTEGER value + * @property {number} BIG_NUMERIC=5 BIG_NUMERIC value + * @property {number} BOOLEAN=6 BOOLEAN value + * @property {number} JSON=7 JSON value */ - GcsSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + BigtableOptions.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "NUMBER"] = 2; + values[valuesById[3] = "INTEGER"] = 3; + values[valuesById[4] = "VAR_INTEGER"] = 4; + values[valuesById[5] = "BIG_NUMERIC"] = 5; + values[valuesById[6] = "BOOLEAN"] = 6; + values[valuesById[7] = "JSON"] = 7; + return values; + })(); /** - * Gets the default type url for GcsSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.GcsSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Encoding enum. + * @name google.cloud.discoveryengine.v1.BigtableOptions.Encoding + * @enum {number} + * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value + * @property {number} TEXT=1 TEXT value + * @property {number} BINARY=2 BINARY value */ - GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.GcsSource"; - }; + BigtableOptions.Encoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "BINARY"] = 2; + return values; + })(); - return GcsSource; + return BigtableOptions; })(); - v1.BigQuerySource = (function() { + v1.BigtableSource = (function() { /** - * Properties of a BigQuerySource. + * Properties of a BigtableSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigQuerySource - * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate - * @property {string|null} [projectId] BigQuerySource projectId - * @property {string|null} [datasetId] BigQuerySource datasetId - * @property {string|null} [tableId] BigQuerySource tableId - * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir - * @property {string|null} [dataSchema] BigQuerySource dataSchema + * @interface IBigtableSource + * @property {string|null} [projectId] BigtableSource projectId + * @property {string|null} [instanceId] BigtableSource instanceId + * @property {string|null} [tableId] BigtableSource tableId + * @property {google.cloud.discoveryengine.v1.IBigtableOptions|null} [bigtableOptions] BigtableSource bigtableOptions */ /** - * Constructs a new BigQuerySource. + * Constructs a new BigtableSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigQuerySource. - * @implements IBigQuerySource + * @classdesc Represents a BigtableSource. + * @implements IBigtableSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set */ - function BigQuerySource(properties) { + function BigtableSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7342,147 +10664,109 @@ } /** - * BigQuerySource partitionDate. - * @member {google.type.IDate|null|undefined} partitionDate - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.partitionDate = null; - - /** - * BigQuerySource projectId. + * BigtableSource projectId. * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.projectId = ""; + BigtableSource.prototype.projectId = ""; /** - * BigQuerySource datasetId. - * @member {string} datasetId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * BigtableSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.datasetId = ""; + BigtableSource.prototype.instanceId = ""; /** - * BigQuerySource tableId. + * BigtableSource tableId. * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.tableId = ""; - - /** - * BigQuerySource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @instance - */ - BigQuerySource.prototype.gcsStagingDir = ""; - - /** - * BigQuerySource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - BigQuerySource.prototype.dataSchema = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BigtableSource.prototype.tableId = ""; /** - * BigQuerySource partition. - * @member {"partitionDate"|undefined} partition - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * BigtableSource bigtableOptions. + * @member {google.cloud.discoveryengine.v1.IBigtableOptions|null|undefined} bigtableOptions + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance */ - Object.defineProperty(BigQuerySource.prototype, "partition", { - get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), - set: $util.oneOfSetter($oneOfFields) - }); + BigtableSource.prototype.bigtableOptions = null; /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new BigtableSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource instance + * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource instance */ - BigQuerySource.create = function create(properties) { - return new BigQuerySource(properties); + BigtableSource.create = function create(properties) { + return new BigtableSource(properties); }; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. + * Encodes the specified BigtableSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encode = function encode(message, writer) { + BigtableSource.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.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); - if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) - $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); + if (message.bigtableOptions != null && Object.hasOwnProperty.call(message, "bigtableOptions")) + $root.google.cloud.discoveryengine.v1.BigtableOptions.encode(message.bigtableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigQuerySource.verify|verify} messages. + * Encodes the specified BigtableSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + BigtableSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes a BigtableSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decode = function decode(reader, length) { + BigtableSource.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.cloud.discoveryengine.v1.BigQuerySource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } case 1: { message.projectId = reader.string(); break; } case 2: { - message.datasetId = reader.string(); + message.instanceId = reader.string(); break; } case 3: { @@ -7490,11 +10774,7 @@ break; } case 4: { - message.gcsStagingDir = reader.string(); - break; - } - case 6: { - message.dataSchema = reader.string(); + message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.decode(reader, reader.uint32()); break; } default: @@ -7506,178 +10786,153 @@ }; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes a BigtableSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decodeDelimited = function decodeDelimited(reader) { + BigtableSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQuerySource message. + * Verifies a BigtableSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - properties.partition = 1; - { - var error = $root.google.type.Date.verify(message.partitionDate); - if (error) - return "partitionDate." + error; - } - } + * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigtableSource.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.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; if (message.tableId != null && message.hasOwnProperty("tableId")) if (!$util.isString(message.tableId)) return "tableId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; + if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) { + var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.verify(message.bigtableOptions); + if (error) + return "bigtableOptions." + error; + } return null; }; /** - * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates a BigtableSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource */ - BigQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigQuerySource) + BigtableSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigQuerySource(); - if (object.partitionDate != null) { - if (typeof object.partitionDate !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigQuerySource.partitionDate: object expected"); - message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); - } + var message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); if (object.projectId != null) message.projectId = String(object.projectId); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); if (object.tableId != null) message.tableId = String(object.tableId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); + if (object.bigtableOptions != null) { + if (typeof object.bigtableOptions !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.BigtableSource.bigtableOptions: object expected"); + message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.fromObject(object.bigtableOptions); + } return message; }; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * Creates a plain object from a BigtableSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static - * @param {google.cloud.discoveryengine.v1.BigQuerySource} message BigQuerySource + * @param {google.cloud.discoveryengine.v1.BigtableSource} message BigtableSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQuerySource.toObject = function toObject(message, options) { + BigtableSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.projectId = ""; - object.datasetId = ""; + object.instanceId = ""; object.tableId = ""; - object.gcsStagingDir = ""; - object.dataSchema = ""; + object.bigtableOptions = null; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; if (message.tableId != null && message.hasOwnProperty("tableId")) object.tableId = message.tableId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); - if (options.oneofs) - object.partition = "partitionDate"; - } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; + if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) + object.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.toObject(message.bigtableOptions, options); return object; }; /** - * Converts this BigQuerySource to JSON. + * Converts this BigtableSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @instance * @returns {Object.} JSON object */ - BigQuerySource.prototype.toJSON = function toJSON() { + BigtableSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQuerySource + * Gets the default type url for BigtableSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigQuerySource + * @memberof google.cloud.discoveryengine.v1.BigtableSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigtableSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigQuerySource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableSource"; }; - return BigQuerySource; + return BigtableSource; })(); - v1.SpannerSource = (function() { + v1.FhirStoreSource = (function() { /** - * Properties of a SpannerSource. + * Properties of a FhirStoreSource. * @memberof google.cloud.discoveryengine.v1 - * @interface ISpannerSource - * @property {string|null} [projectId] SpannerSource projectId - * @property {string|null} [instanceId] SpannerSource instanceId - * @property {string|null} [databaseId] SpannerSource databaseId - * @property {string|null} [tableId] SpannerSource tableId - * @property {boolean|null} [enableDataBoost] SpannerSource enableDataBoost + * @interface IFhirStoreSource + * @property {string|null} [fhirStore] FhirStoreSource fhirStore + * @property {string|null} [gcsStagingDir] FhirStoreSource gcsStagingDir */ /** - * Constructs a new SpannerSource. + * Constructs a new FhirStoreSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SpannerSource. - * @implements ISpannerSource + * @classdesc Represents a FhirStoreSource. + * @implements IFhirStoreSource * @constructor - * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set */ - function SpannerSource(properties) { + function FhirStoreSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7685,131 +10940,89 @@ } /** - * SpannerSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.projectId = ""; - - /** - * SpannerSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.instanceId = ""; - - /** - * SpannerSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.SpannerSource - * @instance - */ - SpannerSource.prototype.databaseId = ""; - - /** - * SpannerSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * FhirStoreSource fhirStore. + * @member {string} fhirStore + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance */ - SpannerSource.prototype.tableId = ""; + FhirStoreSource.prototype.fhirStore = ""; /** - * SpannerSource enableDataBoost. - * @member {boolean} enableDataBoost - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * FhirStoreSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance */ - SpannerSource.prototype.enableDataBoost = false; + FhirStoreSource.prototype.gcsStagingDir = ""; /** - * Creates a new SpannerSource instance using the specified properties. + * Creates a new FhirStoreSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource instance + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource instance */ - SpannerSource.create = function create(properties) { - return new SpannerSource(properties); + FhirStoreSource.create = function create(properties) { + return new FhirStoreSource(properties); }; /** - * Encodes the specified SpannerSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. + * Encodes the specified FhirStoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpannerSource.encode = function encode(message, writer) { + FhirStoreSource.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.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); - if (message.enableDataBoost != null && Object.hasOwnProperty.call(message, "enableDataBoost")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableDataBoost); + if (message.fhirStore != null && Object.hasOwnProperty.call(message, "fhirStore")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fhirStore); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsStagingDir); return writer; }; /** - * Encodes the specified SpannerSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SpannerSource.verify|verify} messages. + * Encodes the specified FhirStoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.ISpannerSource} message SpannerSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpannerSource.encodeDelimited = function encodeDelimited(message, writer) { + FhirStoreSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpannerSource message from the specified reader or buffer. + * Decodes a FhirStoreSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpannerSource.decode = function decode(reader, length) { + FhirStoreSource.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.cloud.discoveryengine.v1.SpannerSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + message.fhirStore = reader.string(); break; } case 2: { - message.instanceId = reader.string(); - break; - } - case 3: { - message.databaseId = reader.string(); - break; - } - case 4: { - message.tableId = reader.string(); - break; - } - case 5: { - message.enableDataBoost = reader.bool(); + message.gcsStagingDir = reader.string(); break; } default: @@ -7821,157 +11034,136 @@ }; /** - * Decodes a SpannerSource message from the specified reader or buffer, length delimited. + * Decodes a FhirStoreSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpannerSource.decodeDelimited = function decodeDelimited(reader) { + FhirStoreSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpannerSource message. + * Verifies a FhirStoreSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpannerSource.verify = function verify(message) { + FhirStoreSource.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.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) - if (typeof message.enableDataBoost !== "boolean") - return "enableDataBoost: boolean expected"; + if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) + if (!$util.isString(message.fhirStore)) + return "fhirStore: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; return null; }; /** - * Creates a SpannerSource message from a plain object. Also converts values to their respective internal types. + * Creates a FhirStoreSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SpannerSource} SpannerSource + * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource */ - SpannerSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SpannerSource) + FhirStoreSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.FhirStoreSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.SpannerSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.enableDataBoost != null) - message.enableDataBoost = Boolean(object.enableDataBoost); + var message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); + if (object.fhirStore != null) + message.fhirStore = String(object.fhirStore); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); return message; }; /** - * Creates a plain object from a SpannerSource message. Also converts values to other types if specified. + * Creates a plain object from a FhirStoreSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static - * @param {google.cloud.discoveryengine.v1.SpannerSource} message SpannerSource + * @param {google.cloud.discoveryengine.v1.FhirStoreSource} message FhirStoreSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpannerSource.toObject = function toObject(message, options) { + FhirStoreSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.instanceId = ""; - object.databaseId = ""; - object.tableId = ""; - object.enableDataBoost = false; + object.fhirStore = ""; + object.gcsStagingDir = ""; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.enableDataBoost != null && message.hasOwnProperty("enableDataBoost")) - object.enableDataBoost = message.enableDataBoost; + if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) + object.fhirStore = message.fhirStore; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this SpannerSource to JSON. + * Converts this FhirStoreSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @instance * @returns {Object.} JSON object */ - SpannerSource.prototype.toJSON = function toJSON() { + FhirStoreSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpannerSource + * Gets the default type url for FhirStoreSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SpannerSource + * @memberof google.cloud.discoveryengine.v1.FhirStoreSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpannerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FhirStoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SpannerSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FhirStoreSource"; }; - return SpannerSource; + return FhirStoreSource; })(); - v1.BigtableOptions = (function() { + v1.CloudSqlSource = (function() { /** - * Properties of a BigtableOptions. + * Properties of a CloudSqlSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigtableOptions - * @property {string|null} [keyFieldName] BigtableOptions keyFieldName - * @property {Object.|null} [families] BigtableOptions families + * @interface ICloudSqlSource + * @property {string|null} [projectId] CloudSqlSource projectId + * @property {string|null} [instanceId] CloudSqlSource instanceId + * @property {string|null} [databaseId] CloudSqlSource databaseId + * @property {string|null} [tableId] CloudSqlSource tableId + * @property {string|null} [gcsStagingDir] CloudSqlSource gcsStagingDir + * @property {boolean|null} [offload] CloudSqlSource offload */ /** - * Constructs a new BigtableOptions. + * Constructs a new CloudSqlSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigtableOptions. - * @implements IBigtableOptions + * @classdesc Represents a CloudSqlSource. + * @implements ICloudSqlSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set */ - function BigtableOptions(properties) { - this.families = {}; + function CloudSqlSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7979,111 +11171,145 @@ } /** - * BigtableOptions keyFieldName. - * @member {string} keyFieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * CloudSqlSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance */ - BigtableOptions.prototype.keyFieldName = ""; + CloudSqlSource.prototype.projectId = ""; /** - * BigtableOptions families. - * @member {Object.} families - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * CloudSqlSource instanceId. + * @member {string} instanceId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance */ - BigtableOptions.prototype.families = $util.emptyObject; + CloudSqlSource.prototype.instanceId = ""; /** - * Creates a new BigtableOptions instance using the specified properties. + * CloudSqlSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.databaseId = ""; + + /** + * CloudSqlSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.tableId = ""; + + /** + * CloudSqlSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.gcsStagingDir = ""; + + /** + * CloudSqlSource offload. + * @member {boolean} offload + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @instance + */ + CloudSqlSource.prototype.offload = false; + + /** + * Creates a new CloudSqlSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions instance + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource instance */ - BigtableOptions.create = function create(properties) { - return new BigtableOptions(properties); + CloudSqlSource.create = function create(properties) { + return new CloudSqlSource(properties); }; /** - * Encodes the specified BigtableOptions message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. + * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableOptions.encode = function encode(message, writer) { + CloudSqlSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyFieldName != null && Object.hasOwnProperty.call(message, "keyFieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyFieldName); - if (message.families != null && Object.hasOwnProperty.call(message, "families")) - for (var keys = Object.keys(message.families), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.encode(message.families[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcsStagingDir); + if (message.offload != null && Object.hasOwnProperty.call(message, "offload")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.offload); return writer; }; /** - * Encodes the specified BigtableOptions message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.verify|verify} messages. + * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableOptions} message BigtableOptions message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableOptions.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigtableOptions message from the specified reader or buffer. + * Decodes a CloudSqlSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableOptions.decode = function decode(reader, length) { + CloudSqlSource.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.cloud.discoveryengine.v1.BigtableOptions(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.keyFieldName = reader.string(); + message.projectId = reader.string(); break; } case 2: { - if (message.families === $util.emptyObject) - message.families = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.families[key] = value; + message.instanceId = reader.string(); + break; + } + case 3: { + message.databaseId = reader.string(); + break; + } + case 4: { + message.tableId = reader.string(); + break; + } + case 5: { + message.gcsStagingDir = reader.string(); + break; + } + case 6: { + message.offload = reader.bool(); break; } default: @@ -8095,918 +11321,485 @@ }; /** - * Decodes a BigtableOptions message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableOptions.decodeDelimited = function decodeDelimited(reader) { + CloudSqlSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigtableOptions message. + * Verifies a CloudSqlSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigtableOptions.verify = function verify(message) { + CloudSqlSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) - if (!$util.isString(message.keyFieldName)) - return "keyFieldName: string expected"; - if (message.families != null && message.hasOwnProperty("families")) { - if (!$util.isObject(message.families)) - return "families: object expected"; - var key = Object.keys(message.families); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify(message.families[key[i]]); - if (error) - return "families." + error; - } - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + if (!$util.isString(message.instanceId)) + return "instanceId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + if (message.offload != null && message.hasOwnProperty("offload")) + if (typeof message.offload !== "boolean") + return "offload: boolean expected"; return null; }; /** - * Creates a BigtableOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions} BigtableOptions + * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource */ - BigtableOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions) + CloudSqlSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CloudSqlSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions(); - if (object.keyFieldName != null) - message.keyFieldName = String(object.keyFieldName); - if (object.families) { - if (typeof object.families !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); - message.families = {}; - for (var keys = Object.keys(object.families), i = 0; i < keys.length; ++i) { - if (typeof object.families[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.families: object expected"); - message.families[keys[i]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.fromObject(object.families[keys[i]]); - } - } + var message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instanceId != null) + message.instanceId = String(object.instanceId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + if (object.offload != null) + message.offload = Boolean(object.offload); return message; }; /** - * Creates a plain object from a BigtableOptions message. Also converts values to other types if specified. + * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions} message BigtableOptions + * @param {google.cloud.discoveryengine.v1.CloudSqlSource} message CloudSqlSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigtableOptions.toObject = function toObject(message, options) { + CloudSqlSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.families = {}; - if (options.defaults) - object.keyFieldName = ""; - if (message.keyFieldName != null && message.hasOwnProperty("keyFieldName")) - object.keyFieldName = message.keyFieldName; - var keys2; - if (message.families && (keys2 = Object.keys(message.families)).length) { - object.families = {}; - for (var j = 0; j < keys2.length; ++j) - object.families[keys2[j]] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.toObject(message.families[keys2[j]], options); + if (options.defaults) { + object.projectId = ""; + object.instanceId = ""; + object.databaseId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + object.offload = false; } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instanceId != null && message.hasOwnProperty("instanceId")) + object.instanceId = message.instanceId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + if (message.offload != null && message.hasOwnProperty("offload")) + object.offload = message.offload; return object; }; /** - * Converts this BigtableOptions to JSON. + * Converts this CloudSqlSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @instance * @returns {Object.} JSON object */ - BigtableOptions.prototype.toJSON = function toJSON() { + CloudSqlSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigtableOptions + * Gets the default type url for CloudSqlSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions + * @memberof google.cloud.discoveryengine.v1.CloudSqlSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigtableOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudSqlSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CloudSqlSource"; }; - BigtableOptions.BigtableColumnFamily = (function() { - - /** - * Properties of a BigtableColumnFamily. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @interface IBigtableColumnFamily - * @property {string|null} [fieldName] BigtableColumnFamily fieldName - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumnFamily encoding - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumnFamily type - * @property {Array.|null} [columns] BigtableColumnFamily columns - */ - - /** - * Constructs a new BigtableColumnFamily. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @classdesc Represents a BigtableColumnFamily. - * @implements IBigtableColumnFamily - * @constructor - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set - */ - function BigtableColumnFamily(properties) { - this.columns = []; - 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]]; - } - - /** - * BigtableColumnFamily fieldName. - * @member {string} fieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.fieldName = ""; - - /** - * BigtableColumnFamily encoding. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.encoding = 0; - - /** - * BigtableColumnFamily type. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.type = 0; - - /** - * BigtableColumnFamily columns. - * @member {Array.} columns - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - */ - BigtableColumnFamily.prototype.columns = $util.emptyArray; - - /** - * Creates a new BigtableColumnFamily instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily instance - */ - BigtableColumnFamily.create = function create(properties) { - return new BigtableColumnFamily(properties); - }; - - /** - * Encodes the specified BigtableColumnFamily message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumnFamily.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BigtableColumnFamily message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumnFamily} message BigtableColumnFamily message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigtableColumnFamily message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumnFamily.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.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldName = reader.string(); - break; - } - case 2: { - message.encoding = reader.int32(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigtableColumnFamily message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumnFamily.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigtableColumnFamily message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigtableColumnFamily.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a BigtableColumnFamily message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} BigtableColumnFamily - */ - BigtableColumnFamily.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily) - return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily(); - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; - break; - } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "TEXT": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STRING": - case 1: - message.type = 1; - break; - case "NUMBER": - case 2: - message.type = 2; - break; - case "INTEGER": - case 3: - message.type = 3; - break; - case "VAR_INTEGER": - case 4: - message.type = 4; - break; - case "BIG_NUMERIC": - case 5: - message.type = 5; - break; - case "BOOLEAN": - case 6: - message.type = 6; - break; - case "JSON": - case 7: - message.type = 7; - break; - } - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily.columns: object expected"); - message.columns[i] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BigtableColumnFamily message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily} message BigtableColumnFamily - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigtableColumnFamily.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) { - object.fieldName = ""; - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this BigtableColumnFamily to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @instance - * @returns {Object.} JSON object - */ - BigtableColumnFamily.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigtableColumnFamily - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigtableColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily"; - }; + return CloudSqlSource; + })(); - return BigtableColumnFamily; - })(); + v1.AlloyDbSource = (function() { - BigtableOptions.BigtableColumn = (function() { + /** + * Properties of an AlloyDbSource. + * @memberof google.cloud.discoveryengine.v1 + * @interface IAlloyDbSource + * @property {string|null} [projectId] AlloyDbSource projectId + * @property {string|null} [locationId] AlloyDbSource locationId + * @property {string|null} [clusterId] AlloyDbSource clusterId + * @property {string|null} [databaseId] AlloyDbSource databaseId + * @property {string|null} [tableId] AlloyDbSource tableId + * @property {string|null} [gcsStagingDir] AlloyDbSource gcsStagingDir + */ - /** - * Properties of a BigtableColumn. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @interface IBigtableColumn - * @property {Uint8Array|null} [qualifier] BigtableColumn qualifier - * @property {string|null} [fieldName] BigtableColumn fieldName - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Encoding|null} [encoding] BigtableColumn encoding - * @property {google.cloud.discoveryengine.v1.BigtableOptions.Type|null} [type] BigtableColumn type - */ + /** + * Constructs a new AlloyDbSource. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an AlloyDbSource. + * @implements IAlloyDbSource + * @constructor + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource=} [properties] Properties to set + */ + function AlloyDbSource(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 BigtableColumn. - * @memberof google.cloud.discoveryengine.v1.BigtableOptions - * @classdesc Represents a BigtableColumn. - * @implements IBigtableColumn - * @constructor - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set - */ - function BigtableColumn(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]]; - } + /** + * AlloyDbSource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.projectId = ""; - /** - * BigtableColumn qualifier. - * @member {Uint8Array} qualifier - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.qualifier = $util.newBuffer([]); + /** + * AlloyDbSource locationId. + * @member {string} locationId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.locationId = ""; - /** - * BigtableColumn fieldName. - * @member {string} fieldName - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.fieldName = ""; + /** + * AlloyDbSource clusterId. + * @member {string} clusterId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.clusterId = ""; - /** - * BigtableColumn encoding. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Encoding} encoding - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.encoding = 0; + /** + * AlloyDbSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.databaseId = ""; - /** - * BigtableColumn type. - * @member {google.cloud.discoveryengine.v1.BigtableOptions.Type} type - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - */ - BigtableColumn.prototype.type = 0; + /** + * AlloyDbSource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.tableId = ""; - /** - * Creates a new BigtableColumn instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn instance - */ - BigtableColumn.create = function create(properties) { - return new BigtableColumn(properties); - }; + /** + * AlloyDbSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + */ + AlloyDbSource.prototype.gcsStagingDir = ""; - /** - * Encodes the specified BigtableColumn message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.qualifier != null && Object.hasOwnProperty.call(message, "qualifier")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifier); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldName); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encoding); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - return writer; - }; + /** + * Creates a new AlloyDbSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource instance + */ + AlloyDbSource.create = function create(properties) { + return new AlloyDbSource(properties); + }; - /** - * Encodes the specified BigtableColumn message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.IBigtableColumn} message BigtableColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AlloyDbSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource} message AlloyDbSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSource.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.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.locationId); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.gcsStagingDir); + return writer; + }; - /** - * Decodes a BigtableColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumn.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.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.qualifier = reader.bytes(); - break; - } - case 2: { - message.fieldName = reader.string(); - break; - } - case 3: { - message.encoding = reader.int32(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified AlloyDbSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.AlloyDbSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.IAlloyDbSource} message AlloyDbSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlloyDbSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSource.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.cloud.discoveryengine.v1.AlloyDbSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a BigtableColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigtableColumn message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigtableColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - if (!(message.qualifier && typeof message.qualifier.length === "number" || $util.isString(message.qualifier))) - return "qualifier: buffer expected"; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + message.locationId = reader.string(); break; } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: + case 3: { + message.clusterId = reader.string(); break; } - return null; - }; - - /** - * Creates a BigtableColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} BigtableColumn - */ - BigtableColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn) - return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn(); - if (object.qualifier != null) - if (typeof object.qualifier === "string") - $util.base64.decode(object.qualifier, message.qualifier = $util.newBuffer($util.base64.length(object.qualifier)), 0); - else if (object.qualifier.length >= 0) - message.qualifier = object.qualifier; - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; + case 4: { + message.databaseId = reader.string(); break; } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "TEXT": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + case 5: { + message.tableId = reader.string(); break; } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STRING": - case 1: - message.type = 1; - break; - case "NUMBER": - case 2: - message.type = 2; - break; - case "INTEGER": - case 3: - message.type = 3; - break; - case "VAR_INTEGER": - case 4: - message.type = 4; - break; - case "BIG_NUMERIC": - case 5: - message.type = 5; - break; - case "BOOLEAN": - case 6: - message.type = 6; - break; - case "JSON": - case 7: - message.type = 7; + case 6: { + message.gcsStagingDir = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a BigtableColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn} message BigtableColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigtableColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.qualifier = ""; - else { - object.qualifier = []; - if (options.bytes !== Array) - object.qualifier = $util.newBuffer(object.qualifier); - } - object.fieldName = ""; - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.qualifier != null && message.hasOwnProperty("qualifier")) - object.qualifier = options.bytes === String ? $util.base64.encode(message.qualifier, 0, message.qualifier.length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifier) : message.qualifier; - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.discoveryengine.v1.BigtableOptions.Encoding[message.encoding] : message.encoding; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] === undefined ? message.type : $root.google.cloud.discoveryengine.v1.BigtableOptions.Type[message.type] : message.type; - return object; - }; + /** + * Decodes an AlloyDbSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this BigtableColumn to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @instance - * @returns {Object.} JSON object - */ - BigtableColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an AlloyDbSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlloyDbSource.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.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + return null; + }; - /** - * Gets the default type url for BigtableColumn - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigtableColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn"; - }; + /** + * Creates an AlloyDbSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.AlloyDbSource} AlloyDbSource + */ + AlloyDbSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.AlloyDbSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.AlloyDbSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.locationId != null) + message.locationId = String(object.locationId); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + return message; + }; - return BigtableColumn; - })(); + /** + * Creates a plain object from an AlloyDbSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {google.cloud.discoveryengine.v1.AlloyDbSource} message AlloyDbSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlloyDbSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.locationId = ""; + object.clusterId = ""; + object.databaseId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + return object; + }; /** - * Type enum. - * @name google.cloud.discoveryengine.v1.BigtableOptions.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} STRING=1 STRING value - * @property {number} NUMBER=2 NUMBER value - * @property {number} INTEGER=3 INTEGER value - * @property {number} VAR_INTEGER=4 VAR_INTEGER value - * @property {number} BIG_NUMERIC=5 BIG_NUMERIC value - * @property {number} BOOLEAN=6 BOOLEAN value - * @property {number} JSON=7 JSON value + * Converts this AlloyDbSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @instance + * @returns {Object.} JSON object */ - BigtableOptions.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STRING"] = 1; - values[valuesById[2] = "NUMBER"] = 2; - values[valuesById[3] = "INTEGER"] = 3; - values[valuesById[4] = "VAR_INTEGER"] = 4; - values[valuesById[5] = "BIG_NUMERIC"] = 5; - values[valuesById[6] = "BOOLEAN"] = 6; - values[valuesById[7] = "JSON"] = 7; - return values; - })(); + AlloyDbSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Encoding enum. - * @name google.cloud.discoveryengine.v1.BigtableOptions.Encoding - * @enum {number} - * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value - * @property {number} TEXT=1 TEXT value - * @property {number} BINARY=2 BINARY value + * Gets the default type url for AlloyDbSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.AlloyDbSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - BigtableOptions.Encoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "TEXT"] = 1; - values[valuesById[2] = "BINARY"] = 2; - return values; - })(); + AlloyDbSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.AlloyDbSource"; + }; - return BigtableOptions; + return AlloyDbSource; })(); - v1.BigtableSource = (function() { + v1.FirestoreSource = (function() { /** - * Properties of a BigtableSource. + * Properties of a FirestoreSource. * @memberof google.cloud.discoveryengine.v1 - * @interface IBigtableSource - * @property {string|null} [projectId] BigtableSource projectId - * @property {string|null} [instanceId] BigtableSource instanceId - * @property {string|null} [tableId] BigtableSource tableId - * @property {google.cloud.discoveryengine.v1.IBigtableOptions|null} [bigtableOptions] BigtableSource bigtableOptions + * @interface IFirestoreSource + * @property {string|null} [projectId] FirestoreSource projectId + * @property {string|null} [databaseId] FirestoreSource databaseId + * @property {string|null} [collectionId] FirestoreSource collectionId + * @property {string|null} [gcsStagingDir] FirestoreSource gcsStagingDir */ /** - * Constructs a new BigtableSource. + * Constructs a new FirestoreSource. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a BigtableSource. - * @implements IBigtableSource + * @classdesc Represents a FirestoreSource. + * @implements IFirestoreSource * @constructor - * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set */ - function BigtableSource(properties) { + function FirestoreSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9014,100 +11807,100 @@ } /** - * BigtableSource projectId. + * FirestoreSource projectId. * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.projectId = ""; + FirestoreSource.prototype.projectId = ""; /** - * BigtableSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource databaseId. + * @member {string} databaseId + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.instanceId = ""; + FirestoreSource.prototype.databaseId = ""; /** - * BigtableSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource collectionId. + * @member {string} collectionId + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.tableId = ""; + FirestoreSource.prototype.collectionId = ""; /** - * BigtableSource bigtableOptions. - * @member {google.cloud.discoveryengine.v1.IBigtableOptions|null|undefined} bigtableOptions - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * FirestoreSource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance */ - BigtableSource.prototype.bigtableOptions = null; + FirestoreSource.prototype.gcsStagingDir = ""; /** - * Creates a new BigtableSource instance using the specified properties. + * Creates a new FirestoreSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource instance + * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource instance */ - BigtableSource.create = function create(properties) { - return new BigtableSource(properties); + FirestoreSource.create = function create(properties) { + return new FirestoreSource(properties); }; /** - * Encodes the specified BigtableSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. + * Encodes the specified FirestoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableSource.encode = function encode(message, writer) { + FirestoreSource.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.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); - if (message.bigtableOptions != null && Object.hasOwnProperty.call(message, "bigtableOptions")) - $root.google.cloud.discoveryengine.v1.BigtableOptions.encode(message.bigtableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseId); + if (message.collectionId != null && Object.hasOwnProperty.call(message, "collectionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); return writer; }; /** - * Encodes the specified BigtableSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.BigtableSource.verify|verify} messages. + * Encodes the specified FirestoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.IBigtableSource} message BigtableSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigtableSource.encodeDelimited = function encodeDelimited(message, writer) { + FirestoreSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigtableSource message from the specified reader or buffer. + * Decodes a FirestoreSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableSource.decode = function decode(reader, length) { + FirestoreSource.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.cloud.discoveryengine.v1.BigtableSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9116,15 +11909,15 @@ break; } case 2: { - message.instanceId = reader.string(); + message.databaseId = reader.string(); break; } case 3: { - message.tableId = reader.string(); + message.collectionId = reader.string(); break; } case 4: { - message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.decode(reader, reader.uint32()); + message.gcsStagingDir = reader.string(); break; } default: @@ -9136,153 +11929,147 @@ }; /** - * Decodes a BigtableSource message from the specified reader or buffer, length delimited. + * Decodes a FirestoreSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigtableSource.decodeDelimited = function decodeDelimited(reader) { + FirestoreSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigtableSource message. + * Verifies a FirestoreSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigtableSource.verify = function verify(message) { + FirestoreSource.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.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) { - var error = $root.google.cloud.discoveryengine.v1.BigtableOptions.verify(message.bigtableOptions); - if (error) - return "bigtableOptions." + error; - } + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + if (!$util.isString(message.databaseId)) + return "databaseId: string expected"; + if (message.collectionId != null && message.hasOwnProperty("collectionId")) + if (!$util.isString(message.collectionId)) + return "collectionId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; return null; }; /** - * Creates a BigtableSource message from a plain object. Also converts values to their respective internal types. + * Creates a FirestoreSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.BigtableSource} BigtableSource + * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource */ - BigtableSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.BigtableSource) + FirestoreSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.FirestoreSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.BigtableSource(); + var message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); if (object.projectId != null) message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.bigtableOptions != null) { - if (typeof object.bigtableOptions !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.BigtableSource.bigtableOptions: object expected"); - message.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.fromObject(object.bigtableOptions); - } + if (object.databaseId != null) + message.databaseId = String(object.databaseId); + if (object.collectionId != null) + message.collectionId = String(object.collectionId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); return message; }; /** - * Creates a plain object from a BigtableSource message. Also converts values to other types if specified. + * Creates a plain object from a FirestoreSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static - * @param {google.cloud.discoveryengine.v1.BigtableSource} message BigtableSource + * @param {google.cloud.discoveryengine.v1.FirestoreSource} message FirestoreSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigtableSource.toObject = function toObject(message, options) { + FirestoreSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.projectId = ""; - object.instanceId = ""; - object.tableId = ""; - object.bigtableOptions = null; + object.databaseId = ""; + object.collectionId = ""; + object.gcsStagingDir = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.bigtableOptions != null && message.hasOwnProperty("bigtableOptions")) - object.bigtableOptions = $root.google.cloud.discoveryengine.v1.BigtableOptions.toObject(message.bigtableOptions, options); + if (message.databaseId != null && message.hasOwnProperty("databaseId")) + object.databaseId = message.databaseId; + if (message.collectionId != null && message.hasOwnProperty("collectionId")) + object.collectionId = message.collectionId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this BigtableSource to JSON. + * Converts this FirestoreSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @instance * @returns {Object.} JSON object */ - BigtableSource.prototype.toJSON = function toJSON() { + FirestoreSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigtableSource + * Gets the default type url for FirestoreSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.BigtableSource + * @memberof google.cloud.discoveryengine.v1.FirestoreSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigtableSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FirestoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.BigtableSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FirestoreSource"; }; - return BigtableSource; + return FirestoreSource; })(); - v1.FhirStoreSource = (function() { + v1.ImportErrorConfig = (function() { /** - * Properties of a FhirStoreSource. + * Properties of an ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1 - * @interface IFhirStoreSource - * @property {string|null} [fhirStore] FhirStoreSource fhirStore - * @property {string|null} [gcsStagingDir] FhirStoreSource gcsStagingDir + * @interface IImportErrorConfig + * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix */ /** - * Constructs a new FhirStoreSource. + * Constructs a new ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a FhirStoreSource. - * @implements IFhirStoreSource + * @classdesc Represents an ImportErrorConfig. + * @implements IImportErrorConfig * @constructor - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set */ - function FhirStoreSource(properties) { + function ImportErrorConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9290,89 +12077,89 @@ } /** - * FhirStoreSource fhirStore. - * @member {string} fhirStore - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * ImportErrorConfig gcsPrefix. + * @member {string|null|undefined} gcsPrefix + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance */ - FhirStoreSource.prototype.fhirStore = ""; + ImportErrorConfig.prototype.gcsPrefix = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FhirStoreSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * ImportErrorConfig destination. + * @member {"gcsPrefix"|undefined} destination + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance */ - FhirStoreSource.prototype.gcsStagingDir = ""; + Object.defineProperty(ImportErrorConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new FhirStoreSource instance using the specified properties. + * Creates a new ImportErrorConfig instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource instance + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig instance */ - FhirStoreSource.create = function create(properties) { - return new FhirStoreSource(properties); + ImportErrorConfig.create = function create(properties) { + return new ImportErrorConfig(properties); }; /** - * Encodes the specified FhirStoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. + * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FhirStoreSource.encode = function encode(message, writer) { + ImportErrorConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fhirStore != null && Object.hasOwnProperty.call(message, "fhirStore")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fhirStore); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsStagingDir); + if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); return writer; }; /** - * Encodes the specified FhirStoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FhirStoreSource.verify|verify} messages. + * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.IFhirStoreSource} message FhirStoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FhirStoreSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FhirStoreSource message from the specified reader or buffer. + * Decodes an ImportErrorConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FhirStoreSource.decode = function decode(reader, length) { + ImportErrorConfig.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.cloud.discoveryengine.v1.FhirStoreSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.fhirStore = reader.string(); - break; - } - case 2: { - message.gcsStagingDir = reader.string(); + message.gcsPrefix = reader.string(); break; } default: @@ -9384,136 +12171,130 @@ }; /** - * Decodes a FhirStoreSource message from the specified reader or buffer, length delimited. + * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FhirStoreSource.decodeDelimited = function decodeDelimited(reader) { + ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FhirStoreSource message. + * Verifies an ImportErrorConfig message. * @function verify - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FhirStoreSource.verify = function verify(message) { + ImportErrorConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) - if (!$util.isString(message.fhirStore)) - return "fhirStore: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; + var properties = {}; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + properties.destination = 1; + if (!$util.isString(message.gcsPrefix)) + return "gcsPrefix: string expected"; + } return null; }; /** - * Creates a FhirStoreSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.FhirStoreSource} FhirStoreSource + * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig */ - FhirStoreSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.FhirStoreSource) + ImportErrorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportErrorConfig) return object; - var message = new $root.google.cloud.discoveryengine.v1.FhirStoreSource(); - if (object.fhirStore != null) - message.fhirStore = String(object.fhirStore); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); + var message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); + if (object.gcsPrefix != null) + message.gcsPrefix = String(object.gcsPrefix); return message; }; /** - * Creates a plain object from a FhirStoreSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1.FhirStoreSource} message FhirStoreSource + * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} message ImportErrorConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FhirStoreSource.toObject = function toObject(message, options) { + ImportErrorConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fhirStore = ""; - object.gcsStagingDir = ""; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + object.gcsPrefix = message.gcsPrefix; + if (options.oneofs) + object.destination = "gcsPrefix"; } - if (message.fhirStore != null && message.hasOwnProperty("fhirStore")) - object.fhirStore = message.fhirStore; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; return object; }; /** - * Converts this FhirStoreSource to JSON. + * Converts this ImportErrorConfig to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @instance * @returns {Object.} JSON object */ - FhirStoreSource.prototype.toJSON = function toJSON() { + ImportErrorConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FhirStoreSource + * Gets the default type url for ImportErrorConfig * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.FhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FhirStoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FhirStoreSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportErrorConfig"; }; - return FhirStoreSource; + return ImportErrorConfig; })(); - v1.CloudSqlSource = (function() { + v1.ImportUserEventsRequest = (function() { /** - * Properties of a CloudSqlSource. + * Properties of an ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface ICloudSqlSource - * @property {string|null} [projectId] CloudSqlSource projectId - * @property {string|null} [instanceId] CloudSqlSource instanceId - * @property {string|null} [databaseId] CloudSqlSource databaseId - * @property {string|null} [tableId] CloudSqlSource tableId - * @property {string|null} [gcsStagingDir] CloudSqlSource gcsStagingDir - * @property {boolean|null} [offload] CloudSqlSource offload + * @interface IImportUserEventsRequest + * @property {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource + * @property {string|null} [parent] ImportUserEventsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig */ /** - * Constructs a new CloudSqlSource. + * Constructs a new ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CloudSqlSource. - * @implements ICloudSqlSource + * @classdesc Represents an ImportUserEventsRequest. + * @implements IImportUserEventsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set */ - function CloudSqlSource(properties) { + function ImportUserEventsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9521,145 +12302,145 @@ } /** - * CloudSqlSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.projectId = ""; + ImportUserEventsRequest.prototype.inlineSource = null; /** - * CloudSqlSource instanceId. - * @member {string} instanceId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.instanceId = ""; + ImportUserEventsRequest.prototype.gcsSource = null; /** - * CloudSqlSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.databaseId = ""; + ImportUserEventsRequest.prototype.bigquerySource = null; /** - * CloudSqlSource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.tableId = ""; + ImportUserEventsRequest.prototype.parent = ""; /** - * CloudSqlSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.gcsStagingDir = ""; + ImportUserEventsRequest.prototype.errorConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CloudSqlSource offload. - * @member {boolean} offload - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * ImportUserEventsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance */ - CloudSqlSource.prototype.offload = false; + Object.defineProperty(ImportUserEventsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CloudSqlSource instance using the specified properties. + * Creates a new ImportUserEventsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest instance */ - CloudSqlSource.create = function create(properties) { - return new CloudSqlSource(properties); + ImportUserEventsRequest.create = function create(properties) { + return new ImportUserEventsRequest(properties); }; /** - * Encodes the specified CloudSqlSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSource.encode = function encode(message, writer) { + ImportUserEventsRequest.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.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceId); - if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcsStagingDir); - if (message.offload != null && Object.hasOwnProperty.call(message, "offload")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.offload); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudSqlSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CloudSqlSource.verify|verify} messages. + * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.ICloudSqlSource} message CloudSqlSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlSource message from the specified reader or buffer. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSource.decode = function decode(reader, length) { + ImportUserEventsRequest.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.cloud.discoveryengine.v1.CloudSqlSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.projectId = reader.string(); - break; - } case 2: { - message.instanceId = reader.string(); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { - message.databaseId = reader.string(); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } case 4: { - message.tableId = reader.string(); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); break; } - case 5: { - message.gcsStagingDir = reader.string(); + case 1: { + message.parent = reader.string(); break; } - case 6: { - message.offload = reader.bool(); + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -9671,166 +12452,423 @@ }; /** - * Decodes a CloudSqlSource message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSource.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlSource message. + * Verifies an ImportUserEventsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlSource.verify = function verify(message) { + ImportUserEventsRequest.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.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; - if (message.offload != null && message.hasOwnProperty("offload")) - if (typeof message.offload !== "boolean") - return "offload: boolean expected"; + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); + if (error) + return "inlineSource." + error; + } + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } return null; }; /** - * Creates a CloudSqlSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CloudSqlSource} CloudSqlSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest */ - CloudSqlSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CloudSqlSource) + ImportUserEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.CloudSqlSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); - if (object.offload != null) - message.offload = Boolean(object.offload); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } return message; }; /** - * Creates a plain object from a CloudSqlSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1.CloudSqlSource} message CloudSqlSource + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest} message ImportUserEventsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlSource.toObject = function toObject(message, options) { + ImportUserEventsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.instanceId = ""; - object.databaseId = ""; - object.tableId = ""; - object.gcsStagingDir = ""; - object.offload = false; + object.parent = ""; + object.errorConfig = null; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; - if (message.offload != null && message.hasOwnProperty("offload")) - object.offload = message.offload; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this CloudSqlSource to JSON. + * Converts this ImportUserEventsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @instance * @returns {Object.} JSON object */ - CloudSqlSource.prototype.toJSON = function toJSON() { + ImportUserEventsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlSource + * Gets the default type url for ImportUserEventsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CloudSqlSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest"; }; - return CloudSqlSource; + ImportUserEventsRequest.InlineSource = (function() { + + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @interface IInlineSource + * @property {Array.|null} [userEvents] InlineSource userEvents + */ + + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.userEvents = []; + 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]]; + } + + /** + * InlineSource userEvents. + * @member {Array.} userEvents + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @instance + */ + InlineSource.prototype.userEvents = $util.emptyArray; + + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userEvents != null && message.userEvents.length) + for (var i = 0; i < message.userEvents.length; ++i) + $root.google.cloud.discoveryengine.v1.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.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.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userEvents && message.userEvents.length)) + message.userEvents = []; + message.userEvents.push($root.google.cloud.discoveryengine.v1.UserEvent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userEvents != null && message.hasOwnProperty("userEvents")) { + if (!Array.isArray(message.userEvents)) + return "userEvents: array expected"; + for (var i = 0; i < message.userEvents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.UserEvent.verify(message.userEvents[i]); + if (error) + return "userEvents." + error; + } + } + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); + if (object.userEvents) { + if (!Array.isArray(object.userEvents)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: array expected"); + message.userEvents = []; + for (var i = 0; i < object.userEvents.length; ++i) { + if (typeof object.userEvents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: object expected"); + message.userEvents[i] = $root.google.cloud.discoveryengine.v1.UserEvent.fromObject(object.userEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userEvents = []; + if (message.userEvents && message.userEvents.length) { + object.userEvents = []; + for (var j = 0; j < message.userEvents.length; ++j) + object.userEvents[j] = $root.google.cloud.discoveryengine.v1.UserEvent.toObject(message.userEvents[j], options); + } + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + return ImportUserEventsRequest; })(); - v1.FirestoreSource = (function() { + v1.ImportUserEventsResponse = (function() { /** - * Properties of a FirestoreSource. + * Properties of an ImportUserEventsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IFirestoreSource - * @property {string|null} [projectId] FirestoreSource projectId - * @property {string|null} [databaseId] FirestoreSource databaseId - * @property {string|null} [collectionId] FirestoreSource collectionId - * @property {string|null} [gcsStagingDir] FirestoreSource gcsStagingDir + * @interface IImportUserEventsResponse + * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig + * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount + * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount */ /** - * Constructs a new FirestoreSource. + * Constructs a new ImportUserEventsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a FirestoreSource. - * @implements IFirestoreSource + * @classdesc Represents an ImportUserEventsResponse. + * @implements IImportUserEventsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set */ - function FirestoreSource(properties) { + function ImportUserEventsResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9838,117 +12876,120 @@ } /** - * FirestoreSource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.projectId = ""; + ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; /** - * FirestoreSource databaseId. - * @member {string} databaseId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.databaseId = ""; + ImportUserEventsResponse.prototype.errorConfig = null; /** - * FirestoreSource collectionId. - * @member {string} collectionId - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse joinedEventsCount. + * @member {number|Long} joinedEventsCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.collectionId = ""; + ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FirestoreSource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * ImportUserEventsResponse unjoinedEventsCount. + * @member {number|Long} unjoinedEventsCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance */ - FirestoreSource.prototype.gcsStagingDir = ""; + ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new FirestoreSource instance using the specified properties. + * Creates a new ImportUserEventsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse instance */ - FirestoreSource.create = function create(properties) { - return new FirestoreSource(properties); + ImportUserEventsResponse.create = function create(properties) { + return new ImportUserEventsResponse(properties); }; /** - * Encodes the specified FirestoreSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FirestoreSource.encode = function encode(message, writer) { + ImportUserEventsResponse.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.databaseId != null && Object.hasOwnProperty.call(message, "databaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseId); - if (message.collectionId != null && Object.hasOwnProperty.call(message, "collectionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); + if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); return writer; }; /** - * Encodes the specified FirestoreSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.FirestoreSource.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.IFirestoreSource} message FirestoreSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FirestoreSource.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FirestoreSource message from the specified reader or buffer. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FirestoreSource.decode = function decode(reader, length) { + ImportUserEventsResponse.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.cloud.discoveryengine.v1.FirestoreSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 2: { - message.databaseId = reader.string(); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } case 3: { - message.collectionId = reader.string(); + message.joinedEventsCount = reader.int64(); break; } case 4: { - message.gcsStagingDir = reader.string(); + message.unjoinedEventsCount = reader.int64(); break; } default: @@ -9960,147 +13001,201 @@ }; /** - * Decodes a FirestoreSource message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FirestoreSource.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FirestoreSource message. + * Verifies an ImportUserEventsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FirestoreSource.verify = function verify(message) { + ImportUserEventsResponse.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.databaseId != null && message.hasOwnProperty("databaseId")) - if (!$util.isString(message.databaseId)) - return "databaseId: string expected"; - if (message.collectionId != null && message.hasOwnProperty("collectionId")) - if (!$util.isString(message.collectionId)) - return "collectionId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) + return "joinedEventsCount: integer|Long expected"; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) + return "unjoinedEventsCount: integer|Long expected"; return null; }; /** - * Creates a FirestoreSource message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.FirestoreSource} FirestoreSource + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse */ - FirestoreSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.FirestoreSource) + ImportUserEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.FirestoreSource(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.databaseId != null) - message.databaseId = String(object.databaseId); - if (object.collectionId != null) - message.collectionId = String(object.collectionId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } + if (object.joinedEventsCount != null) + if ($util.Long) + (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; + else if (typeof object.joinedEventsCount === "string") + message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); + else if (typeof object.joinedEventsCount === "number") + message.joinedEventsCount = object.joinedEventsCount; + else if (typeof object.joinedEventsCount === "object") + message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); + if (object.unjoinedEventsCount != null) + if ($util.Long) + (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; + else if (typeof object.unjoinedEventsCount === "string") + message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); + else if (typeof object.unjoinedEventsCount === "number") + message.unjoinedEventsCount = object.unjoinedEventsCount; + else if (typeof object.unjoinedEventsCount === "object") + message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FirestoreSource message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1.FirestoreSource} message FirestoreSource + * @param {google.cloud.discoveryengine.v1.ImportUserEventsResponse} message ImportUserEventsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FirestoreSource.toObject = function toObject(message, options) { + ImportUserEventsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; if (options.defaults) { - object.projectId = ""; - object.databaseId = ""; - object.collectionId = ""; - object.gcsStagingDir = ""; + object.errorConfig = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.joinedEventsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unjoinedEventsCount = options.longs === String ? "0" : 0; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.databaseId != null && message.hasOwnProperty("databaseId")) - object.databaseId = message.databaseId; - if (message.collectionId != null && message.hasOwnProperty("collectionId")) - object.collectionId = message.collectionId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (typeof message.joinedEventsCount === "number") + object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; + else + object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (typeof message.unjoinedEventsCount === "number") + object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; + else + object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; return object; }; /** - * Converts this FirestoreSource to JSON. + * Converts this ImportUserEventsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @instance * @returns {Object.} JSON object */ - FirestoreSource.prototype.toJSON = function toJSON() { + ImportUserEventsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FirestoreSource + * Gets the default type url for ImportUserEventsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.FirestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FirestoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.FirestoreSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsResponse"; }; - return FirestoreSource; + return ImportUserEventsResponse; })(); - v1.ImportErrorConfig = (function() { + v1.ImportUserEventsMetadata = (function() { /** - * Properties of an ImportErrorConfig. + * Properties of an ImportUserEventsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportErrorConfig - * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix + * @interface IImportUserEventsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime + * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount + * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount */ /** - * Constructs a new ImportErrorConfig. + * Constructs a new ImportUserEventsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportErrorConfig. - * @implements IImportErrorConfig + * @classdesc Represents an ImportUserEventsMetadata. + * @implements IImportUserEventsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set */ - function ImportErrorConfig(properties) { + function ImportUserEventsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10108,89 +13203,117 @@ } /** - * ImportErrorConfig gcsPrefix. - * @member {string|null|undefined} gcsPrefix - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * ImportUserEventsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance */ - ImportErrorConfig.prototype.gcsPrefix = null; + ImportUserEventsMetadata.prototype.createTime = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ImportUserEventsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.updateTime = null; /** - * ImportErrorConfig destination. - * @member {"gcsPrefix"|undefined} destination - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * ImportUserEventsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance */ - Object.defineProperty(ImportErrorConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportErrorConfig instance using the specified properties. + * ImportUserEventsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportUserEventsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig instance + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata instance */ - ImportErrorConfig.create = function create(properties) { - return new ImportErrorConfig(properties); + ImportUserEventsMetadata.create = function create(properties) { + return new ImportUserEventsMetadata(properties); }; /** - * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encode = function encode(message, writer) { + ImportUserEventsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); return writer; }; /** - * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportErrorConfig.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decode = function decode(reader, length) { + ImportUserEventsMetadata.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.cloud.discoveryengine.v1.ImportErrorConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsPrefix = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } default: @@ -10202,130 +13325,189 @@ }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportErrorConfig message. + * Verifies an ImportUserEventsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportErrorConfig.verify = function verify(message) { + ImportUserEventsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - properties.destination = 1; - if (!$util.isString(message.gcsPrefix)) - return "gcsPrefix: string expected"; + 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.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata */ - ImportErrorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportErrorConfig) + ImportUserEventsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportErrorConfig(); - if (object.gcsPrefix != null) - message.gcsPrefix = String(object.gcsPrefix); + var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} message ImportErrorConfig + * @param {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} message ImportUserEventsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportErrorConfig.toObject = function toObject(message, options) { + ImportUserEventsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - object.gcsPrefix = message.gcsPrefix; - if (options.oneofs) - object.destination = "gcsPrefix"; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; } + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportErrorConfig to JSON. + * Converts this ImportUserEventsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @instance * @returns {Object.} JSON object */ - ImportErrorConfig.prototype.toJSON = function toJSON() { + ImportUserEventsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportErrorConfig + * Gets the default type url for ImportUserEventsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportErrorConfig"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsMetadata"; }; - return ImportErrorConfig; + return ImportUserEventsMetadata; })(); - v1.ImportUserEventsRequest = (function() { + v1.ImportDocumentsMetadata = (function() { /** - * Properties of an ImportUserEventsRequest. + * Properties of an ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsRequest - * @property {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource - * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource - * @property {string|null} [parent] ImportUserEventsRequest parent - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig + * @interface IImportDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount + * @property {number|Long|null} [totalCount] ImportDocumentsMetadata totalCount */ /** - * Constructs a new ImportUserEventsRequest. + * Constructs a new ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsRequest. - * @implements IImportUserEventsRequest + * @classdesc Represents an ImportDocumentsMetadata. + * @implements IImportDocumentsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set */ - function ImportUserEventsRequest(properties) { + function ImportDocumentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10333,145 +13515,131 @@ } /** - * ImportUserEventsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.inlineSource = null; - - /** - * ImportUserEventsRequest gcsSource. - * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.gcsSource = null; + ImportDocumentsMetadata.prototype.createTime = null; /** - * ImportUserEventsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.bigquerySource = null; + ImportDocumentsMetadata.prototype.updateTime = null; /** - * ImportUserEventsRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.parent = ""; + ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImportUserEventsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - ImportUserEventsRequest.prototype.errorConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImportUserEventsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * ImportDocumentsMetadata totalCount. + * @member {number|Long} totalCount + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @instance */ - Object.defineProperty(ImportUserEventsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportDocumentsMetadata.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportUserEventsRequest instance using the specified properties. + * Creates a new ImportDocumentsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata instance */ - ImportUserEventsRequest.create = function create(properties) { - return new ImportUserEventsRequest(properties); + ImportDocumentsMetadata.create = function create(properties) { + return new ImportDocumentsMetadata(properties); }; /** - * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encode = function encode(message, writer) { + ImportDocumentsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalCount); return writer; }; /** - * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decode = function decode(reader, length) { + ImportDocumentsMetadata.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.cloud.discoveryengine.v1.ImportUserEventsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); + message.successCount = reader.int64(); break; } case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); + message.failureCount = reader.int64(); break; } case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + message.totalCount = reader.int64(); break; } default: @@ -10483,423 +13651,221 @@ }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsRequest message. + * Verifies an ImportDocumentsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsRequest.verify = function verify(message) { + ImportDocumentsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "errorConfig." + error; + return "updateTime." + error; } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) + return "totalCount: integer|Long expected"; return null; }; /** - * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata */ - ImportUserEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest) + ImportDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest(); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); - } - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.parent != null) - message.parent = String(object.parent); - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + if (object.totalCount != null) + if ($util.Long) + (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = false; + else if (typeof object.totalCount === "string") + message.totalCount = parseInt(object.totalCount, 10); + else if (typeof object.totalCount === "number") + message.totalCount = object.totalCount; + else if (typeof object.totalCount === "object") + message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest} message ImportUserEventsRequest + * @param {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.errorConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - return object; - }; - - /** - * Converts this ImportUserEventsRequest to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportUserEventsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportUserEventsRequest - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest"; - }; - - ImportUserEventsRequest.InlineSource = (function() { - - /** - * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @interface IInlineSource - * @property {Array.|null} [userEvents] InlineSource userEvents - */ - - /** - * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.userEvents = []; - 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]]; - } - - /** - * InlineSource userEvents. - * @member {Array.} userEvents - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @instance - */ - InlineSource.prototype.userEvents = $util.emptyArray; - - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userEvents != null && message.userEvents.length) - for (var i = 0; i < message.userEvents.length; ++i) - $root.google.cloud.discoveryengine.v1.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.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.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userEvents && message.userEvents.length)) - message.userEvents = []; - message.userEvents.push($root.google.cloud.discoveryengine.v1.UserEvent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userEvents != null && message.hasOwnProperty("userEvents")) { - if (!Array.isArray(message.userEvents)) - return "userEvents: array expected"; - for (var i = 0; i < message.userEvents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.UserEvent.verify(message.userEvents[i]); - if (error) - return "userEvents." + error; - } - } - return null; - }; - - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource(); - if (object.userEvents) { - if (!Array.isArray(object.userEvents)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: array expected"); - message.userEvents = []; - for (var i = 0; i < object.userEvents.length; ++i) { - if (typeof object.userEvents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource.userEvents: object expected"); - message.userEvents[i] = $root.google.cloud.discoveryengine.v1.UserEvent.fromObject(object.userEvents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userEvents = []; - if (message.userEvents && message.userEvents.length) { - object.userEvents = []; - for (var j = 0; j < message.userEvents.length; ++j) - object.userEvents[j] = $root.google.cloud.discoveryengine.v1.UserEvent.toObject(message.userEvents[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ImportDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalCount = options.longs === String ? "0" : 0; + } + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (typeof message.totalCount === "number") + object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; + else + object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber() : message.totalCount; + return object; + }; - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource"; - }; + /** + * Converts this ImportDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InlineSource; - })(); + /** + * Gets the default type url for ImportDocumentsMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsMetadata"; + }; - return ImportUserEventsRequest; + return ImportDocumentsMetadata; })(); - v1.ImportUserEventsResponse = (function() { + v1.ImportDocumentsRequest = (function() { /** - * Properties of an ImportUserEventsResponse. + * Properties of an ImportDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsResponse - * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig - * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount - * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount + * @interface IImportDocumentsRequest + * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource + * @property {google.cloud.discoveryengine.v1.IFhirStoreSource|null} [fhirStoreSource] ImportDocumentsRequest fhirStoreSource + * @property {google.cloud.discoveryengine.v1.ISpannerSource|null} [spannerSource] ImportDocumentsRequest spannerSource + * @property {google.cloud.discoveryengine.v1.ICloudSqlSource|null} [cloudSqlSource] ImportDocumentsRequest cloudSqlSource + * @property {google.cloud.discoveryengine.v1.IFirestoreSource|null} [firestoreSource] ImportDocumentsRequest firestoreSource + * @property {google.cloud.discoveryengine.v1.IAlloyDbSource|null} [alloyDbSource] ImportDocumentsRequest alloyDbSource + * @property {google.cloud.discoveryengine.v1.IBigtableSource|null} [bigtableSource] ImportDocumentsRequest bigtableSource + * @property {string|null} [parent] ImportDocumentsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig + * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode + * @property {google.protobuf.IFieldMask|null} [updateMask] ImportDocumentsRequest updateMask + * @property {boolean|null} [autoGenerateIds] ImportDocumentsRequest autoGenerateIds + * @property {string|null} [idField] ImportDocumentsRequest idField */ /** - * Constructs a new ImportUserEventsResponse. + * Constructs a new ImportDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsResponse. - * @implements IImportUserEventsResponse + * @classdesc Represents an ImportDocumentsRequest. + * @implements IImportDocumentsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set */ - function ImportUserEventsResponse(properties) { - this.errorSamples = []; + function ImportDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10907,120 +13873,285 @@ } /** - * ImportUserEventsResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; + ImportDocumentsRequest.prototype.inlineSource = null; /** - * ImportUserEventsResponse errorConfig. + * ImportDocumentsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.gcsSource = null; + + /** + * ImportDocumentsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.bigquerySource = null; + + /** + * ImportDocumentsRequest fhirStoreSource. + * @member {google.cloud.discoveryengine.v1.IFhirStoreSource|null|undefined} fhirStoreSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.fhirStoreSource = null; + + /** + * ImportDocumentsRequest spannerSource. + * @member {google.cloud.discoveryengine.v1.ISpannerSource|null|undefined} spannerSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.spannerSource = null; + + /** + * ImportDocumentsRequest cloudSqlSource. + * @member {google.cloud.discoveryengine.v1.ICloudSqlSource|null|undefined} cloudSqlSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.cloudSqlSource = null; + + /** + * ImportDocumentsRequest firestoreSource. + * @member {google.cloud.discoveryengine.v1.IFirestoreSource|null|undefined} firestoreSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.firestoreSource = null; + + /** + * ImportDocumentsRequest alloyDbSource. + * @member {google.cloud.discoveryengine.v1.IAlloyDbSource|null|undefined} alloyDbSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.alloyDbSource = null; + + /** + * ImportDocumentsRequest bigtableSource. + * @member {google.cloud.discoveryengine.v1.IBigtableSource|null|undefined} bigtableSource + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.bigtableSource = null; + + /** + * ImportDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.parent = ""; + + /** + * ImportDocumentsRequest errorConfig. * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.errorConfig = null; + ImportDocumentsRequest.prototype.errorConfig = null; /** - * ImportUserEventsResponse joinedEventsCount. - * @member {number|Long} joinedEventsCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest reconciliationMode. + * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode} reconciliationMode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsRequest.prototype.reconciliationMode = 0; /** - * ImportUserEventsResponse unjoinedEventsCount. - * @member {number|Long} unjoinedEventsCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * ImportDocumentsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance */ - ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsRequest.prototype.updateMask = null; /** - * Creates a new ImportUserEventsResponse instance using the specified properties. + * ImportDocumentsRequest autoGenerateIds. + * @member {boolean} autoGenerateIds + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.autoGenerateIds = false; + + /** + * ImportDocumentsRequest idField. + * @member {string} idField + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.idField = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportDocumentsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"alloyDbSource"|"bigtableSource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @instance + */ + Object.defineProperty(ImportDocumentsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource", "fhirStoreSource", "spannerSource", "cloudSqlSource", "firestoreSource", "alloyDbSource", "bigtableSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest instance */ - ImportUserEventsResponse.create = function create(properties) { - return new ImportUserEventsResponse(properties); + ImportDocumentsRequest.create = function create(properties) { + return new ImportDocumentsRequest(properties); }; /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encode = function encode(message, writer) { + ImportDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); - if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.autoGenerateIds != null && Object.hasOwnProperty.call(message, "autoGenerateIds")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoGenerateIds); + if (message.idField != null && Object.hasOwnProperty.call(message, "idField")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.idField); + if (message.fhirStoreSource != null && Object.hasOwnProperty.call(message, "fhirStoreSource")) + $root.google.cloud.discoveryengine.v1.FhirStoreSource.encode(message.fhirStoreSource, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.spannerSource != null && Object.hasOwnProperty.call(message, "spannerSource")) + $root.google.cloud.discoveryengine.v1.SpannerSource.encode(message.spannerSource, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudSqlSource != null && Object.hasOwnProperty.call(message, "cloudSqlSource")) + $root.google.cloud.discoveryengine.v1.CloudSqlSource.encode(message.cloudSqlSource, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.firestoreSource != null && Object.hasOwnProperty.call(message, "firestoreSource")) + $root.google.cloud.discoveryengine.v1.FirestoreSource.encode(message.firestoreSource, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.alloyDbSource != null && Object.hasOwnProperty.call(message, "alloyDbSource")) + $root.google.cloud.discoveryengine.v1.AlloyDbSource.encode(message.alloyDbSource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bigtableSource != null && Object.hasOwnProperty.call(message, "bigtableSource")) + $root.google.cloud.discoveryengine.v1.BigtableSource.encode(message.bigtableSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decode = function decode(reader, length) { + ImportDocumentsRequest.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.cloud.discoveryengine.v1.ImportUserEventsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); + break; + } + case 10: { + message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.decode(reader, reader.uint32()); + break; + } + case 11: { + message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.decode(reader, reader.uint32()); + break; + } + case 13: { + message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.decode(reader, reader.uint32()); + break; + } + case 14: { + message.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.decode(reader, reader.uint32()); + break; + } + case 15: { + message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.decode(reader, reader.uint32()); + break; + } case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } - case 2: { + case 5: { message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } - case 3: { - message.joinedEventsCount = reader.int64(); + case 6: { + message.reconciliationMode = reader.int32(); break; } - case 4: { - message.unjoinedEventsCount = reader.int64(); + case 7: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 8: { + message.autoGenerateIds = reader.bool(); + break; + } + case 9: { + message.idField = reader.string(); break; } default: @@ -11032,513 +14163,618 @@ }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsResponse message. + * Verifies an ImportDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsResponse.verify = function verify(message) { + ImportDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); if (error) - return "errorSamples." + error; + return "inlineSource." + error; + } + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.FhirStoreSource.verify(message.fhirStoreSource); + if (error) + return "fhirStoreSource." + error; + } + } + if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.SpannerSource.verify(message.spannerSource); + if (error) + return "spannerSource." + error; + } + } + if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.CloudSqlSource.verify(message.cloudSqlSource); + if (error) + return "cloudSqlSource." + error; + } + } + if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.FirestoreSource.verify(message.firestoreSource); + if (error) + return "firestoreSource." + error; + } + } + if (message.alloyDbSource != null && message.hasOwnProperty("alloyDbSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.AlloyDbSource.verify(message.alloyDbSource); + if (error) + return "alloyDbSource." + error; + } + } + if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigtableSource.verify(message.bigtableSource); + if (error) + return "bigtableSource." + error; } } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); if (error) return "errorConfig." + error; } - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) - return "joinedEventsCount: integer|Long expected"; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) - return "unjoinedEventsCount: integer|Long expected"; + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + switch (message.reconciliationMode) { + default: + return "reconciliationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) + if (typeof message.autoGenerateIds !== "boolean") + return "autoGenerateIds: boolean expected"; + if (message.idField != null && message.hasOwnProperty("idField")) + if (!$util.isString(message.idField)) + return "idField: string expected"; return null; }; /** - * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest */ - ImportUserEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse) + ImportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } + if (object.fhirStoreSource != null) { + if (typeof object.fhirStoreSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.fhirStoreSource: object expected"); + message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.fromObject(object.fhirStoreSource); + } + if (object.spannerSource != null) { + if (typeof object.spannerSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.spannerSource: object expected"); + message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.fromObject(object.spannerSource); + } + if (object.cloudSqlSource != null) { + if (typeof object.cloudSqlSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.cloudSqlSource: object expected"); + message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.fromObject(object.cloudSqlSource); } + if (object.firestoreSource != null) { + if (typeof object.firestoreSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.firestoreSource: object expected"); + message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.fromObject(object.firestoreSource); + } + if (object.alloyDbSource != null) { + if (typeof object.alloyDbSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.alloyDbSource: object expected"); + message.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.fromObject(object.alloyDbSource); + } + if (object.bigtableSource != null) { + if (typeof object.bigtableSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigtableSource: object expected"); + message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.fromObject(object.bigtableSource); + } + if (object.parent != null) + message.parent = String(object.parent); if (object.errorConfig != null) { if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsResponse.errorConfig: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.errorConfig: object expected"); message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.joinedEventsCount != null) - if ($util.Long) - (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; - else if (typeof object.joinedEventsCount === "string") - message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); - else if (typeof object.joinedEventsCount === "number") - message.joinedEventsCount = object.joinedEventsCount; - else if (typeof object.joinedEventsCount === "object") - message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); - if (object.unjoinedEventsCount != null) - if ($util.Long) - (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; - else if (typeof object.unjoinedEventsCount === "string") - message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); - else if (typeof object.unjoinedEventsCount === "number") - message.unjoinedEventsCount = object.unjoinedEventsCount; - else if (typeof object.unjoinedEventsCount === "object") - message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); + switch (object.reconciliationMode) { + default: + if (typeof object.reconciliationMode === "number") { + message.reconciliationMode = object.reconciliationMode; + break; + } + break; + case "RECONCILIATION_MODE_UNSPECIFIED": + case 0: + message.reconciliationMode = 0; + break; + case "INCREMENTAL": + case 1: + message.reconciliationMode = 1; + break; + case "FULL": + case 2: + message.reconciliationMode = 2; + break; + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.autoGenerateIds != null) + message.autoGenerateIds = Boolean(object.autoGenerateIds); + if (object.idField != null) + message.idField = String(object.idField); return message; }; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsResponse} message ImportUserEventsResponse + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest} message ImportDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsResponse.toObject = function toObject(message, options) { + ImportDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; if (options.defaults) { + object.parent = ""; object.errorConfig = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.joinedEventsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unjoinedEventsCount = options.longs === String ? "0" : 0; + object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; + object.updateMask = null; + object.autoGenerateIds = false; + object.idField = ""; } - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; } if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (typeof message.joinedEventsCount === "number") - object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; - else - object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (typeof message.unjoinedEventsCount === "number") - object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; - else - object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) + object.autoGenerateIds = message.autoGenerateIds; + if (message.idField != null && message.hasOwnProperty("idField")) + object.idField = message.idField; + if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { + object.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.toObject(message.fhirStoreSource, options); + if (options.oneofs) + object.source = "fhirStoreSource"; + } + if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { + object.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.toObject(message.spannerSource, options); + if (options.oneofs) + object.source = "spannerSource"; + } + if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { + object.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.toObject(message.cloudSqlSource, options); + if (options.oneofs) + object.source = "cloudSqlSource"; + } + if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { + object.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.toObject(message.firestoreSource, options); + if (options.oneofs) + object.source = "firestoreSource"; + } + if (message.alloyDbSource != null && message.hasOwnProperty("alloyDbSource")) { + object.alloyDbSource = $root.google.cloud.discoveryengine.v1.AlloyDbSource.toObject(message.alloyDbSource, options); + if (options.oneofs) + object.source = "alloyDbSource"; + } + if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { + object.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.toObject(message.bigtableSource, options); + if (options.oneofs) + object.source = "bigtableSource"; + } return object; }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this ImportDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @instance * @returns {Object.} JSON object */ - ImportUserEventsResponse.prototype.toJSON = function toJSON() { + ImportDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for ImportDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest"; }; - return ImportUserEventsResponse; - })(); - - v1.ImportUserEventsMetadata = (function() { - - /** - * Properties of an ImportUserEventsMetadata. - * @memberof google.cloud.discoveryengine.v1 - * @interface IImportUserEventsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime - * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount - * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount - */ - - /** - * Constructs a new ImportUserEventsMetadata. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportUserEventsMetadata. - * @implements IImportUserEventsMetadata - * @constructor - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set - */ - function ImportUserEventsMetadata(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]]; - } - - /** - * ImportUserEventsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.createTime = null; + ImportDocumentsRequest.InlineSource = (function() { - /** - * ImportUserEventsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.updateTime = null; + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @interface IInlineSource + * @property {Array.|null} [documents] InlineSource documents + */ - /** - * ImportUserEventsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.documents = []; + 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]]; + } - /** - * ImportUserEventsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * InlineSource documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @instance + */ + InlineSource.prototype.documents = $util.emptyArray; - /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata instance - */ - ImportUserEventsMetadata.create = function create(properties) { - return new ImportUserEventsMetadata(properties); - }; + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; - /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportUserEventsMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - return writer; - }; + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportUserEventsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportUserEventsMetadata.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.cloud.discoveryengine.v1.ImportUserEventsMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ImportUserEventsMetadata message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportUserEventsMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - return null; - }; + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + return null; + }; - /** - * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} ImportUserEventsMetadata - */ - ImportUserEventsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata) + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.documents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1.Document.toObject(message.documents[j], options); + } return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportUserEventsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportUserEventsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - return message; - }; + }; - /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {google.cloud.discoveryengine.v1.ImportUserEventsMetadata} message ImportUserEventsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportUserEventsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - } - 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.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - return object; - }; + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ImportUserEventsMetadata to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportUserEventsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource"; + }; + + return InlineSource; + })(); /** - * Gets the default type url for ImportUserEventsMetadata - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportUserEventsMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ReconciliationMode enum. + * @name google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode + * @enum {number} + * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value + * @property {number} INCREMENTAL=1 INCREMENTAL value + * @property {number} FULL=2 FULL value */ - ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportUserEventsMetadata"; - }; + ImportDocumentsRequest.ReconciliationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCREMENTAL"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); - return ImportUserEventsMetadata; + return ImportDocumentsRequest; })(); - v1.ImportDocumentsMetadata = (function() { + v1.ImportDocumentsResponse = (function() { /** - * Properties of an ImportDocumentsMetadata. + * Properties of an ImportDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime - * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount - * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount - * @property {number|Long|null} [totalCount] ImportDocumentsMetadata totalCount + * @interface IImportDocumentsResponse + * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig */ /** - * Constructs a new ImportDocumentsMetadata. + * Constructs a new ImportDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsMetadata. - * @implements IImportDocumentsMetadata + * @classdesc Represents an ImportDocumentsResponse. + * @implements IImportDocumentsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set */ - function ImportDocumentsMetadata(properties) { + function ImportDocumentsResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11546,131 +14782,92 @@ } /** - * ImportDocumentsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.createTime = null; - - /** - * ImportDocumentsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.updateTime = null; - - /** - * ImportDocumentsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportDocumentsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * ImportDocumentsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance */ - ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; /** - * ImportDocumentsMetadata totalCount. - * @member {number|Long} totalCount - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * ImportDocumentsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance */ - ImportDocumentsMetadata.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportDocumentsResponse.prototype.errorConfig = null; /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * Creates a new ImportDocumentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata instance + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse instance */ - ImportDocumentsMetadata.create = function create(properties) { - return new ImportDocumentsMetadata(properties); + ImportDocumentsResponse.create = function create(properties) { + return new ImportDocumentsResponse(properties); }; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encode = function encode(message, writer) { + ImportDocumentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalCount); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsMetadata.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decode = function decode(reader, length) { + ImportDocumentsResponse.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.cloud.discoveryengine.v1.ImportDocumentsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); - break; - } - case 5: { - message.totalCount = reader.int64(); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -11682,220 +14879,155 @@ }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsMetadata.verify = function verify(message) { + ImportDocumentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); if (error) - return "updateTime." + error; + return "errorConfig." + error; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) - return "totalCount: integer|Long expected"; return null; }; /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse */ - ImportDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata) + ImportDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - if (object.totalCount != null) - if ($util.Long) - (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = false; - else if (typeof object.totalCount === "string") - message.totalCount = parseInt(object.totalCount, 10); - else if (typeof object.totalCount === "number") - message.totalCount = object.totalCount; - else if (typeof object.totalCount === "object") - message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata + * @param {google.cloud.discoveryengine.v1.ImportDocumentsResponse} message ImportDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsMetadata.toObject = function toObject(message, options) { + ImportDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalCount = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) + object.errorConfig = null; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[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.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (typeof message.totalCount === "number") - object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; - else - object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber() : message.totalCount; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @instance * @returns {Object.} JSON object */ - ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + ImportDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsMetadata + * Gets the default type url for ImportDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsResponse"; }; - return ImportDocumentsMetadata; + return ImportDocumentsResponse; })(); - v1.ImportDocumentsRequest = (function() { + v1.ImportSuggestionDenyListEntriesRequest = (function() { /** - * Properties of an ImportDocumentsRequest. + * Properties of an ImportSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsRequest - * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource - * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource - * @property {google.cloud.discoveryengine.v1.IFhirStoreSource|null} [fhirStoreSource] ImportDocumentsRequest fhirStoreSource - * @property {google.cloud.discoveryengine.v1.ISpannerSource|null} [spannerSource] ImportDocumentsRequest spannerSource - * @property {google.cloud.discoveryengine.v1.ICloudSqlSource|null} [cloudSqlSource] ImportDocumentsRequest cloudSqlSource - * @property {google.cloud.discoveryengine.v1.IFirestoreSource|null} [firestoreSource] ImportDocumentsRequest firestoreSource - * @property {google.cloud.discoveryengine.v1.IBigtableSource|null} [bigtableSource] ImportDocumentsRequest bigtableSource - * @property {string|null} [parent] ImportDocumentsRequest parent - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig - * @property {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode - * @property {google.protobuf.IFieldMask|null} [updateMask] ImportDocumentsRequest updateMask - * @property {boolean|null} [autoGenerateIds] ImportDocumentsRequest autoGenerateIds - * @property {string|null} [idField] ImportDocumentsRequest idField + * @interface IImportSuggestionDenyListEntriesRequest + * @property {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null} [inlineSource] ImportSuggestionDenyListEntriesRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportSuggestionDenyListEntriesRequest gcsSource + * @property {string|null} [parent] ImportSuggestionDenyListEntriesRequest parent */ /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new ImportSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsRequest. - * @implements IImportDocumentsRequest + * @classdesc Represents an ImportSuggestionDenyListEntriesRequest. + * @implements IImportSuggestionDenyListEntriesRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set */ - function ImportDocumentsRequest(properties) { + function ImportSuggestionDenyListEntriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11903,273 +15035,119 @@ } /** - * ImportDocumentsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * ImportSuggestionDenyListEntriesRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.inlineSource = null; + ImportSuggestionDenyListEntriesRequest.prototype.inlineSource = null; /** - * ImportDocumentsRequest gcsSource. + * ImportSuggestionDenyListEntriesRequest gcsSource. * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.gcsSource = null; - - /** - * ImportDocumentsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.bigquerySource = null; - - /** - * ImportDocumentsRequest fhirStoreSource. - * @member {google.cloud.discoveryengine.v1.IFhirStoreSource|null|undefined} fhirStoreSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.fhirStoreSource = null; - - /** - * ImportDocumentsRequest spannerSource. - * @member {google.cloud.discoveryengine.v1.ISpannerSource|null|undefined} spannerSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.spannerSource = null; - - /** - * ImportDocumentsRequest cloudSqlSource. - * @member {google.cloud.discoveryengine.v1.ICloudSqlSource|null|undefined} cloudSqlSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.cloudSqlSource = null; - - /** - * ImportDocumentsRequest firestoreSource. - * @member {google.cloud.discoveryengine.v1.IFirestoreSource|null|undefined} firestoreSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.firestoreSource = null; - - /** - * ImportDocumentsRequest bigtableSource. - * @member {google.cloud.discoveryengine.v1.IBigtableSource|null|undefined} bigtableSource - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.bigtableSource = null; + ImportSuggestionDenyListEntriesRequest.prototype.gcsSource = null; /** - * ImportDocumentsRequest parent. + * ImportSuggestionDenyListEntriesRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.parent = ""; - - /** - * ImportDocumentsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.errorConfig = null; - - /** - * ImportDocumentsRequest reconciliationMode. - * @member {google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode} reconciliationMode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.reconciliationMode = 0; - - /** - * ImportDocumentsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.updateMask = null; - - /** - * ImportDocumentsRequest autoGenerateIds. - * @member {boolean} autoGenerateIds - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.autoGenerateIds = false; - - /** - * ImportDocumentsRequest idField. - * @member {string} idField - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - ImportDocumentsRequest.prototype.idField = ""; + ImportSuggestionDenyListEntriesRequest.prototype.parent = ""; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ImportDocumentsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|"fhirStoreSource"|"spannerSource"|"cloudSqlSource"|"firestoreSource"|"bigtableSource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * ImportSuggestionDenyListEntriesRequest source. + * @member {"inlineSource"|"gcsSource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance */ - Object.defineProperty(ImportDocumentsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource", "fhirStoreSource", "spannerSource", "cloudSqlSource", "firestoreSource", "bigtableSource"]), + Object.defineProperty(ImportSuggestionDenyListEntriesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest instance */ - ImportDocumentsRequest.create = function create(properties) { - return new ImportDocumentsRequest(properties); + ImportSuggestionDenyListEntriesRequest.create = function create(properties) { + return new ImportSuggestionDenyListEntriesRequest(properties); }; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encode = function encode(message, writer) { + ImportSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.autoGenerateIds != null && Object.hasOwnProperty.call(message, "autoGenerateIds")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoGenerateIds); - if (message.idField != null && Object.hasOwnProperty.call(message, "idField")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.idField); - if (message.fhirStoreSource != null && Object.hasOwnProperty.call(message, "fhirStoreSource")) - $root.google.cloud.discoveryengine.v1.FhirStoreSource.encode(message.fhirStoreSource, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.spannerSource != null && Object.hasOwnProperty.call(message, "spannerSource")) - $root.google.cloud.discoveryengine.v1.SpannerSource.encode(message.spannerSource, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudSqlSource != null && Object.hasOwnProperty.call(message, "cloudSqlSource")) - $root.google.cloud.discoveryengine.v1.CloudSqlSource.encode(message.cloudSqlSource, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.firestoreSource != null && Object.hasOwnProperty.call(message, "firestoreSource")) - $root.google.cloud.discoveryengine.v1.FirestoreSource.encode(message.firestoreSource, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.bigtableSource != null && Object.hasOwnProperty.call(message, "bigtableSource")) - $root.google.cloud.discoveryengine.v1.BigtableSource.encode(message.bigtableSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decode = function decode(reader, length) { + ImportSuggestionDenyListEntriesRequest.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.cloud.discoveryengine.v1.ImportDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } - case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); - break; - } - case 10: { - message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.decode(reader, reader.uint32()); - break; - } - case 11: { - message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.decode(reader, reader.uint32()); - break; - } - case 13: { - message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.decode(reader, reader.uint32()); - break; - } - case 15: { - message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.decode(reader, reader.uint32()); - break; - } case 1: { message.parent = reader.string(); break; } - case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.reconciliationMode = reader.int32(); - break; - } - case 7: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 8: { - message.autoGenerateIds = reader.bool(); - break; - } - case 9: { - message.idField = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -12179,37 +15157,37 @@ }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsRequest message. + * Verifies an ImportSuggestionDenyListEntriesRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsRequest.verify = function verify(message) { + ImportSuggestionDenyListEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { properties.source = 1; { - var error = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); + var error = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify(message.inlineSource); if (error) return "inlineSource." + error; } @@ -12224,309 +15202,114 @@ return "gcsSource." + error; } } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } - } - if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.FhirStoreSource.verify(message.fhirStoreSource); - if (error) - return "fhirStoreSource." + error; - } - } - if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.SpannerSource.verify(message.spannerSource); - if (error) - return "spannerSource." + error; - } - } - if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.CloudSqlSource.verify(message.cloudSqlSource); - if (error) - return "cloudSqlSource." + error; - } - } - if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.FirestoreSource.verify(message.firestoreSource); - if (error) - return "firestoreSource." + error; - } - } - if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1.BigtableSource.verify(message.bigtableSource); - if (error) - return "bigtableSource." + error; - } - } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); - if (error) - return "errorConfig." + error; - } - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - switch (message.reconciliationMode) { - default: - return "reconciliationMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) - if (typeof message.autoGenerateIds !== "boolean") - return "autoGenerateIds: boolean expected"; - if (message.idField != null && message.hasOwnProperty("idField")) - if (!$util.isString(message.idField)) - return "idField: string expected"; return null; }; /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest */ - ImportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest) + ImportSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest(); + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); if (object.inlineSource != null) { if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.fromObject(object.inlineSource); } if (object.gcsSource != null) { if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.gcsSource: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.gcsSource: object expected"); message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); - } - if (object.fhirStoreSource != null) { - if (typeof object.fhirStoreSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.fhirStoreSource: object expected"); - message.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.fromObject(object.fhirStoreSource); - } - if (object.spannerSource != null) { - if (typeof object.spannerSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.spannerSource: object expected"); - message.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.fromObject(object.spannerSource); - } - if (object.cloudSqlSource != null) { - if (typeof object.cloudSqlSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.cloudSqlSource: object expected"); - message.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.fromObject(object.cloudSqlSource); - } - if (object.firestoreSource != null) { - if (typeof object.firestoreSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.firestoreSource: object expected"); - message.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.fromObject(object.firestoreSource); - } - if (object.bigtableSource != null) { - if (typeof object.bigtableSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.bigtableSource: object expected"); - message.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.fromObject(object.bigtableSource); - } if (object.parent != null) message.parent = String(object.parent); - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); - } - switch (object.reconciliationMode) { - default: - if (typeof object.reconciliationMode === "number") { - message.reconciliationMode = object.reconciliationMode; - break; - } - break; - case "RECONCILIATION_MODE_UNSPECIFIED": - case 0: - message.reconciliationMode = 0; - break; - case "INCREMENTAL": - case 1: - message.reconciliationMode = 1; - break; - case "FULL": - case 2: - message.reconciliationMode = 2; - break; - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.autoGenerateIds != null) - message.autoGenerateIds = Boolean(object.autoGenerateIds); - if (object.idField != null) - message.idField = String(object.idField); return message; }; /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsRequest.toObject = function toObject(message, options) { + ImportSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.parent = ""; - object.errorConfig = null; - object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; - object.updateMask = null; - object.autoGenerateIds = false; - object.idField = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; - } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.autoGenerateIds != null && message.hasOwnProperty("autoGenerateIds")) - object.autoGenerateIds = message.autoGenerateIds; - if (message.idField != null && message.hasOwnProperty("idField")) - object.idField = message.idField; - if (message.fhirStoreSource != null && message.hasOwnProperty("fhirStoreSource")) { - object.fhirStoreSource = $root.google.cloud.discoveryengine.v1.FhirStoreSource.toObject(message.fhirStoreSource, options); - if (options.oneofs) - object.source = "fhirStoreSource"; - } - if (message.spannerSource != null && message.hasOwnProperty("spannerSource")) { - object.spannerSource = $root.google.cloud.discoveryengine.v1.SpannerSource.toObject(message.spannerSource, options); - if (options.oneofs) - object.source = "spannerSource"; - } - if (message.cloudSqlSource != null && message.hasOwnProperty("cloudSqlSource")) { - object.cloudSqlSource = $root.google.cloud.discoveryengine.v1.CloudSqlSource.toObject(message.cloudSqlSource, options); - if (options.oneofs) - object.source = "cloudSqlSource"; - } - if (message.firestoreSource != null && message.hasOwnProperty("firestoreSource")) { - object.firestoreSource = $root.google.cloud.discoveryengine.v1.FirestoreSource.toObject(message.firestoreSource, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.toObject(message.inlineSource, options); if (options.oneofs) - object.source = "firestoreSource"; + object.source = "inlineSource"; } - if (message.bigtableSource != null && message.hasOwnProperty("bigtableSource")) { - object.bigtableSource = $root.google.cloud.discoveryengine.v1.BigtableSource.toObject(message.bigtableSource, options); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.toObject(message.gcsSource, options); if (options.oneofs) - object.source = "bigtableSource"; + object.source = "gcsSource"; } return object; }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this ImportSuggestionDenyListEntriesRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @instance * @returns {Object.} JSON object */ - ImportDocumentsRequest.prototype.toJSON = function toJSON() { + ImportSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsRequest + * Gets the default type url for ImportSuggestionDenyListEntriesRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest"; }; - ImportDocumentsRequest.InlineSource = (function() { + ImportSuggestionDenyListEntriesRequest.InlineSource = (function() { /** * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @interface IInlineSource - * @property {Array.|null} [documents] InlineSource documents + * @property {Array.|null} [entries] InlineSource entries */ /** * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest * @classdesc Represents an InlineSource. * @implements IInlineSource * @constructor - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set */ function InlineSource(properties) { - this.documents = []; + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12534,49 +15317,49 @@ } /** - * InlineSource documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * InlineSource entries. + * @member {Array.} entries + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @instance */ - InlineSource.prototype.documents = $util.emptyArray; + InlineSource.prototype.entries = $util.emptyArray; /** * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource instance + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource instance */ InlineSource.create = function create(properties) { return new InlineSource(properties); }; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -12587,25 +15370,25 @@ /** * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ InlineSource.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.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32())); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.decode(reader, reader.uint32())); break; } default: @@ -12619,10 +15402,10 @@ /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -12635,7 +15418,7 @@ /** * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -12643,13 +15426,13 @@ InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.Document.verify(message.documents[i]); + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify(message.entries[i]); if (error) - return "documents." + error; + return "entries." + error; } } return null; @@ -12658,23 +15441,23 @@ /** * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource */ InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource) + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.documents[i]); + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: object expected"); + message.entries[i] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.fromObject(object.entries[i]); } } return message; @@ -12683,9 +15466,9 @@ /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource} message InlineSource + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -12694,11 +15477,11 @@ options = {}; var object = {}; if (options.arrays || options.defaults) - object.documents = []; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1.Document.toObject(message.documents[j], options); + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.toObject(message.entries[j], options); } return object; }; @@ -12706,7 +15489,7 @@ /** * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @instance * @returns {Object.} JSON object */ @@ -12717,7 +15500,7 @@ /** * Gets the default type url for InlineSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -12726,50 +15509,35 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsRequest.InlineSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource"; }; return InlineSource; })(); - /** - * ReconciliationMode enum. - * @name google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode - * @enum {number} - * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value - * @property {number} INCREMENTAL=1 INCREMENTAL value - * @property {number} FULL=2 FULL value - */ - ImportDocumentsRequest.ReconciliationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCREMENTAL"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - return ImportDocumentsRequest; + return ImportSuggestionDenyListEntriesRequest; })(); - v1.ImportDocumentsResponse = (function() { + v1.ImportSuggestionDenyListEntriesResponse = (function() { /** - * Properties of an ImportDocumentsResponse. + * Properties of an ImportSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportDocumentsResponse - * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples - * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig + * @interface IImportSuggestionDenyListEntriesResponse + * @property {Array.|null} [errorSamples] ImportSuggestionDenyListEntriesResponse errorSamples + * @property {number|Long|null} [importedEntriesCount] ImportSuggestionDenyListEntriesResponse importedEntriesCount + * @property {number|Long|null} [failedEntriesCount] ImportSuggestionDenyListEntriesResponse failedEntriesCount */ /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new ImportSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportDocumentsResponse. - * @implements IImportDocumentsResponse + * @classdesc Represents an ImportSuggestionDenyListEntriesResponse. + * @implements IImportSuggestionDenyListEntriesResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set */ - function ImportDocumentsResponse(properties) { + function ImportSuggestionDenyListEntriesResponse(properties) { this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -12778,92 +15546,387 @@ } /** - * ImportDocumentsResponse errorSamples. + * ImportSuggestionDenyListEntriesResponse errorSamples. * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @instance */ - ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; + ImportSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; /** - * ImportDocumentsResponse errorConfig. - * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * ImportSuggestionDenyListEntriesResponse importedEntriesCount. + * @member {number|Long} importedEntriesCount + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @instance */ - ImportDocumentsResponse.prototype.errorConfig = null; + ImportSuggestionDenyListEntriesResponse.prototype.importedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * ImportSuggestionDenyListEntriesResponse failedEntriesCount. + * @member {number|Long} failedEntriesCount + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @instance + */ + ImportSuggestionDenyListEntriesResponse.prototype.failedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse instance + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse instance */ - ImportDocumentsResponse.create = function create(properties) { - return new ImportDocumentsResponse(properties); + ImportSuggestionDenyListEntriesResponse.create = function create(properties) { + return new ImportSuggestionDenyListEntriesResponse(properties); }; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encode = function encode(message, writer) { + ImportSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.errorSamples != null && message.errorSamples.length) for (var i = 0; i < message.errorSamples.length; ++i) $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.importedEntriesCount != null && Object.hasOwnProperty.call(message, "importedEntriesCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.importedEntriesCount); + if (message.failedEntriesCount != null && Object.hasOwnProperty.call(message, "failedEntriesCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.failedEntriesCount); + return writer; + }; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportSuggestionDenyListEntriesResponse.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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 2: { + message.importedEntriesCount = reader.int64(); + break; + } + case 3: { + message.failedEntriesCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportSuggestionDenyListEntriesResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportSuggestionDenyListEntriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) + if (!$util.isInteger(message.importedEntriesCount) && !(message.importedEntriesCount && $util.isInteger(message.importedEntriesCount.low) && $util.isInteger(message.importedEntriesCount.high))) + return "importedEntriesCount: integer|Long expected"; + if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) + if (!$util.isInteger(message.failedEntriesCount) && !(message.failedEntriesCount && $util.isInteger(message.failedEntriesCount.low) && $util.isInteger(message.failedEntriesCount.high))) + return "failedEntriesCount: integer|Long expected"; + return null; + }; + + /** + * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + */ + ImportSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.importedEntriesCount != null) + if ($util.Long) + (message.importedEntriesCount = $util.Long.fromValue(object.importedEntriesCount)).unsigned = false; + else if (typeof object.importedEntriesCount === "string") + message.importedEntriesCount = parseInt(object.importedEntriesCount, 10); + else if (typeof object.importedEntriesCount === "number") + message.importedEntriesCount = object.importedEntriesCount; + else if (typeof object.importedEntriesCount === "object") + message.importedEntriesCount = new $util.LongBits(object.importedEntriesCount.low >>> 0, object.importedEntriesCount.high >>> 0).toNumber(); + if (object.failedEntriesCount != null) + if ($util.Long) + (message.failedEntriesCount = $util.Long.fromValue(object.failedEntriesCount)).unsigned = false; + else if (typeof object.failedEntriesCount === "string") + message.failedEntriesCount = parseInt(object.failedEntriesCount, 10); + else if (typeof object.failedEntriesCount === "number") + message.failedEntriesCount = object.failedEntriesCount; + else if (typeof object.failedEntriesCount === "object") + message.failedEntriesCount = new $util.LongBits(object.failedEntriesCount.low >>> 0, object.failedEntriesCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.importedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.importedEntriesCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedEntriesCount = options.longs === String ? "0" : 0; + } + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) + if (typeof message.importedEntriesCount === "number") + object.importedEntriesCount = options.longs === String ? String(message.importedEntriesCount) : message.importedEntriesCount; + else + object.importedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.importedEntriesCount) : options.longs === Number ? new $util.LongBits(message.importedEntriesCount.low >>> 0, message.importedEntriesCount.high >>> 0).toNumber() : message.importedEntriesCount; + if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) + if (typeof message.failedEntriesCount === "number") + object.failedEntriesCount = options.longs === String ? String(message.failedEntriesCount) : message.failedEntriesCount; + else + object.failedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedEntriesCount) : options.longs === Number ? new $util.LongBits(message.failedEntriesCount.low >>> 0, message.failedEntriesCount.high >>> 0).toNumber() : message.failedEntriesCount; + return object; + }; + + /** + * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ImportSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse"; + }; + + return ImportSuggestionDenyListEntriesResponse; + })(); + + v1.ImportSuggestionDenyListEntriesMetadata = (function() { + + /** + * Properties of an ImportSuggestionDenyListEntriesMetadata. + * @memberof google.cloud.discoveryengine.v1 + * @interface IImportSuggestionDenyListEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportSuggestionDenyListEntriesMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportSuggestionDenyListEntriesMetadata updateTime + */ + + /** + * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an ImportSuggestionDenyListEntriesMetadata. + * @implements IImportSuggestionDenyListEntriesMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + */ + function ImportSuggestionDenyListEntriesMetadata(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]]; + } + + /** + * ImportSuggestionDenyListEntriesMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @instance + */ + ImportSuggestionDenyListEntriesMetadata.prototype.createTime = null; + + /** + * ImportSuggestionDenyListEntriesMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @instance + */ + ImportSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + + /** + * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata instance + */ + ImportSuggestionDenyListEntriesMetadata.create = function create(properties) { + return new ImportSuggestionDenyListEntriesMetadata(properties); + }; + + /** + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @static + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decode = function decode(reader, length) { + ImportSuggestionDenyListEntriesMetadata.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.cloud.discoveryengine.v1.ImportDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -12875,155 +15938,145 @@ }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + ImportSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportSuggestionDenyListEntriesMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsResponse.verify = function verify(message) { + ImportSuggestionDenyListEntriesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); - if (error) - return "errorSamples." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "errorConfig." + error; + return "updateTime." + error; } return null; }; /** - * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata */ - ImportDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse) + ImportSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportDocumentsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportDocumentsResponse.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportDocumentsResponse} message ImportDocumentsResponse + * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsResponse.toObject = function toObject(message, options) { + ImportSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; - if (options.defaults) - object.errorConfig = null; - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (options.defaults) { + object.createTime = null; + object.updateTime = null; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, 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); return object; }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @instance * @returns {Object.} JSON object */ - ImportDocumentsResponse.prototype.toJSON = function toJSON() { + ImportSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportSuggestionDenyListEntriesMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportDocumentsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata"; }; - return ImportDocumentsResponse; + return ImportSuggestionDenyListEntriesMetadata; })(); - v1.ImportSuggestionDenyListEntriesRequest = (function() { + v1.ImportCompletionSuggestionsRequest = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesRequest. + * Properties of an ImportCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesRequest - * @property {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null} [inlineSource] ImportSuggestionDenyListEntriesRequest inlineSource - * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportSuggestionDenyListEntriesRequest gcsSource - * @property {string|null} [parent] ImportSuggestionDenyListEntriesRequest parent + * @interface IImportCompletionSuggestionsRequest + * @property {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null} [inlineSource] ImportCompletionSuggestionsRequest inlineSource + * @property {google.cloud.discoveryengine.v1.IGcsSource|null} [gcsSource] ImportCompletionSuggestionsRequest gcsSource + * @property {google.cloud.discoveryengine.v1.IBigQuerySource|null} [bigquerySource] ImportCompletionSuggestionsRequest bigquerySource + * @property {string|null} [parent] ImportCompletionSuggestionsRequest parent + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportCompletionSuggestionsRequest errorConfig */ /** - * Constructs a new ImportSuggestionDenyListEntriesRequest. + * Constructs a new ImportCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesRequest. - * @implements IImportSuggestionDenyListEntriesRequest + * @classdesc Represents an ImportCompletionSuggestionsRequest. + * @implements IImportCompletionSuggestionsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesRequest(properties) { + function ImportCompletionSuggestionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13031,119 +16084,147 @@ } /** - * ImportSuggestionDenyListEntriesRequest inlineSource. - * @member {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * ImportCompletionSuggestionsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.inlineSource = null; + ImportCompletionSuggestionsRequest.prototype.inlineSource = null; /** - * ImportSuggestionDenyListEntriesRequest gcsSource. + * ImportCompletionSuggestionsRequest gcsSource. * @member {google.cloud.discoveryengine.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.gcsSource = null; + ImportCompletionSuggestionsRequest.prototype.gcsSource = null; /** - * ImportSuggestionDenyListEntriesRequest parent. + * ImportCompletionSuggestionsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest + * @instance + */ + ImportCompletionSuggestionsRequest.prototype.bigquerySource = null; + + /** + * ImportCompletionSuggestionsRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - ImportSuggestionDenyListEntriesRequest.prototype.parent = ""; + ImportCompletionSuggestionsRequest.prototype.parent = ""; + + /** + * ImportCompletionSuggestionsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest + * @instance + */ + ImportCompletionSuggestionsRequest.prototype.errorConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ImportSuggestionDenyListEntriesRequest source. - * @member {"inlineSource"|"gcsSource"|undefined} source - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * ImportCompletionSuggestionsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance */ - Object.defineProperty(ImportSuggestionDenyListEntriesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource"]), + Object.defineProperty(ImportCompletionSuggestionsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ImportSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new ImportCompletionSuggestionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest instance */ - ImportSuggestionDenyListEntriesRequest.create = function create(properties) { - return new ImportSuggestionDenyListEntriesRequest(properties); + ImportCompletionSuggestionsRequest.create = function create(properties) { + return new ImportCompletionSuggestionsRequest(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { + ImportCompletionSuggestionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) $root.google.cloud.discoveryengine.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportCompletionSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { + ImportCompletionSuggestionsRequest.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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.decode(reader, reader.uint32()); break; } + case 4: { + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.decode(reader, reader.uint32()); + break; + } case 1: { message.parent = reader.string(); break; } + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13153,37 +16234,37 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + ImportCompletionSuggestionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesRequest message. + * Verifies an ImportCompletionSuggestionsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesRequest.verify = function verify(message) { + ImportCompletionSuggestionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { properties.source = 1; { - var error = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify(message.inlineSource); + var error = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify(message.inlineSource); if (error) return "inlineSource." + error; } @@ -13198,58 +16279,85 @@ return "gcsSource." + error; } } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } return null; }; /** - * Creates an ImportSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} ImportSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} ImportCompletionSuggestionsRequest */ - ImportSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest) + ImportCompletionSuggestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest(); + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest(); if (object.inlineSource != null) { if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.fromObject(object.inlineSource); + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.fromObject(object.inlineSource); } if (object.gcsSource != null) { if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.gcsSource: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.gcsSource: object expected"); message.gcsSource = $root.google.cloud.discoveryengine.v1.GcsSource.fromObject(object.gcsSource); } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.fromObject(object.bigquerySource); + } if (object.parent != null) message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportCompletionSuggestionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest} message ImportSuggestionDenyListEntriesRequest + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest} message ImportCompletionSuggestionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { + ImportCompletionSuggestionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.parent = ""; + object.errorConfig = null; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.toObject(message.inlineSource, options); + object.inlineSource = $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.toObject(message.inlineSource, options); if (options.oneofs) object.source = "inlineSource"; } @@ -13258,54 +16366,61 @@ if (options.oneofs) object.source = "gcsSource"; } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this ImportSuggestionDenyListEntriesRequest to JSON. + * Converts this ImportCompletionSuggestionsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { + ImportCompletionSuggestionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesRequest + * Gets the default type url for ImportCompletionSuggestionsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportCompletionSuggestionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest"; }; - ImportSuggestionDenyListEntriesRequest.InlineSource = (function() { + ImportCompletionSuggestionsRequest.InlineSource = (function() { /** * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @interface IInlineSource - * @property {Array.|null} [entries] InlineSource entries + * @property {Array.|null} [suggestions] InlineSource suggestions */ /** * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest * @classdesc Represents an InlineSource. * @implements IInlineSource * @constructor - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource=} [properties] Properties to set */ function InlineSource(properties) { - this.entries = []; + this.suggestions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13313,49 +16428,49 @@ } /** - * InlineSource entries. - * @member {Array.} entries - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * InlineSource suggestions. + * @member {Array.} suggestions + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @instance */ - InlineSource.prototype.entries = $util.emptyArray; + InlineSource.prototype.suggestions = $util.emptyArray; /** * Creates a new InlineSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource instance + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource instance */ InlineSource.create = function create(properties) { return new InlineSource(properties); }; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ InlineSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.cloud.discoveryengine.v1.CompletionSuggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.IInlineSource} message InlineSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -13366,25 +16481,25 @@ /** * Decodes an InlineSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ InlineSource.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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.decode(reader, reader.uint32())); + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.cloud.discoveryengine.v1.CompletionSuggestion.decode(reader, reader.uint32())); break; } default: @@ -13398,10 +16513,10 @@ /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -13414,7 +16529,7 @@ /** * Verifies an InlineSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -13422,13 +16537,13 @@ InlineSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.verify(message.entries[i]); + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.verify(message.suggestions[i]); if (error) - return "entries." + error; + return "suggestions." + error; } } return null; @@ -13437,23 +16552,23 @@ /** * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} InlineSource + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} InlineSource */ InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource) + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource.entries: object expected"); - message.entries[i] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.fromObject(object.entries[i]); + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource.suggestions: object expected"); + message.suggestions[i] = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.fromObject(object.suggestions[i]); } } return message; @@ -13462,9 +16577,9 @@ /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource} message InlineSource + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} message InlineSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -13473,11 +16588,11 @@ options = {}; var object = {}; if (options.arrays || options.defaults) - object.entries = []; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.discoveryengine.v1.SuggestionDenyListEntry.toObject(message.entries[j], options); + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.cloud.discoveryengine.v1.CompletionSuggestion.toObject(message.suggestions[j], options); } return object; }; @@ -13485,7 +16600,7 @@ /** * Converts this InlineSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource * @instance * @returns {Object.} JSON object */ @@ -13493,48 +16608,301 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesRequest.InlineSource"; - }; + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + return ImportCompletionSuggestionsRequest; + })(); + + v1.ImportCompletionSuggestionsResponse = (function() { + + /** + * Properties of an ImportCompletionSuggestionsResponse. + * @memberof google.cloud.discoveryengine.v1 + * @interface IImportCompletionSuggestionsResponse + * @property {Array.|null} [errorSamples] ImportCompletionSuggestionsResponse errorSamples + * @property {google.cloud.discoveryengine.v1.IImportErrorConfig|null} [errorConfig] ImportCompletionSuggestionsResponse errorConfig + */ + + /** + * Constructs a new ImportCompletionSuggestionsResponse. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents an ImportCompletionSuggestionsResponse. + * @implements IImportCompletionSuggestionsResponse + * @constructor + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse=} [properties] Properties to set + */ + function ImportCompletionSuggestionsResponse(properties) { + this.errorSamples = []; + 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]]; + } + + /** + * ImportCompletionSuggestionsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + */ + ImportCompletionSuggestionsResponse.prototype.errorSamples = $util.emptyArray; + + /** + * ImportCompletionSuggestionsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + */ + ImportCompletionSuggestionsResponse.prototype.errorConfig = null; + + /** + * Creates a new ImportCompletionSuggestionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse instance + */ + ImportCompletionSuggestionsResponse.create = function create(properties) { + return new ImportCompletionSuggestionsResponse(properties); + }; + + /** + * Encodes the specified ImportCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportCompletionSuggestionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportCompletionSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportCompletionSuggestionsResponse.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.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 2: { + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportCompletionSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportCompletionSuggestionsResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportCompletionSuggestionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } + return null; + }; + + /** + * Creates an ImportCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} ImportCompletionSuggestionsResponse + */ + ImportCompletionSuggestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.fromObject(object.errorConfig); + } + return message; + }; + + /** + * Creates a plain object from an ImportCompletionSuggestionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse} message ImportCompletionSuggestionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportCompletionSuggestionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) + object.errorConfig = null; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1.ImportErrorConfig.toObject(message.errorConfig, options); + return object; + }; + + /** + * Converts this ImportCompletionSuggestionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @instance + * @returns {Object.} JSON object + */ + ImportCompletionSuggestionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InlineSource; - })(); + /** + * Gets the default type url for ImportCompletionSuggestionsResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportCompletionSuggestionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse"; + }; - return ImportSuggestionDenyListEntriesRequest; + return ImportCompletionSuggestionsResponse; })(); - v1.ImportSuggestionDenyListEntriesResponse = (function() { + v1.ImportCompletionSuggestionsMetadata = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesResponse. + * Properties of an ImportCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesResponse - * @property {Array.|null} [errorSamples] ImportSuggestionDenyListEntriesResponse errorSamples - * @property {number|Long|null} [importedEntriesCount] ImportSuggestionDenyListEntriesResponse importedEntriesCount - * @property {number|Long|null} [failedEntriesCount] ImportSuggestionDenyListEntriesResponse failedEntriesCount + * @interface IImportCompletionSuggestionsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportCompletionSuggestionsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportCompletionSuggestionsMetadata updateTime + * @property {number|Long|null} [successCount] ImportCompletionSuggestionsMetadata successCount + * @property {number|Long|null} [failureCount] ImportCompletionSuggestionsMetadata failureCount */ /** - * Constructs a new ImportSuggestionDenyListEntriesResponse. + * Constructs a new ImportCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesResponse. - * @implements IImportSuggestionDenyListEntriesResponse + * @classdesc Represents an ImportCompletionSuggestionsMetadata. + * @implements IImportCompletionSuggestionsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesResponse(properties) { - this.errorSamples = []; + function ImportCompletionSuggestionsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13542,106 +16910,117 @@ } /** - * ImportSuggestionDenyListEntriesResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; + ImportCompletionSuggestionsMetadata.prototype.createTime = null; /** - * ImportSuggestionDenyListEntriesResponse importedEntriesCount. - * @member {number|Long} importedEntriesCount - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.importedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportCompletionSuggestionsMetadata.prototype.updateTime = null; /** - * ImportSuggestionDenyListEntriesResponse failedEntriesCount. - * @member {number|Long} failedEntriesCount - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * ImportCompletionSuggestionsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance */ - ImportSuggestionDenyListEntriesResponse.prototype.failedEntriesCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportCompletionSuggestionsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportSuggestionDenyListEntriesResponse instance using the specified properties. + * ImportCompletionSuggestionsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + * @instance + */ + ImportCompletionSuggestionsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ImportCompletionSuggestionsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse instance + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata instance */ - ImportSuggestionDenyListEntriesResponse.create = function create(properties) { - return new ImportSuggestionDenyListEntriesResponse(properties); + ImportCompletionSuggestionsMetadata.create = function create(properties) { + return new ImportCompletionSuggestionsMetadata(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { + ImportCompletionSuggestionsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.importedEntriesCount != null && Object.hasOwnProperty.call(message, "importedEntriesCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.importedEntriesCount); - if (message.failedEntriesCount != null && Object.hasOwnProperty.call(message, "failedEntriesCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.failedEntriesCount); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified ImportCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportCompletionSuggestionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { + ImportCompletionSuggestionsMetadata.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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.importedEntriesCount = reader.int64(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.failedEntriesCount = reader.int64(); + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } default: @@ -13653,186 +17032,193 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + ImportCompletionSuggestionsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesResponse message. + * Verifies an ImportCompletionSuggestionsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesResponse.verify = function verify(message) { + ImportCompletionSuggestionsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); - if (error) - return "errorSamples." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) - if (!$util.isInteger(message.importedEntriesCount) && !(message.importedEntriesCount && $util.isInteger(message.importedEntriesCount.low) && $util.isInteger(message.importedEntriesCount.high))) - return "importedEntriesCount: integer|Long expected"; - if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) - if (!$util.isInteger(message.failedEntriesCount) && !(message.failedEntriesCount && $util.isInteger(message.failedEntriesCount.low) && $util.isInteger(message.failedEntriesCount.high))) - return "failedEntriesCount: integer|Long expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} ImportSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} ImportCompletionSuggestionsMetadata */ - ImportSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse) + ImportCompletionSuggestionsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.importedEntriesCount != null) + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) if ($util.Long) - (message.importedEntriesCount = $util.Long.fromValue(object.importedEntriesCount)).unsigned = false; - else if (typeof object.importedEntriesCount === "string") - message.importedEntriesCount = parseInt(object.importedEntriesCount, 10); - else if (typeof object.importedEntriesCount === "number") - message.importedEntriesCount = object.importedEntriesCount; - else if (typeof object.importedEntriesCount === "object") - message.importedEntriesCount = new $util.LongBits(object.importedEntriesCount.low >>> 0, object.importedEntriesCount.high >>> 0).toNumber(); - if (object.failedEntriesCount != null) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) if ($util.Long) - (message.failedEntriesCount = $util.Long.fromValue(object.failedEntriesCount)).unsigned = false; - else if (typeof object.failedEntriesCount === "string") - message.failedEntriesCount = parseInt(object.failedEntriesCount, 10); - else if (typeof object.failedEntriesCount === "number") - message.failedEntriesCount = object.failedEntriesCount; - else if (typeof object.failedEntriesCount === "object") - message.failedEntriesCount = new $util.LongBits(object.failedEntriesCount.low >>> 0, object.failedEntriesCount.high >>> 0).toNumber(); + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportCompletionSuggestionsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse} message ImportSuggestionDenyListEntriesResponse + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata} message ImportCompletionSuggestionsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + ImportCompletionSuggestionsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; if (options.defaults) { + object.createTime = null; + object.updateTime = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.importedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.importedEntriesCount = options.longs === String ? "0" : 0; + object.successCount = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.failedEntriesCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.failedEntriesCount = options.longs === String ? "0" : 0; - } - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + object.failureCount = options.longs === String ? "0" : 0; } - if (message.importedEntriesCount != null && message.hasOwnProperty("importedEntriesCount")) - if (typeof message.importedEntriesCount === "number") - object.importedEntriesCount = options.longs === String ? String(message.importedEntriesCount) : message.importedEntriesCount; + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; else - object.importedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.importedEntriesCount) : options.longs === Number ? new $util.LongBits(message.importedEntriesCount.low >>> 0, message.importedEntriesCount.high >>> 0).toNumber() : message.importedEntriesCount; - if (message.failedEntriesCount != null && message.hasOwnProperty("failedEntriesCount")) - if (typeof message.failedEntriesCount === "number") - object.failedEntriesCount = options.longs === String ? String(message.failedEntriesCount) : message.failedEntriesCount; + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; else - object.failedEntriesCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedEntriesCount) : options.longs === Number ? new $util.LongBits(message.failedEntriesCount.low >>> 0, message.failedEntriesCount.high >>> 0).toNumber() : message.failedEntriesCount; + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportSuggestionDenyListEntriesResponse to JSON. + * Converts this ImportCompletionSuggestionsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + ImportCompletionSuggestionsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesResponse + * Gets the default type url for ImportCompletionSuggestionsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportCompletionSuggestionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata"; }; - return ImportSuggestionDenyListEntriesResponse; + return ImportCompletionSuggestionsMetadata; })(); - v1.ImportSuggestionDenyListEntriesMetadata = (function() { + v1.Document = (function() { /** - * Properties of an ImportSuggestionDenyListEntriesMetadata. + * Properties of a Document. * @memberof google.cloud.discoveryengine.v1 - * @interface IImportSuggestionDenyListEntriesMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportSuggestionDenyListEntriesMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportSuggestionDenyListEntriesMetadata updateTime + * @interface IDocument + * @property {google.protobuf.IStruct|null} [structData] Document structData + * @property {string|null} [jsonData] Document jsonData + * @property {string|null} [name] Document name + * @property {string|null} [id] Document id + * @property {string|null} [schemaId] Document schemaId + * @property {google.cloud.discoveryengine.v1.Document.IContent|null} [content] Document content + * @property {string|null} [parentDocumentId] Document parentDocumentId + * @property {google.protobuf.IStruct|null} [derivedStructData] Document derivedStructData + * @property {google.protobuf.ITimestamp|null} [indexTime] Document indexTime */ /** - * Constructs a new ImportSuggestionDenyListEntriesMetadata. + * Constructs a new Document. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents an ImportSuggestionDenyListEntriesMetadata. - * @implements IImportSuggestionDenyListEntriesMetadata + * @classdesc Represents a Document. + * @implements IDocument * @constructor - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set */ - function ImportSuggestionDenyListEntriesMetadata(properties) { + function Document(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13840,89 +17226,201 @@ } /** - * ImportSuggestionDenyListEntriesMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * Document structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1.Document * @instance */ - ImportSuggestionDenyListEntriesMetadata.prototype.createTime = null; + Document.prototype.structData = null; /** - * ImportSuggestionDenyListEntriesMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * Document jsonData. + * @member {string|null|undefined} jsonData + * @memberof google.cloud.discoveryengine.v1.Document * @instance */ - ImportSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + Document.prototype.jsonData = null; /** - * Creates a new ImportSuggestionDenyListEntriesMetadata instance using the specified properties. + * Document name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.name = ""; + + /** + * Document id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.id = ""; + + /** + * Document schemaId. + * @member {string} schemaId + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.schemaId = ""; + + /** + * Document content. + * @member {google.cloud.discoveryengine.v1.Document.IContent|null|undefined} content + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.content = null; + + /** + * Document parentDocumentId. + * @member {string} parentDocumentId + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.parentDocumentId = ""; + + /** + * Document derivedStructData. + * @member {google.protobuf.IStruct|null|undefined} derivedStructData + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.derivedStructData = null; + + /** + * Document indexTime. + * @member {google.protobuf.ITimestamp|null|undefined} indexTime + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Document.prototype.indexTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document data. + * @member {"structData"|"jsonData"|undefined} data + * @memberof google.cloud.discoveryengine.v1.Document + * @instance + */ + Object.defineProperty(Document.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata instance + * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Document} Document instance */ - ImportSuggestionDenyListEntriesMetadata.create = function create(properties) { - return new ImportSuggestionDenyListEntriesMetadata(properties); + Document.create = function create(properties) { + return new Document(properties); }; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + Document.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); + if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) + $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.discoveryengine.v1.Document.Content.encode(message.content, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime")) + $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.IImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { + Document.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.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonData = reader.string(); + break; + } case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.id = reader.string(); + break; + } + case 3: { + message.schemaId = reader.string(); + break; + } + case 10: { + message.content = $root.google.cloud.discoveryengine.v1.Document.Content.decode(reader, reader.uint32()); + break; + } + case 7: { + message.parentDocumentId = reader.string(); + break; + } + case 6: { + message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 13: { + message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -13934,149 +17432,519 @@ }; /** - * Decodes an ImportSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + Document.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSuggestionDenyListEntriesMetadata message. + * Verifies a Document message. * @function verify - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSuggestionDenyListEntriesMetadata.verify = function verify(message) { + Document.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + var properties = {}; + if (message.structData != null && message.hasOwnProperty("structData")) { + properties.data = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + if (!$util.isString(message.jsonData)) + return "jsonData: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + if (!$util.isString(message.schemaId)) + return "schemaId: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.discoveryengine.v1.Document.Content.verify(message.content); if (error) - return "createTime." + error; + return "content." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + if (!$util.isString(message.parentDocumentId)) + return "parentDocumentId: string expected"; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { + var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (error) + return "derivedStructData." + error; + } + if (message.indexTime != null && message.hasOwnProperty("indexTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.indexTime); if (error) - return "updateTime." + error; + return "indexTime." + error; } return null; }; /** - * Creates an ImportSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} ImportSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.Document} Document */ - ImportSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata) + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Document) return object; - var message = new $root.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.discoveryengine.v1.Document(); + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.jsonData != null) + message.jsonData = String(object.jsonData); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.schemaId != null) + message.schemaId = String(object.schemaId); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.content: object expected"); + message.content = $root.google.cloud.discoveryengine.v1.Document.Content.fromObject(object.content); + } + if (object.parentDocumentId != null) + message.parentDocumentId = String(object.parentDocumentId); + if (object.derivedStructData != null) { + if (typeof object.derivedStructData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.derivedStructData: object expected"); + message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + } + if (object.indexTime != null) { + if (typeof object.indexTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.Document.indexTime: object expected"); + message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime); } return message; }; /** - * Creates a plain object from an ImportSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static - * @param {google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata} message ImportSuggestionDenyListEntriesMetadata + * @param {google.cloud.discoveryengine.v1.Document} message Document * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { + Document.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.updateTime = null; + object.name = ""; + object.id = ""; + object.schemaId = ""; + object.derivedStructData = null; + object.parentDocumentId = ""; + object.content = null; + object.indexTime = null; } - 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + object.schemaId = message.schemaId; + if (message.structData != null && message.hasOwnProperty("structData")) { + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); + if (options.oneofs) + object.data = "structData"; + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + object.jsonData = message.jsonData; + if (options.oneofs) + object.data = "jsonData"; + } + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) + object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + object.parentDocumentId = message.parentDocumentId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.discoveryengine.v1.Document.Content.toObject(message.content, options); + if (message.indexTime != null && message.hasOwnProperty("indexTime")) + object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options); return object; }; /** - * Converts this ImportSuggestionDenyListEntriesMetadata to JSON. + * Converts this Document to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @instance * @returns {Object.} JSON object */ - ImportSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { + Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportSuggestionDenyListEntriesMetadata + * Gets the default type url for Document * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.Document * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document"; }; - return ImportSuggestionDenyListEntriesMetadata; + Document.Content = (function() { + + /** + * Properties of a Content. + * @memberof google.cloud.discoveryengine.v1.Document + * @interface IContent + * @property {Uint8Array|null} [rawBytes] Content rawBytes + * @property {string|null} [uri] Content uri + * @property {string|null} [mimeType] Content mimeType + */ + + /** + * Constructs a new Content. + * @memberof google.cloud.discoveryengine.v1.Document + * @classdesc Represents a Content. + * @implements IContent + * @constructor + * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set + */ + function Content(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]]; + } + + /** + * Content rawBytes. + * @member {Uint8Array|null|undefined} rawBytes + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.rawBytes = null; + + /** + * Content uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.uri = null; + + /** + * Content mimeType. + * @member {string} mimeType + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Content.prototype.mimeType = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Content content. + * @member {"rawBytes"|"uri"|undefined} content + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + */ + Object.defineProperty(Content.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["rawBytes", "uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content instance + */ + Content.create = function create(properties) { + return new Content(properties); + }; + + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.rawBytes != null && Object.hasOwnProperty.call(message, "rawBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawBytes); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + return writer; + }; + + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Content message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.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.cloud.discoveryengine.v1.Document.Content(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.rawBytes = reader.bytes(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 1: { + message.mimeType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Content message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Content.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + properties.content = 1; + if (!(message.rawBytes && typeof message.rawBytes.length === "number" || $util.isString(message.rawBytes))) + return "rawBytes: buffer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.Document.Content} Content + */ + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.Document.Content) + return object; + var message = new $root.google.cloud.discoveryengine.v1.Document.Content(); + if (object.rawBytes != null) + if (typeof object.rawBytes === "string") + $util.base64.decode(object.rawBytes, message.rawBytes = $util.newBuffer($util.base64.length(object.rawBytes)), 0); + else if (object.rawBytes.length >= 0) + message.rawBytes = object.rawBytes; + if (object.uri != null) + message.uri = String(object.uri); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1.Document.Content} message Content + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Content.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mimeType = ""; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + object.rawBytes = options.bytes === String ? $util.base64.encode(message.rawBytes, 0, message.rawBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawBytes) : message.rawBytes; + if (options.oneofs) + object.content = "rawBytes"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.content = "uri"; + } + return object; + }; + + /** + * Converts this Content to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @instance + * @returns {Object.} JSON object + */ + Content.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Content + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.Document.Content + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document.Content"; + }; + + return Content; + })(); + + return Document; })(); - v1.Document = (function() { + v1.UserEvent = (function() { /** - * Properties of a Document. + * Properties of a UserEvent. * @memberof google.cloud.discoveryengine.v1 - * @interface IDocument - * @property {google.protobuf.IStruct|null} [structData] Document structData - * @property {string|null} [jsonData] Document jsonData - * @property {string|null} [name] Document name - * @property {string|null} [id] Document id - * @property {string|null} [schemaId] Document schemaId - * @property {google.cloud.discoveryengine.v1.Document.IContent|null} [content] Document content - * @property {string|null} [parentDocumentId] Document parentDocumentId - * @property {google.protobuf.IStruct|null} [derivedStructData] Document derivedStructData - * @property {google.protobuf.ITimestamp|null} [indexTime] Document indexTime + * @interface IUserEvent + * @property {string|null} [eventType] UserEvent eventType + * @property {string|null} [userPseudoId] UserEvent userPseudoId + * @property {string|null} [engine] UserEvent engine + * @property {string|null} [dataStore] UserEvent dataStore + * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime + * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] UserEvent userInfo + * @property {boolean|null} [directUserRequest] UserEvent directUserRequest + * @property {string|null} [sessionId] UserEvent sessionId + * @property {google.cloud.discoveryengine.v1.IPageInfo|null} [pageInfo] UserEvent pageInfo + * @property {string|null} [attributionToken] UserEvent attributionToken + * @property {string|null} [filter] UserEvent filter + * @property {Array.|null} [documents] UserEvent documents + * @property {google.cloud.discoveryengine.v1.IPanelInfo|null} [panel] UserEvent panel + * @property {google.cloud.discoveryengine.v1.ISearchInfo|null} [searchInfo] UserEvent searchInfo + * @property {google.cloud.discoveryengine.v1.ICompletionInfo|null} [completionInfo] UserEvent completionInfo + * @property {google.cloud.discoveryengine.v1.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo + * @property {Array.|null} [tagIds] UserEvent tagIds + * @property {Array.|null} [promotionIds] UserEvent promotionIds + * @property {Object.|null} [attributes] UserEvent attributes + * @property {google.cloud.discoveryengine.v1.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo */ /** - * Constructs a new Document. + * Constructs a new UserEvent. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a Document. - * @implements IDocument + * @classdesc Represents a UserEvent. + * @implements IUserEvent * @constructor - * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set */ - function Document(properties) { + function UserEvent(properties) { + this.documents = []; + this.tagIds = []; + this.promotionIds = []; + this.attributes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14084,201 +17952,372 @@ } /** - * Document structData. - * @member {google.protobuf.IStruct|null|undefined} structData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent eventType. + * @member {string} eventType + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.eventType = ""; + + /** + * UserEvent userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.userPseudoId = ""; + + /** + * UserEvent engine. + * @member {string} engine + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.engine = ""; + + /** + * UserEvent dataStore. + * @member {string} dataStore + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.dataStore = ""; + + /** + * UserEvent eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.eventTime = null; + + /** + * UserEvent userInfo. + * @member {google.cloud.discoveryengine.v1.IUserInfo|null|undefined} userInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.userInfo = null; + + /** + * UserEvent directUserRequest. + * @member {boolean} directUserRequest + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.directUserRequest = false; + + /** + * UserEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.sessionId = ""; + + /** + * UserEvent pageInfo. + * @member {google.cloud.discoveryengine.v1.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.pageInfo = null; + + /** + * UserEvent attributionToken. + * @member {string} attributionToken + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.structData = null; + UserEvent.prototype.attributionToken = ""; /** - * Document jsonData. - * @member {string|null|undefined} jsonData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.jsonData = null; + UserEvent.prototype.filter = ""; /** - * Document name. - * @member {string} name - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.name = ""; + UserEvent.prototype.documents = $util.emptyArray; /** - * Document id. - * @member {string} id - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent panel. + * @member {google.cloud.discoveryengine.v1.IPanelInfo|null|undefined} panel + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.id = ""; + UserEvent.prototype.panel = null; /** - * Document schemaId. - * @member {string} schemaId - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent searchInfo. + * @member {google.cloud.discoveryengine.v1.ISearchInfo|null|undefined} searchInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.schemaId = ""; + UserEvent.prototype.searchInfo = null; /** - * Document content. - * @member {google.cloud.discoveryengine.v1.Document.IContent|null|undefined} content - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent completionInfo. + * @member {google.cloud.discoveryengine.v1.ICompletionInfo|null|undefined} completionInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.content = null; + UserEvent.prototype.completionInfo = null; /** - * Document parentDocumentId. - * @member {string} parentDocumentId - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent transactionInfo. + * @member {google.cloud.discoveryengine.v1.ITransactionInfo|null|undefined} transactionInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.parentDocumentId = ""; + UserEvent.prototype.transactionInfo = null; /** - * Document derivedStructData. - * @member {google.protobuf.IStruct|null|undefined} derivedStructData - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent tagIds. + * @member {Array.} tagIds + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.derivedStructData = null; + UserEvent.prototype.tagIds = $util.emptyArray; /** - * Document indexTime. - * @member {google.protobuf.ITimestamp|null|undefined} indexTime - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Document.prototype.indexTime = null; + UserEvent.prototype.promotionIds = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UserEvent attributes. + * @member {Object.} attributes + * @memberof google.cloud.discoveryengine.v1.UserEvent + * @instance + */ + UserEvent.prototype.attributes = $util.emptyObject; /** - * Document data. - * @member {"structData"|"jsonData"|undefined} data - * @memberof google.cloud.discoveryengine.v1.Document + * UserEvent mediaInfo. + * @member {google.cloud.discoveryengine.v1.IMediaInfo|null|undefined} mediaInfo + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance */ - Object.defineProperty(Document.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserEvent.prototype.mediaInfo = null; /** - * Creates a new Document instance using the specified properties. + * Creates a new UserEvent instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Document} Document instance + * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent instance */ - Document.create = function create(properties) { - return new Document(properties); + UserEvent.create = function create(properties) { + return new UserEvent(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + UserEvent.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); - if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) - $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); - if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) - $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.discoveryengine.v1.Document.Content.encode(message.content, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime")) - $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) + $root.google.cloud.discoveryengine.v1.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.discoveryengine.v1.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) + $root.google.cloud.discoveryengine.v1.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) + $root.google.cloud.discoveryengine.v1.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) + $root.google.cloud.discoveryengine.v1.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) + $root.google.cloud.discoveryengine.v1.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.tagIds != null && message.tagIds.length) + for (var i = 0; i < message.tagIds.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) + for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.discoveryengine.v1.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) + $root.google.cloud.discoveryengine.v1.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.engine); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.dataStore); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.verify|verify} messages. + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + UserEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a UserEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + UserEvent.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.cloud.discoveryengine.v1.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.UserEvent(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.eventType = reader.string(); + break; + } + case 2: { + message.userPseudoId = reader.string(); + break; + } + case 19: { + message.engine = reader.string(); + break; + } + case 20: { + message.dataStore = reader.string(); + break; + } + case 3: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 4: { - message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); break; } case 5: { - message.jsonData = reader.string(); + message.directUserRequest = reader.bool(); break; } - case 1: { - message.name = reader.string(); + case 6: { + message.sessionId = reader.string(); break; } - case 2: { - message.id = reader.string(); + case 7: { + message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.decode(reader, reader.uint32()); break; } - case 3: { - message.schemaId = reader.string(); + case 8: { + message.attributionToken = reader.string(); + break; + } + case 9: { + message.filter = reader.string(); break; } case 10: { - message.content = $root.google.cloud.discoveryengine.v1.Document.Content.decode(reader, reader.uint32()); + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1.DocumentInfo.decode(reader, reader.uint32())); break; } - case 7: { - message.parentDocumentId = reader.string(); + case 11: { + message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.decode(reader, reader.uint32()); break; } - case 6: { - message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + case 12: { + message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.decode(reader, reader.uint32()); break; } case 13: { - message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.tagIds && message.tagIds.length)) + message.tagIds = []; + message.tagIds.push(reader.string()); + break; + } + case 16: { + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); + break; + } + case 17: { + if (message.attributes === $util.emptyObject) + message.attributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.CustomAttribute.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.attributes[key] = value; + break; + } + case 18: { + message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.decode(reader, reader.uint32()); break; } default: @@ -14290,519 +18329,653 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a UserEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + UserEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies a UserEvent message. * @function verify - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + UserEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.structData != null && message.hasOwnProperty("structData")) { - properties.data = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structData); + if (message.eventType != null && message.hasOwnProperty("eventType")) + if (!$util.isString(message.eventType)) + return "eventType: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + if (!$util.isString(message.engine)) + return "engine: string expected"; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.userInfo != null && message.hasOwnProperty("userInfo")) { + var error = $root.google.cloud.discoveryengine.v1.UserInfo.verify(message.userInfo); + if (error) + return "userInfo." + error; + } + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + if (typeof message.directUserRequest !== "boolean") + return "directUserRequest: boolean expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.discoveryengine.v1.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (!$util.isString(message.attributionToken)) + return "attributionToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.DocumentInfo.verify(message.documents[i]); if (error) - return "structData." + error; + return "documents." + error; } } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - if (!$util.isString(message.jsonData)) - return "jsonData: string expected"; + if (message.panel != null && message.hasOwnProperty("panel")) { + var error = $root.google.cloud.discoveryengine.v1.PanelInfo.verify(message.panel); + if (error) + return "panel." + error; } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - if (!$util.isString(message.schemaId)) - return "schemaId: string expected"; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.discoveryengine.v1.Document.Content.verify(message.content); + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { + var error = $root.google.cloud.discoveryengine.v1.SearchInfo.verify(message.searchInfo); if (error) - return "content." + error; + return "searchInfo." + error; } - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - if (!$util.isString(message.parentDocumentId)) - return "parentDocumentId: string expected"; - if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { - var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.CompletionInfo.verify(message.completionInfo); if (error) - return "derivedStructData." + error; + return "completionInfo." + error; } - if (message.indexTime != null && message.hasOwnProperty("indexTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.indexTime); + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.TransactionInfo.verify(message.transactionInfo); if (error) - return "indexTime." + error; + return "transactionInfo." + error; + } + if (message.tagIds != null && message.hasOwnProperty("tagIds")) { + if (!Array.isArray(message.tagIds)) + return "tagIds: array expected"; + for (var i = 0; i < message.tagIds.length; ++i) + if (!$util.isString(message.tagIds[i])) + return "tagIds: string[] expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!$util.isObject(message.attributes)) + return "attributes: object expected"; + var key = Object.keys(message.attributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.CustomAttribute.verify(message.attributes[key[i]]); + if (error) + return "attributes." + error; + } + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { + var error = $root.google.cloud.discoveryengine.v1.MediaInfo.verify(message.mediaInfo); + if (error) + return "mediaInfo." + error; } return null; }; /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. + * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Document} Document + * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Document) + UserEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.UserEvent) return object; - var message = new $root.google.cloud.discoveryengine.v1.Document(); - if (object.structData != null) { - if (typeof object.structData !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.structData: object expected"); - message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + var message = new $root.google.cloud.discoveryengine.v1.UserEvent(); + if (object.eventType != null) + message.eventType = String(object.eventType); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.engine != null) + message.engine = String(object.engine); + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); } - if (object.jsonData != null) - message.jsonData = String(object.jsonData); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.schemaId != null) - message.schemaId = String(object.schemaId); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.content: object expected"); - message.content = $root.google.cloud.discoveryengine.v1.Document.Content.fromObject(object.content); + if (object.userInfo != null) { + if (typeof object.userInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.userInfo: object expected"); + message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); + } + if (object.directUserRequest != null) + message.directUserRequest = Boolean(object.directUserRequest); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.fromObject(object.pageInfo); + } + if (object.attributionToken != null) + message.attributionToken = String(object.attributionToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1.DocumentInfo.fromObject(object.documents[i]); + } + } + if (object.panel != null) { + if (typeof object.panel !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.panel: object expected"); + message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.fromObject(object.panel); + } + if (object.searchInfo != null) { + if (typeof object.searchInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.searchInfo: object expected"); + message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.fromObject(object.searchInfo); + } + if (object.completionInfo != null) { + if (typeof object.completionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.completionInfo: object expected"); + message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.fromObject(object.completionInfo); + } + if (object.transactionInfo != null) { + if (typeof object.transactionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.transactionInfo: object expected"); + message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.fromObject(object.transactionInfo); } - if (object.parentDocumentId != null) - message.parentDocumentId = String(object.parentDocumentId); - if (object.derivedStructData != null) { - if (typeof object.derivedStructData !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.derivedStructData: object expected"); - message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + if (object.tagIds) { + if (!Array.isArray(object.tagIds)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.tagIds: array expected"); + message.tagIds = []; + for (var i = 0; i < object.tagIds.length; ++i) + message.tagIds[i] = String(object.tagIds[i]); } - if (object.indexTime != null) { - if (typeof object.indexTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.Document.indexTime: object expected"); - message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime); + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); + } + if (object.attributes) { + if (typeof object.attributes !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); + message.attributes = {}; + for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { + if (typeof object.attributes[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); + message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.fromObject(object.attributes[keys[i]]); + } + } + if (object.mediaInfo != null) { + if (typeof object.mediaInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.mediaInfo: object expected"); + message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.fromObject(object.mediaInfo); } return message; }; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static - * @param {google.cloud.discoveryengine.v1.Document} message Document + * @param {google.cloud.discoveryengine.v1.UserEvent} message UserEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + UserEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.documents = []; + object.tagIds = []; + object.promotionIds = []; + } + if (options.objects || options.defaults) + object.attributes = {}; if (options.defaults) { - object.name = ""; - object.id = ""; - object.schemaId = ""; - object.derivedStructData = null; - object.parentDocumentId = ""; - object.content = null; - object.indexTime = null; + object.eventType = ""; + object.userPseudoId = ""; + object.eventTime = null; + object.userInfo = null; + object.directUserRequest = false; + object.sessionId = ""; + object.pageInfo = null; + object.attributionToken = ""; + object.filter = ""; + object.panel = null; + object.searchInfo = null; + object.completionInfo = null; + object.transactionInfo = null; + object.mediaInfo = null; + object.engine = ""; + object.dataStore = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - object.schemaId = message.schemaId; - if (message.structData != null && message.hasOwnProperty("structData")) { - object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); - if (options.oneofs) - object.data = "structData"; + if (message.eventType != null && message.hasOwnProperty("eventType")) + object.eventType = message.eventType; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.userInfo != null && message.hasOwnProperty("userInfo")) + object.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.toObject(message.userInfo, options); + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + object.directUserRequest = message.directUserRequest; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.toObject(message.pageInfo, options); + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + object.attributionToken = message.attributionToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1.DocumentInfo.toObject(message.documents[j], options); } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - object.jsonData = message.jsonData; - if (options.oneofs) - object.data = "jsonData"; + if (message.panel != null && message.hasOwnProperty("panel")) + object.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.toObject(message.panel, options); + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) + object.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.toObject(message.searchInfo, options); + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) + object.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.toObject(message.completionInfo, options); + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) + object.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.toObject(message.transactionInfo, options); + if (message.tagIds && message.tagIds.length) { + object.tagIds = []; + for (var j = 0; j < message.tagIds.length; ++j) + object.tagIds[j] = message.tagIds[j]; } - if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) - object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - object.parentDocumentId = message.parentDocumentId; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.discoveryengine.v1.Document.Content.toObject(message.content, options); - if (message.indexTime != null && message.hasOwnProperty("indexTime")) - object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options); + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; + } + var keys2; + if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { + object.attributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.toObject(message.attributes[keys2[j]], options); + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) + object.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.toObject(message.mediaInfo, options); + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = message.engine; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; return object; }; /** - * Converts this Document to JSON. + * Converts this UserEvent to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + UserEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Document + * Gets the default type url for UserEvent * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Document + * @memberof google.cloud.discoveryengine.v1.UserEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserEvent"; }; - Document.Content = (function() { - - /** - * Properties of a Content. - * @memberof google.cloud.discoveryengine.v1.Document - * @interface IContent - * @property {Uint8Array|null} [rawBytes] Content rawBytes - * @property {string|null} [uri] Content uri - * @property {string|null} [mimeType] Content mimeType - */ - - /** - * Constructs a new Content. - * @memberof google.cloud.discoveryengine.v1.Document - * @classdesc Represents a Content. - * @implements IContent - * @constructor - * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set - */ - function Content(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]]; - } - - /** - * Content rawBytes. - * @member {Uint8Array|null|undefined} rawBytes - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.rawBytes = null; - - /** - * Content uri. - * @member {string|null|undefined} uri - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.uri = null; + return UserEvent; + })(); - /** - * Content mimeType. - * @member {string} mimeType - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Content.prototype.mimeType = ""; + v1.PageInfo = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a PageInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IPageInfo + * @property {string|null} [pageviewId] PageInfo pageviewId + * @property {string|null} [pageCategory] PageInfo pageCategory + * @property {string|null} [uri] PageInfo uri + * @property {string|null} [referrerUri] PageInfo referrerUri + */ - /** - * Content content. - * @member {"rawBytes"|"uri"|undefined} content - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - */ - Object.defineProperty(Content.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["rawBytes", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new PageInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a PageInfo. + * @implements IPageInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + */ + function PageInfo(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 Content instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content instance - */ - Content.create = function create(properties) { - return new Content(properties); - }; + /** + * PageInfo pageviewId. + * @member {string} pageviewId + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.pageviewId = ""; - /** - * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.rawBytes != null && Object.hasOwnProperty.call(message, "rawBytes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawBytes); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); - return writer; - }; + /** + * PageInfo pageCategory. + * @member {string} pageCategory + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.pageCategory = ""; - /** - * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.Document.Content.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * PageInfo uri. + * @member {string} uri + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.uri = ""; - /** - * Decodes a Content message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.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.cloud.discoveryengine.v1.Document.Content(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.rawBytes = reader.bytes(); - break; - } - case 3: { - message.uri = reader.string(); - break; - } - case 1: { - message.mimeType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PageInfo referrerUri. + * @member {string} referrerUri + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + */ + PageInfo.prototype.referrerUri = ""; - /** - * Decodes a Content message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new PageInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo instance + */ + PageInfo.create = function create(properties) { + return new PageInfo(properties); + }; - /** - * Verifies a Content message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Content.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { - properties.content = 1; - if (!(message.rawBytes && typeof message.rawBytes.length === "number" || $util.isString(message.rawBytes))) - return "rawBytes: buffer expected"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - return null; - }; + /** + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); + if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); + return writer; + }; - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.Document.Content} Content - */ - Content.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.Document.Content) - return object; - var message = new $root.google.cloud.discoveryengine.v1.Document.Content(); - if (object.rawBytes != null) - if (typeof object.rawBytes === "string") - $util.base64.decode(object.rawBytes, message.rawBytes = $util.newBuffer($util.base64.length(object.rawBytes)), 0); - else if (object.rawBytes.length >= 0) - message.rawBytes = object.rawBytes; - if (object.uri != null) - message.uri = String(object.uri); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - return message; - }; + /** + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {google.cloud.discoveryengine.v1.Document.Content} message Content - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Content.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mimeType = ""; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { - object.rawBytes = options.bytes === String ? $util.base64.encode(message.rawBytes, 0, message.rawBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawBytes) : message.rawBytes; - if (options.oneofs) - object.content = "rawBytes"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.content = "uri"; + /** + * Decodes a PageInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.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.cloud.discoveryengine.v1.PageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageviewId = reader.string(); + break; + } + case 2: { + message.pageCategory = reader.string(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 4: { + message.referrerUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + if (!$util.isString(message.pageviewId)) + return "pageviewId: string expected"; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + if (!$util.isString(message.pageCategory)) + return "pageCategory: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + if (!$util.isString(message.referrerUri)) + return "referrerUri: string expected"; + return null; + }; + + /** + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + */ + PageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PageInfo) return object; - }; + var message = new $root.google.cloud.discoveryengine.v1.PageInfo(); + if (object.pageviewId != null) + message.pageviewId = String(object.pageviewId); + if (object.pageCategory != null) + message.pageCategory = String(object.pageCategory); + if (object.uri != null) + message.uri = String(object.uri); + if (object.referrerUri != null) + message.referrerUri = String(object.referrerUri); + return message; + }; - /** - * Converts this Content to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @instance - * @returns {Object.} JSON object - */ - Content.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {google.cloud.discoveryengine.v1.PageInfo} message PageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageviewId = ""; + object.pageCategory = ""; + object.uri = ""; + object.referrerUri = ""; + } + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + object.pageviewId = message.pageviewId; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + object.pageCategory = message.pageCategory; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + object.referrerUri = message.referrerUri; + return object; + }; - /** - * Gets the default type url for Content - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.Document.Content - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.Document.Content"; - }; + /** + * Converts this PageInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @instance + * @returns {Object.} JSON object + */ + PageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Content; - })(); + /** + * Gets the default type url for PageInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.PageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PageInfo"; + }; - return Document; + return PageInfo; })(); - v1.UserEvent = (function() { + v1.SearchInfo = (function() { /** - * Properties of a UserEvent. + * Properties of a SearchInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface IUserEvent - * @property {string|null} [eventType] UserEvent eventType - * @property {string|null} [userPseudoId] UserEvent userPseudoId - * @property {string|null} [engine] UserEvent engine - * @property {string|null} [dataStore] UserEvent dataStore - * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime - * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] UserEvent userInfo - * @property {boolean|null} [directUserRequest] UserEvent directUserRequest - * @property {string|null} [sessionId] UserEvent sessionId - * @property {google.cloud.discoveryengine.v1.IPageInfo|null} [pageInfo] UserEvent pageInfo - * @property {string|null} [attributionToken] UserEvent attributionToken - * @property {string|null} [filter] UserEvent filter - * @property {Array.|null} [documents] UserEvent documents - * @property {google.cloud.discoveryengine.v1.IPanelInfo|null} [panel] UserEvent panel - * @property {google.cloud.discoveryengine.v1.ISearchInfo|null} [searchInfo] UserEvent searchInfo - * @property {google.cloud.discoveryengine.v1.ICompletionInfo|null} [completionInfo] UserEvent completionInfo - * @property {google.cloud.discoveryengine.v1.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo - * @property {Array.|null} [tagIds] UserEvent tagIds - * @property {Array.|null} [promotionIds] UserEvent promotionIds - * @property {Object.|null} [attributes] UserEvent attributes - * @property {google.cloud.discoveryengine.v1.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo + * @interface ISearchInfo + * @property {string|null} [searchQuery] SearchInfo searchQuery + * @property {string|null} [orderBy] SearchInfo orderBy + * @property {number|null} [offset] SearchInfo offset */ /** - * Constructs a new UserEvent. + * Constructs a new SearchInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a UserEvent. - * @implements IUserEvent + * @classdesc Represents a SearchInfo. + * @implements ISearchInfo * @constructor - * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set */ - function UserEvent(properties) { - this.documents = []; - this.tagIds = []; - this.promotionIds = []; - this.attributes = {}; + function SearchInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14810,372 +18983,357 @@ } /** - * UserEvent eventType. - * @member {string} eventType - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo searchQuery. + * @member {string} searchQuery + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.eventType = ""; + SearchInfo.prototype.searchQuery = ""; /** - * UserEvent userPseudoId. - * @member {string} userPseudoId - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo orderBy. + * @member {string} orderBy + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.userPseudoId = ""; + SearchInfo.prototype.orderBy = ""; /** - * UserEvent engine. - * @member {string} engine - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo offset. + * @member {number|null|undefined} offset + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.engine = ""; + SearchInfo.prototype.offset = null; - /** - * UserEvent dataStore. - * @member {string} dataStore - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance - */ - UserEvent.prototype.dataStore = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UserEvent eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.discoveryengine.v1.UserEvent + * SearchInfo _offset. + * @member {"offset"|undefined} _offset + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance */ - UserEvent.prototype.eventTime = null; + Object.defineProperty(SearchInfo.prototype, "_offset", { + get: $util.oneOfGetter($oneOfFields = ["offset"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * UserEvent userInfo. - * @member {google.cloud.discoveryengine.v1.IUserInfo|null|undefined} userInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a new SearchInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo instance */ - UserEvent.prototype.userInfo = null; + SearchInfo.create = function create(properties) { + return new SearchInfo(properties); + }; /** - * UserEvent directUserRequest. - * @member {boolean} directUserRequest - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.directUserRequest = false; + SearchInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); + return writer; + }; /** - * UserEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.sessionId = ""; + SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * UserEvent pageInfo. - * @member {google.cloud.discoveryengine.v1.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Decodes a SearchInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.pageInfo = null; + SearchInfo.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.cloud.discoveryengine.v1.SearchInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.searchQuery = reader.string(); + break; + } + case 2: { + message.orderBy = reader.string(); + break; + } + case 3: { + message.offset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * UserEvent attributionToken. - * @member {string} attributionToken - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.attributionToken = ""; + SearchInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * UserEvent filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Verifies a SearchInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.prototype.filter = ""; + SearchInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + if (!$util.isString(message.searchQuery)) + return "searchQuery: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) { + properties._offset = 1; + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + } + return null; + }; /** - * UserEvent documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo */ - UserEvent.prototype.documents = $util.emptyArray; + SearchInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); + if (object.searchQuery != null) + message.searchQuery = String(object.searchQuery); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.offset != null) + message.offset = object.offset | 0; + return message; + }; /** - * UserEvent panel. - * @member {google.cloud.discoveryengine.v1.IPanelInfo|null|undefined} panel - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchInfo} message SearchInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - UserEvent.prototype.panel = null; + SearchInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.searchQuery = ""; + object.orderBy = ""; + } + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + object.searchQuery = message.searchQuery; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.offset != null && message.hasOwnProperty("offset")) { + object.offset = message.offset; + if (options.oneofs) + object._offset = "offset"; + } + return object; + }; /** - * UserEvent searchInfo. - * @member {google.cloud.discoveryengine.v1.ISearchInfo|null|undefined} searchInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent + * Converts this SearchInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchInfo * @instance + * @returns {Object.} JSON object */ - UserEvent.prototype.searchInfo = null; + SearchInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * UserEvent completionInfo. - * @member {google.cloud.discoveryengine.v1.ICompletionInfo|null|undefined} completionInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Gets the default type url for SearchInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - UserEvent.prototype.completionInfo = null; + SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchInfo"; + }; - /** - * UserEvent transactionInfo. - * @member {google.cloud.discoveryengine.v1.ITransactionInfo|null|undefined} transactionInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance - */ - UserEvent.prototype.transactionInfo = null; + return SearchInfo; + })(); + + v1.CompletionInfo = (function() { /** - * UserEvent tagIds. - * @member {Array.} tagIds - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Properties of a CompletionInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface ICompletionInfo + * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion + * @property {number|null} [selectedPosition] CompletionInfo selectedPosition */ - UserEvent.prototype.tagIds = $util.emptyArray; /** - * UserEvent promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @instance + * Constructs a new CompletionInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a CompletionInfo. + * @implements ICompletionInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set */ - UserEvent.prototype.promotionIds = $util.emptyArray; + function CompletionInfo(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]]; + } /** - * UserEvent attributes. - * @member {Object.} attributes - * @memberof google.cloud.discoveryengine.v1.UserEvent + * CompletionInfo selectedSuggestion. + * @member {string} selectedSuggestion + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance */ - UserEvent.prototype.attributes = $util.emptyObject; + CompletionInfo.prototype.selectedSuggestion = ""; /** - * UserEvent mediaInfo. - * @member {google.cloud.discoveryengine.v1.IMediaInfo|null|undefined} mediaInfo - * @memberof google.cloud.discoveryengine.v1.UserEvent + * CompletionInfo selectedPosition. + * @member {number} selectedPosition + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance */ - UserEvent.prototype.mediaInfo = null; + CompletionInfo.prototype.selectedPosition = 0; /** - * Creates a new UserEvent instance using the specified properties. + * Creates a new CompletionInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent instance + * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo instance */ - UserEvent.create = function create(properties) { - return new UserEvent(properties); + CompletionInfo.create = function create(properties) { + return new CompletionInfo(properties); }; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encode = function encode(message, writer) { + CompletionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); - if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) - $root.google.cloud.discoveryengine.v1.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.discoveryengine.v1.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) - $root.google.cloud.discoveryengine.v1.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) - $root.google.cloud.discoveryengine.v1.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) - $root.google.cloud.discoveryengine.v1.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) - $root.google.cloud.discoveryengine.v1.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.tagIds != null && message.tagIds.length) - for (var i = 0; i < message.tagIds.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.discoveryengine.v1.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) - $root.google.cloud.discoveryengine.v1.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.engine); - if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.dataStore); + if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); + if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); return writer; }; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.UserEvent.verify|verify} messages. + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encodeDelimited = function encodeDelimited(message, writer) { + CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decode = function decode(reader, length) { + CompletionInfo.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.cloud.discoveryengine.v1.UserEvent(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.eventType = reader.string(); + message.selectedSuggestion = reader.string(); break; } case 2: { - message.userPseudoId = reader.string(); - break; - } - case 19: { - message.engine = reader.string(); - break; - } - case 20: { - message.dataStore = reader.string(); - break; - } - case 3: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.directUserRequest = reader.bool(); - break; - } - case 6: { - message.sessionId = reader.string(); - break; - } - case 7: { - message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.attributionToken = reader.string(); - break; - } - case 9: { - message.filter = reader.string(); - break; - } - case 10: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1.DocumentInfo.decode(reader, reader.uint32())); - break; - } - case 11: { - message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - if (!(message.tagIds && message.tagIds.length)) - message.tagIds = []; - message.tagIds.push(reader.string()); - break; - } - case 16: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); - break; - } - case 17: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.CustomAttribute.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.attributes[key] = value; - break; - } - case 18: { - message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.decode(reader, reader.uint32()); + message.selectedPosition = reader.int32(); break; } default: @@ -15187,381 +19345,136 @@ }; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decodeDelimited = function decodeDelimited(reader) { + CompletionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserEvent message. + * Verifies a CompletionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.verify = function verify(message) { + CompletionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) - if (!$util.isString(message.eventType)) - return "eventType: string expected"; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - if (!$util.isString(message.userPseudoId)) - return "userPseudoId: string expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - if (!$util.isString(message.engine)) - return "engine: string expected"; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - if (!$util.isString(message.dataStore)) - return "dataStore: string expected"; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.userInfo != null && message.hasOwnProperty("userInfo")) { - var error = $root.google.cloud.discoveryengine.v1.UserInfo.verify(message.userInfo); - if (error) - return "userInfo." + error; - } - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - if (typeof message.directUserRequest !== "boolean") - return "directUserRequest: boolean expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.discoveryengine.v1.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - if (!$util.isString(message.attributionToken)) - return "attributionToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.DocumentInfo.verify(message.documents[i]); - if (error) - return "documents." + error; - } - } - if (message.panel != null && message.hasOwnProperty("panel")) { - var error = $root.google.cloud.discoveryengine.v1.PanelInfo.verify(message.panel); - if (error) - return "panel." + error; - } - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { - var error = $root.google.cloud.discoveryengine.v1.SearchInfo.verify(message.searchInfo); - if (error) - return "searchInfo." + error; - } - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { - var error = $root.google.cloud.discoveryengine.v1.CompletionInfo.verify(message.completionInfo); - if (error) - return "completionInfo." + error; - } - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { - var error = $root.google.cloud.discoveryengine.v1.TransactionInfo.verify(message.transactionInfo); - if (error) - return "transactionInfo." + error; - } - if (message.tagIds != null && message.hasOwnProperty("tagIds")) { - if (!Array.isArray(message.tagIds)) - return "tagIds: array expected"; - for (var i = 0; i < message.tagIds.length; ++i) - if (!$util.isString(message.tagIds[i])) - return "tagIds: string[] expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; - } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.CustomAttribute.verify(message.attributes[key[i]]); - if (error) - return "attributes." + error; - } - } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { - var error = $root.google.cloud.discoveryengine.v1.MediaInfo.verify(message.mediaInfo); - if (error) - return "mediaInfo." + error; - } + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + if (!$util.isString(message.selectedSuggestion)) + return "selectedSuggestion: string expected"; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + if (!$util.isInteger(message.selectedPosition)) + return "selectedPosition: integer expected"; return null; }; /** - * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.UserEvent} UserEvent - */ - UserEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.UserEvent) - return object; - var message = new $root.google.cloud.discoveryengine.v1.UserEvent(); - if (object.eventType != null) - message.eventType = String(object.eventType); - if (object.userPseudoId != null) - message.userPseudoId = String(object.userPseudoId); - if (object.engine != null) - message.engine = String(object.engine); - if (object.dataStore != null) - message.dataStore = String(object.dataStore); - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.userInfo != null) { - if (typeof object.userInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.userInfo: object expected"); - message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); - } - if (object.directUserRequest != null) - message.directUserRequest = Boolean(object.directUserRequest); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.fromObject(object.pageInfo); - } - if (object.attributionToken != null) - message.attributionToken = String(object.attributionToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1.DocumentInfo.fromObject(object.documents[i]); - } - } - if (object.panel != null) { - if (typeof object.panel !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.panel: object expected"); - message.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.fromObject(object.panel); - } - if (object.searchInfo != null) { - if (typeof object.searchInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.searchInfo: object expected"); - message.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.fromObject(object.searchInfo); - } - if (object.completionInfo != null) { - if (typeof object.completionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.completionInfo: object expected"); - message.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.fromObject(object.completionInfo); - } - if (object.transactionInfo != null) { - if (typeof object.transactionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.transactionInfo: object expected"); - message.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.fromObject(object.transactionInfo); - } - if (object.tagIds) { - if (!Array.isArray(object.tagIds)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.tagIds: array expected"); - message.tagIds = []; - for (var i = 0; i < object.tagIds.length; ++i) - message.tagIds[i] = String(object.tagIds[i]); - } - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); - } - if (object.attributes) { - if (typeof object.attributes !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (typeof object.attributes[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.attributes: object expected"); - message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.fromObject(object.attributes[keys[i]]); - } - } - if (object.mediaInfo != null) { - if (typeof object.mediaInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.UserEvent.mediaInfo: object expected"); - message.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.fromObject(object.mediaInfo); - } - return message; - }; - - /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.UserEvent - * @static - * @param {google.cloud.discoveryengine.v1.UserEvent} message UserEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo */ - UserEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.documents = []; - object.tagIds = []; - object.promotionIds = []; - } - if (options.objects || options.defaults) - object.attributes = {}; - if (options.defaults) { - object.eventType = ""; - object.userPseudoId = ""; - object.eventTime = null; - object.userInfo = null; - object.directUserRequest = false; - object.sessionId = ""; - object.pageInfo = null; - object.attributionToken = ""; - object.filter = ""; - object.panel = null; - object.searchInfo = null; - object.completionInfo = null; - object.transactionInfo = null; - object.mediaInfo = null; - object.engine = ""; - object.dataStore = ""; - } - if (message.eventType != null && message.hasOwnProperty("eventType")) - object.eventType = message.eventType; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - object.userPseudoId = message.userPseudoId; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.userInfo != null && message.hasOwnProperty("userInfo")) - object.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.toObject(message.userInfo, options); - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - object.directUserRequest = message.directUserRequest; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.discoveryengine.v1.PageInfo.toObject(message.pageInfo, options); - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - object.attributionToken = message.attributionToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1.DocumentInfo.toObject(message.documents[j], options); - } - if (message.panel != null && message.hasOwnProperty("panel")) - object.panel = $root.google.cloud.discoveryengine.v1.PanelInfo.toObject(message.panel, options); - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) - object.searchInfo = $root.google.cloud.discoveryengine.v1.SearchInfo.toObject(message.searchInfo, options); - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) - object.completionInfo = $root.google.cloud.discoveryengine.v1.CompletionInfo.toObject(message.completionInfo, options); - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) - object.transactionInfo = $root.google.cloud.discoveryengine.v1.TransactionInfo.toObject(message.transactionInfo, options); - if (message.tagIds && message.tagIds.length) { - object.tagIds = []; - for (var j = 0; j < message.tagIds.length; ++j) - object.tagIds[j] = message.tagIds[j]; - } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; - } - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1.CustomAttribute.toObject(message.attributes[keys2[j]], options); + CompletionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); + if (object.selectedSuggestion != null) + message.selectedSuggestion = String(object.selectedSuggestion); + if (object.selectedPosition != null) + message.selectedPosition = object.selectedPosition | 0; + return message; + }; + + /** + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @static + * @param {google.cloud.discoveryengine.v1.CompletionInfo} message CompletionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompletionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectedSuggestion = ""; + object.selectedPosition = 0; } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) - object.mediaInfo = $root.google.cloud.discoveryengine.v1.MediaInfo.toObject(message.mediaInfo, options); - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = message.engine; - if (message.dataStore != null && message.hasOwnProperty("dataStore")) - object.dataStore = message.dataStore; + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + object.selectedSuggestion = message.selectedSuggestion; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + object.selectedPosition = message.selectedPosition; return object; }; /** - * Converts this UserEvent to JSON. + * Converts this CompletionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @instance * @returns {Object.} JSON object */ - UserEvent.prototype.toJSON = function toJSON() { + CompletionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserEvent + * Gets the default type url for CompletionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.UserEvent + * @memberof google.cloud.discoveryengine.v1.CompletionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.UserEvent"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionInfo"; }; - return UserEvent; + return CompletionInfo; })(); - v1.PageInfo = (function() { + v1.TransactionInfo = (function() { /** - * Properties of a PageInfo. + * Properties of a TransactionInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface IPageInfo - * @property {string|null} [pageviewId] PageInfo pageviewId - * @property {string|null} [pageCategory] PageInfo pageCategory - * @property {string|null} [uri] PageInfo uri - * @property {string|null} [referrerUri] PageInfo referrerUri + * @interface ITransactionInfo + * @property {number|null} [value] TransactionInfo value + * @property {string|null} [currency] TransactionInfo currency + * @property {string|null} [transactionId] TransactionInfo transactionId + * @property {number|null} [tax] TransactionInfo tax + * @property {number|null} [cost] TransactionInfo cost + * @property {number|null} [discountValue] TransactionInfo discountValue */ /** - * Constructs a new PageInfo. + * Constructs a new TransactionInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PageInfo. - * @implements IPageInfo + * @classdesc Represents a TransactionInfo. + * @implements ITransactionInfo * @constructor - * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set */ - function PageInfo(properties) { + function TransactionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15569,117 +19482,192 @@ } /** - * PageInfo pageviewId. - * @member {string} pageviewId - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo value. + * @member {number|null|undefined} value + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.pageviewId = ""; + TransactionInfo.prototype.value = null; /** - * PageInfo pageCategory. - * @member {string} pageCategory - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo currency. + * @member {string} currency + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.pageCategory = ""; + TransactionInfo.prototype.currency = ""; /** - * PageInfo uri. - * @member {string} uri - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo transactionId. + * @member {string} transactionId + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.uri = ""; + TransactionInfo.prototype.transactionId = ""; /** - * PageInfo referrerUri. - * @member {string} referrerUri - * @memberof google.cloud.discoveryengine.v1.PageInfo + * TransactionInfo tax. + * @member {number|null|undefined} tax + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance */ - PageInfo.prototype.referrerUri = ""; + TransactionInfo.prototype.tax = null; /** - * Creates a new PageInfo instance using the specified properties. + * TransactionInfo cost. + * @member {number|null|undefined} cost + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + TransactionInfo.prototype.cost = null; + + /** + * TransactionInfo discountValue. + * @member {number|null|undefined} discountValue + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + TransactionInfo.prototype.discountValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransactionInfo _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _tax. + * @member {"tax"|undefined} _tax + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_tax", { + get: $util.oneOfGetter($oneOfFields = ["tax"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _cost. + * @member {"cost"|undefined} _cost + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_cost", { + get: $util.oneOfGetter($oneOfFields = ["cost"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _discountValue. + * @member {"discountValue"|undefined} _discountValue + * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_discountValue", { + get: $util.oneOfGetter($oneOfFields = ["discountValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransactionInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo instance + * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo instance */ - PageInfo.create = function create(properties) { - return new PageInfo(properties); + TransactionInfo.create = function create(properties) { + return new TransactionInfo(properties); }; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encode = function encode(message, writer) { + TransactionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); - if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); - if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); + if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); + if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); + if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); return writer; }; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PageInfo.verify|verify} messages. + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes a TransactionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decode = function decode(reader, length) { + TransactionInfo.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.cloud.discoveryengine.v1.PageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.pageviewId = reader.string(); + message.value = reader.float(); break; } case 2: { - message.pageCategory = reader.string(); + message.currency = reader.string(); break; } case 3: { - message.uri = reader.string(); + message.transactionId = reader.string(); break; } case 4: { - message.referrerUri = reader.string(); + message.tax = reader.float(); + break; + } + case 5: { + message.cost = reader.float(); + break; + } + case 6: { + message.discountValue = reader.float(); break; } default: @@ -15691,149 +19679,185 @@ }; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decodeDelimited = function decodeDelimited(reader) { + TransactionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PageInfo message. + * Verifies a TransactionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PageInfo.verify = function verify(message) { + TransactionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - if (!$util.isString(message.pageviewId)) - return "pageviewId: string expected"; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - if (!$util.isString(message.pageCategory)) - return "pageCategory: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - if (!$util.isString(message.referrerUri)) - return "referrerUri: string expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (typeof message.value !== "number") + return "value: number expected"; + } + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + if (!$util.isString(message.transactionId)) + return "transactionId: string expected"; + if (message.tax != null && message.hasOwnProperty("tax")) { + properties._tax = 1; + if (typeof message.tax !== "number") + return "tax: number expected"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + properties._cost = 1; + if (typeof message.cost !== "number") + return "cost: number expected"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + properties._discountValue = 1; + if (typeof message.discountValue !== "number") + return "discountValue: number expected"; + } return null; }; /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo */ - PageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PageInfo) + TransactionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.TransactionInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.PageInfo(); - if (object.pageviewId != null) - message.pageviewId = String(object.pageviewId); - if (object.pageCategory != null) - message.pageCategory = String(object.pageCategory); - if (object.uri != null) - message.uri = String(object.uri); - if (object.referrerUri != null) - message.referrerUri = String(object.referrerUri); + var message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); + if (object.value != null) + message.value = Number(object.value); + if (object.currency != null) + message.currency = String(object.currency); + if (object.transactionId != null) + message.transactionId = String(object.transactionId); + if (object.tax != null) + message.tax = Number(object.tax); + if (object.cost != null) + message.cost = Number(object.cost); + if (object.discountValue != null) + message.discountValue = Number(object.discountValue); return message; }; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1.PageInfo} message PageInfo + * @param {google.cloud.discoveryengine.v1.TransactionInfo} message TransactionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PageInfo.toObject = function toObject(message, options) { + TransactionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.pageviewId = ""; - object.pageCategory = ""; - object.uri = ""; - object.referrerUri = ""; + object.currency = ""; + object.transactionId = ""; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (options.oneofs) + object._value = "value"; + } + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + object.transactionId = message.transactionId; + if (message.tax != null && message.hasOwnProperty("tax")) { + object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; + if (options.oneofs) + object._tax = "tax"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; + if (options.oneofs) + object._cost = "cost"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; + if (options.oneofs) + object._discountValue = "discountValue"; } - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - object.pageviewId = message.pageviewId; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - object.pageCategory = message.pageCategory; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - object.referrerUri = message.referrerUri; return object; }; /** - * Converts this PageInfo to JSON. + * Converts this TransactionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @instance * @returns {Object.} JSON object */ - PageInfo.prototype.toJSON = function toJSON() { + TransactionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PageInfo + * Gets the default type url for TransactionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PageInfo + * @memberof google.cloud.discoveryengine.v1.TransactionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PageInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.TransactionInfo"; }; - return PageInfo; + return TransactionInfo; })(); - v1.SearchInfo = (function() { + v1.DocumentInfo = (function() { /** - * Properties of a SearchInfo. + * Properties of a DocumentInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface ISearchInfo - * @property {string|null} [searchQuery] SearchInfo searchQuery - * @property {string|null} [orderBy] SearchInfo orderBy - * @property {number|null} [offset] SearchInfo offset + * @interface IDocumentInfo + * @property {string|null} [id] DocumentInfo id + * @property {string|null} [name] DocumentInfo name + * @property {string|null} [uri] DocumentInfo uri + * @property {number|null} [quantity] DocumentInfo quantity + * @property {Array.|null} [promotionIds] DocumentInfo promotionIds */ /** - * Constructs a new SearchInfo. + * Constructs a new DocumentInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a SearchInfo. - * @implements ISearchInfo + * @classdesc Represents a DocumentInfo. + * @implements IDocumentInfo * @constructor - * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set */ - function SearchInfo(properties) { + function DocumentInfo(properties) { + this.promotionIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15841,117 +19865,159 @@ } /** - * SearchInfo searchQuery. - * @member {string} searchQuery - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo id. + * @member {string|null|undefined} id + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.searchQuery = ""; + DocumentInfo.prototype.id = null; /** - * SearchInfo orderBy. - * @member {string} orderBy - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo name. + * @member {string|null|undefined} name + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.orderBy = ""; + DocumentInfo.prototype.name = null; /** - * SearchInfo offset. - * @member {number|null|undefined} offset - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - SearchInfo.prototype.offset = null; + DocumentInfo.prototype.uri = null; + + /** + * DocumentInfo quantity. + * @member {number|null|undefined} quantity + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + DocumentInfo.prototype.quantity = null; + + /** + * DocumentInfo promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + DocumentInfo.prototype.promotionIds = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SearchInfo _offset. - * @member {"offset"|undefined} _offset - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * DocumentInfo documentDescriptor. + * @member {"id"|"name"|"uri"|undefined} documentDescriptor + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance */ - Object.defineProperty(SearchInfo.prototype, "_offset", { - get: $util.oneOfGetter($oneOfFields = ["offset"]), + Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["id", "name", "uri"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SearchInfo instance using the specified properties. + * DocumentInfo _quantity. + * @member {"quantity"|undefined} _quantity + * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @instance + */ + Object.defineProperty(DocumentInfo.prototype, "_quantity", { + get: $util.oneOfGetter($oneOfFields = ["quantity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DocumentInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo instance + * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo instance */ - SearchInfo.create = function create(properties) { - return new SearchInfo(properties); + DocumentInfo.create = function create(properties) { + return new DocumentInfo(properties); }; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchInfo.encode = function encode(message, writer) { + DocumentInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); return writer; }; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchInfo.verify|verify} messages. + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.ISearchInfo} message SearchInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { + DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchInfo message from the specified reader or buffer. + * Decodes a DocumentInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchInfo.decode = function decode(reader, length) { + DocumentInfo.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.cloud.discoveryengine.v1.SearchInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.searchQuery = reader.string(); + message.id = reader.string(); break; } case 2: { - message.orderBy = reader.string(); + message.name = reader.string(); + break; + } + case 6: { + message.uri = reader.string(); break; } case 3: { - message.offset = reader.int32(); + message.quantity = reader.int32(); + break; + } + case 4: { + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); break; } default: @@ -15963,145 +20029,190 @@ }; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchInfo.decodeDelimited = function decodeDelimited(reader) { + DocumentInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchInfo message. + * Verifies a DocumentInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchInfo.verify = function verify(message) { + DocumentInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - if (!$util.isString(message.searchQuery)) - return "searchQuery: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) { - properties._offset = 1; - if (!$util.isInteger(message.offset)) - return "offset: integer expected"; + if (message.id != null && message.hasOwnProperty("id")) { + properties.documentDescriptor = 1; + if (!$util.isString(message.id)) + return "id: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + if (properties.documentDescriptor === 1) + return "documentDescriptor: multiple values"; + properties.documentDescriptor = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.documentDescriptor === 1) + return "documentDescriptor: multiple values"; + properties.documentDescriptor = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.quantity != null && message.hasOwnProperty("quantity")) { + properties._quantity = 1; + if (!$util.isInteger(message.quantity)) + return "quantity: integer expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; } return null; }; /** - * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SearchInfo} SearchInfo + * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo */ - SearchInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SearchInfo) + DocumentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.SearchInfo(); - if (object.searchQuery != null) - message.searchQuery = String(object.searchQuery); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.offset != null) - message.offset = object.offset | 0; + var message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.quantity != null) + message.quantity = object.quantity | 0; + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1.DocumentInfo.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); + } return message; }; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1.SearchInfo} message SearchInfo + * @param {google.cloud.discoveryengine.v1.DocumentInfo} message DocumentInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchInfo.toObject = function toObject(message, options) { + DocumentInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.searchQuery = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) + object.promotionIds = []; + if (message.id != null && message.hasOwnProperty("id")) { + object.id = message.id; + if (options.oneofs) + object.documentDescriptor = "id"; } - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - object.searchQuery = message.searchQuery; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.offset != null && message.hasOwnProperty("offset")) { - object.offset = message.offset; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; if (options.oneofs) - object._offset = "offset"; + object.documentDescriptor = "name"; + } + if (message.quantity != null && message.hasOwnProperty("quantity")) { + object.quantity = message.quantity; + if (options.oneofs) + object._quantity = "quantity"; + } + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.documentDescriptor = "uri"; } return object; }; /** - * Converts this SearchInfo to JSON. + * Converts this DocumentInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @instance * @returns {Object.} JSON object */ - SearchInfo.prototype.toJSON = function toJSON() { + DocumentInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchInfo + * Gets the default type url for DocumentInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SearchInfo + * @memberof google.cloud.discoveryengine.v1.DocumentInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentInfo"; }; - return SearchInfo; + return DocumentInfo; })(); - v1.CompletionInfo = (function() { + v1.PanelInfo = (function() { /** - * Properties of a CompletionInfo. + * Properties of a PanelInfo. * @memberof google.cloud.discoveryengine.v1 - * @interface ICompletionInfo - * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion - * @property {number|null} [selectedPosition] CompletionInfo selectedPosition + * @interface IPanelInfo + * @property {string|null} [panelId] PanelInfo panelId + * @property {string|null} [displayName] PanelInfo displayName + * @property {number|null} [panelPosition] PanelInfo panelPosition + * @property {number|null} [totalPanels] PanelInfo totalPanels */ /** - * Constructs a new CompletionInfo. + * Constructs a new PanelInfo. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a CompletionInfo. - * @implements ICompletionInfo + * @classdesc Represents a PanelInfo. + * @implements IPanelInfo * @constructor - * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set */ - function CompletionInfo(properties) { + function PanelInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16109,89 +20220,142 @@ } /** - * CompletionInfo selectedSuggestion. - * @member {string} selectedSuggestion - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * PanelInfo panelId. + * @member {string} panelId + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance */ - CompletionInfo.prototype.selectedSuggestion = ""; + PanelInfo.prototype.panelId = ""; /** - * CompletionInfo selectedPosition. - * @member {number} selectedPosition - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * PanelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance */ - CompletionInfo.prototype.selectedPosition = 0; + PanelInfo.prototype.displayName = ""; /** - * Creates a new CompletionInfo instance using the specified properties. + * PanelInfo panelPosition. + * @member {number|null|undefined} panelPosition + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + PanelInfo.prototype.panelPosition = null; + + /** + * PanelInfo totalPanels. + * @member {number|null|undefined} totalPanels + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + PanelInfo.prototype.totalPanels = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PanelInfo _panelPosition. + * @member {"panelPosition"|undefined} _panelPosition + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_panelPosition", { + get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PanelInfo _totalPanels. + * @member {"totalPanels"|undefined} _totalPanels + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_totalPanels", { + get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PanelInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo instance + * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo instance */ - CompletionInfo.create = function create(properties) { - return new CompletionInfo(properties); + PanelInfo.create = function create(properties) { + return new PanelInfo(properties); }; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompletionInfo.encode = function encode(message, writer) { + PanelInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); - if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); + if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); + if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); return writer; }; /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.CompletionInfo.verify|verify} messages. + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { + PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompletionInfo message from the specified reader or buffer. + * Decodes a PanelInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompletionInfo.decode = function decode(reader, length) { + PanelInfo.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.cloud.discoveryengine.v1.CompletionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.selectedSuggestion = reader.string(); + case 2: { + message.panelId = reader.string(); break; } - case 2: { - message.selectedPosition = reader.int32(); + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.panelPosition = reader.int32(); + break; + } + case 5: { + message.totalPanels = reader.int32(); break; } default: @@ -16203,329 +20367,261 @@ }; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompletionInfo.decodeDelimited = function decodeDelimited(reader) { + PanelInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompletionInfo message. + * Verifies a PanelInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompletionInfo.verify = function verify(message) { + PanelInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - if (!$util.isString(message.selectedSuggestion)) - return "selectedSuggestion: string expected"; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - if (!$util.isInteger(message.selectedPosition)) - return "selectedPosition: integer expected"; + var properties = {}; + if (message.panelId != null && message.hasOwnProperty("panelId")) + if (!$util.isString(message.panelId)) + return "panelId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + properties._panelPosition = 1; + if (!$util.isInteger(message.panelPosition)) + return "panelPosition: integer expected"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + properties._totalPanels = 1; + if (!$util.isInteger(message.totalPanels)) + return "totalPanels: integer expected"; + } return null; }; /** - * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo */ - CompletionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.CompletionInfo) + PanelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PanelInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.CompletionInfo(); - if (object.selectedSuggestion != null) - message.selectedSuggestion = String(object.selectedSuggestion); - if (object.selectedPosition != null) - message.selectedPosition = object.selectedPosition | 0; + var message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); + if (object.panelId != null) + message.panelId = String(object.panelId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.panelPosition != null) + message.panelPosition = object.panelPosition | 0; + if (object.totalPanels != null) + message.totalPanels = object.totalPanels | 0; return message; }; /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.CompletionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @static - * @param {google.cloud.discoveryengine.v1.CompletionInfo} message CompletionInfo + * @param {google.cloud.discoveryengine.v1.PanelInfo} message PanelInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompletionInfo.toObject = function toObject(message, options) { + PanelInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.selectedSuggestion = ""; - object.selectedPosition = 0; + object.panelId = ""; + object.displayName = ""; + } + if (message.panelId != null && message.hasOwnProperty("panelId")) + object.panelId = message.panelId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + object.panelPosition = message.panelPosition; + if (options.oneofs) + object._panelPosition = "panelPosition"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + object.totalPanels = message.totalPanels; + if (options.oneofs) + object._totalPanels = "totalPanels"; } - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - object.selectedSuggestion = message.selectedSuggestion; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - object.selectedPosition = message.selectedPosition; return object; }; /** - * Converts this CompletionInfo to JSON. + * Converts this PanelInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.CompletionInfo - * @instance - * @returns {Object.} JSON object - */ - CompletionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompletionInfo - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.CompletionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.CompletionInfo"; - }; - - return CompletionInfo; - })(); - - v1.TransactionInfo = (function() { - - /** - * Properties of a TransactionInfo. - * @memberof google.cloud.discoveryengine.v1 - * @interface ITransactionInfo - * @property {number|null} [value] TransactionInfo value - * @property {string|null} [currency] TransactionInfo currency - * @property {string|null} [transactionId] TransactionInfo transactionId - * @property {number|null} [tax] TransactionInfo tax - * @property {number|null} [cost] TransactionInfo cost - * @property {number|null} [discountValue] TransactionInfo discountValue - */ - - /** - * Constructs a new TransactionInfo. - * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a TransactionInfo. - * @implements ITransactionInfo - * @constructor - * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set - */ - function TransactionInfo(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]]; - } - - /** - * TransactionInfo value. - * @member {number|null|undefined} value - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.value = null; - - /** - * TransactionInfo currency. - * @member {string} currency - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.currency = ""; - - /** - * TransactionInfo transactionId. - * @member {string} transactionId - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.transactionId = ""; - - /** - * TransactionInfo tax. - * @member {number|null|undefined} tax - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance - */ - TransactionInfo.prototype.tax = null; - - /** - * TransactionInfo cost. - * @member {number|null|undefined} cost - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.PanelInfo * @instance + * @returns {Object.} JSON object */ - TransactionInfo.prototype.cost = null; + PanelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * TransactionInfo discountValue. - * @member {number|null|undefined} discountValue - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance + * Gets the default type url for PanelInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - TransactionInfo.prototype.discountValue = null; + PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PanelInfo"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return PanelInfo; + })(); + + v1.MediaInfo = (function() { /** - * TransactionInfo _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.discoveryengine.v1.TransactionInfo - * @instance + * Properties of a MediaInfo. + * @memberof google.cloud.discoveryengine.v1 + * @interface IMediaInfo + * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration + * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage */ - Object.defineProperty(TransactionInfo.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); /** - * TransactionInfo _tax. - * @member {"tax"|undefined} _tax - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * Constructs a new MediaInfo. + * @memberof google.cloud.discoveryengine.v1 + * @classdesc Represents a MediaInfo. + * @implements IMediaInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + */ + function MediaInfo(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]]; + } + + /** + * MediaInfo mediaProgressDuration. + * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_tax", { - get: $util.oneOfGetter($oneOfFields = ["tax"]), - set: $util.oneOfSetter($oneOfFields) - }); + MediaInfo.prototype.mediaProgressDuration = null; /** - * TransactionInfo _cost. - * @member {"cost"|undefined} _cost - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * MediaInfo mediaProgressPercentage. + * @member {number|null|undefined} mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_cost", { - get: $util.oneOfGetter($oneOfFields = ["cost"]), - set: $util.oneOfSetter($oneOfFields) - }); + MediaInfo.prototype.mediaProgressPercentage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TransactionInfo _discountValue. - * @member {"discountValue"|undefined} _discountValue - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * MediaInfo _mediaProgressPercentage. + * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_discountValue", { - get: $util.oneOfGetter($oneOfFields = ["discountValue"]), + Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { + get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new MediaInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo instance + * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo instance */ - TransactionInfo.create = function create(properties) { - return new TransactionInfo(properties); + MediaInfo.create = function create(properties) { + return new MediaInfo(properties); }; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encode = function encode(message, writer) { + MediaInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); - if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); - if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); - if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); - if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); + if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) + $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); return writer; }; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.TransactionInfo.verify|verify} messages. + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { + MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a MediaInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decode = function decode(reader, length) { + MediaInfo.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.cloud.discoveryengine.v1.TransactionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.float(); + message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.currency = reader.string(); - break; - } - case 3: { - message.transactionId = reader.string(); - break; - } - case 4: { - message.tax = reader.float(); - break; - } - case 5: { - message.cost = reader.float(); - break; - } - case 6: { - message.discountValue = reader.float(); + message.mediaProgressPercentage = reader.float(); break; } default: @@ -16537,185 +20633,142 @@ }; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decodeDelimited = function decodeDelimited(reader) { + MediaInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionInfo message. + * Verifies a MediaInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionInfo.verify = function verify(message) { + MediaInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (typeof message.value !== "number") - return "value: number expected"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - if (!$util.isString(message.currency)) - return "currency: string expected"; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - if (!$util.isString(message.transactionId)) - return "transactionId: string expected"; - if (message.tax != null && message.hasOwnProperty("tax")) { - properties._tax = 1; - if (typeof message.tax !== "number") - return "tax: number expected"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - properties._cost = 1; - if (typeof message.cost !== "number") - return "cost: number expected"; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { + var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); + if (error) + return "mediaProgressDuration." + error; } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - properties._discountValue = 1; - if (typeof message.discountValue !== "number") - return "discountValue: number expected"; + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + properties._mediaProgressPercentage = 1; + if (typeof message.mediaProgressPercentage !== "number") + return "mediaProgressPercentage: number expected"; } return null; }; /** - * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo */ - TransactionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.TransactionInfo) + MediaInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.MediaInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1.TransactionInfo(); - if (object.value != null) - message.value = Number(object.value); - if (object.currency != null) - message.currency = String(object.currency); - if (object.transactionId != null) - message.transactionId = String(object.transactionId); - if (object.tax != null) - message.tax = Number(object.tax); - if (object.cost != null) - message.cost = Number(object.cost); - if (object.discountValue != null) - message.discountValue = Number(object.discountValue); + var message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); + if (object.mediaProgressDuration != null) { + if (typeof object.mediaProgressDuration !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.MediaInfo.mediaProgressDuration: object expected"); + message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); + } + if (object.mediaProgressPercentage != null) + message.mediaProgressPercentage = Number(object.mediaProgressPercentage); return message; }; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static - * @param {google.cloud.discoveryengine.v1.TransactionInfo} message TransactionInfo + * @param {google.cloud.discoveryengine.v1.MediaInfo} message MediaInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionInfo.toObject = function toObject(message, options) { + MediaInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.currency = ""; - object.transactionId = ""; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (options.oneofs) - object._value = "value"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - object.currency = message.currency; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - object.transactionId = message.transactionId; - if (message.tax != null && message.hasOwnProperty("tax")) { - object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; - if (options.oneofs) - object._tax = "tax"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; - if (options.oneofs) - object._cost = "cost"; - } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; + if (options.defaults) + object.mediaProgressDuration = null; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) + object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; if (options.oneofs) - object._discountValue = "discountValue"; + object._mediaProgressPercentage = "mediaProgressPercentage"; } return object; }; /** - * Converts this TransactionInfo to JSON. + * Converts this MediaInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @instance * @returns {Object.} JSON object */ - TransactionInfo.prototype.toJSON = function toJSON() { + MediaInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for MediaInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.TransactionInfo + * @memberof google.cloud.discoveryengine.v1.MediaInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.TransactionInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.MediaInfo"; }; - return TransactionInfo; + return MediaInfo; })(); - v1.DocumentInfo = (function() { + v1.PurgeDocumentsRequest = (function() { /** - * Properties of a DocumentInfo. + * Properties of a PurgeDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IDocumentInfo - * @property {string|null} [id] DocumentInfo id - * @property {string|null} [name] DocumentInfo name - * @property {string|null} [uri] DocumentInfo uri - * @property {number|null} [quantity] DocumentInfo quantity - * @property {Array.|null} [promotionIds] DocumentInfo promotionIds + * @interface IPurgeDocumentsRequest + * @property {string|null} [parent] PurgeDocumentsRequest parent + * @property {string|null} [filter] PurgeDocumentsRequest filter + * @property {boolean|null} [force] PurgeDocumentsRequest force */ /** - * Constructs a new DocumentInfo. + * Constructs a new PurgeDocumentsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a DocumentInfo. - * @implements IDocumentInfo + * @classdesc Represents a PurgeDocumentsRequest. + * @implements IPurgeDocumentsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set */ - function DocumentInfo(properties) { - this.promotionIds = []; + function PurgeDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16723,159 +20776,103 @@ } /** - * DocumentInfo id. - * @member {string|null|undefined} id - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.id = null; - - /** - * DocumentInfo name. - * @member {string|null|undefined} name - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.name = null; - - /** - * DocumentInfo uri. - * @member {string|null|undefined} uri - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.uri = null; - - /** - * DocumentInfo quantity. - * @member {number|null|undefined} quantity - * @memberof google.cloud.discoveryengine.v1.DocumentInfo - * @instance - */ - DocumentInfo.prototype.quantity = null; - - /** - * DocumentInfo promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - DocumentInfo.prototype.promotionIds = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PurgeDocumentsRequest.prototype.parent = ""; /** - * DocumentInfo documentDescriptor. - * @member {"id"|"name"|"uri"|undefined} documentDescriptor - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { - get: $util.oneOfGetter($oneOfFields = ["id", "name", "uri"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsRequest.prototype.filter = ""; /** - * DocumentInfo _quantity. - * @member {"quantity"|undefined} _quantity - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * PurgeDocumentsRequest force. + * @member {boolean} force + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance */ - Object.defineProperty(DocumentInfo.prototype, "_quantity", { - get: $util.oneOfGetter($oneOfFields = ["quantity"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsRequest.prototype.force = false; /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new PurgeDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest instance */ - DocumentInfo.create = function create(properties) { - return new DocumentInfo(properties); + PurgeDocumentsRequest.create = function create(properties) { + return new PurgeDocumentsRequest(properties); }; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encode = function encode(message, writer) { + PurgeDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decode = function decode(reader, length) { + PurgeDocumentsRequest.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.cloud.discoveryengine.v1.DocumentInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.name = reader.string(); - break; - } - case 6: { - message.uri = reader.string(); + message.filter = reader.string(); break; } case 3: { - message.quantity = reader.int32(); - break; - } - case 4: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); + message.force = reader.bool(); break; } default: @@ -16887,190 +20884,141 @@ }; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentInfo message. + * Verifies a PurgeDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentInfo.verify = function verify(message) { + PurgeDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) { - properties.documentDescriptor = 1; - if (!$util.isString(message.id)) - return "id: string expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - if (properties.documentDescriptor === 1) - return "documentDescriptor: multiple values"; - properties.documentDescriptor = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - if (properties.documentDescriptor === 1) - return "documentDescriptor: multiple values"; - properties.documentDescriptor = 1; - if (!$util.isString(message.uri)) - return "uri: string expected"; - } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - properties._quantity = 1; - if (!$util.isInteger(message.quantity)) - return "quantity: integer expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest */ - DocumentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentInfo) + PurgeDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.DocumentInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.quantity != null) - message.quantity = object.quantity | 0; - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1.DocumentInfo.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); - } + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1.DocumentInfo} message DocumentInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} message PurgeDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentInfo.toObject = function toObject(message, options) { + PurgeDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.promotionIds = []; - if (message.id != null && message.hasOwnProperty("id")) { - object.id = message.id; - if (options.oneofs) - object.documentDescriptor = "id"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object.documentDescriptor = "name"; - } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - object.quantity = message.quantity; - if (options.oneofs) - object._quantity = "quantity"; - } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; - } - if (message.uri != null && message.hasOwnProperty("uri")) { - object.uri = message.uri; - if (options.oneofs) - object.documentDescriptor = "uri"; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.force = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this DocumentInfo to JSON. + * Converts this PurgeDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @instance * @returns {Object.} JSON object */ - DocumentInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for PurgeDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.DocumentInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsRequest"; }; - return DocumentInfo; + return PurgeDocumentsRequest; })(); - v1.PanelInfo = (function() { + v1.PurgeDocumentsResponse = (function() { /** - * Properties of a PanelInfo. + * Properties of a PurgeDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPanelInfo - * @property {string|null} [panelId] PanelInfo panelId - * @property {string|null} [displayName] PanelInfo displayName - * @property {number|null} [panelPosition] PanelInfo panelPosition - * @property {number|null} [totalPanels] PanelInfo totalPanels + * @interface IPurgeDocumentsResponse + * @property {number|Long|null} [purgeCount] PurgeDocumentsResponse purgeCount + * @property {Array.|null} [purgeSample] PurgeDocumentsResponse purgeSample */ /** - * Constructs a new PanelInfo. + * Constructs a new PurgeDocumentsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PanelInfo. - * @implements IPanelInfo + * @classdesc Represents a PurgeDocumentsResponse. + * @implements IPurgeDocumentsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set */ - function PanelInfo(properties) { + function PurgeDocumentsResponse(properties) { + this.purgeSample = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17078,142 +21026,92 @@ } /** - * PanelInfo panelId. - * @member {string} panelId - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.panelId = ""; - - /** - * PanelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.displayName = ""; - - /** - * PanelInfo panelPosition. - * @member {number|null|undefined} panelPosition - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.panelPosition = null; - - /** - * PanelInfo totalPanels. - * @member {number|null|undefined} totalPanels - * @memberof google.cloud.discoveryengine.v1.PanelInfo - * @instance - */ - PanelInfo.prototype.totalPanels = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PanelInfo _panelPosition. - * @member {"panelPosition"|undefined} _panelPosition - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * PurgeDocumentsResponse purgeCount. + * @member {number|Long} purgeCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance */ - Object.defineProperty(PanelInfo.prototype, "_panelPosition", { - get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * PanelInfo _totalPanels. - * @member {"totalPanels"|undefined} _totalPanels - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * PurgeDocumentsResponse purgeSample. + * @member {Array.} purgeSample + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance */ - Object.defineProperty(PanelInfo.prototype, "_totalPanels", { - get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsResponse.prototype.purgeSample = $util.emptyArray; /** - * Creates a new PanelInfo instance using the specified properties. + * Creates a new PurgeDocumentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse instance */ - PanelInfo.create = function create(properties) { - return new PanelInfo(properties); + PurgeDocumentsResponse.create = function create(properties) { + return new PurgeDocumentsResponse(properties); }; /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PanelInfo.encode = function encode(message, writer) { + PurgeDocumentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); - if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); + if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); + if (message.purgeSample != null && message.purgeSample.length) + for (var i = 0; i < message.purgeSample.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.purgeSample[i]); return writer; }; /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PanelInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPanelInfo} message PanelInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decode = function decode(reader, length) { + PurgeDocumentsResponse.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.cloud.discoveryengine.v1.PanelInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.panelId = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.panelPosition = reader.int32(); + case 1: { + message.purgeCount = reader.int64(); break; } - case 5: { - message.totalPanels = reader.int32(); + case 2: { + if (!(message.purgeSample && message.purgeSample.length)) + message.purgeSample = []; + message.purgeSample.push(reader.string()); break; } default: @@ -17225,157 +21123,161 @@ }; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PanelInfo message. + * Verifies a PurgeDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PanelInfo.verify = function verify(message) { + PurgeDocumentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.panelId != null && message.hasOwnProperty("panelId")) - if (!$util.isString(message.panelId)) - return "panelId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - properties._panelPosition = 1; - if (!$util.isInteger(message.panelPosition)) - return "panelPosition: integer expected"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - properties._totalPanels = 1; - if (!$util.isInteger(message.totalPanels)) - return "totalPanels: integer expected"; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) + return "purgeCount: integer|Long expected"; + if (message.purgeSample != null && message.hasOwnProperty("purgeSample")) { + if (!Array.isArray(message.purgeSample)) + return "purgeSample: array expected"; + for (var i = 0; i < message.purgeSample.length; ++i) + if (!$util.isString(message.purgeSample[i])) + return "purgeSample: string[] expected"; } return null; }; /** - * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse */ - PanelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PanelInfo) + PurgeDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PanelInfo(); - if (object.panelId != null) - message.panelId = String(object.panelId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.panelPosition != null) - message.panelPosition = object.panelPosition | 0; - if (object.totalPanels != null) - message.totalPanels = object.totalPanels | 0; + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + if (object.purgeCount != null) + if ($util.Long) + (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; + else if (typeof object.purgeCount === "string") + message.purgeCount = parseInt(object.purgeCount, 10); + else if (typeof object.purgeCount === "number") + message.purgeCount = object.purgeCount; + else if (typeof object.purgeCount === "object") + message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); + if (object.purgeSample) { + if (!Array.isArray(object.purgeSample)) + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsResponse.purgeSample: array expected"); + message.purgeSample = []; + for (var i = 0; i < object.purgeSample.length; ++i) + message.purgeSample[i] = String(object.purgeSample[i]); + } return message; }; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1.PanelInfo} message PanelInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} message PurgeDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PanelInfo.toObject = function toObject(message, options) { + PurgeDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.panelId = ""; - object.displayName = ""; - } - if (message.panelId != null && message.hasOwnProperty("panelId")) - object.panelId = message.panelId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - object.panelPosition = message.panelPosition; - if (options.oneofs) - object._panelPosition = "panelPosition"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - object.totalPanels = message.totalPanels; - if (options.oneofs) - object._totalPanels = "totalPanels"; + if (options.arrays || options.defaults) + object.purgeSample = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.purgeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.purgeCount = options.longs === String ? "0" : 0; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (typeof message.purgeCount === "number") + object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; + else + object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; + if (message.purgeSample && message.purgeSample.length) { + object.purgeSample = []; + for (var j = 0; j < message.purgeSample.length; ++j) + object.purgeSample[j] = message.purgeSample[j]; } return object; }; /** - * Converts this PanelInfo to JSON. + * Converts this PurgeDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @instance * @returns {Object.} JSON object */ - PanelInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for PurgeDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PanelInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PanelInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsResponse"; }; - return PanelInfo; + return PurgeDocumentsResponse; })(); - v1.MediaInfo = (function() { + v1.PurgeDocumentsMetadata = (function() { /** - * Properties of a MediaInfo. + * Properties of a PurgeDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IMediaInfo - * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration - * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage + * @interface IPurgeDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] PurgeDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] PurgeDocumentsMetadata failureCount + * @property {number|Long|null} [ignoredCount] PurgeDocumentsMetadata ignoredCount */ /** - * Constructs a new MediaInfo. + * Constructs a new PurgeDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a MediaInfo. - * @implements IMediaInfo + * @classdesc Represents a PurgeDocumentsMetadata. + * @implements IPurgeDocumentsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set */ - function MediaInfo(properties) { + function PurgeDocumentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17383,103 +21285,131 @@ } /** - * MediaInfo mediaProgressDuration. - * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - MediaInfo.prototype.mediaProgressDuration = null; + PurgeDocumentsMetadata.prototype.createTime = null; /** - * MediaInfo mediaProgressPercentage. - * @member {number|null|undefined} mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - MediaInfo.prototype.mediaProgressPercentage = null; + PurgeDocumentsMetadata.prototype.updateTime = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * PurgeDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MediaInfo _mediaProgressPercentage. - * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * PurgeDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance */ - Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { - get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), - set: $util.oneOfSetter($oneOfFields) - }); + PurgeDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new MediaInfo instance using the specified properties. + * PurgeDocumentsMetadata ignoredCount. + * @member {number|Long} ignoredCount + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.ignoredCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PurgeDocumentsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo instance + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata instance */ - MediaInfo.create = function create(properties) { - return new MediaInfo(properties); + PurgeDocumentsMetadata.create = function create(properties) { + return new PurgeDocumentsMetadata(properties); }; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encode = function encode(message, writer) { + PurgeDocumentsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) - $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + if (message.ignoredCount != null && Object.hasOwnProperty.call(message, "ignoredCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ignoredCount); return writer; }; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.MediaInfo.verify|verify} messages. + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { + PurgeDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decode = function decode(reader, length) { + PurgeDocumentsMetadata.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.cloud.discoveryengine.v1.MediaInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } - case 2: { - message.mediaProgressPercentage = reader.float(); + case 5: { + message.ignoredCount = reader.int64(); break; } default: @@ -17491,142 +21421,207 @@ }; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decodeDelimited = function decodeDelimited(reader) { + PurgeDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MediaInfo message. + * Verifies a PurgeDocumentsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MediaInfo.verify = function verify(message) { + PurgeDocumentsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { - var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "mediaProgressDuration." + error; + return "createTime." + error; } - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - properties._mediaProgressPercentage = 1; - if (typeof message.mediaProgressPercentage !== "number") - return "mediaProgressPercentage: number expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } + if (message.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) + if (!$util.isInteger(message.ignoredCount) && !(message.ignoredCount && $util.isInteger(message.ignoredCount.low) && $util.isInteger(message.ignoredCount.high))) + return "ignoredCount: integer|Long expected"; return null; }; /** - * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata */ - MediaInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.MediaInfo) + PurgeDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.MediaInfo(); - if (object.mediaProgressDuration != null) { - if (typeof object.mediaProgressDuration !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.MediaInfo.mediaProgressDuration: object expected"); - message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); + var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.mediaProgressPercentage != null) - message.mediaProgressPercentage = Number(object.mediaProgressPercentage); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + if (object.ignoredCount != null) + if ($util.Long) + (message.ignoredCount = $util.Long.fromValue(object.ignoredCount)).unsigned = false; + else if (typeof object.ignoredCount === "string") + message.ignoredCount = parseInt(object.ignoredCount, 10); + else if (typeof object.ignoredCount === "number") + message.ignoredCount = object.ignoredCount; + else if (typeof object.ignoredCount === "object") + message.ignoredCount = new $util.LongBits(object.ignoredCount.low >>> 0, object.ignoredCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static - * @param {google.cloud.discoveryengine.v1.MediaInfo} message MediaInfo + * @param {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} message PurgeDocumentsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MediaInfo.toObject = function toObject(message, options) { + PurgeDocumentsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mediaProgressDuration = null; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) - object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; - if (options.oneofs) - object._mediaProgressPercentage = "mediaProgressPercentage"; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ignoredCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ignoredCount = options.longs === String ? "0" : 0; } + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) + if (typeof message.ignoredCount === "number") + object.ignoredCount = options.longs === String ? String(message.ignoredCount) : message.ignoredCount; + else + object.ignoredCount = options.longs === String ? $util.Long.prototype.toString.call(message.ignoredCount) : options.longs === Number ? new $util.LongBits(message.ignoredCount.low >>> 0, message.ignoredCount.high >>> 0).toNumber() : message.ignoredCount; return object; }; /** - * Converts this MediaInfo to JSON. + * Converts this PurgeDocumentsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @instance * @returns {Object.} JSON object */ - MediaInfo.prototype.toJSON = function toJSON() { + PurgeDocumentsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for PurgeDocumentsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.MediaInfo + * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.MediaInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsMetadata"; }; - return MediaInfo; + return PurgeDocumentsMetadata; })(); - v1.PurgeDocumentsRequest = (function() { + v1.PurgeSuggestionDenyListEntriesRequest = (function() { /** - * Properties of a PurgeDocumentsRequest. + * Properties of a PurgeSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsRequest - * @property {string|null} [parent] PurgeDocumentsRequest parent - * @property {string|null} [filter] PurgeDocumentsRequest filter - * @property {boolean|null} [force] PurgeDocumentsRequest force + * @interface IPurgeSuggestionDenyListEntriesRequest + * @property {string|null} [parent] PurgeSuggestionDenyListEntriesRequest parent */ /** - * Constructs a new PurgeDocumentsRequest. + * Constructs a new PurgeSuggestionDenyListEntriesRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsRequest. - * @implements IPurgeDocumentsRequest + * @classdesc Represents a PurgeSuggestionDenyListEntriesRequest. + * @implements IPurgeSuggestionDenyListEntriesRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set */ - function PurgeDocumentsRequest(properties) { + function PurgeSuggestionDenyListEntriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17634,90 +21629,70 @@ } /** - * PurgeDocumentsRequest parent. + * PurgeSuggestionDenyListEntriesRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest - * @instance - */ - PurgeDocumentsRequest.prototype.parent = ""; - - /** - * PurgeDocumentsRequest filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest - * @instance - */ - PurgeDocumentsRequest.prototype.filter = ""; - - /** - * PurgeDocumentsRequest force. - * @member {boolean} force - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @instance */ - PurgeDocumentsRequest.prototype.force = false; + PurgeSuggestionDenyListEntriesRequest.prototype.parent = ""; /** - * Creates a new PurgeDocumentsRequest instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest instance */ - PurgeDocumentsRequest.create = function create(properties) { - return new PurgeDocumentsRequest(properties); + PurgeSuggestionDenyListEntriesRequest.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesRequest(properties); }; /** - * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsRequest.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsRequest.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsRequest.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesRequest.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.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17725,14 +21700,6 @@ message.parent = reader.string(); break; } - case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -17742,141 +21709,124 @@ }; /** - * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsRequest message. + * Verifies a PurgeSuggestionDenyListEntriesRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsRequest.verify = function verify(message) { + PurgeSuggestionDenyListEntriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} PurgeDocumentsRequest + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest */ - PurgeDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest) + PurgeSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsRequest(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsRequest} message PurgeDocumentsRequest + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsRequest.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.parent = ""; - object.filter = ""; - object.force = false; - } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this PurgeDocumentsRequest to JSON. + * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @instance * @returns {Object.} JSON object */ - PurgeDocumentsRequest.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsRequest + * Gets the default type url for PurgeSuggestionDenyListEntriesRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsRequest + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest"; }; - return PurgeDocumentsRequest; + return PurgeSuggestionDenyListEntriesRequest; })(); - v1.PurgeDocumentsResponse = (function() { + v1.PurgeSuggestionDenyListEntriesResponse = (function() { /** - * Properties of a PurgeDocumentsResponse. + * Properties of a PurgeSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsResponse - * @property {number|Long|null} [purgeCount] PurgeDocumentsResponse purgeCount - * @property {Array.|null} [purgeSample] PurgeDocumentsResponse purgeSample + * @interface IPurgeSuggestionDenyListEntriesResponse + * @property {number|Long|null} [purgeCount] PurgeSuggestionDenyListEntriesResponse purgeCount + * @property {Array.|null} [errorSamples] PurgeSuggestionDenyListEntriesResponse errorSamples */ /** - * Constructs a new PurgeDocumentsResponse. + * Constructs a new PurgeSuggestionDenyListEntriesResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsResponse. - * @implements IPurgeDocumentsResponse + * @classdesc Represents a PurgeSuggestionDenyListEntriesResponse. + * @implements IPurgeSuggestionDenyListEntriesResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set */ - function PurgeDocumentsResponse(properties) { - this.purgeSample = []; + function PurgeSuggestionDenyListEntriesResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17884,81 +21834,81 @@ } /** - * PurgeDocumentsResponse purgeCount. + * PurgeSuggestionDenyListEntriesResponse purgeCount. * @member {number|Long} purgeCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance */ - PurgeDocumentsResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeSuggestionDenyListEntriesResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * PurgeDocumentsResponse purgeSample. - * @member {Array.} purgeSample - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * PurgeSuggestionDenyListEntriesResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance */ - PurgeDocumentsResponse.prototype.purgeSample = $util.emptyArray; + PurgeSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; /** - * Creates a new PurgeDocumentsResponse instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse instance */ - PurgeDocumentsResponse.create = function create(properties) { - return new PurgeDocumentsResponse(properties); + PurgeSuggestionDenyListEntriesResponse.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesResponse(properties); }; /** - * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsResponse.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); - if (message.purgeSample != null && message.purgeSample.length) - for (var i = 0; i < message.purgeSample.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.purgeSample[i]); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsResponse.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsResponse.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesResponse.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.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -17967,9 +21917,9 @@ break; } case 2: { - if (!(message.purgeSample && message.purgeSample.length)) - message.purgeSample = []; - message.purgeSample.push(reader.string()); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } default: @@ -17981,57 +21931,59 @@ }; /** - * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsResponse message. + * Verifies a PurgeSuggestionDenyListEntriesResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsResponse.verify = function verify(message) { + PurgeSuggestionDenyListEntriesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) return "purgeCount: integer|Long expected"; - if (message.purgeSample != null && message.hasOwnProperty("purgeSample")) { - if (!Array.isArray(message.purgeSample)) - return "purgeSample: array expected"; - for (var i = 0; i < message.purgeSample.length; ++i) - if (!$util.isString(message.purgeSample[i])) - return "purgeSample: string[] expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } } return null; }; /** - * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} PurgeDocumentsResponse + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse */ - PurgeDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse) + PurgeSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsResponse(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); if (object.purgeCount != null) if ($util.Long) (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; @@ -18041,31 +21993,34 @@ message.purgeCount = object.purgeCount; else if (typeof object.purgeCount === "object") message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); - if (object.purgeSample) { - if (!Array.isArray(object.purgeSample)) - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsResponse.purgeSample: array expected"); - message.purgeSample = []; - for (var i = 0; i < object.purgeSample.length; ++i) - message.purgeSample[i] = String(object.purgeSample[i]); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } } return message; }; /** - * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsResponse} message PurgeDocumentsResponse + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsResponse.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.purgeSample = []; + object.errorSamples = []; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -18077,65 +22032,62 @@ object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; else object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; - if (message.purgeSample && message.purgeSample.length) { - object.purgeSample = []; - for (var j = 0; j < message.purgeSample.length; ++j) - object.purgeSample[j] = message.purgeSample[j]; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); } return object; }; /** - * Converts this PurgeDocumentsResponse to JSON. + * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @instance * @returns {Object.} JSON object */ - PurgeDocumentsResponse.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsResponse + * Gets the default type url for PurgeSuggestionDenyListEntriesResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsResponse + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse"; }; - return PurgeDocumentsResponse; + return PurgeSuggestionDenyListEntriesResponse; })(); - v1.PurgeDocumentsMetadata = (function() { + v1.PurgeSuggestionDenyListEntriesMetadata = (function() { /** - * Properties of a PurgeDocumentsMetadata. + * Properties of a PurgeSuggestionDenyListEntriesMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] PurgeDocumentsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeDocumentsMetadata updateTime - * @property {number|Long|null} [successCount] PurgeDocumentsMetadata successCount - * @property {number|Long|null} [failureCount] PurgeDocumentsMetadata failureCount - * @property {number|Long|null} [ignoredCount] PurgeDocumentsMetadata ignoredCount + * @interface IPurgeSuggestionDenyListEntriesMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeSuggestionDenyListEntriesMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeSuggestionDenyListEntriesMetadata updateTime */ /** - * Constructs a new PurgeDocumentsMetadata. + * Constructs a new PurgeSuggestionDenyListEntriesMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeDocumentsMetadata. - * @implements IPurgeDocumentsMetadata + * @classdesc Represents a PurgeSuggestionDenyListEntriesMetadata. + * @implements IPurgeSuggestionDenyListEntriesMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set */ - function PurgeDocumentsMetadata(properties) { + function PurgeSuggestionDenyListEntriesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18143,110 +22095,80 @@ } /** - * PurgeDocumentsMetadata createTime. + * PurgeSuggestionDenyListEntriesMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance */ - PurgeDocumentsMetadata.prototype.createTime = null; + PurgeSuggestionDenyListEntriesMetadata.prototype.createTime = null; /** - * PurgeDocumentsMetadata updateTime. + * PurgeSuggestionDenyListEntriesMetadata updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.updateTime = null; - - /** - * PurgeDocumentsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PurgeDocumentsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata - * @instance - */ - PurgeDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PurgeDocumentsMetadata ignoredCount. - * @member {number|Long} ignoredCount - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance */ - PurgeDocumentsMetadata.prototype.ignoredCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeSuggestionDenyListEntriesMetadata.prototype.updateTime = null; /** - * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata instance + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata instance */ - PurgeDocumentsMetadata.create = function create(properties) { - return new PurgeDocumentsMetadata(properties); + PurgeSuggestionDenyListEntriesMetadata.create = function create(properties) { + return new PurgeSuggestionDenyListEntriesMetadata(properties); }; /** - * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsMetadata.encode = function encode(message, writer) { + PurgeSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - if (message.ignoredCount != null && Object.hasOwnProperty.call(message, "ignoredCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ignoredCount); return writer; }; /** - * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.verify|verify} messages. + * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + PurgeSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsMetadata.decode = function decode(reader, length) { + PurgeSuggestionDenyListEntriesMetadata.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.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18258,18 +22180,6 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); - break; - } - case 5: { - message.ignoredCount = reader.int64(); - break; - } default: reader.skipType(tag & 7); break; @@ -18279,30 +22189,30 @@ }; /** - * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + PurgeSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeDocumentsMetadata message. + * Verifies a PurgeSuggestionDenyListEntriesMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeDocumentsMetadata.verify = function verify(message) { + PurgeSuggestionDenyListEntriesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -18315,171 +22225,105 @@ if (error) return "updateTime." + error; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; - if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) - if (!$util.isInteger(message.ignoredCount) && !(message.ignoredCount && $util.isInteger(message.ignoredCount.low) && $util.isInteger(message.ignoredCount.high))) - return "ignoredCount: integer|Long expected"; return null; }; /** - * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata */ - PurgeDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata) + PurgeSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeDocumentsMetadata(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.createTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeDocumentsMetadata.updateTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); - if (object.ignoredCount != null) - if ($util.Long) - (message.ignoredCount = $util.Long.fromValue(object.ignoredCount)).unsigned = false; - else if (typeof object.ignoredCount === "string") - message.ignoredCount = parseInt(object.ignoredCount, 10); - else if (typeof object.ignoredCount === "number") - message.ignoredCount = object.ignoredCount; - else if (typeof object.ignoredCount === "object") - message.ignoredCount = new $util.LongBits(object.ignoredCount.low >>> 0, object.ignoredCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static - * @param {google.cloud.discoveryengine.v1.PurgeDocumentsMetadata} message PurgeDocumentsMetadata + * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeDocumentsMetadata.toObject = function toObject(message, options) { + PurgeSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.createTime = null; object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ignoredCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ignoredCount = options.longs === String ? "0" : 0; } 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.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; - if (message.ignoredCount != null && message.hasOwnProperty("ignoredCount")) - if (typeof message.ignoredCount === "number") - object.ignoredCount = options.longs === String ? String(message.ignoredCount) : message.ignoredCount; - else - object.ignoredCount = options.longs === String ? $util.Long.prototype.toString.call(message.ignoredCount) : options.longs === Number ? new $util.LongBits(message.ignoredCount.low >>> 0, message.ignoredCount.high >>> 0).toNumber() : message.ignoredCount; return object; }; /** - * Converts this PurgeDocumentsMetadata to JSON. + * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @instance * @returns {Object.} JSON object */ - PurgeDocumentsMetadata.prototype.toJSON = function toJSON() { + PurgeSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeDocumentsMetadata + * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeDocumentsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata"; }; - return PurgeDocumentsMetadata; + return PurgeSuggestionDenyListEntriesMetadata; })(); - v1.PurgeSuggestionDenyListEntriesRequest = (function() { + v1.PurgeCompletionSuggestionsRequest = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesRequest. + * Properties of a PurgeCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesRequest - * @property {string|null} [parent] PurgeSuggestionDenyListEntriesRequest parent + * @interface IPurgeCompletionSuggestionsRequest + * @property {string|null} [parent] PurgeCompletionSuggestionsRequest parent */ /** - * Constructs a new PurgeSuggestionDenyListEntriesRequest. + * Constructs a new PurgeCompletionSuggestionsRequest. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesRequest. - * @implements IPurgeSuggestionDenyListEntriesRequest + * @classdesc Represents a PurgeCompletionSuggestionsRequest. + * @implements IPurgeCompletionSuggestionsRequest * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesRequest(properties) { + function PurgeCompletionSuggestionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18487,35 +22331,35 @@ } /** - * PurgeSuggestionDenyListEntriesRequest parent. + * PurgeCompletionSuggestionsRequest parent. * @member {string} parent - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @instance */ - PurgeSuggestionDenyListEntriesRequest.prototype.parent = ""; + PurgeCompletionSuggestionsRequest.prototype.parent = ""; /** - * Creates a new PurgeSuggestionDenyListEntriesRequest instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest instance */ - PurgeSuggestionDenyListEntriesRequest.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesRequest(properties); + PurgeCompletionSuggestionsRequest.create = function create(properties) { + return new PurgeCompletionSuggestionsRequest(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesRequest.encode = function encode(message, writer) { + PurgeCompletionSuggestionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -18524,33 +22368,33 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesRequest.decode = function decode(reader, length) { + PurgeCompletionSuggestionsRequest.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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -18567,30 +22411,30 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesRequest message. + * Verifies a PurgeCompletionSuggestionsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesRequest.verify = function verify(message) { + PurgeCompletionSuggestionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -18600,32 +22444,32 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} PurgeSuggestionDenyListEntriesRequest + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} PurgeCompletionSuggestionsRequest */ - PurgeSuggestionDenyListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest) + PurgeCompletionSuggestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest(); if (object.parent != null) message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest} message PurgeSuggestionDenyListEntriesRequest + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest} message PurgeCompletionSuggestionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesRequest.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -18637,53 +22481,53 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesRequest to JSON. + * Converts this PurgeCompletionSuggestionsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesRequest.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesRequest + * Gets the default type url for PurgeCompletionSuggestionsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest"; }; - return PurgeSuggestionDenyListEntriesRequest; + return PurgeCompletionSuggestionsRequest; })(); - v1.PurgeSuggestionDenyListEntriesResponse = (function() { + v1.PurgeCompletionSuggestionsResponse = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesResponse. + * Properties of a PurgeCompletionSuggestionsResponse. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesResponse - * @property {number|Long|null} [purgeCount] PurgeSuggestionDenyListEntriesResponse purgeCount - * @property {Array.|null} [errorSamples] PurgeSuggestionDenyListEntriesResponse errorSamples + * @interface IPurgeCompletionSuggestionsResponse + * @property {boolean|null} [purgeSucceeded] PurgeCompletionSuggestionsResponse purgeSucceeded + * @property {Array.|null} [errorSamples] PurgeCompletionSuggestionsResponse errorSamples */ /** - * Constructs a new PurgeSuggestionDenyListEntriesResponse. + * Constructs a new PurgeCompletionSuggestionsResponse. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesResponse. - * @implements IPurgeSuggestionDenyListEntriesResponse + * @classdesc Represents a PurgeCompletionSuggestionsResponse. + * @implements IPurgeCompletionSuggestionsResponse * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesResponse(properties) { + function PurgeCompletionSuggestionsResponse(properties) { this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -18692,47 +22536,47 @@ } /** - * PurgeSuggestionDenyListEntriesResponse purgeCount. - * @member {number|Long} purgeCount - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * PurgeCompletionSuggestionsResponse purgeSucceeded. + * @member {boolean} purgeSucceeded + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance */ - PurgeSuggestionDenyListEntriesResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PurgeCompletionSuggestionsResponse.prototype.purgeSucceeded = false; /** - * PurgeSuggestionDenyListEntriesResponse errorSamples. + * PurgeCompletionSuggestionsResponse errorSamples. * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance */ - PurgeSuggestionDenyListEntriesResponse.prototype.errorSamples = $util.emptyArray; + PurgeCompletionSuggestionsResponse.prototype.errorSamples = $util.emptyArray; /** - * Creates a new PurgeSuggestionDenyListEntriesResponse instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse instance */ - PurgeSuggestionDenyListEntriesResponse.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesResponse(properties); + PurgeCompletionSuggestionsResponse.create = function create(properties) { + return new PurgeCompletionSuggestionsResponse(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesResponse.encode = function encode(message, writer) { + PurgeCompletionSuggestionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); + if (message.purgeSucceeded != null && Object.hasOwnProperty.call(message, "purgeSucceeded")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.purgeSucceeded); if (message.errorSamples != null && message.errorSamples.length) for (var i = 0; i < message.errorSamples.length; ++i) $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); @@ -18740,38 +22584,38 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesResponse.decode = function decode(reader, length) { + PurgeCompletionSuggestionsResponse.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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.purgeCount = reader.int64(); + message.purgeSucceeded = reader.bool(); break; } case 2: { @@ -18789,35 +22633,35 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesResponse message. + * Verifies a PurgeCompletionSuggestionsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesResponse.verify = function verify(message) { + PurgeCompletionSuggestionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) - if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) - return "purgeCount: integer|Long expected"; + if (message.purgeSucceeded != null && message.hasOwnProperty("purgeSucceeded")) + if (typeof message.purgeSucceeded !== "boolean") + return "purgeSucceeded: boolean expected"; if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { if (!Array.isArray(message.errorSamples)) return "errorSamples: array expected"; @@ -18831,33 +22675,26 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} PurgeSuggestionDenyListEntriesResponse + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} PurgeCompletionSuggestionsResponse */ - PurgeSuggestionDenyListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse) + PurgeCompletionSuggestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse(); - if (object.purgeCount != null) - if ($util.Long) - (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; - else if (typeof object.purgeCount === "string") - message.purgeCount = parseInt(object.purgeCount, 10); - else if (typeof object.purgeCount === "number") - message.purgeCount = object.purgeCount; - else if (typeof object.purgeCount === "object") - message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse(); + if (object.purgeSucceeded != null) + message.purgeSucceeded = Boolean(object.purgeSucceeded); if (object.errorSamples) { if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: array expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.errorSamples: array expected"); message.errorSamples = []; for (var i = 0; i < object.errorSamples.length; ++i) { if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse.errorSamples: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse.errorSamples: object expected"); message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); } } @@ -18865,31 +22702,24 @@ }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse} message PurgeSuggestionDenyListEntriesResponse + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse} message PurgeCompletionSuggestionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesResponse.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.errorSamples = []; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.purgeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.purgeCount = options.longs === String ? "0" : 0; - if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) - if (typeof message.purgeCount === "number") - object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; - else - object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; + object.purgeSucceeded = false; + if (message.purgeSucceeded != null && message.hasOwnProperty("purgeSucceeded")) + object.purgeSucceeded = message.purgeSucceeded; if (message.errorSamples && message.errorSamples.length) { object.errorSamples = []; for (var j = 0; j < message.errorSamples.length; ++j) @@ -18899,53 +22729,53 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesResponse to JSON. + * Converts this PurgeCompletionSuggestionsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesResponse.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesResponse + * Gets the default type url for PurgeCompletionSuggestionsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse"; }; - return PurgeSuggestionDenyListEntriesResponse; + return PurgeCompletionSuggestionsResponse; })(); - v1.PurgeSuggestionDenyListEntriesMetadata = (function() { + v1.PurgeCompletionSuggestionsMetadata = (function() { /** - * Properties of a PurgeSuggestionDenyListEntriesMetadata. + * Properties of a PurgeCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @interface IPurgeSuggestionDenyListEntriesMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] PurgeSuggestionDenyListEntriesMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeSuggestionDenyListEntriesMetadata updateTime + * @interface IPurgeCompletionSuggestionsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeCompletionSuggestionsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeCompletionSuggestionsMetadata updateTime */ /** - * Constructs a new PurgeSuggestionDenyListEntriesMetadata. + * Constructs a new PurgeCompletionSuggestionsMetadata. * @memberof google.cloud.discoveryengine.v1 - * @classdesc Represents a PurgeSuggestionDenyListEntriesMetadata. - * @implements IPurgeSuggestionDenyListEntriesMetadata + * @classdesc Represents a PurgeCompletionSuggestionsMetadata. + * @implements IPurgeCompletionSuggestionsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata=} [properties] Properties to set */ - function PurgeSuggestionDenyListEntriesMetadata(properties) { + function PurgeCompletionSuggestionsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18953,43 +22783,43 @@ } /** - * PurgeSuggestionDenyListEntriesMetadata createTime. + * PurgeCompletionSuggestionsMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance */ - PurgeSuggestionDenyListEntriesMetadata.prototype.createTime = null; + PurgeCompletionSuggestionsMetadata.prototype.createTime = null; /** - * PurgeSuggestionDenyListEntriesMetadata updateTime. + * PurgeCompletionSuggestionsMetadata updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance */ - PurgeSuggestionDenyListEntriesMetadata.prototype.updateTime = null; + PurgeCompletionSuggestionsMetadata.prototype.updateTime = null; /** - * Creates a new PurgeSuggestionDenyListEntriesMetadata instance using the specified properties. + * Creates a new PurgeCompletionSuggestionsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata instance + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata instance */ - PurgeSuggestionDenyListEntriesMetadata.create = function create(properties) { - return new PurgeSuggestionDenyListEntriesMetadata(properties); + PurgeCompletionSuggestionsMetadata.create = function create(properties) { + return new PurgeCompletionSuggestionsMetadata(properties); }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesMetadata.encode = function encode(message, writer) { + PurgeCompletionSuggestionsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) @@ -19000,33 +22830,33 @@ }; /** - * Encodes the specified PurgeSuggestionDenyListEntriesMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.verify|verify} messages. + * Encodes the specified PurgeCompletionSuggestionsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.IPurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PurgeSuggestionDenyListEntriesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + PurgeCompletionSuggestionsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesMetadata.decode = function decode(reader, length) { + PurgeCompletionSuggestionsMetadata.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.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19047,30 +22877,30 @@ }; /** - * Decodes a PurgeSuggestionDenyListEntriesMetadata message from the specified reader or buffer, length delimited. + * Decodes a PurgeCompletionSuggestionsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PurgeSuggestionDenyListEntriesMetadata.decodeDelimited = function decodeDelimited(reader) { + PurgeCompletionSuggestionsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PurgeSuggestionDenyListEntriesMetadata message. + * Verifies a PurgeCompletionSuggestionsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PurgeSuggestionDenyListEntriesMetadata.verify = function verify(message) { + PurgeCompletionSuggestionsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -19087,40 +22917,40 @@ }; /** - * Creates a PurgeSuggestionDenyListEntriesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a PurgeCompletionSuggestionsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} PurgeSuggestionDenyListEntriesMetadata + * @returns {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} PurgeCompletionSuggestionsMetadata */ - PurgeSuggestionDenyListEntriesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata) + PurgeCompletionSuggestionsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata(); + var message = new $root.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.createTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata.updateTime: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Creates a plain object from a PurgeSuggestionDenyListEntriesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a PurgeCompletionSuggestionsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static - * @param {google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata} message PurgeSuggestionDenyListEntriesMetadata + * @param {google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata} message PurgeCompletionSuggestionsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PurgeSuggestionDenyListEntriesMetadata.toObject = function toObject(message, options) { + PurgeCompletionSuggestionsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -19136,32 +22966,32 @@ }; /** - * Converts this PurgeSuggestionDenyListEntriesMetadata to JSON. + * Converts this PurgeCompletionSuggestionsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @instance * @returns {Object.} JSON object */ - PurgeSuggestionDenyListEntriesMetadata.prototype.toJSON = function toJSON() { + PurgeCompletionSuggestionsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PurgeSuggestionDenyListEntriesMetadata + * Gets the default type url for PurgeCompletionSuggestionsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata + * @memberof google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PurgeSuggestionDenyListEntriesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PurgeCompletionSuggestionsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata"; }; - return PurgeSuggestionDenyListEntriesMetadata; + return PurgeCompletionSuggestionsMetadata; })(); v1.Condition = (function() { @@ -24459,6 +28289,7 @@ * @property {string|null} [canonicalFilter] SearchRequest canonicalFilter * @property {string|null} [orderBy] SearchRequest orderBy * @property {google.cloud.discoveryengine.v1.IUserInfo|null} [userInfo] SearchRequest userInfo + * @property {string|null} [languageCode] SearchRequest languageCode * @property {Array.|null} [facetSpecs] SearchRequest facetSpecs * @property {google.cloud.discoveryengine.v1.SearchRequest.IBoostSpec|null} [boostSpec] SearchRequest boostSpec * @property {Object.|null} [params] SearchRequest params @@ -24468,6 +28299,9 @@ * @property {google.cloud.discoveryengine.v1.SearchRequest.IContentSearchSpec|null} [contentSearchSpec] SearchRequest contentSearchSpec * @property {boolean|null} [safeSearch] SearchRequest safeSearch * @property {Object.|null} [userLabels] SearchRequest userLabels + * @property {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null} [searchAsYouTypeSpec] SearchRequest searchAsYouTypeSpec + * @property {string|null} [session] SearchRequest session + * @property {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null} [sessionSpec] SearchRequest sessionSpec */ /** @@ -24585,6 +28419,14 @@ */ SearchRequest.prototype.userInfo = null; + /** + * SearchRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.languageCode = ""; + /** * SearchRequest facetSpecs. * @member {Array.} facetSpecs @@ -24657,6 +28499,30 @@ */ SearchRequest.prototype.userLabels = $util.emptyObject; + /** + * SearchRequest searchAsYouTypeSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec|null|undefined} searchAsYouTypeSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.searchAsYouTypeSpec = null; + + /** + * SearchRequest session. + * @member {string} session + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.session = ""; + + /** + * SearchRequest sessionSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec|null|undefined} sessionSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @instance + */ + SearchRequest.prototype.sessionSpec = null; + /** * Creates a new SearchRequest instance using the specified properties. * @function create @@ -24726,9 +28592,17 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.encode(message.contentSearchSpec, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.canonicalFilter != null && Object.hasOwnProperty.call(message, "canonicalFilter")) writer.uint32(/* id 29, wireType 2 =*/234).string(message.canonicalFilter); + if (message.searchAsYouTypeSpec != null && Object.hasOwnProperty.call(message, "searchAsYouTypeSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.encode(message.searchAsYouTypeSpec, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.dataStoreSpecs != null && message.dataStoreSpecs.length) for (var i = 0; i < message.dataStoreSpecs.length; ++i) $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.encode(message.dataStoreSpecs[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 35, wireType 2 =*/282).string(message.languageCode); + if (message.session != null && Object.hasOwnProperty.call(message, "session")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.session); + if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.encode(message.sessionSpec, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); return writer; }; @@ -24813,6 +28687,10 @@ message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.decode(reader, reader.uint32()); break; } + case 35: { + message.languageCode = reader.string(); + break; + } case 9: { if (!(message.facetSpecs && message.facetSpecs.length)) message.facetSpecs = []; @@ -24889,6 +28767,18 @@ message.userLabels[key] = value; break; } + case 31: { + message.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.decode(reader, reader.uint32()); + break; + } + case 41: { + message.session = reader.string(); + break; + } + case 42: { + message.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24970,6 +28860,9 @@ if (error) return "userInfo." + error; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.facetSpecs != null && message.hasOwnProperty("facetSpecs")) { if (!Array.isArray(message.facetSpecs)) return "facetSpecs: array expected"; @@ -25023,6 +28916,19 @@ if (!$util.isString(message.userLabels[key[i]])) return "userLabels: string{k:string} expected"; } + if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify(message.searchAsYouTypeSpec); + if (error) + return "searchAsYouTypeSpec." + error; + } + if (message.session != null && message.hasOwnProperty("session")) + if (!$util.isString(message.session)) + return "session: string expected"; + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify(message.sessionSpec); + if (error) + return "sessionSpec." + error; + } return null; }; @@ -25076,6 +28982,8 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.userInfo: object expected"); message.userInfo = $root.google.cloud.discoveryengine.v1.UserInfo.fromObject(object.userInfo); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.facetSpecs) { if (!Array.isArray(object.facetSpecs)) throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.facetSpecs: array expected"); @@ -25127,6 +29035,18 @@ for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } + if (object.searchAsYouTypeSpec != null) { + if (typeof object.searchAsYouTypeSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.searchAsYouTypeSpec: object expected"); + message.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.fromObject(object.searchAsYouTypeSpec); + } + if (object.session != null) + message.session = String(object.session); + if (object.sessionSpec != null) { + if (typeof object.sessionSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.sessionSpec: object expected"); + message.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.fromObject(object.sessionSpec); + } return message; }; @@ -25169,6 +29089,10 @@ object.userInfo = null; object.contentSearchSpec = null; object.canonicalFilter = ""; + object.searchAsYouTypeSpec = null; + object.languageCode = ""; + object.session = ""; + object.sessionSpec = null; } if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) object.servingConfig = message.servingConfig; @@ -25220,11 +29144,19 @@ object.contentSearchSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.toObject(message.contentSearchSpec, options); if (message.canonicalFilter != null && message.hasOwnProperty("canonicalFilter")) object.canonicalFilter = message.canonicalFilter; + if (message.searchAsYouTypeSpec != null && message.hasOwnProperty("searchAsYouTypeSpec")) + object.searchAsYouTypeSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.toObject(message.searchAsYouTypeSpec, options); if (message.dataStoreSpecs && message.dataStoreSpecs.length) { object.dataStoreSpecs = []; for (var j = 0; j < message.dataStoreSpecs.length; ++j) object.dataStoreSpecs[j] = $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.toObject(message.dataStoreSpecs[j], options); } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) + object.sessionSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.toObject(message.sessionSpec, options); return object; }; @@ -27356,6 +31288,8 @@ * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ISnippetSpec|null} [snippetSpec] ContentSearchSpec snippetSpec * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ISummarySpec|null} [summarySpec] ContentSearchSpec summarySpec * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec|null} [extractiveContentSpec] ContentSearchSpec extractiveContentSpec + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null} [searchResultMode] ContentSearchSpec searchResultMode + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null} [chunkSpec] ContentSearchSpec chunkSpec */ /** @@ -27397,6 +31331,22 @@ */ ContentSearchSpec.prototype.extractiveContentSpec = null; + /** + * ContentSearchSpec searchResultMode. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode} searchResultMode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.searchResultMode = 0; + + /** + * ContentSearchSpec chunkSpec. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec|null|undefined} chunkSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.chunkSpec = null; + /** * Creates a new ContentSearchSpec instance using the specified properties. * @function create @@ -27427,6 +31377,10 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.encode(message.summarySpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.extractiveContentSpec != null && Object.hasOwnProperty.call(message, "extractiveContentSpec")) $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.encode(message.extractiveContentSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.searchResultMode != null && Object.hasOwnProperty.call(message, "searchResultMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.searchResultMode); + if (message.chunkSpec != null && Object.hasOwnProperty.call(message, "chunkSpec")) + $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.encode(message.chunkSpec, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -27473,6 +31427,14 @@ message.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.decode(reader, reader.uint32()); break; } + case 4: { + message.searchResultMode = reader.int32(); + break; + } + case 5: { + message.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27523,6 +31485,20 @@ if (error) return "extractiveContentSpec." + error; } + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + switch (message.searchResultMode) { + default: + return "searchResultMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.chunkSpec != null && message.hasOwnProperty("chunkSpec")) { + var error = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify(message.chunkSpec); + if (error) + return "chunkSpec." + error; + } return null; }; @@ -27553,6 +31529,31 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.extractiveContentSpec: object expected"); message.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.fromObject(object.extractiveContentSpec); } + switch (object.searchResultMode) { + default: + if (typeof object.searchResultMode === "number") { + message.searchResultMode = object.searchResultMode; + break; + } + break; + case "SEARCH_RESULT_MODE_UNSPECIFIED": + case 0: + message.searchResultMode = 0; + break; + case "DOCUMENTS": + case 1: + message.searchResultMode = 1; + break; + case "CHUNKS": + case 2: + message.searchResultMode = 2; + break; + } + if (object.chunkSpec != null) { + if (typeof object.chunkSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.chunkSpec: object expected"); + message.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.fromObject(object.chunkSpec); + } return message; }; @@ -27573,6 +31574,8 @@ object.snippetSpec = null; object.summarySpec = null; object.extractiveContentSpec = null; + object.searchResultMode = options.enums === String ? "SEARCH_RESULT_MODE_UNSPECIFIED" : 0; + object.chunkSpec = null; } if (message.snippetSpec != null && message.hasOwnProperty("snippetSpec")) object.snippetSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SnippetSpec.toObject(message.snippetSpec, options); @@ -27580,6 +31583,10 @@ object.summarySpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.toObject(message.summarySpec, options); if (message.extractiveContentSpec != null && message.hasOwnProperty("extractiveContentSpec")) object.extractiveContentSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.toObject(message.extractiveContentSpec, options); + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + object.searchResultMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] === undefined ? message.searchResultMode : $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] : message.searchResultMode; + if (message.chunkSpec != null && message.hasOwnProperty("chunkSpec")) + object.chunkSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.toObject(message.chunkSpec, options); return object; }; @@ -28746,54 +32753,305 @@ }; /** - * Encodes the specified ExtractiveContentSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.verify|verify} messages. + * Encodes the specified ExtractiveContentSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec} message ExtractiveContentSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtractiveContentSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtractiveContentSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtractiveContentSpec.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.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxExtractiveAnswerCount = reader.int32(); + break; + } + case 2: { + message.maxExtractiveSegmentCount = reader.int32(); + break; + } + case 3: { + message.returnExtractiveSegmentScore = reader.bool(); + break; + } + case 4: { + message.numPreviousSegments = reader.int32(); + break; + } + case 5: { + message.numNextSegments = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtractiveContentSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtractiveContentSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtractiveContentSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtractiveContentSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) + if (!$util.isInteger(message.maxExtractiveAnswerCount)) + return "maxExtractiveAnswerCount: integer expected"; + if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) + if (!$util.isInteger(message.maxExtractiveSegmentCount)) + return "maxExtractiveSegmentCount: integer expected"; + if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) + if (typeof message.returnExtractiveSegmentScore !== "boolean") + return "returnExtractiveSegmentScore: boolean expected"; + if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) + if (!$util.isInteger(message.numPreviousSegments)) + return "numPreviousSegments: integer expected"; + if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) + if (!$util.isInteger(message.numNextSegments)) + return "numNextSegments: integer expected"; + return null; + }; + + /** + * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + */ + ExtractiveContentSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + if (object.maxExtractiveAnswerCount != null) + message.maxExtractiveAnswerCount = object.maxExtractiveAnswerCount | 0; + if (object.maxExtractiveSegmentCount != null) + message.maxExtractiveSegmentCount = object.maxExtractiveSegmentCount | 0; + if (object.returnExtractiveSegmentScore != null) + message.returnExtractiveSegmentScore = Boolean(object.returnExtractiveSegmentScore); + if (object.numPreviousSegments != null) + message.numPreviousSegments = object.numPreviousSegments | 0; + if (object.numNextSegments != null) + message.numNextSegments = object.numNextSegments | 0; + return message; + }; + + /** + * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} message ExtractiveContentSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtractiveContentSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxExtractiveAnswerCount = 0; + object.maxExtractiveSegmentCount = 0; + object.returnExtractiveSegmentScore = false; + object.numPreviousSegments = 0; + object.numNextSegments = 0; + } + if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) + object.maxExtractiveAnswerCount = message.maxExtractiveAnswerCount; + if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) + object.maxExtractiveSegmentCount = message.maxExtractiveSegmentCount; + if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) + object.returnExtractiveSegmentScore = message.returnExtractiveSegmentScore; + if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) + object.numPreviousSegments = message.numPreviousSegments; + if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) + object.numNextSegments = message.numNextSegments; + return object; + }; + + /** + * Converts this ExtractiveContentSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @instance + * @returns {Object.} JSON object + */ + ExtractiveContentSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtractiveContentSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtractiveContentSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"; + }; + + return ExtractiveContentSpec; + })(); + + ContentSearchSpec.ChunkSpec = (function() { + + /** + * Properties of a ChunkSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @interface IChunkSpec + * @property {number|null} [numPreviousChunks] ChunkSpec numPreviousChunks + * @property {number|null} [numNextChunks] ChunkSpec numNextChunks + */ + + /** + * Constructs a new ChunkSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec + * @classdesc Represents a ChunkSpec. + * @implements IChunkSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec=} [properties] Properties to set + */ + function ChunkSpec(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]]; + } + + /** + * ChunkSpec numPreviousChunks. + * @member {number} numPreviousChunks + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @instance + */ + ChunkSpec.prototype.numPreviousChunks = 0; + + /** + * ChunkSpec numNextChunks. + * @member {number} numNextChunks + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @instance + */ + ChunkSpec.prototype.numNextChunks = 0; + + /** + * Creates a new ChunkSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec instance + */ + ChunkSpec.create = function create(properties) { + return new ChunkSpec(properties); + }; + + /** + * Encodes the specified ChunkSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec} message ChunkSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numPreviousChunks != null && Object.hasOwnProperty.call(message, "numPreviousChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numPreviousChunks); + if (message.numNextChunks != null && Object.hasOwnProperty.call(message, "numNextChunks")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numNextChunks); + return writer; + }; + + /** + * Encodes the specified ChunkSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static - * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IExtractiveContentSpec} message ExtractiveContentSpec message or plain object to encode + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.IChunkSpec} message ChunkSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtractiveContentSpec.encodeDelimited = function encodeDelimited(message, writer) { + ChunkSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtractiveContentSpec message from the specified reader or buffer. + * Decodes a ChunkSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtractiveContentSpec.decode = function decode(reader, length) { + ChunkSpec.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.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.maxExtractiveAnswerCount = reader.int32(); + message.numPreviousChunks = reader.int32(); break; } case 2: { - message.maxExtractiveSegmentCount = reader.int32(); - break; - } - case 3: { - message.returnExtractiveSegmentScore = reader.bool(); - break; - } - case 4: { - message.numPreviousSegments = reader.int32(); - break; - } - case 5: { - message.numNextSegments = reader.int32(); + message.numNextChunks = reader.int32(); break; } default: @@ -28805,140 +33063,620 @@ }; /** - * Decodes an ExtractiveContentSpec message from the specified reader or buffer, length delimited. + * Decodes a ChunkSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtractiveContentSpec.decodeDelimited = function decodeDelimited(reader) { + ChunkSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtractiveContentSpec message. + * Verifies a ChunkSpec message. * @function verify - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtractiveContentSpec.verify = function verify(message) { + ChunkSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) - if (!$util.isInteger(message.maxExtractiveAnswerCount)) - return "maxExtractiveAnswerCount: integer expected"; - if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) - if (!$util.isInteger(message.maxExtractiveSegmentCount)) - return "maxExtractiveSegmentCount: integer expected"; - if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) - if (typeof message.returnExtractiveSegmentScore !== "boolean") - return "returnExtractiveSegmentScore: boolean expected"; - if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) - if (!$util.isInteger(message.numPreviousSegments)) - return "numPreviousSegments: integer expected"; - if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) - if (!$util.isInteger(message.numNextSegments)) - return "numNextSegments: integer expected"; + if (message.numPreviousChunks != null && message.hasOwnProperty("numPreviousChunks")) + if (!$util.isInteger(message.numPreviousChunks)) + return "numPreviousChunks: integer expected"; + if (message.numNextChunks != null && message.hasOwnProperty("numNextChunks")) + if (!$util.isInteger(message.numNextChunks)) + return "numNextChunks: integer expected"; return null; }; /** - * Creates an ExtractiveContentSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ChunkSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} ExtractiveContentSpec + * @returns {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} ChunkSpec */ - ExtractiveContentSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + ChunkSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec) return object; - var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec(); - if (object.maxExtractiveAnswerCount != null) - message.maxExtractiveAnswerCount = object.maxExtractiveAnswerCount | 0; - if (object.maxExtractiveSegmentCount != null) - message.maxExtractiveSegmentCount = object.maxExtractiveSegmentCount | 0; - if (object.returnExtractiveSegmentScore != null) - message.returnExtractiveSegmentScore = Boolean(object.returnExtractiveSegmentScore); - if (object.numPreviousSegments != null) - message.numPreviousSegments = object.numPreviousSegments | 0; - if (object.numNextSegments != null) - message.numNextSegments = object.numNextSegments | 0; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec(); + if (object.numPreviousChunks != null) + message.numPreviousChunks = object.numPreviousChunks | 0; + if (object.numNextChunks != null) + message.numNextChunks = object.numNextChunks | 0; return message; }; /** - * Creates a plain object from an ExtractiveContentSpec message. Also converts values to other types if specified. + * Creates a plain object from a ChunkSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static - * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} message ExtractiveContentSpec + * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec} message ChunkSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtractiveContentSpec.toObject = function toObject(message, options) { + ChunkSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.maxExtractiveAnswerCount = 0; - object.maxExtractiveSegmentCount = 0; - object.returnExtractiveSegmentScore = false; - object.numPreviousSegments = 0; - object.numNextSegments = 0; + object.numPreviousChunks = 0; + object.numNextChunks = 0; } - if (message.maxExtractiveAnswerCount != null && message.hasOwnProperty("maxExtractiveAnswerCount")) - object.maxExtractiveAnswerCount = message.maxExtractiveAnswerCount; - if (message.maxExtractiveSegmentCount != null && message.hasOwnProperty("maxExtractiveSegmentCount")) - object.maxExtractiveSegmentCount = message.maxExtractiveSegmentCount; - if (message.returnExtractiveSegmentScore != null && message.hasOwnProperty("returnExtractiveSegmentScore")) - object.returnExtractiveSegmentScore = message.returnExtractiveSegmentScore; - if (message.numPreviousSegments != null && message.hasOwnProperty("numPreviousSegments")) - object.numPreviousSegments = message.numPreviousSegments; - if (message.numNextSegments != null && message.hasOwnProperty("numNextSegments")) - object.numNextSegments = message.numNextSegments; + if (message.numPreviousChunks != null && message.hasOwnProperty("numPreviousChunks")) + object.numPreviousChunks = message.numPreviousChunks; + if (message.numNextChunks != null && message.hasOwnProperty("numNextChunks")) + object.numNextChunks = message.numNextChunks; return object; }; /** - * Converts this ExtractiveContentSpec to JSON. + * Converts this ChunkSpec to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @instance * @returns {Object.} JSON object */ - ExtractiveContentSpec.prototype.toJSON = function toJSON() { + ChunkSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExtractiveContentSpec + * Gets the default type url for ChunkSpec * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + * @memberof google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExtractiveContentSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChunkSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec"; }; - return ExtractiveContentSpec; + return ChunkSpec; + })(); + + /** + * SearchResultMode enum. + * @name google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode + * @enum {number} + * @property {number} SEARCH_RESULT_MODE_UNSPECIFIED=0 SEARCH_RESULT_MODE_UNSPECIFIED value + * @property {number} DOCUMENTS=1 DOCUMENTS value + * @property {number} CHUNKS=2 CHUNKS value + */ + ContentSearchSpec.SearchResultMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_RESULT_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOCUMENTS"] = 1; + values[valuesById[2] = "CHUNKS"] = 2; + return values; })(); return ContentSearchSpec; })(); + SearchRequest.SearchAsYouTypeSpec = (function() { + + /** + * Properties of a SearchAsYouTypeSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @interface ISearchAsYouTypeSpec + * @property {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition|null} [condition] SearchAsYouTypeSpec condition + */ + + /** + * Constructs a new SearchAsYouTypeSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @classdesc Represents a SearchAsYouTypeSpec. + * @implements ISearchAsYouTypeSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec=} [properties] Properties to set + */ + function SearchAsYouTypeSpec(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]]; + } + + /** + * SearchAsYouTypeSpec condition. + * @member {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition} condition + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @instance + */ + SearchAsYouTypeSpec.prototype.condition = 0; + + /** + * Creates a new SearchAsYouTypeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec instance + */ + SearchAsYouTypeSpec.create = function create(properties) { + return new SearchAsYouTypeSpec(properties); + }; + + /** + * Encodes the specified SearchAsYouTypeSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec} message SearchAsYouTypeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchAsYouTypeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.condition); + return writer; + }; + + /** + * Encodes the specified SearchAsYouTypeSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISearchAsYouTypeSpec} message SearchAsYouTypeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchAsYouTypeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchAsYouTypeSpec.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.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchAsYouTypeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchAsYouTypeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchAsYouTypeSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchAsYouTypeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + switch (message.condition) { + default: + return "condition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SearchAsYouTypeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} SearchAsYouTypeSpec + */ + SearchAsYouTypeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec(); + switch (object.condition) { + default: + if (typeof object.condition === "number") { + message.condition = object.condition; + break; + } + break; + case "CONDITION_UNSPECIFIED": + case 0: + message.condition = 0; + break; + case "DISABLED": + case 1: + message.condition = 1; + break; + case "ENABLED": + case 2: + message.condition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SearchAsYouTypeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} message SearchAsYouTypeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchAsYouTypeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = options.enums === String ? "CONDITION_UNSPECIFIED" : 0; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition[message.condition] === undefined ? message.condition : $root.google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition[message.condition] : message.condition; + return object; + }; + + /** + * Converts this SearchAsYouTypeSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @instance + * @returns {Object.} JSON object + */ + SearchAsYouTypeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchAsYouTypeSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchAsYouTypeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec"; + }; + + /** + * Condition enum. + * @name google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec.Condition + * @enum {number} + * @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + SearchAsYouTypeSpec.Condition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + return SearchAsYouTypeSpec; + })(); + + SearchRequest.SessionSpec = (function() { + + /** + * Properties of a SessionSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @interface ISessionSpec + * @property {string|null} [queryId] SessionSpec queryId + * @property {number|null} [searchResultPersistenceCount] SessionSpec searchResultPersistenceCount + */ + + /** + * Constructs a new SessionSpec. + * @memberof google.cloud.discoveryengine.v1.SearchRequest + * @classdesc Represents a SessionSpec. + * @implements ISessionSpec + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec=} [properties] Properties to set + */ + function SessionSpec(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]]; + } + + /** + * SessionSpec queryId. + * @member {string} queryId + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + SessionSpec.prototype.queryId = ""; + + /** + * SessionSpec searchResultPersistenceCount. + * @member {number|null|undefined} searchResultPersistenceCount + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + SessionSpec.prototype.searchResultPersistenceCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionSpec _searchResultPersistenceCount. + * @member {"searchResultPersistenceCount"|undefined} _searchResultPersistenceCount + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + */ + Object.defineProperty(SessionSpec.prototype, "_searchResultPersistenceCount", { + get: $util.oneOfGetter($oneOfFields = ["searchResultPersistenceCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec instance + */ + SessionSpec.create = function create(properties) { + return new SessionSpec(properties); + }; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.searchResultPersistenceCount != null && Object.hasOwnProperty.call(message, "searchResultPersistenceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.searchResultPersistenceCount); + return writer; + }; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchRequest.SessionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.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.cloud.discoveryengine.v1.SearchRequest.SessionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.searchResultPersistenceCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.searchResultPersistenceCount != null && message.hasOwnProperty("searchResultPersistenceCount")) { + properties._searchResultPersistenceCount = 1; + if (!$util.isInteger(message.searchResultPersistenceCount)) + return "searchResultPersistenceCount: integer expected"; + } + return null; + }; + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} SessionSpec + */ + SessionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchRequest.SessionSpec(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.searchResultPersistenceCount != null) + message.searchResultPersistenceCount = object.searchResultPersistenceCount | 0; + return message; + }; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} message SessionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.queryId = ""; + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.searchResultPersistenceCount != null && message.hasOwnProperty("searchResultPersistenceCount")) { + object.searchResultPersistenceCount = message.searchResultPersistenceCount; + if (options.oneofs) + object._searchResultPersistenceCount = "searchResultPersistenceCount"; + } + return object; + }; + + /** + * Converts this SessionSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @instance + * @returns {Object.} JSON object + */ + SessionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchRequest.SessionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchRequest.SessionSpec"; + }; + + return SessionSpec; + })(); + return SearchRequest; })(); @@ -28957,6 +33695,7 @@ * @property {string|null} [correctedQuery] SearchResponse correctedQuery * @property {google.cloud.discoveryengine.v1.SearchResponse.ISummary|null} [summary] SearchResponse summary * @property {google.cloud.discoveryengine.v1.SearchResponse.IQueryExpansionInfo|null} [queryExpansionInfo] SearchResponse queryExpansionInfo + * @property {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null} [sessionInfo] SearchResponse sessionInfo */ /** @@ -29048,6 +33787,14 @@ */ SearchResponse.prototype.queryExpansionInfo = null; + /** + * SearchResponse sessionInfo. + * @member {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo|null|undefined} sessionInfo + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @instance + */ + SearchResponse.prototype.sessionInfo = null; + /** * Creates a new SearchResponse instance using the specified properties. * @function create @@ -29092,6 +33839,8 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.redirectUri); if (message.queryExpansionInfo != null && Object.hasOwnProperty.call(message, "queryExpansionInfo")) $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.encode(message.queryExpansionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sessionInfo != null && Object.hasOwnProperty.call(message, "sessionInfo")) + $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.encode(message.sessionInfo, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -29166,6 +33915,10 @@ message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.decode(reader, reader.uint32()); break; } + case 19: { + message.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29244,6 +33997,11 @@ if (error) return "queryExpansionInfo." + error; } + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) { + var error = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify(message.sessionInfo); + if (error) + return "sessionInfo." + error; + } return null; }; @@ -29299,6 +34057,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.queryExpansionInfo: object expected"); message.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.fromObject(object.queryExpansionInfo); } + if (object.sessionInfo != null) { + if (typeof object.sessionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.sessionInfo: object expected"); + message.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.fromObject(object.sessionInfo); + } return message; }; @@ -29327,6 +34090,7 @@ object.summary = null; object.redirectUri = ""; object.queryExpansionInfo = null; + object.sessionInfo = null; } if (message.results && message.results.length) { object.results = []; @@ -29352,6 +34116,8 @@ object.redirectUri = message.redirectUri; if (message.queryExpansionInfo != null && message.hasOwnProperty("queryExpansionInfo")) object.queryExpansionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.QueryExpansionInfo.toObject(message.queryExpansionInfo, options); + if (message.sessionInfo != null && message.hasOwnProperty("sessionInfo")) + object.sessionInfo = $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.toObject(message.sessionInfo, options); return object; }; @@ -29389,6 +34155,7 @@ * @interface ISearchResult * @property {string|null} [id] SearchResult id * @property {google.cloud.discoveryengine.v1.IDocument|null} [document] SearchResult document + * @property {google.cloud.discoveryengine.v1.IChunk|null} [chunk] SearchResult chunk */ /** @@ -29422,6 +34189,14 @@ */ SearchResult.prototype.document = null; + /** + * SearchResult chunk. + * @member {google.cloud.discoveryengine.v1.IChunk|null|undefined} chunk + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SearchResult + * @instance + */ + SearchResult.prototype.chunk = null; + /** * Creates a new SearchResult instance using the specified properties. * @function create @@ -29450,6 +34225,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.document != null && Object.hasOwnProperty.call(message, "document")) $root.google.cloud.discoveryengine.v1.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + $root.google.cloud.discoveryengine.v1.Chunk.encode(message.chunk, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -29492,6 +34269,10 @@ message.document = $root.google.cloud.discoveryengine.v1.Document.decode(reader, reader.uint32()); break; } + case 18: { + message.chunk = $root.google.cloud.discoveryengine.v1.Chunk.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29535,6 +34316,11 @@ if (error) return "document." + error; } + if (message.chunk != null && message.hasOwnProperty("chunk")) { + var error = $root.google.cloud.discoveryengine.v1.Chunk.verify(message.chunk); + if (error) + return "chunk." + error; + } return null; }; @@ -29557,6 +34343,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.SearchResult.document: object expected"); message.document = $root.google.cloud.discoveryengine.v1.Document.fromObject(object.document); } + if (object.chunk != null) { + if (typeof object.chunk !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.SearchResponse.SearchResult.chunk: object expected"); + message.chunk = $root.google.cloud.discoveryengine.v1.Chunk.fromObject(object.chunk); + } return message; }; @@ -29576,11 +34367,14 @@ if (options.defaults) { object.id = ""; object.document = null; + object.chunk = null; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.document != null && message.hasOwnProperty("document")) object.document = $root.google.cloud.discoveryengine.v1.Document.toObject(message.document, options); + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = $root.google.cloud.discoveryengine.v1.Chunk.toObject(message.chunk, options); return object; }; @@ -32596,6 +37390,233 @@ return QueryExpansionInfo; })(); + SearchResponse.SessionInfo = (function() { + + /** + * Properties of a SessionInfo. + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @interface ISessionInfo + * @property {string|null} [name] SessionInfo name + * @property {string|null} [queryId] SessionInfo queryId + */ + + /** + * Constructs a new SessionInfo. + * @memberof google.cloud.discoveryengine.v1.SearchResponse + * @classdesc Represents a SessionInfo. + * @implements ISessionInfo + * @constructor + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo=} [properties] Properties to set + */ + function SessionInfo(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]]; + } + + /** + * SessionInfo name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + */ + SessionInfo.prototype.name = ""; + + /** + * SessionInfo queryId. + * @member {string} queryId + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + */ + SessionInfo.prototype.queryId = ""; + + /** + * Creates a new SessionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo instance + */ + SessionInfo.create = function create(properties) { + return new SessionInfo(properties); + }; + + /** + * Encodes the specified SessionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.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.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryId); + return writer; + }; + + /** + * Encodes the specified SessionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.SearchResponse.SessionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.ISessionInfo} message SessionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.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.cloud.discoveryengine.v1.SearchResponse.SessionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.queryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionInfo.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.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + return null; + }; + + /** + * Creates a SessionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} SessionInfo + */ + SessionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1.SearchResponse.SessionInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.queryId != null) + message.queryId = String(object.queryId); + return message; + }; + + /** + * Creates a plain object from a SessionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {google.cloud.discoveryengine.v1.SearchResponse.SessionInfo} message SessionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.queryId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + return object; + }; + + /** + * Converts this SessionInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @instance + * @returns {Object.} JSON object + */ + SessionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.SearchResponse.SessionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.SearchResponse.SessionInfo"; + }; + + return SessionInfo; + })(); + return SearchResponse; })(); @@ -35224,6 +40245,7 @@ * @property {google.cloud.discoveryengine.v1.AnswerQueryRequest.IQueryUnderstandingSpec|null} [queryUnderstandingSpec] AnswerQueryRequest queryUnderstandingSpec * @property {boolean|null} [asynchronousMode] AnswerQueryRequest asynchronousMode * @property {string|null} [userPseudoId] AnswerQueryRequest userPseudoId + * @property {Object.|null} [userLabels] AnswerQueryRequest userLabels */ /** @@ -35235,6 +40257,7 @@ * @param {google.cloud.discoveryengine.v1.IAnswerQueryRequest=} [properties] Properties to set */ function AnswerQueryRequest(properties) { + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35321,6 +40344,14 @@ */ AnswerQueryRequest.prototype.userPseudoId = ""; + /** + * AnswerQueryRequest userLabels. + * @member {Object.} userLabels + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest + * @instance + */ + AnswerQueryRequest.prototype.userLabels = $util.emptyObject; + /** * Creates a new AnswerQueryRequest instance using the specified properties. * @function create @@ -35365,6 +40396,9 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.asynchronousMode); if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.userPseudoId); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); return writer; }; @@ -35395,7 +40429,7 @@ AnswerQueryRequest.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.cloud.discoveryengine.v1.AnswerQueryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1.AnswerQueryRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -35439,6 +40473,29 @@ message.userPseudoId = reader.string(); break; } + case 13: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.userLabels[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -35516,6 +40573,14 @@ if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) if (!$util.isString(message.userPseudoId)) return "userPseudoId: string expected"; + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } return null; }; @@ -35569,6 +40634,13 @@ message.asynchronousMode = Boolean(object.asynchronousMode); if (object.userPseudoId != null) message.userPseudoId = String(object.userPseudoId); + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.AnswerQueryRequest.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } return message; }; @@ -35585,6 +40657,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.userLabels = {}; if (options.defaults) { object.servingConfig = ""; object.query = null; @@ -35617,6 +40691,12 @@ object.asynchronousMode = message.asynchronousMode; if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) object.userPseudoId = message.userPseudoId; + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } return object; }; @@ -37098,6 +42178,7 @@ * @property {string|null} [filter] SearchParams filter * @property {google.cloud.discoveryengine.v1.SearchRequest.IBoostSpec|null} [boostSpec] SearchParams boostSpec * @property {string|null} [orderBy] SearchParams orderBy + * @property {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode|null} [searchResultMode] SearchParams searchResultMode * @property {Array.|null} [dataStoreSpecs] SearchParams dataStoreSpecs */ @@ -37149,6 +42230,14 @@ */ SearchParams.prototype.orderBy = ""; + /** + * SearchParams searchResultMode. + * @member {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode} searchResultMode + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams + * @instance + */ + SearchParams.prototype.searchResultMode = 0; + /** * SearchParams dataStoreSpecs. * @member {Array.} dataStoreSpecs @@ -37189,6 +42278,8 @@ $root.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.encode(message.boostSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.searchResultMode != null && Object.hasOwnProperty.call(message, "searchResultMode")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.searchResultMode); if (message.dataStoreSpecs != null && message.dataStoreSpecs.length) for (var i = 0; i < message.dataStoreSpecs.length; ++i) $root.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.encode(message.dataStoreSpecs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); @@ -37242,6 +42333,10 @@ message.orderBy = reader.string(); break; } + case 5: { + message.searchResultMode = reader.int32(); + break; + } case 7: { if (!(message.dataStoreSpecs && message.dataStoreSpecs.length)) message.dataStoreSpecs = []; @@ -37297,6 +42392,15 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + switch (message.searchResultMode) { + default: + return "searchResultMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.dataStoreSpecs != null && message.hasOwnProperty("dataStoreSpecs")) { if (!Array.isArray(message.dataStoreSpecs)) return "dataStoreSpecs: array expected"; @@ -37332,6 +42436,26 @@ } if (object.orderBy != null) message.orderBy = String(object.orderBy); + switch (object.searchResultMode) { + default: + if (typeof object.searchResultMode === "number") { + message.searchResultMode = object.searchResultMode; + break; + } + break; + case "SEARCH_RESULT_MODE_UNSPECIFIED": + case 0: + message.searchResultMode = 0; + break; + case "DOCUMENTS": + case 1: + message.searchResultMode = 1; + break; + case "CHUNKS": + case 2: + message.searchResultMode = 2; + break; + } if (object.dataStoreSpecs) { if (!Array.isArray(object.dataStoreSpecs)) throw TypeError(".google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchParams.dataStoreSpecs: array expected"); @@ -37365,6 +42489,7 @@ object.filter = ""; object.boostSpec = null; object.orderBy = ""; + object.searchResultMode = options.enums === String ? "SEARCH_RESULT_MODE_UNSPECIFIED" : 0; } if (message.maxReturnResults != null && message.hasOwnProperty("maxReturnResults")) object.maxReturnResults = message.maxReturnResults; @@ -37374,6 +42499,8 @@ object.boostSpec = $root.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec.toObject(message.boostSpec, options); if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; + if (message.searchResultMode != null && message.hasOwnProperty("searchResultMode")) + object.searchResultMode = options.enums === String ? $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] === undefined ? message.searchResultMode : $root.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode[message.searchResultMode] : message.searchResultMode; if (message.dataStoreSpecs && message.dataStoreSpecs.length) { object.dataStoreSpecs = []; for (var j = 0; j < message.dataStoreSpecs.length; ++j) @@ -39700,6 +44827,7 @@ * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec * @interface IQueryRephraserSpec * @property {boolean|null} [disable] QueryRephraserSpec disable + * @property {number|null} [maxRephraseSteps] QueryRephraserSpec maxRephraseSteps */ /** @@ -39725,6 +44853,14 @@ */ QueryRephraserSpec.prototype.disable = false; + /** + * QueryRephraserSpec maxRephraseSteps. + * @member {number} maxRephraseSteps + * @memberof google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec + * @instance + */ + QueryRephraserSpec.prototype.maxRephraseSteps = 0; + /** * Creates a new QueryRephraserSpec instance using the specified properties. * @function create @@ -39751,6 +44887,8 @@ writer = $Writer.create(); if (message.disable != null && Object.hasOwnProperty.call(message, "disable")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.disable); + if (message.maxRephraseSteps != null && Object.hasOwnProperty.call(message, "maxRephraseSteps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxRephraseSteps); return writer; }; @@ -39789,6 +44927,10 @@ message.disable = reader.bool(); break; } + case 2: { + message.maxRephraseSteps = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -39827,6 +44969,9 @@ if (message.disable != null && message.hasOwnProperty("disable")) if (typeof message.disable !== "boolean") return "disable: boolean expected"; + if (message.maxRephraseSteps != null && message.hasOwnProperty("maxRephraseSteps")) + if (!$util.isInteger(message.maxRephraseSteps)) + return "maxRephraseSteps: integer expected"; return null; }; @@ -39844,6 +44989,8 @@ var message = new $root.google.cloud.discoveryengine.v1.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec(); if (object.disable != null) message.disable = Boolean(object.disable); + if (object.maxRephraseSteps != null) + message.maxRephraseSteps = object.maxRephraseSteps | 0; return message; }; @@ -39860,10 +45007,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.disable = false; + object.maxRephraseSteps = 0; + } if (message.disable != null && message.hasOwnProperty("disable")) object.disable = message.disable; + if (message.maxRephraseSteps != null && message.hasOwnProperty("maxRephraseSteps")) + object.maxRephraseSteps = message.maxRephraseSteps; return object; }; @@ -43190,6 +48341,7 @@ * @memberof google.cloud.discoveryengine.v1 * @interface IDocumentProcessingConfig * @property {string|null} [name] DocumentProcessingConfig name + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null} [chunkingConfig] DocumentProcessingConfig chunkingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null} [defaultParsingConfig] DocumentProcessingConfig defaultParsingConfig * @property {Object.|null} [parsingConfigOverrides] DocumentProcessingConfig parsingConfigOverrides */ @@ -43218,6 +48370,14 @@ */ DocumentProcessingConfig.prototype.name = ""; + /** + * DocumentProcessingConfig chunkingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig|null|undefined} chunkingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @instance + */ + DocumentProcessingConfig.prototype.chunkingConfig = null; + /** * DocumentProcessingConfig defaultParsingConfig. * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IParsingConfig|null|undefined} defaultParsingConfig @@ -43260,6 +48420,8 @@ writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.chunkingConfig != null && Object.hasOwnProperty.call(message, "chunkingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.encode(message.chunkingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.defaultParsingConfig != null && Object.hasOwnProperty.call(message, "defaultParsingConfig")) $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.encode(message.defaultParsingConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.parsingConfigOverrides != null && Object.hasOwnProperty.call(message, "parsingConfigOverrides")) @@ -43270,213 +48432,684 @@ return writer; }; - /** - * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {google.cloud.discoveryengine.v1.IDocumentProcessingConfig} message DocumentProcessingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentProcessingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DocumentProcessingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {google.cloud.discoveryengine.v1.IDocumentProcessingConfig} message DocumentProcessingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentProcessingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentProcessingConfig.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.cloud.discoveryengine.v1.DocumentProcessingConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.parsingConfigOverrides === $util.emptyObject) + message.parsingConfigOverrides = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parsingConfigOverrides[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentProcessingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentProcessingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentProcessingConfig.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.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify(message.chunkingConfig); + if (error) + return "chunkingConfig." + error; + } + if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.defaultParsingConfig); + if (error) + return "defaultParsingConfig." + error; + } + if (message.parsingConfigOverrides != null && message.hasOwnProperty("parsingConfigOverrides")) { + if (!$util.isObject(message.parsingConfigOverrides)) + return "parsingConfigOverrides: object expected"; + var key = Object.keys(message.parsingConfigOverrides); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.parsingConfigOverrides[key[i]]); + if (error) + return "parsingConfigOverrides." + error; + } + } + return null; + }; + + /** + * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig + */ + DocumentProcessingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.chunkingConfig != null) { + if (typeof object.chunkingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.chunkingConfig: object expected"); + message.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.fromObject(object.chunkingConfig); + } + if (object.defaultParsingConfig != null) { + if (typeof object.defaultParsingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.defaultParsingConfig: object expected"); + message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.defaultParsingConfig); + } + if (object.parsingConfigOverrides) { + if (typeof object.parsingConfigOverrides !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); + message.parsingConfigOverrides = {}; + for (var keys = Object.keys(object.parsingConfigOverrides), i = 0; i < keys.length; ++i) { + if (typeof object.parsingConfigOverrides[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); + message.parsingConfigOverrides[keys[i]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.parsingConfigOverrides[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig} message DocumentProcessingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentProcessingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parsingConfigOverrides = {}; + if (options.defaults) { + object.name = ""; + object.chunkingConfig = null; + object.defaultParsingConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.chunkingConfig != null && message.hasOwnProperty("chunkingConfig")) + object.chunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.toObject(message.chunkingConfig, options); + if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) + object.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.defaultParsingConfig, options); + var keys2; + if (message.parsingConfigOverrides && (keys2 = Object.keys(message.parsingConfigOverrides)).length) { + object.parsingConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.parsingConfigOverrides[keys2[j]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.parsingConfigOverrides[keys2[j]], options); + } + return object; + }; + + /** + * Converts this DocumentProcessingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @instance + * @returns {Object.} JSON object + */ + DocumentProcessingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentProcessingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentProcessingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig"; + }; + + DocumentProcessingConfig.ChunkingConfig = (function() { + + /** + * Properties of a ChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @interface IChunkingConfig + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null} [layoutBasedChunkingConfig] ChunkingConfig layoutBasedChunkingConfig + */ + + /** + * Constructs a new ChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig + * @classdesc Represents a ChunkingConfig. + * @implements IChunkingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig=} [properties] Properties to set + */ + function ChunkingConfig(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]]; + } + + /** + * ChunkingConfig layoutBasedChunkingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig|null|undefined} layoutBasedChunkingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + */ + ChunkingConfig.prototype.layoutBasedChunkingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChunkingConfig chunkMode. + * @member {"layoutBasedChunkingConfig"|undefined} chunkMode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + */ + Object.defineProperty(ChunkingConfig.prototype, "chunkMode", { + get: $util.oneOfGetter($oneOfFields = ["layoutBasedChunkingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChunkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig instance + */ + ChunkingConfig.create = function create(properties) { + return new ChunkingConfig(properties); + }; + + /** + * Encodes the specified ChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig} message ChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.layoutBasedChunkingConfig != null && Object.hasOwnProperty.call(message, "layoutBasedChunkingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.encode(message.layoutBasedChunkingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.IChunkingConfig} message ChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkingConfig.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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.layoutBasedChunkingConfig != null && message.hasOwnProperty("layoutBasedChunkingConfig")) { + properties.chunkMode = 1; + { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify(message.layoutBasedChunkingConfig); + if (error) + return "layoutBasedChunkingConfig." + error; + } + } + return null; + }; + + /** + * Creates a ChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} ChunkingConfig + */ + ChunkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig(); + if (object.layoutBasedChunkingConfig != null) { + if (typeof object.layoutBasedChunkingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.layoutBasedChunkingConfig: object expected"); + message.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.fromObject(object.layoutBasedChunkingConfig); + } + return message; + }; + + /** + * Creates a plain object from a ChunkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig} message ChunkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.layoutBasedChunkingConfig != null && message.hasOwnProperty("layoutBasedChunkingConfig")) { + object.layoutBasedChunkingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.toObject(message.layoutBasedChunkingConfig, options); + if (options.oneofs) + object.chunkMode = "layoutBasedChunkingConfig"; + } + return object; + }; + + /** + * Converts this ChunkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @instance + * @returns {Object.} JSON object + */ + ChunkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig"; + }; + + ChunkingConfig.LayoutBasedChunkingConfig = (function() { + + /** + * Properties of a LayoutBasedChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @interface ILayoutBasedChunkingConfig + * @property {number|null} [chunkSize] LayoutBasedChunkingConfig chunkSize + * @property {boolean|null} [includeAncestorHeadings] LayoutBasedChunkingConfig includeAncestorHeadings + */ + + /** + * Constructs a new LayoutBasedChunkingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig + * @classdesc Represents a LayoutBasedChunkingConfig. + * @implements ILayoutBasedChunkingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig=} [properties] Properties to set + */ + function LayoutBasedChunkingConfig(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]]; + } + + /** + * LayoutBasedChunkingConfig chunkSize. + * @member {number} chunkSize + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + */ + LayoutBasedChunkingConfig.prototype.chunkSize = 0; + + /** + * LayoutBasedChunkingConfig includeAncestorHeadings. + * @member {boolean} includeAncestorHeadings + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + */ + LayoutBasedChunkingConfig.prototype.includeAncestorHeadings = false; + + /** + * Creates a new LayoutBasedChunkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig instance + */ + LayoutBasedChunkingConfig.create = function create(properties) { + return new LayoutBasedChunkingConfig(properties); + }; + + /** + * Encodes the specified LayoutBasedChunkingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig} message LayoutBasedChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutBasedChunkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunkSize != null && Object.hasOwnProperty.call(message, "chunkSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chunkSize); + if (message.includeAncestorHeadings != null && Object.hasOwnProperty.call(message, "includeAncestorHeadings")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeAncestorHeadings); + return writer; + }; + + /** + * Encodes the specified LayoutBasedChunkingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.ILayoutBasedChunkingConfig} message LayoutBasedChunkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutBasedChunkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentProcessingConfig.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.cloud.discoveryengine.v1.DocumentProcessingConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 4: { - message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.parsingConfigOverrides === $util.emptyObject) - message.parsingConfigOverrides = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.decode(reader, reader.uint32()); + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutBasedChunkingConfig.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.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chunkSize = reader.int32(); break; - default: - reader.skipType(tag2 & 7); + } + case 2: { + message.includeAncestorHeadings = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - message.parsingConfigOverrides[key] = value; - break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a DocumentProcessingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentProcessingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LayoutBasedChunkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutBasedChunkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DocumentProcessingConfig message. - * @function verify - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DocumentProcessingConfig.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.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) { - var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.defaultParsingConfig); - if (error) - return "defaultParsingConfig." + error; - } - if (message.parsingConfigOverrides != null && message.hasOwnProperty("parsingConfigOverrides")) { - if (!$util.isObject(message.parsingConfigOverrides)) - return "parsingConfigOverrides: object expected"; - var key = Object.keys(message.parsingConfigOverrides); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.verify(message.parsingConfigOverrides[key[i]]); - if (error) - return "parsingConfigOverrides." + error; - } - } - return null; - }; + /** + * Verifies a LayoutBasedChunkingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LayoutBasedChunkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkSize != null && message.hasOwnProperty("chunkSize")) + if (!$util.isInteger(message.chunkSize)) + return "chunkSize: integer expected"; + if (message.includeAncestorHeadings != null && message.hasOwnProperty("includeAncestorHeadings")) + if (typeof message.includeAncestorHeadings !== "boolean") + return "includeAncestorHeadings: boolean expected"; + return null; + }; - /** - * Creates a DocumentProcessingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig} DocumentProcessingConfig - */ - DocumentProcessingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig) - return object; - var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.defaultParsingConfig != null) { - if (typeof object.defaultParsingConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.defaultParsingConfig: object expected"); - message.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.defaultParsingConfig); - } - if (object.parsingConfigOverrides) { - if (typeof object.parsingConfigOverrides !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); - message.parsingConfigOverrides = {}; - for (var keys = Object.keys(object.parsingConfigOverrides), i = 0; i < keys.length; ++i) { - if (typeof object.parsingConfigOverrides[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.parsingConfigOverrides: object expected"); - message.parsingConfigOverrides[keys[i]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.fromObject(object.parsingConfigOverrides[keys[i]]); - } - } - return message; - }; + /** + * Creates a LayoutBasedChunkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} LayoutBasedChunkingConfig + */ + LayoutBasedChunkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig) + return object; + var message = new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig(); + if (object.chunkSize != null) + message.chunkSize = object.chunkSize | 0; + if (object.includeAncestorHeadings != null) + message.includeAncestorHeadings = Boolean(object.includeAncestorHeadings); + return message; + }; - /** - * Creates a plain object from a DocumentProcessingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig} message DocumentProcessingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentProcessingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parsingConfigOverrides = {}; - if (options.defaults) { - object.name = ""; - object.defaultParsingConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.defaultParsingConfig != null && message.hasOwnProperty("defaultParsingConfig")) - object.defaultParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.defaultParsingConfig, options); - var keys2; - if (message.parsingConfigOverrides && (keys2 = Object.keys(message.parsingConfigOverrides)).length) { - object.parsingConfigOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.parsingConfigOverrides[keys2[j]] = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.toObject(message.parsingConfigOverrides[keys2[j]], options); - } - return object; - }; + /** + * Creates a plain object from a LayoutBasedChunkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig} message LayoutBasedChunkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LayoutBasedChunkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.chunkSize = 0; + object.includeAncestorHeadings = false; + } + if (message.chunkSize != null && message.hasOwnProperty("chunkSize")) + object.chunkSize = message.chunkSize; + if (message.includeAncestorHeadings != null && message.hasOwnProperty("includeAncestorHeadings")) + object.includeAncestorHeadings = message.includeAncestorHeadings; + return object; + }; - /** - * Converts this DocumentProcessingConfig to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @instance - * @returns {Object.} JSON object - */ - DocumentProcessingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this LayoutBasedChunkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @instance + * @returns {Object.} JSON object + */ + LayoutBasedChunkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for DocumentProcessingConfig - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DocumentProcessingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig"; - }; + /** + * Gets the default type url for LayoutBasedChunkingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LayoutBasedChunkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ChunkingConfig.LayoutBasedChunkingConfig"; + }; + + return LayoutBasedChunkingConfig; + })(); + + return ChunkingConfig; + })(); DocumentProcessingConfig.ParsingConfig = (function() { @@ -43486,6 +49119,7 @@ * @interface IParsingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IDigitalParsingConfig|null} [digitalParsingConfig] ParsingConfig digitalParsingConfig * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.IOcrParsingConfig|null} [ocrParsingConfig] ParsingConfig ocrParsingConfig + * @property {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null} [layoutParsingConfig] ParsingConfig layoutParsingConfig */ /** @@ -43519,17 +49153,25 @@ */ ParsingConfig.prototype.ocrParsingConfig = null; + /** + * ParsingConfig layoutParsingConfig. + * @member {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig|null|undefined} layoutParsingConfig + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @instance + */ + ParsingConfig.prototype.layoutParsingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * ParsingConfig typeDedicatedConfig. - * @member {"digitalParsingConfig"|"ocrParsingConfig"|undefined} typeDedicatedConfig + * @member {"digitalParsingConfig"|"ocrParsingConfig"|"layoutParsingConfig"|undefined} typeDedicatedConfig * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig * @instance */ Object.defineProperty(ParsingConfig.prototype, "typeDedicatedConfig", { - get: $util.oneOfGetter($oneOfFields = ["digitalParsingConfig", "ocrParsingConfig"]), + get: $util.oneOfGetter($oneOfFields = ["digitalParsingConfig", "ocrParsingConfig", "layoutParsingConfig"]), set: $util.oneOfSetter($oneOfFields) }); @@ -43561,6 +49203,8 @@ $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.DigitalParsingConfig.encode(message.digitalParsingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.ocrParsingConfig != null && Object.hasOwnProperty.call(message, "ocrParsingConfig")) $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.encode(message.ocrParsingConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.layoutParsingConfig != null && Object.hasOwnProperty.call(message, "layoutParsingConfig")) + $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.encode(message.layoutParsingConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -43603,6 +49247,10 @@ message.ocrParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.decode(reader, reader.uint32()); break; } + case 3: { + message.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -43657,6 +49305,16 @@ return "ocrParsingConfig." + error; } } + if (message.layoutParsingConfig != null && message.hasOwnProperty("layoutParsingConfig")) { + if (properties.typeDedicatedConfig === 1) + return "typeDedicatedConfig: multiple values"; + properties.typeDedicatedConfig = 1; + { + var error = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify(message.layoutParsingConfig); + if (error) + return "layoutParsingConfig." + error; + } + } return null; }; @@ -43682,6 +49340,11 @@ throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ocrParsingConfig: object expected"); message.ocrParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig.fromObject(object.ocrParsingConfig); } + if (object.layoutParsingConfig != null) { + if (typeof object.layoutParsingConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.layoutParsingConfig: object expected"); + message.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.fromObject(object.layoutParsingConfig); + } return message; }; @@ -43708,6 +49371,11 @@ if (options.oneofs) object.typeDedicatedConfig = "ocrParsingConfig"; } + if (message.layoutParsingConfig != null && message.hasOwnProperty("layoutParsingConfig")) { + object.layoutParsingConfig = $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.toObject(message.layoutParsingConfig, options); + if (options.oneofs) + object.typeDedicatedConfig = "layoutParsingConfig"; + } return object; }; @@ -44155,6 +49823,181 @@ return OcrParsingConfig; })(); + ParsingConfig.LayoutParsingConfig = (function() { + + /** + * Properties of a LayoutParsingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @interface ILayoutParsingConfig + */ + + /** + * Constructs a new LayoutParsingConfig. + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig + * @classdesc Represents a LayoutParsingConfig. + * @implements ILayoutParsingConfig + * @constructor + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig=} [properties] Properties to set + */ + function LayoutParsingConfig(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 LayoutParsingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig instance + */ + LayoutParsingConfig.create = function create(properties) { + return new LayoutParsingConfig(properties); + }; + + /** + * Encodes the specified LayoutParsingConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig} message LayoutParsingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutParsingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified LayoutParsingConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.ILayoutParsingConfig} message LayoutParsingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutParsingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutParsingConfig.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.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LayoutParsingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutParsingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LayoutParsingConfig message. + * @function verify + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LayoutParsingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a LayoutParsingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} LayoutParsingConfig + */ + LayoutParsingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig) + return object; + return new $root.google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig(); + }; + + /** + * Creates a plain object from a LayoutParsingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} message LayoutParsingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LayoutParsingConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this LayoutParsingConfig to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @instance + * @returns {Object.} JSON object + */ + LayoutParsingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LayoutParsingConfig + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LayoutParsingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig"; + }; + + return LayoutParsingConfig; + })(); + return ParsingConfig; })(); diff --git a/packages/google-cloud-discoveryengine/protos/protos.json b/packages/google-cloud-discoveryengine/protos/protos.json index d9ef2d2619a0..e7d2421d50cc 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.json +++ b/packages/google-cloud-discoveryengine/protos/protos.json @@ -16,8 +16,8 @@ "objc_class_prefix": "DISCOVERYENGINE", "php_namespace": "Google\\Cloud\\DiscoveryEngine\\V1", "ruby_package": "Google::Cloud::DiscoveryEngine::V1", - "(google.api.resource_definition).type": "discoveryengine.googleapis.com/Chunk", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + "(google.api.resource_definition).type": "healthcare.googleapis.com/FhirStore", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" }, "nested": { "Answer": { @@ -317,6 +317,10 @@ "rule": "repeated", "type": "ChunkInfo", "id": 5 + }, + "structData": { + "type": "google.protobuf.Struct", + "id": 6 } }, "nested": { @@ -420,7 +424,109 @@ "ADVERSARIAL_QUERY_IGNORED": 1, "NON_ANSWER_SEEKING_QUERY_IGNORED": 2, "OUT_OF_DOMAIN_QUERY_IGNORED": 3, - "POTENTIAL_POLICY_VIOLATION": 4 + "POTENTIAL_POLICY_VIOLATION": 4, + "NO_RELEVANT_CONTENT": 5 + } + } + } + }, + "Chunk": { + "options": { + "(google.api.resource).type": "discoveryengine.googleapis.com/Chunk", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}" + }, + "oneofs": { + "_relevanceScore": { + "oneof": [ + "relevanceScore" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "content": { + "type": "string", + "id": 3 + }, + "relevanceScore": { + "type": "double", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "documentMetadata": { + "type": "DocumentMetadata", + "id": 5 + }, + "derivedStructData": { + "type": "google.protobuf.Struct", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pageSpan": { + "type": "PageSpan", + "id": 6 + }, + "chunkMetadata": { + "type": "ChunkMetadata", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DocumentMetadata": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "structData": { + "type": "google.protobuf.Struct", + "id": 3 + } + } + }, + "PageSpan": { + "fields": { + "pageStart": { + "type": "int32", + "id": 1 + }, + "pageEnd": { + "type": "int32", + "id": 2 + } + } + }, + "ChunkMetadata": { + "fields": { + "previousChunks": { + "rule": "repeated", + "type": "Chunk", + "id": 1 + }, + "nextChunks": { + "rule": "repeated", + "type": "Chunk", + "id": 2 + } } } } @@ -549,6 +655,50 @@ } } }, + "CompletionSuggestion": { + "oneofs": { + "rankingInfo": { + "oneof": [ + "globalScore", + "frequency" + ] + } + }, + "fields": { + "globalScore": { + "type": "double", + "id": 2 + }, + "frequency": { + "type": "int64", + "id": 3 + }, + "suggestion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 4 + }, + "groupId": { + "type": "string", + "id": 5 + }, + "groupScore": { + "type": "double", + "id": 6 + }, + "alternativePhrases": { + "rule": "repeated", + "type": "string", + "id": 7 + } + } + }, "CompletionService": { "options": { "(google.api.default_host)": "discoveryengine.googleapis.com", @@ -632,6 +782,66 @@ } } ] + }, + "ImportCompletionSuggestions": { + "requestType": "ImportCompletionSuggestionsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse", + "metadata_type": "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata" + } + } + ] + }, + "PurgeCompletionSuggestions": { + "requestType": "PurgeCompletionSuggestionsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse", + "metadata_type": "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata" + } + } + ] } } }, @@ -944,6 +1154,46 @@ } } }, + "AlloyDbSource": { + "fields": { + "projectId": { + "type": "string", + "id": 1 + }, + "locationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "databaseId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tableId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "gcsStagingDir": { + "type": "string", + "id": 6 + } + } + }, "FirestoreSource": { "fields": { "projectId": { @@ -1112,6 +1362,7 @@ "spannerSource", "cloudSqlSource", "firestoreSource", + "alloyDbSource", "bigtableSource" ] } @@ -1145,6 +1396,10 @@ "type": "FirestoreSource", "id": 13 }, + "alloyDbSource": { + "type": "AlloyDbSource", + "id": 14 + }, "bigtableSource": { "type": "BigtableSource", "id": 15 @@ -1284,6 +1539,90 @@ } } }, + "ImportCompletionSuggestionsRequest": { + "oneofs": { + "source": { + "oneof": [ + "inlineSource", + "gcsSource", + "bigquerySource" + ] + } + }, + "fields": { + "inlineSource": { + "type": "InlineSource", + "id": 2 + }, + "gcsSource": { + "type": "GcsSource", + "id": 3 + }, + "bigquerySource": { + "type": "BigQuerySource", + "id": 4 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "errorConfig": { + "type": "ImportErrorConfig", + "id": 5 + } + }, + "nested": { + "InlineSource": { + "fields": { + "suggestions": { + "rule": "repeated", + "type": "CompletionSuggestion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ImportCompletionSuggestionsResponse": { + "fields": { + "errorSamples": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 1 + }, + "errorConfig": { + "type": "ImportErrorConfig", + "id": 2 + } + } + }, + "ImportCompletionSuggestionsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "successCount": { + "type": "int64", + "id": 3 + }, + "failureCount": { + "type": "int64", + "id": 4 + } + } + }, "Document": { "options": { "(google.api.resource).type": "discoveryengine.googleapis.com/Document", @@ -1806,6 +2145,43 @@ } } }, + "PurgeCompletionSuggestionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + } + } + }, + "PurgeCompletionSuggestionsResponse": { + "fields": { + "purgeSucceeded": { + "type": "bool", + "id": 1 + }, + "errorSamples": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "PurgeCompletionSuggestionsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, "Condition": { "fields": { "queryTerms": { @@ -2458,6 +2834,10 @@ "type": "UserInfo", "id": 21 }, + "languageCode": { + "type": "string", + "id": 35 + }, "facetSpecs": { "rule": "repeated", "type": "FacetSpec", @@ -2496,6 +2876,21 @@ "keyType": "string", "type": "string", "id": 22 + }, + "searchAsYouTypeSpec": { + "type": "SearchAsYouTypeSpec", + "id": 31 + }, + "session": { + "type": "string", + "id": 41, + "options": { + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Session" + } + }, + "sessionSpec": { + "type": "SessionSpec", + "id": 42 } }, "nested": { @@ -2665,6 +3060,14 @@ "extractiveContentSpec": { "type": "ExtractiveContentSpec", "id": 3 + }, + "searchResultMode": { + "type": "SearchResultMode", + "id": 4 + }, + "chunkSpec": { + "type": "ChunkSpec", + "id": 5 } }, "nested": { @@ -2767,6 +3170,64 @@ "id": 5 } } + }, + "ChunkSpec": { + "fields": { + "numPreviousChunks": { + "type": "int32", + "id": 1 + }, + "numNextChunks": { + "type": "int32", + "id": 2 + } + } + }, + "SearchResultMode": { + "values": { + "SEARCH_RESULT_MODE_UNSPECIFIED": 0, + "DOCUMENTS": 1, + "CHUNKS": 2 + } + } + } + }, + "SearchAsYouTypeSpec": { + "fields": { + "condition": { + "type": "Condition", + "id": 1 + } + }, + "nested": { + "Condition": { + "values": { + "CONDITION_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + } + } + }, + "SessionSpec": { + "oneofs": { + "_searchResultPersistenceCount": { + "oneof": [ + "searchResultPersistenceCount" + ] + } + }, + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "searchResultPersistenceCount": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } } } } @@ -2811,6 +3272,10 @@ "queryExpansionInfo": { "type": "QueryExpansionInfo", "id": 14 + }, + "sessionInfo": { + "type": "SessionInfo", + "id": 19 } }, "nested": { @@ -2823,6 +3288,10 @@ "document": { "type": "Document", "id": 2 + }, + "chunk": { + "type": "Chunk", + "id": 18 } } }, @@ -3017,6 +3486,18 @@ "id": 2 } } + }, + "SessionInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "queryId": { + "type": "string", + "id": 2 + } + } } } }, @@ -3623,6 +4104,11 @@ "userPseudoId": { "type": "string", "id": 12 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 13 } }, "nested": { @@ -3740,6 +4226,10 @@ "type": "string", "id": 4 }, + "searchResultMode": { + "type": "SearchRequest.ContentSearchSpec.SearchResultMode", + "id": 5 + }, "dataStoreSpecs": { "rule": "repeated", "type": "SearchRequest.DataStoreSpec", @@ -3904,6 +4394,10 @@ "disable": { "type": "bool", "id": 1 + }, + "maxRephraseSteps": { + "type": "int32", + "id": 2 } } } @@ -4205,6 +4699,10 @@ "type": "string", "id": 1 }, + "chunkingConfig": { + "type": "ChunkingConfig", + "id": 3 + }, "defaultParsingConfig": { "type": "ParsingConfig", "id": 4 @@ -4216,12 +4714,42 @@ } }, "nested": { + "ChunkingConfig": { + "oneofs": { + "chunkMode": { + "oneof": [ + "layoutBasedChunkingConfig" + ] + } + }, + "fields": { + "layoutBasedChunkingConfig": { + "type": "LayoutBasedChunkingConfig", + "id": 1 + } + }, + "nested": { + "LayoutBasedChunkingConfig": { + "fields": { + "chunkSize": { + "type": "int32", + "id": 1 + }, + "includeAncestorHeadings": { + "type": "bool", + "id": 2 + } + } + } + } + }, "ParsingConfig": { "oneofs": { "typeDedicatedConfig": { "oneof": [ "digitalParsingConfig", - "ocrParsingConfig" + "ocrParsingConfig", + "layoutParsingConfig" ] } }, @@ -4233,6 +4761,10 @@ "ocrParsingConfig": { "type": "OcrParsingConfig", "id": 2 + }, + "layoutParsingConfig": { + "type": "LayoutParsingConfig", + "id": 3 } }, "nested": { @@ -4254,6 +4786,9 @@ "id": 2 } } + }, + "LayoutParsingConfig": { + "fields": {} } } } @@ -6996,15 +7531,20 @@ "responseType": "google.api.HttpBody", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/userEvents:collect" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" - } + "additional_bindings": [ + { + "get": "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + }, + { + "get": "/v1/{parent=projects/*/locations/*}/userEvents:collect" + } + ] } } ] diff --git a/packages/google-cloud-discoveryengine/samples/README.md b/packages/google-cloud-discoveryengine/samples/README.md index 49ead2abaaf5..e1216d96c315 100644 --- a/packages/google-cloud-discoveryengine/samples/README.md +++ b/packages/google-cloud-discoveryengine/samples/README.md @@ -13,7 +13,9 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) * [Completion_service.complete_query](#completion_service.complete_query) + * [Completion_service.import_completion_suggestions](#completion_service.import_completion_suggestions) * [Completion_service.import_suggestion_deny_list_entries](#completion_service.import_suggestion_deny_list_entries) + * [Completion_service.purge_completion_suggestions](#completion_service.purge_completion_suggestions) * [Completion_service.purge_suggestion_deny_list_entries](#completion_service.purge_suggestion_deny_list_entries) * [Control_service.create_control](#control_service.create_control) * [Control_service.delete_control](#control_service.delete_control) @@ -262,6 +264,23 @@ __Usage:__ +### Completion_service.import_completion_suggestions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js` + + +----- + + + + ### Completion_service.import_suggestion_deny_list_entries View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js). @@ -279,6 +298,23 @@ __Usage:__ +### Completion_service.purge_completion_suggestions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js` + + +----- + + + + ### Completion_service.purge_suggestion_deny_list_entries View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js). diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js new file mode 100644 index 000000000000..2eff78fc6ad7 --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The Inline source for suggestion entries. + */ + // const inlineSource = {} + /** + * Cloud Storage location for the input content. + */ + // const gcsSource = {} + /** + * BigQuery input source. + */ + // const bigquerySource = {} + /** + * Required. The parent data store resource name for which to import customer + * autocomplete suggestions. + * Follows pattern `projects/* /locations/* /collections/* /dataStores/*` + */ + // const parent = 'abc123' + /** + * The desired location of errors incurred during the Import. + */ + // const errorConfig = {} + + // Imports the Discoveryengine library + const {CompletionServiceClient} = require('@google-cloud/discoveryengine').v1; + + // Instantiates a client + const discoveryengineClient = new CompletionServiceClient(); + + async function callImportCompletionSuggestions() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await discoveryengineClient.importCompletionSuggestions(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportCompletionSuggestions(); + // [END discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js new file mode 100644 index 000000000000..ceda06f3d13f --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent data store resource name for which to purge completion + * suggestions. Follows pattern + * projects/* /locations/* /collections/* /dataStores/*. + */ + // const parent = 'abc123' + + // Imports the Discoveryengine library + const {CompletionServiceClient} = require('@google-cloud/discoveryengine').v1; + + // Instantiates a client + const discoveryengineClient = new CompletionServiceClient(); + + async function callPurgeCompletionSuggestions() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await discoveryengineClient.purgeCompletionSuggestions(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPurgeCompletionSuggestions(); + // [END discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js b/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js index 0d11e2895aff..8e012f519642 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.answer_query.js @@ -89,6 +89,24 @@ function main(servingConfig, query) { * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. */ // const userPseudoId = 'abc123' + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See Google Cloud + * Document (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + */ + // const userLabels = [1,2,3,4] // Imports the Discoveryengine library const {ConversationalSearchServiceClient} = require('@google-cloud/discoveryengine').v1; diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js b/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js index 64da7e2fb300..147af5633608 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/document_service.import_documents.js @@ -56,6 +56,10 @@ function main(parent) { * Firestore input source. */ // const firestoreSource = {} + /** + * AlloyDB input source. + */ + // const alloyDbSource = {} /** * Cloud Bigtable input source. */ diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js b/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js index 9d6c8cc744e6..aca8ca4fd3f8 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search.js @@ -134,6 +134,14 @@ function main(servingConfig) { * is used to deduce `device_type` for analytics. */ // const userInfo = {} + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see Standard + * fields (https://cloud.google.com/apis/design/standard_fields). This field + * helps to better interpret the query. If a value isn't specified, the query + * language code is automatically detected, which may not be accurate. + */ + // const languageCode = 'abc123' /** * Facet specifications for faceted search. If empty, no facets are returned. * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` @@ -211,6 +219,41 @@ function main(servingConfig) { * for more details. */ // const userLabels = [1,2,3,4] + /** + * Search as you type configuration. Only supported for the + * IndustryVertical.MEDIA google.cloud.discoveryengine.v1.IndustryVertical.MEDIA + * vertical. + */ + // const searchAsYouTypeSpec = {} + /** + * The session resource name. Optional. + * Session allows users to do multi-turn /search API calls or coordination + * between /search API calls and /answer API calls. + * Example #1 (multi-turn /search API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /search API with the session ID generated in the first call. + * Here, the previous search query gets considered in query + * standing. I.e., if the first query is "How did Alphabet do in 2022?" + * and the current query is "How about 2023?", the current query will + * be interpreted as "How did Alphabet do in 2023?". + * Example #2 (coordination between /search API calls and /answer API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /answer API with the session ID generated in the first call. + * Here, the answer generation happens in the context of the search + * results from the first search call. + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * Multi-turn Search feature is currently at private GA stage. Please use + * v1alpha or v1beta version instead before we launch this feature to public + * GA. Or ask for allowlisting through Google Support team. + */ + // const session = 'abc123' + /** + * Session specification. + * Can be used only when `session` is set. + */ + // const sessionSpec = {} // Imports the Discoveryengine library const {SearchServiceClient} = require('@google-cloud/discoveryengine').v1; diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json index c44b54c69736..c400d997ecc6 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -155,6 +155,102 @@ } } }, + { + "regionTag": "discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async", + "title": "CompletionService importCompletionSuggestions Sample", + "origin": "API_DEFINITION", + "description": " Imports [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.", + "canonical": true, + "file": "completion_service.import_completion_suggestions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions", + "async": true, + "parameters": [ + { + "name": "inline_source", + "type": ".google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource" + }, + { + "name": "gcs_source", + "type": ".google.cloud.discoveryengine.v1.GcsSource" + }, + { + "name": "bigquery_source", + "type": ".google.cloud.discoveryengine.v1.BigQuerySource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "error_config", + "type": ".google.cloud.discoveryengine.v1.ImportErrorConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CompletionServiceClient", + "fullName": "google.cloud.discoveryengine.v1.CompletionServiceClient" + }, + "method": { + "shortName": "ImportCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions", + "service": { + "shortName": "CompletionService", + "fullName": "google.cloud.discoveryengine.v1.CompletionService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async", + "title": "CompletionService purgeCompletionSuggestions Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes all [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s for a DataStore.", + "canonical": true, + "file": "completion_service.purge_completion_suggestions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PurgeCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CompletionServiceClient", + "fullName": "google.cloud.discoveryengine.v1.CompletionServiceClient" + }, + "method": { + "shortName": "PurgeCompletionSuggestions", + "fullName": "google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions", + "service": { + "shortName": "CompletionService", + "fullName": "google.cloud.discoveryengine.v1.CompletionService" + } + } + } + }, { "regionTag": "discoveryengine_v1_generated_ControlService_CreateControl_async", "title": "CompletionService createControl Sample", @@ -686,7 +782,7 @@ "segments": [ { "start": 25, - "end": 111, + "end": 129, "type": "FULL" } ], @@ -734,6 +830,10 @@ { "name": "user_pseudo_id", "type": "TYPE_STRING" + }, + { + "name": "user_labels", + "type": "TYPE_MESSAGE[]" } ], "resultType": ".google.cloud.discoveryengine.v1.AnswerQueryResponse", @@ -1478,7 +1578,7 @@ "segments": [ { "start": 25, - "end": 159, + "end": 163, "type": "FULL" } ], @@ -1515,6 +1615,10 @@ "name": "firestore_source", "type": ".google.cloud.discoveryengine.v1.FirestoreSource" }, + { + "name": "alloy_db_source", + "type": ".google.cloud.discoveryengine.v1.AlloyDbSource" + }, { "name": "bigtable_source", "type": ".google.cloud.discoveryengine.v1.BigtableSource" @@ -2294,7 +2398,7 @@ "segments": [ { "start": 25, - "end": 234, + "end": 277, "type": "FULL" } ], @@ -2351,6 +2455,10 @@ "name": "user_info", "type": ".google.cloud.discoveryengine.v1.UserInfo" }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, { "name": "facet_specs", "type": "TYPE_MESSAGE[]" @@ -2386,6 +2494,18 @@ { "name": "user_labels", "type": "TYPE_MESSAGE[]" + }, + { + "name": "search_as_you_type_spec", + "type": ".google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec" + }, + { + "name": "session", + "type": "TYPE_STRING" + }, + { + "name": "session_spec", + "type": ".google.cloud.discoveryengine.v1.SearchRequest.SessionSpec" } ], "resultType": ".google.cloud.discoveryengine.v1.SearchResponse", diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts index 752cefca26f3..a42ff11d4d42 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_client.ts @@ -221,6 +221,10 @@ export class CompletionServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -276,6 +280,10 @@ export class CompletionServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -437,6 +445,18 @@ export class CompletionServiceClient { const purgeSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup( '.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata' ) as gax.protobuf.Type; + const importCompletionSuggestionsResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse' + ) as gax.protobuf.Type; + const importCompletionSuggestionsMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata' + ) as gax.protobuf.Type; + const purgeCompletionSuggestionsResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse' + ) as gax.protobuf.Type; + const purgeCompletionSuggestionsMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { importSuggestionDenyListEntries: @@ -458,6 +478,24 @@ export class CompletionServiceClient { purgeSuggestionDenyListEntriesMetadata ) ), + importCompletionSuggestions: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importCompletionSuggestionsResponse.decode.bind( + importCompletionSuggestionsResponse + ), + importCompletionSuggestionsMetadata.decode.bind( + importCompletionSuggestionsMetadata + ) + ), + purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + purgeCompletionSuggestionsResponse.decode.bind( + purgeCompletionSuggestionsResponse + ), + purgeCompletionSuggestionsMetadata.decode.bind( + purgeCompletionSuggestionsMetadata + ) + ), }; // Put together the default options sent with requests. @@ -514,6 +552,8 @@ export class CompletionServiceClient { 'completeQuery', 'importSuggestionDenyListEntries', 'purgeSuggestionDenyListEntries', + 'importCompletionSuggestions', + 'purgeCompletionSuggestions', ]; for (const methodName of completionServiceStubMethods) { const callPromise = this.completionServiceStub.then( @@ -1059,6 +1099,303 @@ export class CompletionServiceClient { protos.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata >; } + /** + * Imports + * {@link protos.google.cloud.discoveryengine.v1.CompletionSuggestion|CompletionSuggestion}s + * for a DataStore. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest.InlineSource} request.inlineSource + * The Inline source for suggestion entries. + * @param {google.cloud.discoveryengine.v1.GcsSource} request.gcsSource + * Cloud Storage location for the input content. + * @param {google.cloud.discoveryengine.v1.BigQuerySource} request.bigquerySource + * BigQuery input source. + * @param {string} request.parent + * Required. The parent data store resource name for which to import customer + * autocomplete suggestions. + * + * Follows pattern `projects/* /locations/* /collections/* /dataStores/*` + * @param {google.cloud.discoveryengine.v1.ImportErrorConfig} request.errorConfig + * The desired location of errors incurred during the Import. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.import_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async + */ + importCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + importCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.importCompletionSuggestions( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `importCompletionSuggestions()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.import_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_ImportCompletionSuggestions_async + */ + async checkImportCompletionSuggestionsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.importCompletionSuggestions, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata + >; + } + /** + * Permanently deletes all + * {@link protos.google.cloud.discoveryengine.v1.CompletionSuggestion|CompletionSuggestion}s + * for a DataStore. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent data store resource name for which to purge completion + * suggestions. Follows pattern + * projects/* /locations/* /collections/* /dataStores/*. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.purge_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async + */ + purgeCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + purgeCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeCompletionSuggestions( + request: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeCompletionSuggestions( + request?: protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.purgeCompletionSuggestions( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `purgeCompletionSuggestions()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/completion_service.purge_completion_suggestions.js + * region_tag:discoveryengine_v1_generated_CompletionService_PurgeCompletionSuggestions_async + */ + async checkPurgeCompletionSuggestionsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.purgeCompletionSuggestions, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata + >; + } /** * Gets information about a location. * @@ -1612,6 +1949,145 @@ export class CompletionServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3016,6 +3492,127 @@ export class CompletionServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json index 2136f588531b..b48335cdf733 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_client_config.json @@ -46,6 +46,16 @@ "timeout_millis": 5000, "retry_codes_name": "unavailable", "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + }, + "ImportCompletionSuggestions": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + }, + "PurgeCompletionSuggestions": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" } } } diff --git a/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/completion_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts index 68f6752f2386..b615bfaaa196 100644 --- a/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/control_service_client.ts @@ -226,6 +226,10 @@ export class ControlServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -281,6 +285,10 @@ export class ControlServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1524,6 +1532,145 @@ export class ControlServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2928,6 +3075,127 @@ export class ControlServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/control_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts index 5d696cd54a62..acbeb181d619 100644 --- a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_client.ts @@ -221,6 +221,10 @@ export class ConversationalSearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -284,6 +288,10 @@ export class ConversationalSearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1129,6 +1137,24 @@ export class ConversationalSearchServiceClient { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @param {number[]} request.userLabels + * The user labels applied to a resource must meet the following requirements: + * + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2559,6 +2585,145 @@ export class ConversationalSearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -4169,6 +4334,127 @@ export class ConversationalSearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/conversational_search_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts index 9440222ee39e..f443a8faf94d 100644 --- a/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/data_store_service_client.ts @@ -227,6 +227,10 @@ export class DataStoreServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class DataStoreServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -2015,6 +2023,145 @@ export class DataStoreServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3419,6 +3566,127 @@ export class DataStoreServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/data_store_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts index abcadee1d9ee..862bf928957f 100644 --- a/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/document_service_client.ts @@ -228,6 +228,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -287,6 +291,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1089,6 +1097,8 @@ export class DocumentServiceClient { * Cloud SQL input source. * @param {google.cloud.discoveryengine.v1.FirestoreSource} request.firestoreSource * Firestore input source. + * @param {google.cloud.discoveryengine.v1.AlloyDbSource} request.alloyDbSource + * AlloyDB input source. * @param {google.cloud.discoveryengine.v1.BigtableSource} request.bigtableSource * Cloud Bigtable input source. * @param {string} request.parent @@ -2358,6 +2368,145 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3847,6 +3996,127 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/document_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts index 04c30060f5b8..ea6daf080c2b 100644 --- a/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/engine_service_client.ts @@ -227,6 +227,10 @@ export class EngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class EngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1933,6 +1941,145 @@ export class EngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3337,6 +3484,127 @@ export class EngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/engine_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json b/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json index fc7963b1a35e..bf77fe662c5e 100644 --- a/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json +++ b/packages/google-cloud-discoveryengine/src/v1/gapic_metadata.json @@ -24,6 +24,16 @@ "methods": [ "purgeSuggestionDenyListEntries" ] + }, + "ImportCompletionSuggestions": { + "methods": [ + "importCompletionSuggestions" + ] + }, + "PurgeCompletionSuggestions": { + "methods": [ + "purgeCompletionSuggestions" + ] } } }, @@ -44,6 +54,16 @@ "methods": [ "purgeSuggestionDenyListEntries" ] + }, + "ImportCompletionSuggestions": { + "methods": [ + "importCompletionSuggestions" + ] + }, + "PurgeCompletionSuggestions": { + "methods": [ + "purgeCompletionSuggestions" + ] } } } diff --git a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts index 006136029616..915ab5e2eea3 100644 --- a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_client.ts @@ -222,6 +222,10 @@ export class GroundedGenerationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -277,6 +281,10 @@ export class GroundedGenerationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1029,6 +1037,145 @@ export class GroundedGenerationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2433,6 +2580,127 @@ export class GroundedGenerationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/grounded_generation_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts index 3f5ef1247364..251f7eeacfbd 100644 --- a/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/project_service_client.ts @@ -222,6 +222,10 @@ export class ProjectServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -277,6 +281,10 @@ export class ProjectServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1311,6 +1319,145 @@ export class ProjectServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2715,6 +2862,127 @@ export class ProjectServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/project_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts index c780c0347ba0..a449a7975c77 100644 --- a/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/rank_service_client.ts @@ -218,6 +218,10 @@ export class RankServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -273,6 +277,10 @@ export class RankServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -972,6 +980,145 @@ export class RankServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2376,6 +2523,127 @@ export class RankServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/rank_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts index ebb775c113d8..c202636fdbfd 100644 --- a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_client.ts @@ -219,6 +219,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -282,6 +286,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1066,6 +1074,145 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2676,6 +2823,127 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/recommendation_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts index 42ec70595214..0eef8acce6a3 100644 --- a/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/schema_service_client.ts @@ -223,6 +223,10 @@ export class SchemaServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -278,6 +282,10 @@ export class SchemaServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1942,6 +1950,145 @@ export class SchemaServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3346,6 +3493,127 @@ export class SchemaServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/schema_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts index b595d803da8d..a81ecb9c02ff 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/search_service_client.ts @@ -224,6 +224,10 @@ export class SearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -291,6 +295,10 @@ export class SearchServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -603,6 +611,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see [Standard + * fields](https://cloud.google.com/apis/design/standard_fields). This field + * helps to better interpret the query. If a value isn't specified, the query + * language code is automatically detected, which may not be accurate. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -672,6 +686,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * The session resource name. Optional. + * + * Session allows users to do multi-turn /search API calls or coordination + * between /search API calls and /answer API calls. + * + * Example #1 (multi-turn /search API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /search API with the session ID generated in the first call. + * Here, the previous search query gets considered in query + * standing. I.e., if the first query is "How did Alphabet do in 2022?" + * and the current query is "How about 2023?", the current query will + * be interpreted as "How did Alphabet do in 2023?". + * + * Example #2 (coordination between /search API calls and /answer API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /answer API with the session ID generated in the first call. + * Here, the answer generation happens in the context of the search + * results from the first search call. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * Multi-turn Search feature is currently at private GA stage. Please use + * v1alpha or v1beta version instead before we launch this feature to public + * GA. Or ask for allowlisting through Google Support team. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -851,6 +900,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see [Standard + * fields](https://cloud.google.com/apis/design/standard_fields). This field + * helps to better interpret the query. If a value isn't specified, the query + * language code is automatically detected, which may not be accurate. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -920,6 +975,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * The session resource name. Optional. + * + * Session allows users to do multi-turn /search API calls or coordination + * between /search API calls and /answer API calls. + * + * Example #1 (multi-turn /search API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /search API with the session ID generated in the first call. + * Here, the previous search query gets considered in query + * standing. I.e., if the first query is "How did Alphabet do in 2022?" + * and the current query is "How about 2023?", the current query will + * be interpreted as "How did Alphabet do in 2023?". + * + * Example #2 (coordination between /search API calls and /answer API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /answer API with the session ID generated in the first call. + * Here, the answer generation happens in the context of the search + * results from the first search call. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * Multi-turn Search feature is currently at private GA stage. Please use + * v1alpha or v1beta version instead before we launch this feature to public + * GA. Or ask for allowlisting through Google Support team. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1053,6 +1143,12 @@ export class SearchServiceClient { * Highly recommended for analytics. * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent} * is used to deduce `device_type` for analytics. + * @param {string} request.languageCode + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see [Standard + * fields](https://cloud.google.com/apis/design/standard_fields). This field + * helps to better interpret the query. If a value isn't specified, the query + * language code is automatically detected, which may not be accurate. * @param {number[]} request.facetSpecs * Facet specifications for faceted search. If empty, no facets are returned. * @@ -1122,6 +1218,41 @@ export class SearchServiceClient { * See [Google Cloud * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) * for more details. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec + * Search as you type configuration. Only supported for the + * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA} + * vertical. + * @param {string} request.session + * The session resource name. Optional. + * + * Session allows users to do multi-turn /search API calls or coordination + * between /search API calls and /answer API calls. + * + * Example #1 (multi-turn /search API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /search API with the session ID generated in the first call. + * Here, the previous search query gets considered in query + * standing. I.e., if the first query is "How did Alphabet do in 2022?" + * and the current query is "How about 2023?", the current query will + * be interpreted as "How did Alphabet do in 2023?". + * + * Example #2 (coordination between /search API calls and /answer API calls): + * 1. Call /search API with the auto-session mode (see below). + * 2. Call /answer API with the session ID generated in the first call. + * Here, the answer generation happens in the context of the search + * results from the first search call. + * + * Auto-session mode: when `projects/.../sessions/-` is used, a new session + * gets automatically created. Otherwise, users can use the create-session API + * to create a session manually. + * + * Multi-turn Search feature is currently at private GA stage. Please use + * v1alpha or v1beta version instead before we launch this feature to public + * GA. Or ask for allowlisting through Google Support team. + * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec + * Session specification. + * + * Can be used only when `session` is set. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1636,6 +1767,145 @@ export class SearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -3331,6 +3601,127 @@ export class SearchServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/search_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts index 193269ff01e1..da6f18949463 100644 --- a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_client.ts @@ -224,6 +224,10 @@ export class SiteSearchEngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -279,6 +283,10 @@ export class SiteSearchEngineServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -3089,6 +3097,145 @@ export class SiteSearchEngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -4493,6 +4640,127 @@ export class SiteSearchEngineServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/site_search_engine_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts index 2d554a7b849a..ae82dd91945e 100644 --- a/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1/user_event_service_client.ts @@ -221,6 +221,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}' @@ -276,6 +280,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreBranchDocumentChunkPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}' + ), projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}' @@ -1531,6 +1539,145 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentChunkPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + projectLocationCollectionDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string. * @@ -2935,6 +3082,127 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @param {string} chunk + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentChunkPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string, + chunk: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + chunk: chunk, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).document; + } + + /** + * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource. + * + * @param {string} projectLocationDataStoreBranchDocumentChunkName + * A fully-qualified path representing project_location_data_store_branch_document_chunk resource. + * @returns {string} A string representing the chunk. + */ + matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + projectLocationDataStoreBranchDocumentChunkName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match( + projectLocationDataStoreBranchDocumentChunkName + ).chunk; + } + /** * Return a fully-qualified projectLocationDataStoreControl resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json index 9deb6123f5a3..1da503d80027 100644 --- a/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1/user_event_service_proto_list.json @@ -1,5 +1,6 @@ [ "../../protos/google/cloud/discoveryengine/v1/answer.proto", + "../../protos/google/cloud/discoveryengine/v1/chunk.proto", "../../protos/google/cloud/discoveryengine/v1/common.proto", "../../protos/google/cloud/discoveryengine/v1/completion.proto", "../../protos/google/cloud/discoveryengine/v1/completion_service.proto", diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts index 3ba1fba1bcdf..ab0987d018dd 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1.ts @@ -826,6 +826,402 @@ describe('v1.CompletionServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); + + describe('importCompletionSuggestions', () => { + it('invokes importCompletionSuggestions without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importCompletionSuggestions = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importCompletionSuggestions(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions without error using callback', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importCompletionSuggestions = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importCompletionSuggestions( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IImportCompletionSuggestionsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions with call error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importCompletionSuggestions = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.importCompletionSuggestions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importCompletionSuggestions with LRO error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.ImportCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importCompletionSuggestions = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importCompletionSuggestions(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportCompletionSuggestionsProgress without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkImportCompletionSuggestionsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportCompletionSuggestionsProgress with error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportCompletionSuggestionsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('purgeCompletionSuggestions', () => { + it('invokes purgeCompletionSuggestions without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeCompletionSuggestions = + stubLongRunningCall(expectedResponse); + const [operation] = await client.purgeCompletionSuggestions(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions without error using callback', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeCompletionSuggestions = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.purgeCompletionSuggestions( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsResponse, + protos.google.cloud.discoveryengine.v1.IPurgeCompletionSuggestionsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions with call error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeCompletionSuggestions = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.purgeCompletionSuggestions(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeCompletionSuggestions with LRO error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeCompletionSuggestions = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.purgeCompletionSuggestions(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeCompletionSuggestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkPurgeCompletionSuggestionsProgress without error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkPurgeCompletionSuggestionsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPurgeCompletionSuggestionsProgress with error', async () => { + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkPurgeCompletionSuggestionsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); describe('getLocation', () => { it('invokes getLocation without error', async () => { const client = new completionserviceModule.v1.CompletionServiceClient({ @@ -1692,6 +2088,171 @@ describe('v1.CompletionServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3411,6 +3972,151 @@ describe('v1.CompletionServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new completionserviceModule.v1.CompletionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts index 22a1a90cb333..3a15ecc4150f 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_control_service_v1.ts @@ -1768,6 +1768,171 @@ describe('v1.ControlServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new controlserviceModule.v1.ControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3487,6 +3652,151 @@ describe('v1.ControlServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new controlserviceModule.v1.ControlServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts index 4cb5eff6ff6a..4bc2c93f8ba1 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_conversational_search_service_v1.ts @@ -3194,6 +3194,174 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new conversationalsearchserviceModule.v1.ConversationalSearchServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -5214,6 +5382,154 @@ describe('v1.ConversationalSearchServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new conversationalsearchserviceModule.v1.ConversationalSearchServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts index 7b42af39ddd9..44ba6234359a 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_data_store_service_v1.ts @@ -2254,6 +2254,171 @@ describe('v1.DataStoreServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new datastoreserviceModule.v1.DataStoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3973,6 +4138,151 @@ describe('v1.DataStoreServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new datastoreserviceModule.v1.DataStoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts index 0ce380e3b1e7..4660094b61c5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1.ts @@ -2574,6 +2574,171 @@ describe('v1.DocumentServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new documentserviceModule.v1.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -4386,6 +4551,151 @@ describe('v1.DocumentServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new documentserviceModule.v1.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts index ae05a5881d02..e6cbfc04307e 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_engine_service_v1.ts @@ -2244,6 +2244,171 @@ describe('v1.EngineServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new engineserviceModule.v1.EngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3963,6 +4128,151 @@ describe('v1.EngineServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new engineserviceModule.v1.EngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts index 407cb320b02c..e983fd0eee17 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_grounded_generation_service_v1.ts @@ -1053,6 +1053,172 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new groundedgenerationserviceModule.v1.GroundedGenerationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2786,6 +2952,152 @@ describe('v1.GroundedGenerationServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new groundedgenerationserviceModule.v1.GroundedGenerationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts index 1f2ff4045292..cc1dedeccd4c 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_project_service_v1.ts @@ -1355,6 +1355,171 @@ describe('v1.ProjectServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new projectserviceModule.v1.ProjectServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3074,6 +3239,151 @@ describe('v1.ProjectServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new projectserviceModule.v1.ProjectServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts index 128d0028fb65..835db9a5396e 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_rank_service_v1.ts @@ -949,6 +949,171 @@ describe('v1.RankServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new rankserviceModule.v1.RankServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2668,6 +2833,151 @@ describe('v1.RankServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new rankserviceModule.v1.RankServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts index 90393fe3d3e7..5b0e01df0332 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1.ts @@ -984,6 +984,172 @@ describe('v1.RecommendationServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new recommendationserviceModule.v1.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -2972,6 +3138,152 @@ describe('v1.RecommendationServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new recommendationserviceModule.v1.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts index 9b438e3a5ba3..fd3b9eae18d9 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1.ts @@ -2240,6 +2240,171 @@ describe('v1.SchemaServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new schemaserviceModule.v1.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3959,6 +4124,151 @@ describe('v1.SchemaServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new schemaserviceModule.v1.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts index 8143374f1070..07549c1c5f5d 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1.ts @@ -1328,6 +1328,171 @@ describe('v1.SearchServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new searchserviceModule.v1.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3393,6 +3558,151 @@ describe('v1.SearchServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new searchserviceModule.v1.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts index 4da4042717ac..9fb4c93cddc3 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_site_search_engine_service_v1.ts @@ -3831,6 +3831,172 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new sitesearchengineserviceModule.v1.SiteSearchEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -5564,6 +5730,152 @@ describe('v1.SiteSearchEngineServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = + new sitesearchengineserviceModule.v1.SiteSearchEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts index bad04ef309be..2ae2ab4f87b8 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1.ts @@ -1621,6 +1621,171 @@ describe('v1.UserEventServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new usereventserviceModule.v1.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentChunkPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreControl'; @@ -3340,6 +3505,151 @@ describe('v1.UserEventServiceClient', () => { }); }); + describe('projectLocationDataStoreBranchDocumentChunk', () => { + const fakePath = + '/rendered/path/projectLocationDataStoreBranchDocumentChunk'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + chunk: 'chunkValue', + }; + const client = new usereventserviceModule.v1.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentChunkPath', () => { + const result = client.projectLocationDataStoreBranchDocumentChunkPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue', + 'chunkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChunkFromProjectLocationDataStoreBranchDocumentChunkName', () => { + const result = + client.matchChunkFromProjectLocationDataStoreBranchDocumentChunkName( + fakePath + ); + assert.strictEqual(result, 'chunkValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentChunkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreControl', () => { const fakePath = '/rendered/path/projectLocationDataStoreControl'; const expectedParameters = { From 347ea87f938abbf9abe37df7ffb32625ec142e1a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:01:29 -0400 Subject: [PATCH 13/17] feat: [sql] add Dataplex integration opt-in field (#5527) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Dataplex integration opt-in field PiperOrigin-RevId: 649181421 Source-Link: https://github.com/googleapis/googleapis/commit/95b8ded04d644eada44b2df6e498462464c69f49 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3ca77d975f0d5150140424986c67d52c3e90f0b1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiM2NhNzdkOTc1ZjBkNTE1MDE0MDQyNDk4NmM2N2Q1MmMzZTkwZjBiMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../sql/v1beta4/cloud_sql_resources.proto | 6 ++++ packages/google-cloud-sql/protos/protos.d.ts | 6 ++++ packages/google-cloud-sql/protos/protos.js | 28 +++++++++++++++++++ packages/google-cloud-sql/protos/protos.json | 7 +++++ 4 files changed, 47 insertions(+) diff --git a/packages/google-cloud-sql/protos/google/cloud/sql/v1beta4/cloud_sql_resources.proto b/packages/google-cloud-sql/protos/google/cloud/sql/v1beta4/cloud_sql_resources.proto index 828998d2df10..3c3f92386446 100644 --- a/packages/google-cloud-sql/protos/google/cloud/sql/v1beta4/cloud_sql_resources.proto +++ b/packages/google-cloud-sql/protos/google/cloud/sql/v1beta4/cloud_sql_resources.proto @@ -2329,6 +2329,12 @@ message Settings { // SQL for PostgreSQL instances. google.protobuf.BoolValue enable_google_ml_integration = 40 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. By default, Cloud SQL instances have schema extraction disabled + // for Dataplex. When this parameter is set to true, schema extraction for + // Dataplex on Cloud SQL instances is activated. + google.protobuf.BoolValue enable_dataplex_integration = 41 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies options for controlling advanced machine features. diff --git a/packages/google-cloud-sql/protos/protos.d.ts b/packages/google-cloud-sql/protos/protos.d.ts index e6e42e499258..99b74cb01ee4 100644 --- a/packages/google-cloud-sql/protos/protos.d.ts +++ b/packages/google-cloud-sql/protos/protos.d.ts @@ -37501,6 +37501,9 @@ export namespace google { /** Settings enableGoogleMlIntegration */ enableGoogleMlIntegration?: (google.protobuf.IBoolValue|null); + + /** Settings enableDataplexIntegration */ + enableDataplexIntegration?: (google.protobuf.IBoolValue|null); } /** Represents a Settings. */ @@ -37611,6 +37614,9 @@ export namespace google { /** Settings enableGoogleMlIntegration. */ public enableGoogleMlIntegration?: (google.protobuf.IBoolValue|null); + /** Settings enableDataplexIntegration. */ + public enableDataplexIntegration?: (google.protobuf.IBoolValue|null); + /** * Creates a new Settings instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-sql/protos/protos.js b/packages/google-cloud-sql/protos/protos.js index 6d9c5ec2cf85..dc35e1bd8199 100644 --- a/packages/google-cloud-sql/protos/protos.js +++ b/packages/google-cloud-sql/protos/protos.js @@ -93579,6 +93579,7 @@ * @property {google.cloud.sql.v1beta4.IAdvancedMachineFeatures|null} [advancedMachineFeatures] Settings advancedMachineFeatures * @property {google.cloud.sql.v1beta4.IDataCacheConfig|null} [dataCacheConfig] Settings dataCacheConfig * @property {google.protobuf.IBoolValue|null} [enableGoogleMlIntegration] Settings enableGoogleMlIntegration + * @property {google.protobuf.IBoolValue|null} [enableDataplexIntegration] Settings enableDataplexIntegration */ /** @@ -93864,6 +93865,14 @@ */ Settings.prototype.enableGoogleMlIntegration = null; + /** + * Settings enableDataplexIntegration. + * @member {google.protobuf.IBoolValue|null|undefined} enableDataplexIntegration + * @memberof google.cloud.sql.v1beta4.Settings + * @instance + */ + Settings.prototype.enableDataplexIntegration = null; + /** * Creates a new Settings instance using the specified properties. * @function create @@ -93958,6 +93967,8 @@ writer.uint32(/* id 38, wireType 0 =*/304).int32(message.edition); if (message.enableGoogleMlIntegration != null && Object.hasOwnProperty.call(message, "enableGoogleMlIntegration")) $root.google.protobuf.BoolValue.encode(message.enableGoogleMlIntegration, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.enableDataplexIntegration != null && Object.hasOwnProperty.call(message, "enableDataplexIntegration")) + $root.google.protobuf.BoolValue.encode(message.enableDataplexIntegration, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); return writer; }; @@ -94149,6 +94160,10 @@ message.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } + case 41: { + message.enableDataplexIntegration = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -94384,6 +94399,11 @@ if (error) return "enableGoogleMlIntegration." + error; } + if (message.enableDataplexIntegration != null && message.hasOwnProperty("enableDataplexIntegration")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableDataplexIntegration); + if (error) + return "enableDataplexIntegration." + error; + } return null; }; @@ -94679,6 +94699,11 @@ throw TypeError(".google.cloud.sql.v1beta4.Settings.enableGoogleMlIntegration: object expected"); message.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.fromObject(object.enableGoogleMlIntegration); } + if (object.enableDataplexIntegration != null) { + if (typeof object.enableDataplexIntegration !== "object") + throw TypeError(".google.cloud.sql.v1beta4.Settings.enableDataplexIntegration: object expected"); + message.enableDataplexIntegration = $root.google.protobuf.BoolValue.fromObject(object.enableDataplexIntegration); + } return message; }; @@ -94732,6 +94757,7 @@ object.dataCacheConfig = null; object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; object.enableGoogleMlIntegration = null; + object.enableDataplexIntegration = null; } if (message.settingsVersion != null && message.hasOwnProperty("settingsVersion")) object.settingsVersion = $root.google.protobuf.Int64Value.toObject(message.settingsVersion, options); @@ -94812,6 +94838,8 @@ object.edition = options.enums === String ? $root.google.cloud.sql.v1beta4.Settings.Edition[message.edition] === undefined ? message.edition : $root.google.cloud.sql.v1beta4.Settings.Edition[message.edition] : message.edition; if (message.enableGoogleMlIntegration != null && message.hasOwnProperty("enableGoogleMlIntegration")) object.enableGoogleMlIntegration = $root.google.protobuf.BoolValue.toObject(message.enableGoogleMlIntegration, options); + if (message.enableDataplexIntegration != null && message.hasOwnProperty("enableDataplexIntegration")) + object.enableDataplexIntegration = $root.google.protobuf.BoolValue.toObject(message.enableDataplexIntegration, options); return object; }; diff --git a/packages/google-cloud-sql/protos/protos.json b/packages/google-cloud-sql/protos/protos.json index de4bdc0c0f58..d25795e3681a 100644 --- a/packages/google-cloud-sql/protos/protos.json +++ b/packages/google-cloud-sql/protos/protos.json @@ -9435,6 +9435,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "enableDataplexIntegration": { + "type": "google.protobuf.BoolValue", + "id": 41, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { From 3f2cdb4a250a8a19959bb14900e1a59d985ac3b5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:01:45 -0400 Subject: [PATCH 14/17] chore: [containeranalysis] restore Go library generation (#5528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: restore Go library generation PiperOrigin-RevId: 650361587 Source-Link: https://github.com/googleapis/googleapis/commit/8ea348f641af88cd703023f72a857497c206a229 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5c0e216d3b614bb903946bb4094e87df538183d2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNvbnRhaW5lcmFuYWx5c2lzLy5Pd2xCb3QueWFtbCIsImgiOiI1YzBlMjE2ZDNiNjE0YmI5MDM5NDZiYjQwOTRlODdkZjUzODE4M2QyIn0= * 🦉 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 --- .../devtools/containeranalysis/v1/containeranalysis.proto | 2 +- packages/google-devtools-containeranalysis/protos/protos.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto index c6e7eb7462de..21ce24a1e105 100644 --- a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +++ b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1/containeranalysis.proto @@ -25,7 +25,7 @@ import "google/iam/v1/policy.proto"; import "grafeas/v1/severity.proto"; option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1"; -option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis"; +option go_package = "cloud.google.com/go/containeranalysis/apiv1/containeranalysispb;containeranalysispb"; option java_multiple_files = true; option java_package = "com.google.containeranalysis.v1"; option objc_class_prefix = "GCA"; diff --git a/packages/google-devtools-containeranalysis/protos/protos.json b/packages/google-devtools-containeranalysis/protos/protos.json index d61e7e6410a8..0dfc847b3ad8 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.json +++ b/packages/google-devtools-containeranalysis/protos/protos.json @@ -5200,7 +5200,7 @@ "v1": { "options": { "csharp_namespace": "Google.Cloud.DevTools.ContainerAnalysis.V1", - "go_package": "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis", + "go_package": "cloud.google.com/go/containeranalysis/apiv1/containeranalysispb;containeranalysispb", "java_multiple_files": true, "java_package": "com.google.containeranalysis.v1", "objc_class_prefix": "GCA", From 63f8e88a7cd2f64bfc39aa26a1bfe24963285e1b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:17:02 -0400 Subject: [PATCH 15/17] feat: [securitycenter] added cloud provider field to list findings response (#5529) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: added cloud provider field to list findings response feat: added ResourceValueConfig protos and API methods feat: added etd custom module protos and API methods feat: added toxic combination field to finding feat: added attack path API methods docs: update toxic combinations comments docs: update examples in comments to use backticks PiperOrigin-RevId: 650374217 Source-Link: https://github.com/googleapis/googleapis/commit/f6b7b348396bfd934be0dfbb0b4c96ef6dde6327 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7379e7c4493b24d64fc43384e0566ccb8e1ffeff Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiI3Mzc5ZTdjNDQ5M2IyNGQ2NGZjNDMzODRlMDU2NmNjYjhlMWZmZWZmIn0= * 🦉 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 --- .../google-cloud-securitycenter/README.md | 18 + .../cloud/securitycenter/v1/asset.proto | 2 + .../securitycenter/v1/attack_exposure.proto | 71 + .../cloud/securitycenter/v1/attack_path.proto | 131 + .../securitycenter/v1/bigquery_export.proto | 2 + .../cloud/securitycenter/v1/cloud_armor.proto | 12 +- ...event_threat_detection_custom_module.proto | 85 + ...event_threat_detection_custom_module.proto | 102 + ...tion_custom_module_validation_errors.proto | 59 + .../securitycenter/v1/external_system.proto | 2 + .../cloud/securitycenter/v1/finding.proto | 6 + .../securitycenter/v1/mitre_attack.proto | 14 +- .../cloud/securitycenter/v1/mute_config.proto | 14 +- .../v1/notification_config.proto | 2 + .../v1/organization_settings.proto | 2 + .../cloud/securitycenter/v1/resource.proto | 195 + .../v1/resource_value_config.proto | 123 + .../v1/securitycenter_service.proto | 1049 +- .../cloud/securitycenter/v1/simulation.proto | 56 + .../securitycenter/v1/valued_resource.proto | 88 + .../protos/protos.d.ts | 24295 +++--- .../protos/protos.js | 67381 ++++++++++------ .../protos/protos.json | 1929 +- .../samples/README.md | 324 + ...ter.batch_create_resource_value_configs.js | 68 + .../v1/security_center.bulk_mute_findings.js | 4 +- ...security_center.create_big_query_export.js | 4 +- ...te_event_threat_detection_custom_module.js | 72 + .../v1/security_center.create_finding.js | 2 +- .../v1/security_center.create_mute_config.js | 4 +- ...urity_center.create_notification_config.js | 4 +- ...security_health_analytics_custom_module.js | 6 +- .../v1/security_center.create_source.js | 2 +- ...security_center.delete_big_query_export.js | 6 +- ...te_event_threat_detection_custom_module.js | 65 + .../v1/security_center.delete_mute_config.js | 9 +- ...urity_center.delete_notification_config.js | 6 +- ...ity_center.delete_resource_value_config.js | 61 + ...security_health_analytics_custom_module.js | 6 +- .../security_center.get_big_query_export.js | 6 +- ...ve_event_threat_detection_custom_module.js | 66 + ...security_health_analytics_custom_module.js | 6 +- ...et_event_threat_detection_custom_module.js | 65 + .../v1/security_center.get_mute_config.js | 9 +- ...security_center.get_notification_config.js | 6 +- ...curity_center.get_organization_settings.js | 2 +- ...curity_center.get_resource_value_config.js | 62 + ...security_health_analytics_custom_module.js | 6 +- .../v1/security_center.get_simulation.js | 64 + .../v1/security_center.get_source.js | 2 +- .../v1/security_center.get_valued_resource.js | 63 + .../v1/security_center.group_assets.js | 4 +- .../v1/security_center.group_findings.js | 16 +- .../v1/security_center.list_assets.js | 4 +- .../v1/security_center.list_attack_paths.js | 85 + .../security_center.list_big_query_exports.js | 4 +- ...t_event_threat_detection_custom_modules.js | 83 + ...ecurity_health_analytics_custom_modules.js | 6 +- ...e_event_threat_detection_custom_modules.js | 83 + ...ecurity_health_analytics_custom_modules.js | 6 +- ...t_event_threat_detection_custom_modules.js | 83 + .../v1/security_center.list_findings.js | 10 +- .../v1/security_center.list_mute_configs.js | 4 +- ...rity_center.list_resource_value_configs.js | 81 + ...ecurity_health_analytics_custom_modules.js | 6 +- .../v1/security_center.list_sources.js | 4 +- .../security_center.list_valued_resources.js | 100 + .../v1/security_center.run_asset_discovery.js | 2 +- .../v1/security_center.set_finding_state.js | 6 +- .../generated/v1/security_center.set_mute.js | 6 +- ...te_event_threat_detection_custom_module.js | 66 + ...ity_center.update_resource_value_config.js | 66 + ...security_health_analytics_custom_module.js | 4 +- ...te_event_threat_detection_custom_module.js | 76 + ...tadata_google.cloud.securitycenter.v1.json | 812 +- .../src/v1/gapic_metadata.json | 204 + .../src/v1/security_center_client.ts | 7706 +- .../src/v1/security_center_client_config.json | 72 + .../src/v1/security_center_proto_list.json | 8 + .../test/gapic_security_center_v1.ts | 6974 +- 80 files changed, 74569 insertions(+), 38650 deletions(-) create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_exposure.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_path.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource_value_config.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/simulation.proto create mode 100644 packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/valued_resource.proto create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js create mode 100644 packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js diff --git a/packages/google-cloud-securitycenter/README.md b/packages/google-cloud-securitycenter/README.md index 0e6db8adb7a2..94472ab64bbb 100644 --- a/packages/google-cloud-securitycenter/README.md +++ b/packages/google-cloud-securitycenter/README.md @@ -91,36 +91,51 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Security_center.batch_create_resource_value_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.bulk_mute_findings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_big_query_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.create_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_finding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_mute_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_notification_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.delete_big_query_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.delete_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.delete_mute_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.delete_notification_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.delete_resource_value_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.delete_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_big_query_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.get_effective_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_effective_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.get_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_iam_policy.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_mute_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_notification_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_organization_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.get_resource_value_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.get_simulation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.get_valued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.group_assets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.group_findings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_assets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_attack_paths | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_big_query_exports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_descendant_event_threat_detection_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_descendant_security_health_analytics_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_effective_event_threat_detection_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_effective_security_health_analytics_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_event_threat_detection_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_findings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_mute_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_notification_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_notification_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_notification_configs.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_resource_value_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_security_health_analytics_custom_modules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.list_sources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.list_valued_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.run_asset_discovery | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.set_finding_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_iam_policy.js,packages/google-cloud-securitycenter/samples/README.md) | @@ -128,14 +143,17 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Security_center.simulate_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.simulate_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.simulate_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.test_iam_permissions.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_big_query_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_big_query_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_big_query_export.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.update_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_external_system | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_external_system.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_external_system.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_finding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_finding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_finding.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_mute_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_mute_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_mute_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_notification_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_notification_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_notification_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_organization_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_organization_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_organization_settings.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.update_resource_value_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_security_health_analytics_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_security_marks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_marks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_marks.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.update_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_source.js,packages/google-cloud-securitycenter/samples/README.md) | +| Security_center.validate_event_threat_detection_custom_module | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_finding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.create_finding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.create_finding.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.create_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.create_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.create_source.js,packages/google-cloud-securitycenter/samples/README.md) | | Security_center.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.get_iam_policy.js,packages/google-cloud-securitycenter/samples/README.md) | diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto index 2a277d3d6a2e..489fb3c3135a 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/asset.proto @@ -42,6 +42,8 @@ message Asset { pattern: "organizations/{organization}/assets/{asset}" pattern: "folders/{folder}/assets/{asset}" pattern: "projects/{project}/assets/{asset}" + plural: "assets" + singular: "asset" }; // Security Command Center managed properties. These properties are managed by diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_exposure.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_exposure.proto new file mode 100644 index 000000000000..636393c9e68b --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_exposure.proto @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "AttackExposureProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// An attack exposure contains the results of an attack path simulation run. +message AttackExposure { + // This enum defines the various states an AttackExposure can be in. + enum State { + // The state is not specified. + STATE_UNSPECIFIED = 0; + + // The attack exposure has been calculated. + CALCULATED = 1; + + // The attack exposure has not been calculated. + NOT_CALCULATED = 2; + } + + // A number between 0 (inclusive) and infinity that represents how important + // this finding is to remediate. The higher the score, the more important it + // is to remediate. + double score = 1; + + // The most recent time the attack exposure was updated on this finding. + google.protobuf.Timestamp latest_calculation_time = 2; + + // The resource name of the attack path simulation result that contains the + // details regarding this attack exposure score. + // Example: `organizations/123/simulations/456/attackExposureResults/789` + string attack_exposure_result = 3; + + // What state this AttackExposure is in. This captures whether or not an + // attack exposure has been calculated or not. + State state = 4; + + // The number of high value resources that are exposed as a result of this + // finding. + int32 exposed_high_value_resources_count = 5; + + // The number of medium value resources that are exposed as a result of this + // finding. + int32 exposed_medium_value_resources_count = 6; + + // The number of high value resources that are exposed as a result of this + // finding. + int32 exposed_low_value_resources_count = 7; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_path.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_path.proto new file mode 100644 index 000000000000..cf561417f87d --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/attack_path.proto @@ -0,0 +1,131 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "AttackPathProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// A path that an attacker could take to reach an exposed resource. +message AttackPath { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/AttackPath" + pattern: "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}" + plural: "attackPaths" + singular: "attackPath" + }; + + // Represents one point that an attacker passes through in this attack path. + message AttackPathNode { + // A finding that is associated with this node in the attack path. + message PathNodeAssociatedFinding { + // Canonical name of the associated findings. Example: + // `organizations/123/sources/456/findings/789` + string canonical_finding = 1; + + // The additional taxonomy group within findings from a given source. + string finding_category = 2; + + // Full resource name of the finding. + string name = 3; + } + + // The type of the incoming attack step node. + enum NodeType { + // Type not specified + NODE_TYPE_UNSPECIFIED = 0; + + // Incoming edge joined with AND + NODE_TYPE_AND = 1; + + // Incoming edge joined with OR + NODE_TYPE_OR = 2; + + // Incoming edge is defense + NODE_TYPE_DEFENSE = 3; + + // Incoming edge is attacker + NODE_TYPE_ATTACKER = 4; + } + + // Detailed steps the attack can take between path nodes. + message AttackStepNode { + // Unique ID for one Node + string uuid = 1; + + // Attack step type. Can be either AND, OR or DEFENSE + NodeType type = 2; + + // User friendly name of the attack step + string display_name = 3; + + // Attack step labels for metadata + map labels = 4; + + // Attack step description + string description = 5; + } + + // The name of the resource at this point in the attack path. + // The format of the name follows the Cloud Asset Inventory [resource + // name + // format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + string resource = 1; + + // The [supported resource + // type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + string resource_type = 2; + + // Human-readable name of this resource. + string display_name = 3; + + // The findings associated with this node in the attack path. + repeated PathNodeAssociatedFinding associated_findings = 4; + + // Unique id of the attack path node. + string uuid = 5; + + // A list of attack step nodes that exist in this attack path node. + repeated AttackStepNode attack_steps = 6; + } + + // Represents a connection between a source node and a destination node in + // this attack path. + message AttackPathEdge { + // The attack node uuid of the source node. + string source = 1; + + // The attack node uuid of the destination node. + string destination = 2; + } + + // The attack path name, for example, + // `organizations/12/simulation/34/valuedResources/56/attackPaths/78` + string name = 1; + + // A list of nodes that exist in this attack path. + repeated AttackPathNode path_nodes = 2; + + // A list of the edges between nodes in this attack path. + repeated AttackPathEdge edges = 3; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/bigquery_export.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/bigquery_export.proto index 17275ed80de9..ce19dd1c67e7 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/bigquery_export.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/bigquery_export.proto @@ -35,6 +35,8 @@ message BigQueryExport { pattern: "organizations/{organization}/bigQueryExports/{export}" pattern: "folders/{folder}/bigQueryExports/{export}" pattern: "projects/{project}/bigQueryExports/{export}" + plural: "bigQueryExports" + singular: "bigQueryExport" }; // The relative resource name of this export. See: diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_armor.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_armor.proto index a6875c77529a..81b590e9a765 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_armor.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_armor.proto @@ -47,8 +47,8 @@ message CloudArmor { Attack attack = 4; // Distinguish between volumetric & protocol DDoS attack and - // application layer attacks. For example, “L3_4” for Layer 3 and Layer 4 DDoS - // attacks, or “L_7” for Layer 7 DDoS attacks. + // application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS + // attacks, or "L_7" for Layer 7 DDoS attacks. string threat_vector = 5; // Duration of attack from the start until the current moment (updated every 5 @@ -64,9 +64,9 @@ message SecurityPolicy { // "my-security-policy". string name = 1; - // The type of Google Cloud Armor security policy for example, ‘backend - // security policy’, ‘edge security policy’, ‘network edge security policy’, - // or ‘always-on DDoS protection’. + // The type of Google Cloud Armor security policy for example, 'backend + // security policy', 'edge security policy', 'network edge security policy', + // or 'always-on DDoS protection'. string type = 2; // Whether or not the associated rule or policy is in preview mode. @@ -109,6 +109,6 @@ message Attack { // Total BPS (bytes per second) volume of attack. int32 volume_bps = 2; - // Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + // Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. string classification = 3; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto new file mode 100644 index 000000000000..4f1ee9fc6deb --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "EffectiveEventThreatDetectionCustomModuleProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// An EffectiveEventThreatDetectionCustomModule is the representation of +// an Event Threat Detection custom module at a specified level of the +// resource hierarchy: organization, folder, or project. If a custom module is +// inherited from a parent organization or folder, the value of the +// `enablement_state` property in EffectiveEventThreatDetectionCustomModule is +// set to the value that is effective in the parent, instead of `INHERITED`. +// For example, if the module is enabled in a parent organization or folder, the +// effective `enablement_state` for the module in all child folders or projects +// is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. +message EffectiveEventThreatDetectionCustomModule { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule" + pattern: "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}" + pattern: "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}" + pattern: "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}" + }; + + // The enablement state of the module. + enum EnablementState { + // Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given level. + ENABLED = 1; + + // The module is disabled at the given level. + DISABLED = 2; + } + + // Output only. The resource name of the effective ETD custom module. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + // * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + // * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Config for the effective module. + google.protobuf.Struct config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective state of enablement for the module at the given + // level of the hierarchy. + EnablementState enablement_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + string type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The human readable name to be displayed for the module. + string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The description for the module. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto new file mode 100644 index 000000000000..a866d9ccaa46 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto @@ -0,0 +1,102 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "EventThreatDetectionCustomModuleProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Represents an instance of an Event Threat Detection custom module, +// including its full module name, display name, enablement state, and last +// updated time. You can create a custom module at the organization, folder, or +// project level. Custom modules that you create at the organization or folder +// level are inherited by child folders and projects. +message EventThreatDetectionCustomModule { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + pattern: "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}" + pattern: "folders/{folder}/eventThreatDetectionSettings/customModules/{module}" + pattern: "projects/{project}/eventThreatDetectionSettings/customModules/{module}" + }; + + // The enablement state of the module. + enum EnablementState { + // Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given level. + ENABLED = 1; + + // The module is disabled at the given level. + DISABLED = 2; + + // When the enablement state is inherited. + INHERITED = 3; + } + + // Immutable. The resource name of the Event Threat Detection custom module. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + // * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + // * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Config for the module. For the resident module, its config value is defined + // at this level. For the inherited module, its config value is inherited from + // the ancestor module. + google.protobuf.Struct config = 2; + + // Output only. The closest ancestor module that this module inherits the + // enablement state from. The format is the same as the + // EventThreatDetectionCustomModule resource name. + string ancestor_module = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // The state of enablement for the module at the given level of the hierarchy. + EnablementState enablement_state = 4; + + // Type for the module. e.g. CONFIGURABLE_BAD_IP. + string type = 5; + + // The human readable name to be displayed for the module. + string display_name = 6; + + // The description for the module. + string description = 7; + + // Output only. The time the module was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The editor the module was last updated by. + string last_editor = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto new file mode 100644 index 000000000000..12065c98875c --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto @@ -0,0 +1,59 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "EventThreatDetectionCustomModuleValidationErrorsProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// A list of zero or more errors encountered while validating the uploaded +// configuration of an Event Threat Detection Custom Module. +message CustomModuleValidationErrors { + repeated CustomModuleValidationError errors = 1; +} + +// An error encountered while validating the uploaded configuration of an +// Event Threat Detection Custom Module. +message CustomModuleValidationError { + // A description of the error, suitable for human consumption. Required. + string description = 1; + + // The path, in RFC 8901 JSON Pointer format, to the field that failed + // validation. This may be left empty if no specific field is affected. + string field_path = 2; + + // The initial position of the error in the uploaded text version of the + // module. This field may be omitted if no specific position applies, or if + // one could not be computed. + optional Position start = 3; + + // The end position of the error in the uploaded text version of the + // module. This field may be omitted if no specific position applies, or if + // one could not be computed.. + optional Position end = 4; +} + +// A position in the uploaded text version of a module. +message Position { + int32 line_number = 1; + + int32 column_number = 2; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/external_system.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/external_system.proto index ff053cf3e940..bcc2456c6add 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/external_system.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/external_system.proto @@ -34,6 +34,8 @@ message ExternalSystem { pattern: "organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" pattern: "folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" pattern: "projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" + plural: "externalSystems" + singular: "externalSystem" }; // Information about the ticket, if any, that is being used to track the diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto index 8cf1857bc7b5..c1b15c0892e1 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/access.proto"; import "google/cloud/securitycenter/v1/application.proto"; +import "google/cloud/securitycenter/v1/attack_exposure.proto"; import "google/cloud/securitycenter/v1/backup_disaster_recovery.proto"; import "google/cloud/securitycenter/v1/cloud_armor.proto"; import "google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto"; @@ -70,6 +71,8 @@ message Finding { pattern: "organizations/{organization}/sources/{source}/findings/{finding}" pattern: "folders/{folder}/sources/{source}/findings/{finding}" pattern: "projects/{project}/sources/{source}/findings/{finding}" + plural: "findings" + singular: "finding" }; // The state of the finding. @@ -367,6 +370,9 @@ message Finding { // Database associated with the finding. Database database = 44; + // The results of an attack path simulation relevant to this finding. + AttackExposure attack_exposure = 45; + // File associated with the finding. repeated File files = 46; diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mitre_attack.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mitre_attack.proto index 90e70c7c6baf..c9072542d6aa 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mitre_attack.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mitre_attack.proto @@ -78,7 +78,7 @@ message MitreAttack { // MITRE ATT&CK techniques that can be referenced by SCC findings. // See: https://attack.mitre.org/techniques/enterprise/ - // Next ID: 59 + // Next ID: 63 enum Technique { // Unspecified value. TECHNIQUE_UNSPECIFIED = 0; @@ -107,6 +107,9 @@ message MitreAttack { // T1059.004 UNIX_SHELL = 7; + // T1059.006 + PYTHON = 59; + // T1069 PERMISSION_GROUPS_DISCOVERY = 18; @@ -254,8 +257,17 @@ message MitreAttack { // T1595.001 SCANNING_IP_BLOCKS = 2; + // T1609 + CONTAINER_ADMINISTRATION_COMMAND = 60; + + // T1611 + ESCAPE_TO_HOST = 61; + // T1613 CONTAINER_AND_RESOURCE_DISCOVERY = 57; + + // T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62; } // The MITRE ATT&CK tactic most closely represented by this finding, if any. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mute_config.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mute_config.proto index 69b493dc2bf5..ed82eca48b6f 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mute_config.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/mute_config.proto @@ -36,12 +36,20 @@ message MuteConfig { pattern: "organizations/{organization}/muteConfigs/{mute_config}" pattern: "folders/{folder}/muteConfigs/{mute_config}" pattern: "projects/{project}/muteConfigs/{mute_config}" + pattern: "organizations/{organization}/locations/{location}/muteConfigs/{mute_config}" + pattern: "folders/{folder}/locations/{location}/muteConfigs/{mute_config}" + pattern: "projects/{project}/locations/{location}/muteConfigs/{mute_config}" + plural: "muteConfigs" + singular: "muteConfig" }; // This field will be ignored if provided on config creation. Format - // "organizations/{organization}/muteConfigs/{mute_config}" - // "folders/{folder}/muteConfigs/{mute_config}" - // "projects/{project}/muteConfigs/{mute_config}" + // `organizations/{organization}/muteConfigs/{mute_config}` + // `folders/{folder}/muteConfigs/{mute_config}` + // `projects/{project}/muteConfigs/{mute_config}` + // `organizations/{organization}/locations/global/muteConfigs/{mute_config}` + // `folders/{folder}/locations/global/muteConfigs/{mute_config}` + // `projects/{project}/locations/global/muteConfigs/{mute_config}` string name = 1; // The human readable name to be displayed for the mute config. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_config.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_config.proto index 660733dbd43d..d0e6e0caadcb 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_config.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/notification_config.proto @@ -41,6 +41,8 @@ message NotificationConfig { pattern: "organizations/{organization}/notificationConfigs/{notification_config}" pattern: "folders/{folder}/notificationConfigs/{notification_config}" pattern: "projects/{project}/notificationConfigs/{notification_config}" + plural: "notificationConfigs" + singular: "notificationConfig" }; // The config for streaming-based notifications, which send each event as soon diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto index 620cc03acc79..6466c205d50e 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/organization_settings.proto @@ -31,6 +31,8 @@ message OrganizationSettings { option (google.api.resource) = { type: "securitycenter.googleapis.com/OrganizationSettings" pattern: "organizations/{organization}/organizationSettings" + plural: "organizationSettings" + singular: "organizationSettings" }; // The configuration used for Asset Discovery runs. diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto index da9ec2950d1b..6faee3a403f8 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource.proto @@ -55,4 +55,199 @@ message Resource { // ancestry. The first folder is the deepest nested folder, and the last // folder is the folder directly under the Organization. repeated Folder folders = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Indicates which cloud provider the resource resides in. + CloudProvider cloud_provider = 9; + + // Indicates which organization or tenant in the cloud provider the finding + // applies to. + string organization = 10; + + // The parent service or product from which the resource is provided, for + // example, GKE or SNS. + string service = 11; + + // The region or location of the service (if applicable). + string location = 12; + + oneof cloud_provider_metadata { + // The AWS metadata associated with the finding. + AwsMetadata aws_metadata = 16; + + // The Azure metadata associated with the finding. + AzureMetadata azure_metadata = 17; + } + + // Provides the path to the resource within the resource hierarchy. + ResourcePath resource_path = 18; + + // A string representation of the resource path. + // For Google Cloud, it has the format of + // `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` + // where there can be any number of folders. + // For AWS, it has the format of + // `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + // where there can be any number of organizational units. + // For Azure, it has the format of + // `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + // where there can be any number of management groups. + string resource_path_string = 19; +} + +// Enumeration representing the various cloud providers a finding's resource +// could reside in. +enum CloudProvider { + // The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0; + + // The cloud provider is Google Cloud Platform. + GOOGLE_CLOUD_PLATFORM = 1; + + // The cloud provider is Amazon Web Services. + AMAZON_WEB_SERVICES = 2; + + // The cloud provider is Microsoft Azure. + MICROSOFT_AZURE = 3; +} + +// AWS metadata associated with the resource, only applicable if the finding's +// cloud provider is Amazon Web Services. +message AwsMetadata { + // An organization is a collection of accounts that are centrally managed + // together using consolidated billing, organized hierarchically with + // organizational units (OUs), and controlled with policies. + message AwsOrganization { + // The unique identifier (ID) for the organization. The regex pattern for an + // organization ID string requires "o-" followed by from 10 to 32 lowercase + // letters or digits. + string id = 1; + } + + // An Organizational Unit (OU) is a container of AWS accounts within a root of + // an organization. Policies that are attached to an OU apply to all accounts + // contained in that OU and in any child OUs. + message AwsOrganizationalUnit { + // The unique identifier (ID) associated with this OU. The regex pattern for + // an organizational unit ID string requires "ou-" followed by from 4 to 32 + // lowercase letters or digits (the ID of the root that contains the OU). + // This string is followed by a second "-" dash and from 8 to 32 additional + // lowercase letters or digits. For example, "ou-ab12-cd34ef56". + string id = 1; + + // The friendly name of the OU. + string name = 2; + } + + // An AWS account that is a member of an organization. + message AwsAccount { + // The unique identifier (ID) of the account, containing exactly 12 digits. + string id = 1; + + // The friendly name of this account. + string name = 2; + } + + // The AWS organization associated with the resource. + AwsOrganization organization = 2; + + // A list of AWS organizational units associated with the resource, ordered + // from lowest level (closest to the account) to highest level. + repeated AwsOrganizationalUnit organizational_units = 3; + + // The AWS account associated with the resource. + AwsAccount account = 4; +} + +// Azure metadata associated with the resource, only applicable if the finding's +// cloud provider is Microsoft Azure. +message AzureMetadata { + // Represents an Azure management group. + message AzureManagementGroup { + // The UUID of the Azure management group, for example, + // `20000000-0001-0000-0000-000000000000`. + string id = 1; + + // The display name of the Azure management group. + string display_name = 2; + } + + // Represents an Azure subscription. + message AzureSubscription { + // The UUID of the Azure subscription, for example, + // `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. + string id = 1; + + // The display name of the Azure subscription. + string display_name = 2; + } + + // Represents an Azure resource group. + message AzureResourceGroup { + // The name of the Azure resource group. This is not a UUID. + string name = 1; + } + + // A list of Azure management groups associated with the resource, ordered + // from lowest level (closest to the subscription) to highest level. + repeated AzureManagementGroup management_groups = 4; + + // The Azure subscription associated with the resource. + AzureSubscription subscription = 5; + + // The Azure resource group associated with the resource. + AzureResourceGroup resource_group = 6; +} + +// Represents the path of resources leading up to the resource this finding is +// about. +message ResourcePath { + // The type of resource the node represents. + enum ResourcePathNodeType { + // Node type is unspecified. + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0; + + // The node represents a Google Cloud organization. + GCP_ORGANIZATION = 1; + + // The node represents a Google Cloud folder. + GCP_FOLDER = 2; + + // The node represents a Google Cloud project. + GCP_PROJECT = 3; + + // The node represents an AWS organization. + AWS_ORGANIZATION = 4; + + // The node represents an AWS organizational unit. + AWS_ORGANIZATIONAL_UNIT = 5; + + // The node represents an AWS account. + AWS_ACCOUNT = 6; + + // The node represents an Azure management group. + AZURE_MANAGEMENT_GROUP = 7; + + // The node represents an Azure subscription. + AZURE_SUBSCRIPTION = 8; + + // The node represents an Azure resource group. + AZURE_RESOURCE_GROUP = 9; + } + + // A node within the resource path. Each node represents a resource within the + // resource hierarchy. + message ResourcePathNode { + // The type of resource this node represents. + ResourcePathNodeType node_type = 1; + + // The ID of the resource this node represents. + string id = 2; + + // The display name of the resource this node represents. + string display_name = 3; + } + + // The list of nodes that make the up resource path, ordered from lowest + // level to highest level. + repeated ResourcePathNode nodes = 1; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource_value_config.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource_value_config.proto new file mode 100644 index 000000000000..acf6681bd969 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/resource_value_config.proto @@ -0,0 +1,123 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "ResourceValueConfigProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// A resource value configuration (RVC) is a mapping configuration of user's +// resources to resource values. Used in Attack path simulations. +message ResourceValueConfig { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/ResourceValueConfig" + pattern: "organizations/{organization}/resourceValueConfigs/{resource_value_config}" + plural: "resourceValueConfigs" + singular: "resourceValueConfig" + }; + + // Resource value mapping for Sensitive Data Protection findings. + // If any of these mappings have a resource value that is not unspecified, + // the resource_value field will be ignored when reading this configuration. + message SensitiveDataProtectionMapping { + // Resource value mapping for high-sensitivity Sensitive Data Protection + // findings + ResourceValue high_sensitivity_mapping = 1; + + // Resource value mapping for medium-sensitivity Sensitive Data Protection + // findings + ResourceValue medium_sensitivity_mapping = 2; + } + + // Name for the resource value configuration + string name = 1; + + // Required. Resource value level this expression represents + ResourceValue resource_value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Tag values combined with `AND` to check against. + // Values in the form "tagValues/123" + // Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` + // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + repeated string tag_values = 3 [(google.api.field_behavior) = REQUIRED]; + + // Apply resource_value only to resources that match resource_type. + // resource_type will be checked with `AND` of other resources. + // For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" + // will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + string resource_type = 4; + + // Project or folder to scope this configuration to. + // For example, "project/456" would apply this configuration only to resources + // in "project/456" scope will be checked with `AND` of other + // resources. + string scope = 5; + + // List of resource labels to search for, evaluated with `AND`. + // For example, `"resource_labels_selector": {"key": "value", "env": "prod"}` + // will match resources with labels "key": "value" `AND` "env": + // "prod" + // https://cloud.google.com/resource-manager/docs/creating-managing-labels + map resource_labels_selector = 6; + + // Description of the resource value configuration. + string description = 7; + + // Output only. Timestamp this resource value configuration was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp this resource value configuration was last updated. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud provider this configuration applies to + CloudProvider cloud_provider = 10; + + // A mapping of the sensitivity on Sensitive Data Protection finding to + // resource values. This mapping can only be used in combination with a + // resource_type that is related to BigQuery, e.g. + // "bigquery.googleapis.com/Dataset". + SensitiveDataProtectionMapping sensitive_data_protection_mapping = 11; +} + +// Value enum to map to a resource +enum ResourceValue { + // Unspecific value + RESOURCE_VALUE_UNSPECIFIED = 0; + + // High resource value + HIGH = 1; + + // Medium resource value + MEDIUM = 2; + + // Low resource value + LOW = 3; + + // No resource value, e.g. ignore these resources + NONE = 4; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto index a18fcc2e9613..696875baece3 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -21,19 +21,27 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/asset.proto"; +import "google/cloud/securitycenter/v1/attack_path.proto"; import "google/cloud/securitycenter/v1/bigquery_export.proto"; +import "google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto"; import "google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto"; +import "google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto"; +import "google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/finding.proto"; import "google/cloud/securitycenter/v1/folder.proto"; import "google/cloud/securitycenter/v1/mute_config.proto"; import "google/cloud/securitycenter/v1/notification_config.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; +import "google/cloud/securitycenter/v1/resource.proto"; +import "google/cloud/securitycenter/v1/resource_value_config.proto"; import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/cloud/securitycenter/v1/security_health_analytics_custom_config.proto"; import "google/cloud/securitycenter/v1/security_health_analytics_custom_module.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; +import "google/cloud/securitycenter/v1/simulation.proto"; import "google/cloud/securitycenter/v1/source.proto"; +import "google/cloud/securitycenter/v1/valued_resource.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; @@ -50,6 +58,24 @@ option java_multiple_files = true; option java_package = "com.google.cloud.securitycenter.v1"; option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; option ruby_package = "Google::Cloud::SecurityCenter::V1"; +option (google.api.resource_definition) = { + type: "securitycenter.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "securitycenter.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "securitycenter.googleapis.com/OrganizationSimulation" + pattern: "organizations/{organization}/simulations/{simulation}" +}; +option (google.api.resource_definition) = { + type: "securitycenter.googleapis.com/EventThreatDetectionSettings" + pattern: "organizations/{organization}/eventThreatDetectionSettings" + pattern: "folders/{folder}/eventThreatDetectionSettings" + pattern: "projects/{project}/eventThreatDetectionSettings" +}; // V1 APIs for Security Center service. service SecurityCenter { @@ -128,14 +154,26 @@ service SecurityCenter { option (google.api.http) = { post: "/v1/{parent=organizations/*}/muteConfigs" body: "mute_config" + additional_bindings { + post: "/v1/{parent=organizations/*/locations/*}/muteConfigs" + body: "mute_config" + } additional_bindings { post: "/v1/{parent=folders/*}/muteConfigs" body: "mute_config" } + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/muteConfigs" + body: "mute_config" + } additional_bindings { post: "/v1/{parent=projects/*}/muteConfigs" body: "mute_config" } + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/muteConfigs" + body: "mute_config" + } }; option (google.api.method_signature) = "parent,mute_config"; option (google.api.method_signature) = "parent,mute_config,mute_config_id"; @@ -168,6 +206,15 @@ service SecurityCenter { delete: "/v1/{name=organizations/*/muteConfigs/*}" additional_bindings { delete: "/v1/{name=folders/*/muteConfigs/*}" } additional_bindings { delete: "/v1/{name=projects/*/muteConfigs/*}" } + additional_bindings { + delete: "/v1/{name=organizations/*/locations/*/muteConfigs/*}" + } + additional_bindings { + delete: "/v1/{name=folders/*/locations/*/muteConfigs/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/muteConfigs/*}" + } }; option (google.api.method_signature) = "name"; } @@ -205,6 +252,23 @@ service SecurityCenter { option (google.api.method_signature) = "name"; } + // Get the simulation by name or the latest simulation for the given + // organization. + rpc GetSimulation(GetSimulationRequest) returns (Simulation) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/simulations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the valued resource by name + rpc GetValuedResource(GetValuedResourceRequest) returns (ValuedResource) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/simulations/*/valuedResources/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets a BigQuery export. rpc GetBigQueryExport(GetBigQueryExportRequest) returns (BigQueryExport) { option (google.api.http) = { @@ -231,6 +295,15 @@ service SecurityCenter { get: "/v1/{name=organizations/*/muteConfigs/*}" additional_bindings { get: "/v1/{name=folders/*/muteConfigs/*}" } additional_bindings { get: "/v1/{name=projects/*/muteConfigs/*}" } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/muteConfigs/*}" + } + additional_bindings { + get: "/v1/{name=folders/*/locations/*/muteConfigs/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/locations/*/muteConfigs/*}" + } }; option (google.api.method_signature) = "name"; } @@ -382,6 +455,15 @@ service SecurityCenter { get: "/v1/{parent=organizations/*}/muteConfigs" additional_bindings { get: "/v1/{parent=folders/*}/muteConfigs" } additional_bindings { get: "/v1/{parent=projects/*}/muteConfigs" } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*/muteConfigs}" + } + additional_bindings { + get: "/v1/{parent=folders/*/locations/*/muteConfigs}" + } + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/muteConfigs}" + } }; option (google.api.method_signature) = "parent"; } @@ -585,6 +667,18 @@ service SecurityCenter { patch: "/v1/{mute_config.name=projects/*/muteConfigs/*}" body: "mute_config" } + additional_bindings { + patch: "/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}" + body: "mute_config" + } + additional_bindings { + patch: "/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}" + body: "mute_config" + } + additional_bindings { + patch: "/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}" + body: "mute_config" + } }; option (google.api.method_signature) = "mute_config,update_mask"; } @@ -744,6 +838,251 @@ service SecurityCenter { }; option (google.api.method_signature) = "parent"; } + + // Creates a resident Event Threat Detection custom module at the scope of the + // given Resource Manager parent, and also creates inherited custom modules + // for all descendants of the given parent. These modules are enabled by + // default. + rpc CreateEventThreatDetectionCustomModule( + CreateEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules" + body: "event_threat_detection_custom_module" + additional_bindings { + post: "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules" + body: "event_threat_detection_custom_module" + } + additional_bindings { + post: "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules" + body: "event_threat_detection_custom_module" + } + }; + option (google.api.method_signature) = + "parent,event_threat_detection_custom_module"; + } + + // Deletes the specified Event Threat Detection custom module and all of its + // descendants in the Resource Manager hierarchy. This method is only + // supported for resident custom modules. + rpc DeleteEventThreatDetectionCustomModule( + DeleteEventThreatDetectionCustomModuleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}" + additional_bindings { + delete: "/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}" + } + additional_bindings { + delete: "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets an Event Threat Detection custom module. + rpc GetEventThreatDetectionCustomModule( + GetEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all resident Event Threat Detection custom modules under the + // given Resource Manager parent and its descendants. + rpc ListDescendantEventThreatDetectionCustomModules( + ListDescendantEventThreatDetectionCustomModulesRequest) + returns (ListDescendantEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendant" + additional_bindings { + get: "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendant" + } + additional_bindings { + get: "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all Event Threat Detection custom modules for the given + // Resource Manager parent. This includes resident modules defined at the + // scope of the parent along with modules inherited from ancestors. + rpc ListEventThreatDetectionCustomModules( + ListEventThreatDetectionCustomModulesRequest) + returns (ListEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules" + additional_bindings { + get: "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules" + } + additional_bindings { + get: "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the Event Threat Detection custom module with the given name based + // on the given update mask. Updating the enablement state is supported for + // both resident and inherited modules (though resident modules cannot have an + // enablement state of "inherited"). Updating the display name or + // configuration of a module is supported for resident modules only. The type + // of a module cannot be changed. + rpc UpdateEventThreatDetectionCustomModule( + UpdateEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + patch: "/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}" + body: "event_threat_detection_custom_module" + additional_bindings { + patch: "/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}" + body: "event_threat_detection_custom_module" + } + additional_bindings { + patch: "/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}" + body: "event_threat_detection_custom_module" + } + }; + option (google.api.method_signature) = + "event_threat_detection_custom_module,update_mask"; + } + + // Validates the given Event Threat Detection custom module. + rpc ValidateEventThreatDetectionCustomModule( + ValidateEventThreatDetectionCustomModuleRequest) + returns (ValidateEventThreatDetectionCustomModuleResponse) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule" + body: "*" + additional_bindings { + post: "/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule" + body: "*" + } + }; + } + + // Gets an effective Event Threat Detection custom module at the given level. + rpc GetEffectiveEventThreatDetectionCustomModule( + GetEffectiveEventThreatDetectionCustomModuleRequest) + returns (EffectiveEventThreatDetectionCustomModule) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}" + } + additional_bindings { + get: "/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all effective Event Threat Detection custom modules for the + // given parent. This includes resident modules defined at the scope of the + // parent along with modules inherited from its ancestors. + rpc ListEffectiveEventThreatDetectionCustomModules( + ListEffectiveEventThreatDetectionCustomModulesRequest) + returns (ListEffectiveEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModules" + additional_bindings { + get: "/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModules" + } + additional_bindings { + get: "/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a ResourceValueConfig for an organization. Maps user's tags to + // difference resource values for use by the attack path simulation. + rpc BatchCreateResourceValueConfigs(BatchCreateResourceValueConfigsRequest) + returns (BatchCreateResourceValueConfigsResponse) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,requests"; + } + + // Deletes a ResourceValueConfig. + rpc DeleteResourceValueConfig(DeleteResourceValueConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=organizations/*/resourceValueConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a ResourceValueConfig. + rpc GetResourceValueConfig(GetResourceValueConfigRequest) + returns (ResourceValueConfig) { + option (google.api.http) = { + get: "/v1/{name=organizations/*/resourceValueConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all ResourceValueConfigs. + rpc ListResourceValueConfigs(ListResourceValueConfigsRequest) + returns (ListResourceValueConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*}/resourceValueConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an existing ResourceValueConfigs with new rules. + rpc UpdateResourceValueConfig(UpdateResourceValueConfigRequest) + returns (ResourceValueConfig) { + option (google.api.http) = { + patch: "/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}" + body: "resource_value_config" + }; + option (google.api.method_signature) = "resource_value_config,update_mask"; + } + + // Lists the valued resources for a set of simulation results and filter. + rpc ListValuedResources(ListValuedResourcesRequest) + returns (ListValuedResourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/simulations/*}/valuedResources" + additional_bindings { + get: "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the attack paths for a set of simulation results or valued resources + // and filter. + rpc ListAttackPaths(ListAttackPathsRequest) + returns (ListAttackPathsResponse) { + option (google.api.http) = { + get: "/v1/{parent=organizations/*/simulations/*}/attackPaths" + additional_bindings { + get: "/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPaths" + } + additional_bindings { + get: "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths" + } + }; + option (google.api.method_signature) = "parent"; + } } // Request message for bulk findings update. @@ -754,8 +1093,8 @@ service SecurityCenter { // 2. Once a bulk operation is started, there is no way to stop it. message BulkMuteFindingsRequest { // Required. The parent, at which bulk action needs to be applied. Its format - // is "organizations/[organization_id]", "folders/[folder_id]", - // "projects/[project_id]". + // is `organizations/[organization_id]`, `folders/[folder_id]`, + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "*" } @@ -794,7 +1133,7 @@ message BulkMuteFindingsResponse {} // Request message for creating a finding. message CreateFindingRequest { // Required. Resource name of the new finding's parent. Its format should be - // "organizations/[organization_id]/sources/[source_id]". + // `organizations/[organization_id]/sources/[source_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -815,8 +1154,8 @@ message CreateFindingRequest { // Request message for creating a mute config. message CreateMuteConfigRequest { // Required. Resource name of the new mute configs's parent. Its format is - // "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -834,11 +1173,122 @@ message CreateMuteConfigRequest { string mute_config_id = 3 [(google.api.field_behavior) = REQUIRED]; } +// Request message to create single resource value config +message CreateResourceValueConfigRequest { + // Required. Resource name of the new ResourceValueConfig's parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/ResourceValueConfig" + } + ]; + + // Required. The resource value config being created. + ResourceValueConfig resource_value_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message to create multiple resource value configs +message BatchCreateResourceValueConfigsRequest { + // Required. Resource name of the new ResourceValueConfig's parent. + // The parent field in the CreateResourceValueConfigRequest + // messages must either be empty or match this field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/ResourceValueConfig" + } + ]; + + // Required. The resource value configs to be created. + repeated CreateResourceValueConfigRequest requests = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BatchCreateResourceValueConfigs +message BatchCreateResourceValueConfigsResponse { + // The resource value configs created + repeated ResourceValueConfig resource_value_configs = 1; +} + +// Request message to delete resource value config +message DeleteResourceValueConfigRequest { + // Required. Name of the ResourceValueConfig to delete + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ResourceValueConfig" + } + ]; +} + +// Request message to get resource value config +message GetResourceValueConfigRequest { + // Required. Name of the resource value config to retrieve. Its format is + // `organizations/{organization}/resourceValueConfigs/{config_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ResourceValueConfig" + } + ]; +} + +// Request message to list resource value configs of a parent +message ListResourceValueConfigsRequest { + // Required. The parent, which owns the collection of resource value configs. + // Its format is + // `organizations/[organization_id]` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/ResourceValueConfig" + } + ]; + + // The number of results to return. The service may return fewer than + // this value. + // If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListResourceValueConfigs` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListResourceValueConfigs` must match the call that provided the + // page token. + // + // page_size can be specified, and the new page_size will be used. + string page_token = 3; +} + +// Response message to list resource value configs +message ListResourceValueConfigsResponse { + // The resource value configs from the specified parent. + repeated ResourceValueConfig resource_value_configs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is empty, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message to update resource value config +message UpdateResourceValueConfigRequest { + // Required. The resource value config being updated. + ResourceValueConfig resource_value_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + // Request message for creating a notification config. message CreateNotificationConfigRequest { // Required. Resource name of the new notification config's parent. Its format - // is "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // is `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -862,9 +1312,9 @@ message CreateNotificationConfigRequest { // Request message for creating Security Health Analytics custom modules. message CreateSecurityHealthAnalyticsCustomModuleRequest { // Required. Resource name of the new custom module's parent. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings", - // "folders/{folder}/securityHealthAnalyticsSettings", or - // "projects/{project}/securityHealthAnalyticsSettings" + // `organizations/{organization}/securityHealthAnalyticsSettings`, + // `folders/{folder}/securityHealthAnalyticsSettings`, or + // `projects/{project}/securityHealthAnalyticsSettings` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -882,7 +1332,7 @@ message CreateSecurityHealthAnalyticsCustomModuleRequest { // Request message for creating a source. message CreateSourceRequest { // Required. Resource name of the new source's parent. Its format should be - // "organizations/[organization_id]". + // `organizations/[organization_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -898,9 +1348,12 @@ message CreateSourceRequest { // Request message for deleting a mute config. message DeleteMuteConfigRequest { // Required. Name of the mute config to delete. Its format is - // organizations/{organization}/muteConfigs/{config_id}, - // folders/{folder}/muteConfigs/{config_id}, or - // projects/{project}/muteConfigs/{config_id} + // `organizations/{organization}/muteConfigs/{config_id}`, + // `folders/{folder}/muteConfigs/{config_id}`, + // `projects/{project}/muteConfigs/{config_id}`, + // `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + // `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + // `projects/{project}/locations/global/muteConfigs/{config_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -912,9 +1365,9 @@ message DeleteMuteConfigRequest { // Request message for deleting a notification config. message DeleteNotificationConfigRequest { // Required. Name of the notification config to delete. Its format is - // "organizations/[organization_id]/notificationConfigs/[config_id]", - // "folders/[folder_id]/notificationConfigs/[config_id]", - // or "projects/[project_id]/notificationConfigs/[config_id]". + // `organizations/[organization_id]/notificationConfigs/[config_id]`, + // `folders/[folder_id]/notificationConfigs/[config_id]`, + // or `projects/[project_id]/notificationConfigs/[config_id]`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -926,10 +1379,10 @@ message DeleteNotificationConfigRequest { // Request message for deleting Security Health Analytics custom modules. message DeleteSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the custom module to delete. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - // "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + // `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + // `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, // or - // "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + // `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -941,9 +1394,9 @@ message DeleteSecurityHealthAnalyticsCustomModuleRequest { // Request message for retrieving a BigQuery export. message GetBigQueryExportRequest { // Required. Name of the BigQuery export to retrieve. Its format is - // organizations/{organization}/bigQueryExports/{export_id}, - // folders/{folder}/bigQueryExports/{export_id}, or - // projects/{project}/bigQueryExports/{export_id} + // `organizations/{organization}/bigQueryExports/{export_id}`, + // `folders/{folder}/bigQueryExports/{export_id}`, or + // `projects/{project}/bigQueryExports/{export_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -955,9 +1408,12 @@ message GetBigQueryExportRequest { // Request message for retrieving a mute config. message GetMuteConfigRequest { // Required. Name of the mute config to retrieve. Its format is - // organizations/{organization}/muteConfigs/{config_id}, - // folders/{folder}/muteConfigs/{config_id}, or - // projects/{project}/muteConfigs/{config_id} + // `organizations/{organization}/muteConfigs/{config_id}`, + // `folders/{folder}/muteConfigs/{config_id}`, + // `projects/{project}/muteConfigs/{config_id}`, + // `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + // `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + // `projects/{project}/locations/global/muteConfigs/{config_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -969,9 +1425,9 @@ message GetMuteConfigRequest { // Request message for getting a notification config. message GetNotificationConfigRequest { // Required. Name of the notification config to get. Its format is - // "organizations/[organization_id]/notificationConfigs/[config_id]", - // "folders/[folder_id]/notificationConfigs/[config_id]", - // or "projects/[project_id]/notificationConfigs/[config_id]". + // `organizations/[organization_id]/notificationConfigs/[config_id]`, + // `folders/[folder_id]/notificationConfigs/[config_id]`, + // or `projects/[project_id]/notificationConfigs/[config_id]`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -983,7 +1439,7 @@ message GetNotificationConfigRequest { // Request message for getting organization settings. message GetOrganizationSettingsRequest { // Required. Name of the organization to get organization settings for. Its - // format is "organizations/[organization_id]/organizationSettings". + // format is `organizations/[organization_id]/organizationSettings`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -996,10 +1452,10 @@ message GetOrganizationSettingsRequest { // modules. message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the effective custom module to get. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", - // "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + // `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + // `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, // or - // "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + // `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1011,10 +1467,10 @@ message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { // Request message for getting Security Health Analytics custom modules. message GetSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the custom module to get. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - // "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + // `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + // `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, // or - // "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + // `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1026,7 +1482,7 @@ message GetSecurityHealthAnalyticsCustomModuleRequest { // Request message for getting a source. message GetSourceRequest { // Required. Relative resource name of the source. Its format is - // "organizations/[organization_id]/source/[source_id]". + // `organizations/[organization_id]/source/[source_id]`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1038,8 +1494,8 @@ message GetSourceRequest { // Request message for grouping by assets. message GroupAssetsRequest { // Required. The name of the parent to group the assets by. Its format is - // "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1197,12 +1653,12 @@ message GroupAssetsResponse { // Request message for grouping by findings. message GroupFindingsRequest { // Required. Name of the source to groupBy. Its format is - // "organizations/[organization_id]/sources/[source_id]", - // folders/[folder_id]/sources/[source_id], or - // projects/[project_id]/sources/[source_id]. To groupBy across all sources + // `organizations/[organization_id]/sources/[source_id]`, + // `folders/[folder_id]/sources/[source_id]`, or + // `projects/[project_id]/sources/[source_id]`. To groupBy across all sources // provide a source_id of `-`. For example: - // organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - // or projects/{project_id}/sources/- + // `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + // or `projects/{project_id}/sources/-` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1275,14 +1731,6 @@ message GroupFindingsRequest { // (including `state_change`). The string value should follow SQL syntax: // comma separated list of fields. For example: "parent,resource_name". // - // The following fields are supported: - // - // * resource_name - // * category - // * state - // * parent - // * severity - // // The following fields are supported when compare_duration is set: // // * state_change @@ -1369,9 +1817,9 @@ message GroupResult { // modules. message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list descendant custom modules. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings", - // "folders/{folder}/securityHealthAnalyticsSettings", or - // "projects/{project}/securityHealthAnalyticsSettings" + // `organizations/{organization}/securityHealthAnalyticsSettings`, + // `folders/{folder}/securityHealthAnalyticsSettings`, or + // `projects/{project}/securityHealthAnalyticsSettings` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1399,12 +1847,154 @@ message ListDescendantSecurityHealthAnalyticsCustomModulesResponse { string next_page_token = 2; } +// Request message for listing the valued resources for a given simulation. +message ListValuedResourcesRequest { + // Required. Name of parent to list valued resources. + // + // Valid formats: + // `organizations/{organization}`, + // `organizations/{organization}/simulations/{simulation}` + // `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/ValuedResource" + } + ]; + + // The filter expression that filters the valued resources in the response. + // Supported fields: + // + // * `resource_value` supports = + // * `resource_type` supports = + string filter = 2; + + // The value returned by the last `ListValuedResourcesResponse`; indicates + // that this is a continuation of a prior `ListValuedResources` call, and + // that the system should return the next page of data. + string page_token = 3; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 4; + + // Optional. The fields by which to order the valued resources response. + // + // Supported fields: + // + // * `exposed_score` + // + // * `resource_value` + // + // * `resource_type` + // + // * `resource` + // + // * `display_name` + // + // Values should be a comma separated list of fields. For example: + // `exposed_score,resource_value`. + // + // The default sorting order is descending. To specify ascending or descending + // order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + // example: `exposed_score DESC`. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing the valued resources for a given simulation. +message ListValuedResourcesResponse { + // The valued resources that the attack path simulation identified. + repeated ValuedResource valued_resources = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 2; + + // The estimated total number of results matching the query. + int32 total_size = 3; +} + +// Request message for listing the attack paths for a given simulation or valued +// resource. +message ListAttackPathsRequest { + // Required. Name of parent to list attack paths. + // + // Valid formats: + // `organizations/{organization}`, + // `organizations/{organization}/simulations/{simulation}` + // `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + // `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/AttackPath" + } + ]; + + // The filter expression that filters the attack path in the response. + // Supported fields: + // + // * `valued_resources` supports = + string filter = 2; + + // The value returned by the last `ListAttackPathsResponse`; indicates + // that this is a continuation of a prior `ListAttackPaths` call, and + // that the system should return the next page of data. + string page_token = 3; + + // The maximum number of results to return in a single response. Default is + // 10, minimum is 1, maximum is 1000. + int32 page_size = 4; +} + +// Response message for listing the attack paths for a given simulation or +// valued resource. +message ListAttackPathsResponse { + // The attack paths that the attack path simulation identified. + repeated AttackPath attack_paths = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results. + string next_page_token = 2; +} + +// Request message for getting simulation. +// Simulation name can include "latest" to retrieve the latest simulation +// For example, "organizations/123/simulations/latest" +message GetSimulationRequest { + // Required. The organization name or simulation name of this simulation + // + // Valid format: + // `organizations/{organization}/simulations/latest` + // `organizations/{organization}/simulations/{simulation}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/Simulation" + } + ]; +} + +// Request message for getting a valued resource. +message GetValuedResourceRequest { + // Required. The name of this valued resource + // + // Valid format: + // `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/ValuedResource" + } + ]; +} + // Request message for listing mute configs at a given scope e.g. organization, // folder or project. message ListMuteConfigsRequest { // Required. The parent, which owns the collection of mute configs. Its format - // is "organizations/[organization_id]", "folders/[folder_id]", - // "projects/[project_id]". + // is `organizations/[organization_id]`, `folders/[folder_id]`, + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1472,9 +2062,9 @@ message ListNotificationConfigsResponse { // modules. message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list effective custom modules. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings", - // "folders/{folder}/securityHealthAnalyticsSettings", or - // "projects/{project}/securityHealthAnalyticsSettings" + // `organizations/{organization}/securityHealthAnalyticsSettings`, + // `folders/{folder}/securityHealthAnalyticsSettings`, or + // `projects/{project}/securityHealthAnalyticsSettings` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1505,9 +2095,9 @@ message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { // Request message for listing Security Health Analytics custom modules. message ListSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list custom modules. Its format is - // "organizations/{organization}/securityHealthAnalyticsSettings", - // "folders/{folder}/securityHealthAnalyticsSettings", or - // "projects/{project}/securityHealthAnalyticsSettings" + // `organizations/{organization}/securityHealthAnalyticsSettings`, + // `folders/{folder}/securityHealthAnalyticsSettings`, or + // `projects/{project}/securityHealthAnalyticsSettings` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1537,8 +2127,8 @@ message ListSecurityHealthAnalyticsCustomModulesResponse { // Request message for listing sources. message ListSourcesRequest { // Required. Resource name of the parent of sources to list. Its format should - // be "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // be `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1571,8 +2161,8 @@ message ListAssetsRequest { // Required. The name of the parent resource that contains the assets. The // value that you can specify on parent depends on the method in which you // specify parent. You can specify one of the following values: - // "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1762,12 +2352,12 @@ message ListAssetsResponse { // Request message for listing findings. message ListFindingsRequest { // Required. Name of the source the findings belong to. Its format is - // "organizations/[organization_id]/sources/[source_id], - // folders/[folder_id]/sources/[source_id], or - // projects/[project_id]/sources/[source_id]". To list across all sources + // `organizations/[organization_id]/sources/[source_id]`, + // `folders/[folder_id]/sources/[source_id]`, or + // `projects/[project_id]/sources/[source_id]`. To list across all sources // provide a source_id of `-`. For example: - // organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - // projects/{projects_id}/sources/- + // `organizations/{organization_id}/sources/-`, + // `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1971,6 +2561,41 @@ message ListFindingsResponse { // The first folder is the deepest nested folder, and the last folder is // the folder directly under the Organization. repeated Folder folders = 7; + + // Indicates which cloud provider the finding is from. + CloudProvider cloud_provider = 9; + + // Indicates which organization / tenant the finding is for. + string organization = 10; + + // The service or resource provider associated with the resource. + string service = 11; + + // The region or location of the service (if applicable). + string location = 12; + + oneof cloud_provider_metadata { + // The AWS metadata associated with the finding. + AwsMetadata aws_metadata = 16; + + // The Azure metadata associated with the finding. + AzureMetadata azure_metadata = 17; + } + + // Provides the path to the resource within the resource hierarchy. + ResourcePath resource_path = 18; + + // A string representation of the resource path. + // For Google Cloud, it has the format of + // `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` + // where there can be any number of folders. + // For AWS, it has the format of + // `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + // where there can be any number of organizational units. + // For Azure, it has the format of + // `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + // where there can be any number of management groups. + string resource_path_string = 19; } // Finding matching the search request. @@ -2002,9 +2627,9 @@ message SetFindingStateRequest { // Required. The [relative resource // name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) // of the finding. Example: - // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - // "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + // `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2025,9 +2650,9 @@ message SetMuteRequest { // Required. The [relative resource // name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) // of the finding. Example: - // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - // "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + // `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2042,7 +2667,7 @@ message SetMuteRequest { // Request message for running asset discovery for an organization. message RunAssetDiscoveryRequest { // Required. Name of the organization to run asset discovery for. Its format - // is "organizations/[organization_id]". + // is `organizations/[organization_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2179,7 +2804,9 @@ message UpdateSecurityHealthAnalyticsCustomModuleRequest { SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of fields to update. + // The list of fields to be updated. The only fields that can be updated are + // `enablement_state` and `custom_config`. If empty or set to the wildcard + // value `*`, both `enablement_state` and `custom_config` are updated. google.protobuf.FieldMask update_mask = 2; } @@ -2216,8 +2843,8 @@ message UpdateSecurityMarksRequest { // Request message for creating a BigQuery export. message CreateBigQueryExportRequest { // Required. The name of the parent resource of the new BigQuery export. Its - // format is "organizations/[organization_id]", "folders/[folder_id]", or - // "projects/[project_id]". + // format is `organizations/[organization_id]`, `folders/[folder_id]`, or + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2249,8 +2876,8 @@ message UpdateBigQueryExportRequest { // organization, folder or project. message ListBigQueryExportsRequest { // Required. The parent, which owns the collection of BigQuery exports. Its - // format is "organizations/[organization_id]", "folders/[folder_id]", - // "projects/[project_id]". + // format is `organizations/[organization_id]`, `folders/[folder_id]`, + // `projects/[project_id]`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2284,9 +2911,9 @@ message ListBigQueryExportsResponse { // Request message for deleting a BigQuery export. message DeleteBigQueryExportRequest { // Required. The name of the BigQuery export to delete. Its format is - // organizations/{organization}/bigQueryExports/{export_id}, - // folders/{folder}/bigQueryExports/{export_id}, or - // projects/{project}/bigQueryExports/{export_id} + // `organizations/{organization}/bigQueryExports/{export_id}`, + // `folders/{folder}/bigQueryExports/{export_id}`, or + // `projects/{project}/bigQueryExports/{export_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2294,3 +2921,251 @@ message DeleteBigQueryExportRequest { } ]; } + +// Request to create an Event Threat Detection custom module. +message CreateEventThreatDetectionCustomModuleRequest { + // Required. The new custom module's parent. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings`. + // * `folders/{folder}/eventThreatDetectionSettings`. + // * `projects/{project}/eventThreatDetectionSettings`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Required. The module to create. The + // event_threat_detection_custom_module.name will be ignored and server + // generated. + EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to validate an Event Threat Detection custom module. +message ValidateEventThreatDetectionCustomModuleRequest { + // Required. Resource name of the parent to validate the Custom Module under. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings`. + // * `folders/{folder}/eventThreatDetectionSettings`. + // * `projects/{project}/eventThreatDetectionSettings`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Required. The raw text of the module's contents. Used to generate error + // messages. + string raw_text = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + string type = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to validating an Event Threat Detection custom module. +message ValidateEventThreatDetectionCustomModuleResponse { + // A list of errors returned by the validator. If the list is empty, there + // were no errors. + CustomModuleValidationErrors errors = 2; +} + +// Request to delete an Event Threat Detection custom module. +message DeleteEventThreatDetectionCustomModuleRequest { + // Required. Name of the custom module to delete. + // + // Its format is: + // + // * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". + // * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". + // * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; +} + +// Request to get an Event Threat Detection custom module. +message GetEventThreatDetectionCustomModuleRequest { + // Required. Name of the custom module to get. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + // * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + // * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; +} + +// Request to list current and descendant resident Event Threat Detection custom +// modules. +message ListDescendantEventThreatDetectionCustomModulesRequest { + // Required. Name of the parent to list custom modules under. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings`. + // * `folders/{folder}/eventThreatDetectionSettings`. + // * `projects/{project}/eventThreatDetectionSettings`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // A page token, received from a previous + // `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + // retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDescendantEventThreatDetectionCustomModules` must match the call that + // provided the page token. + string page_token = 2; + + // The maximum number of modules to return. The service may return fewer than + // this value. + // If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3; +} + +// Response for listing current and descendant resident +// Event Threat Detection custom modules. +message ListDescendantEventThreatDetectionCustomModulesResponse { + // Custom modules belonging to the requested parent. + repeated EventThreatDetectionCustomModule + event_threat_detection_custom_modules = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to list Event Threat Detection custom modules. +message ListEventThreatDetectionCustomModulesRequest { + // Required. Name of the parent to list custom modules under. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings`. + // * `folders/{folder}/eventThreatDetectionSettings`. + // * `projects/{project}/eventThreatDetectionSettings`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // A page token, received from a previous + // `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListEventThreatDetectionCustomModules` must match the call that provided + // the page token. + string page_token = 2; + + // The maximum number of modules to return. The service may return fewer than + // this value. + // If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3; +} + +// Response for listing Event Threat Detection custom modules. +message ListEventThreatDetectionCustomModulesResponse { + // Custom modules belonging to the requested parent. + repeated EventThreatDetectionCustomModule + event_threat_detection_custom_modules = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to update an Event Threat Detection custom module. +message UpdateEventThreatDetectionCustomModuleRequest { + // Required. The module being updated. + EventThreatDetectionCustomModule event_threat_detection_custom_module = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + // If empty all mutable fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to get an EffectiveEventThreatDetectionCustomModule. +message GetEffectiveEventThreatDetectionCustomModuleRequest { + // Required. The resource name of the effective Event Threat Detection custom + // module. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + // * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + // * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + ]; +} + +// Request to list effective Event Threat Detection custom modules. +message ListEffectiveEventThreatDetectionCustomModulesRequest { + // Required. Name of the parent to list custom modules for. + // + // Its format is: + // + // * `organizations/{organization}/eventThreatDetectionSettings`. + // * `folders/{folder}/eventThreatDetectionSettings`. + // * `projects/{project}/eventThreatDetectionSettings`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + ]; + + // A page token, received from a previous + // `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + // retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListEffectiveEventThreatDetectionCustomModules` must match the call that + // provided the page token. + string page_token = 2; + + // The maximum number of modules to return. The service may return fewer than + // this value. + // If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3; +} + +// Response for listing EffectiveEventThreatDetectionCustomModules. +message ListEffectiveEventThreatDetectionCustomModulesResponse { + // Effective custom modules belonging to the requested parent. + repeated EffectiveEventThreatDetectionCustomModule + effective_event_threat_detection_custom_modules = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/simulation.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/simulation.proto new file mode 100644 index 000000000000..d8f8e97242be --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/simulation.proto @@ -0,0 +1,56 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1/resource.proto"; +import "google/cloud/securitycenter/v1/valued_resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "SimulationProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Attack path simulation +message Simulation { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Simulation" + pattern: "organizations/{organization}/simulations/{simulation}" + plural: "simulations" + singular: "simulation" + }; + + // Full resource name of the Simulation: + // `organizations/123/simulations/456` + string name = 1; + + // Output only. Time simulation was created + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource value configurations' metadata used in this simulation. Maximum of + // 100. + repeated ResourceValueConfigMetadata resource_value_configs_metadata = 3; + + // Indicates which cloud provider was used in this simulation. + CloudProvider cloud_provider = 4; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/valued_resource.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/valued_resource.proto new file mode 100644 index 000000000000..e78d98338519 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/valued_resource.proto @@ -0,0 +1,88 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "ValuedResourceProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// A resource that is determined to have value to a user's system +message ValuedResource { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/ValuedResource" + pattern: "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + plural: "valuedResources" + singular: "valuedResource" + }; + + // How valuable the resource is. + enum ResourceValue { + // The resource value isn't specified. + RESOURCE_VALUE_UNSPECIFIED = 0; + + // This is a low-value resource. + RESOURCE_VALUE_LOW = 1; + + // This is a medium-value resource. + RESOURCE_VALUE_MEDIUM = 2; + + // This is a high-value resource. + RESOURCE_VALUE_HIGH = 3; + } + + // Valued resource name, for example, + // e.g.: + // `organizations/123/simulations/456/valuedResources/789` + string name = 1; + + // The + // [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // of the valued resource. + string resource = 2; + + // The [resource + // type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // of the valued resource. + string resource_type = 3; + + // Human-readable name of the valued resource. + string display_name = 4; + + // How valuable this resource is. + ResourceValue resource_value = 5; + + // Exposed score for this valued resource. A value of 0 means no exposure was + // detected exposure. + double exposed_score = 6; + + // List of resource value configurations' metadata used to determine the value + // of this resource. Maximum of 100. + repeated ResourceValueConfigMetadata resource_value_configs_used = 7; +} + +// Metadata about a ResourceValueConfig. For example, id and name. +message ResourceValueConfigMetadata { + // Resource value config name + string name = 1; +} diff --git a/packages/google-cloud-securitycenter/protos/protos.d.ts b/packages/google-cloud-securitycenter/protos/protos.d.ts index 0ff2c4bff275..625cdea46772 100644 --- a/packages/google-cloud-securitycenter/protos/protos.d.ts +++ b/packages/google-cloud-securitycenter/protos/protos.d.ts @@ -1082,16320 +1082,22633 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BackupDisasterRecovery. */ - interface IBackupDisasterRecovery { - - /** BackupDisasterRecovery backupTemplate */ - backupTemplate?: (string|null); - - /** BackupDisasterRecovery policies */ - policies?: (string[]|null); - - /** BackupDisasterRecovery host */ - host?: (string|null); + /** Properties of an AttackExposure. */ + interface IAttackExposure { - /** BackupDisasterRecovery applications */ - applications?: (string[]|null); + /** AttackExposure score */ + score?: (number|null); - /** BackupDisasterRecovery storagePool */ - storagePool?: (string|null); + /** AttackExposure latestCalculationTime */ + latestCalculationTime?: (google.protobuf.ITimestamp|null); - /** BackupDisasterRecovery policyOptions */ - policyOptions?: (string[]|null); + /** AttackExposure attackExposureResult */ + attackExposureResult?: (string|null); - /** BackupDisasterRecovery profile */ - profile?: (string|null); + /** AttackExposure state */ + state?: (google.cloud.securitycenter.v1.AttackExposure.State|keyof typeof google.cloud.securitycenter.v1.AttackExposure.State|null); - /** BackupDisasterRecovery appliance */ - appliance?: (string|null); + /** AttackExposure exposedHighValueResourcesCount */ + exposedHighValueResourcesCount?: (number|null); - /** BackupDisasterRecovery backupType */ - backupType?: (string|null); + /** AttackExposure exposedMediumValueResourcesCount */ + exposedMediumValueResourcesCount?: (number|null); - /** BackupDisasterRecovery backupCreateTime */ - backupCreateTime?: (google.protobuf.ITimestamp|null); + /** AttackExposure exposedLowValueResourcesCount */ + exposedLowValueResourcesCount?: (number|null); } - /** Represents a BackupDisasterRecovery. */ - class BackupDisasterRecovery implements IBackupDisasterRecovery { + /** Represents an AttackExposure. */ + class AttackExposure implements IAttackExposure { /** - * Constructs a new BackupDisasterRecovery. + * Constructs a new AttackExposure. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IBackupDisasterRecovery); - - /** BackupDisasterRecovery backupTemplate. */ - public backupTemplate: string; - - /** BackupDisasterRecovery policies. */ - public policies: string[]; - - /** BackupDisasterRecovery host. */ - public host: string; + constructor(properties?: google.cloud.securitycenter.v1.IAttackExposure); - /** BackupDisasterRecovery applications. */ - public applications: string[]; + /** AttackExposure score. */ + public score: number; - /** BackupDisasterRecovery storagePool. */ - public storagePool: string; + /** AttackExposure latestCalculationTime. */ + public latestCalculationTime?: (google.protobuf.ITimestamp|null); - /** BackupDisasterRecovery policyOptions. */ - public policyOptions: string[]; + /** AttackExposure attackExposureResult. */ + public attackExposureResult: string; - /** BackupDisasterRecovery profile. */ - public profile: string; + /** AttackExposure state. */ + public state: (google.cloud.securitycenter.v1.AttackExposure.State|keyof typeof google.cloud.securitycenter.v1.AttackExposure.State); - /** BackupDisasterRecovery appliance. */ - public appliance: string; + /** AttackExposure exposedHighValueResourcesCount. */ + public exposedHighValueResourcesCount: number; - /** BackupDisasterRecovery backupType. */ - public backupType: string; + /** AttackExposure exposedMediumValueResourcesCount. */ + public exposedMediumValueResourcesCount: number; - /** BackupDisasterRecovery backupCreateTime. */ - public backupCreateTime?: (google.protobuf.ITimestamp|null); + /** AttackExposure exposedLowValueResourcesCount. */ + public exposedLowValueResourcesCount: number; /** - * Creates a new BackupDisasterRecovery instance using the specified properties. + * Creates a new AttackExposure instance using the specified properties. * @param [properties] Properties to set - * @returns BackupDisasterRecovery instance + * @returns AttackExposure instance */ - public static create(properties?: google.cloud.securitycenter.v1.IBackupDisasterRecovery): google.cloud.securitycenter.v1.BackupDisasterRecovery; + public static create(properties?: google.cloud.securitycenter.v1.IAttackExposure): google.cloud.securitycenter.v1.AttackExposure; /** - * Encodes the specified BackupDisasterRecovery message. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. - * @param message BackupDisasterRecovery message or plain object to encode + * Encodes the specified AttackExposure message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackExposure.verify|verify} messages. + * @param message AttackExposure message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IBackupDisasterRecovery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IAttackExposure, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackupDisasterRecovery message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. - * @param message BackupDisasterRecovery message or plain object to encode + * Encodes the specified AttackExposure message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackExposure.verify|verify} messages. + * @param message AttackExposure message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IBackupDisasterRecovery, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAttackExposure, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackupDisasterRecovery message from the specified reader or buffer. + * Decodes an AttackExposure message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackupDisasterRecovery + * @returns AttackExposure * @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.cloud.securitycenter.v1.BackupDisasterRecovery; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.AttackExposure; /** - * Decodes a BackupDisasterRecovery message from the specified reader or buffer, length delimited. + * Decodes an AttackExposure message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackupDisasterRecovery + * @returns AttackExposure * @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.cloud.securitycenter.v1.BackupDisasterRecovery; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.AttackExposure; /** - * Verifies a BackupDisasterRecovery message. + * Verifies an AttackExposure 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 BackupDisasterRecovery message from a plain object. Also converts values to their respective internal types. + * Creates an AttackExposure message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackupDisasterRecovery + * @returns AttackExposure */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BackupDisasterRecovery; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackExposure; /** - * Creates a plain object from a BackupDisasterRecovery message. Also converts values to other types if specified. - * @param message BackupDisasterRecovery + * Creates a plain object from an AttackExposure message. Also converts values to other types if specified. + * @param message AttackExposure * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.BackupDisasterRecovery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.AttackExposure, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackupDisasterRecovery to JSON. + * Converts this AttackExposure to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BackupDisasterRecovery + * Gets the default type url for AttackExposure * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BigQueryExport. */ - interface IBigQueryExport { - - /** BigQueryExport name */ - name?: (string|null); - - /** BigQueryExport description */ - description?: (string|null); - - /** BigQueryExport filter */ - filter?: (string|null); + namespace AttackExposure { - /** BigQueryExport dataset */ - dataset?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CALCULATED = 1, + NOT_CALCULATED = 2 + } + } - /** BigQueryExport createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an AttackPath. */ + interface IAttackPath { - /** BigQueryExport updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** AttackPath name */ + name?: (string|null); - /** BigQueryExport mostRecentEditor */ - mostRecentEditor?: (string|null); + /** AttackPath pathNodes */ + pathNodes?: (google.cloud.securitycenter.v1.AttackPath.IAttackPathNode[]|null); - /** BigQueryExport principal */ - principal?: (string|null); + /** AttackPath edges */ + edges?: (google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge[]|null); } - /** Represents a BigQueryExport. */ - class BigQueryExport implements IBigQueryExport { + /** Represents an AttackPath. */ + class AttackPath implements IAttackPath { /** - * Constructs a new BigQueryExport. + * Constructs a new AttackPath. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IBigQueryExport); + constructor(properties?: google.cloud.securitycenter.v1.IAttackPath); - /** BigQueryExport name. */ + /** AttackPath name. */ public name: string; - /** BigQueryExport description. */ - public description: string; - - /** BigQueryExport filter. */ - public filter: string; - - /** BigQueryExport dataset. */ - public dataset: string; - - /** BigQueryExport createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BigQueryExport updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BigQueryExport mostRecentEditor. */ - public mostRecentEditor: string; + /** AttackPath pathNodes. */ + public pathNodes: google.cloud.securitycenter.v1.AttackPath.IAttackPathNode[]; - /** BigQueryExport principal. */ - public principal: string; + /** AttackPath edges. */ + public edges: google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge[]; /** - * Creates a new BigQueryExport instance using the specified properties. + * Creates a new AttackPath instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryExport instance + * @returns AttackPath instance */ - public static create(properties?: google.cloud.securitycenter.v1.IBigQueryExport): google.cloud.securitycenter.v1.BigQueryExport; + public static create(properties?: google.cloud.securitycenter.v1.IAttackPath): google.cloud.securitycenter.v1.AttackPath; /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode + * Encodes the specified AttackPath message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.verify|verify} messages. + * @param message AttackPath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IAttackPath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode + * Encodes the specified AttackPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.verify|verify} messages. + * @param message AttackPath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAttackPath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryExport message from the specified reader or buffer. + * Decodes an AttackPath message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryExport + * @returns AttackPath * @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.cloud.securitycenter.v1.BigQueryExport; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.AttackPath; /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * Decodes an AttackPath message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryExport + * @returns AttackPath * @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.cloud.securitycenter.v1.BigQueryExport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.AttackPath; /** - * Verifies a BigQueryExport message. + * Verifies an AttackPath 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 BigQueryExport message from a plain object. Also converts values to their respective internal types. + * Creates an AttackPath message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryExport + * @returns AttackPath */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BigQueryExport; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackPath; /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. - * @param message BigQueryExport + * Creates a plain object from an AttackPath message. Also converts values to other types if specified. + * @param message AttackPath * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.AttackPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryExport to JSON. + * Converts this AttackPath to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BigQueryExport + * Gets the default type url for AttackPath * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudArmor. */ - interface ICloudArmor { - - /** CloudArmor securityPolicy */ - securityPolicy?: (google.cloud.securitycenter.v1.ISecurityPolicy|null); + namespace AttackPath { - /** CloudArmor requests */ - requests?: (google.cloud.securitycenter.v1.IRequests|null); + /** Properties of an AttackPathNode. */ + interface IAttackPathNode { - /** CloudArmor adaptiveProtection */ - adaptiveProtection?: (google.cloud.securitycenter.v1.IAdaptiveProtection|null); + /** AttackPathNode resource */ + resource?: (string|null); - /** CloudArmor attack */ - attack?: (google.cloud.securitycenter.v1.IAttack|null); + /** AttackPathNode resourceType */ + resourceType?: (string|null); - /** CloudArmor threatVector */ - threatVector?: (string|null); + /** AttackPathNode displayName */ + displayName?: (string|null); - /** CloudArmor duration */ - duration?: (google.protobuf.IDuration|null); - } + /** AttackPathNode associatedFindings */ + associatedFindings?: (google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding[]|null); - /** Represents a CloudArmor. */ - class CloudArmor implements ICloudArmor { + /** AttackPathNode uuid */ + uuid?: (string|null); - /** - * Constructs a new CloudArmor. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ICloudArmor); + /** AttackPathNode attackSteps */ + attackSteps?: (google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode[]|null); + } - /** CloudArmor securityPolicy. */ - public securityPolicy?: (google.cloud.securitycenter.v1.ISecurityPolicy|null); + /** Represents an AttackPathNode. */ + class AttackPathNode implements IAttackPathNode { - /** CloudArmor requests. */ - public requests?: (google.cloud.securitycenter.v1.IRequests|null); + /** + * Constructs a new AttackPathNode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AttackPath.IAttackPathNode); - /** CloudArmor adaptiveProtection. */ - public adaptiveProtection?: (google.cloud.securitycenter.v1.IAdaptiveProtection|null); + /** AttackPathNode resource. */ + public resource: string; - /** CloudArmor attack. */ - public attack?: (google.cloud.securitycenter.v1.IAttack|null); + /** AttackPathNode resourceType. */ + public resourceType: string; - /** CloudArmor threatVector. */ - public threatVector: string; + /** AttackPathNode displayName. */ + public displayName: string; - /** CloudArmor duration. */ - public duration?: (google.protobuf.IDuration|null); + /** AttackPathNode associatedFindings. */ + public associatedFindings: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding[]; - /** - * Creates a new CloudArmor instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudArmor instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ICloudArmor): google.cloud.securitycenter.v1.CloudArmor; + /** AttackPathNode uuid. */ + public uuid: string; - /** - * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. - * @param message CloudArmor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; + /** AttackPathNode attackSteps. */ + public attackSteps: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode[]; - /** - * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. - * @param message CloudArmor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new AttackPathNode instance using the specified properties. + * @param [properties] Properties to set + * @returns AttackPathNode instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AttackPath.IAttackPathNode): google.cloud.securitycenter.v1.AttackPath.AttackPathNode; - /** - * Decodes a CloudArmor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudArmor - * @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.cloud.securitycenter.v1.CloudArmor; + /** + * Encodes the specified AttackPathNode message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.verify|verify} messages. + * @param message AttackPathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AttackPath.IAttackPathNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CloudArmor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudArmor - * @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.cloud.securitycenter.v1.CloudArmor; + /** + * Encodes the specified AttackPathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.verify|verify} messages. + * @param message AttackPathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AttackPath.IAttackPathNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CloudArmor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an AttackPathNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttackPathNode + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode; - /** - * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudArmor - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudArmor; + /** + * Decodes an AttackPathNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttackPathNode + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode; - /** - * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. - * @param message CloudArmor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CloudArmor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an AttackPathNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this CloudArmor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an AttackPathNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttackPathNode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackPath.AttackPathNode; - /** - * Gets the default type url for CloudArmor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from an AttackPathNode message. Also converts values to other types if specified. + * @param message AttackPathNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a SecurityPolicy. */ - interface ISecurityPolicy { + /** + * Converts this AttackPathNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SecurityPolicy name */ - name?: (string|null); + /** + * Gets the default type url for AttackPathNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SecurityPolicy type */ - type?: (string|null); + namespace AttackPathNode { - /** SecurityPolicy preview */ - preview?: (boolean|null); - } + /** Properties of a PathNodeAssociatedFinding. */ + interface IPathNodeAssociatedFinding { - /** Represents a SecurityPolicy. */ - class SecurityPolicy implements ISecurityPolicy { + /** PathNodeAssociatedFinding canonicalFinding */ + canonicalFinding?: (string|null); - /** - * Constructs a new SecurityPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ISecurityPolicy); + /** PathNodeAssociatedFinding findingCategory */ + findingCategory?: (string|null); - /** SecurityPolicy name. */ - public name: string; + /** PathNodeAssociatedFinding name */ + name?: (string|null); + } - /** SecurityPolicy type. */ - public type: string; + /** Represents a PathNodeAssociatedFinding. */ + class PathNodeAssociatedFinding implements IPathNodeAssociatedFinding { - /** SecurityPolicy preview. */ - public preview: boolean; + /** + * Constructs a new PathNodeAssociatedFinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding); - /** - * Creates a new SecurityPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityPolicy instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ISecurityPolicy): google.cloud.securitycenter.v1.SecurityPolicy; + /** PathNodeAssociatedFinding canonicalFinding. */ + public canonicalFinding: string; - /** - * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. - * @param message SecurityPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** PathNodeAssociatedFinding findingCategory. */ + public findingCategory: string; - /** - * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. - * @param message SecurityPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** PathNodeAssociatedFinding name. */ + public name: string; - /** - * Decodes a SecurityPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityPolicy - * @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.cloud.securitycenter.v1.SecurityPolicy; + /** + * Creates a new PathNodeAssociatedFinding instance using the specified properties. + * @param [properties] Properties to set + * @returns PathNodeAssociatedFinding instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding): google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding; - /** - * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityPolicy - * @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.cloud.securitycenter.v1.SecurityPolicy; + /** + * Encodes the specified PathNodeAssociatedFinding message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.verify|verify} messages. + * @param message PathNodeAssociatedFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a SecurityPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified PathNodeAssociatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.verify|verify} messages. + * @param message PathNodeAssociatedFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPolicy; + /** + * Decodes a PathNodeAssociatedFinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PathNodeAssociatedFinding + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding; - /** - * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. - * @param message SecurityPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a PathNodeAssociatedFinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PathNodeAssociatedFinding + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding; - /** - * Converts this SecurityPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a PathNodeAssociatedFinding 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); - /** - * Gets the default type url for SecurityPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a PathNodeAssociatedFinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PathNodeAssociatedFinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding; - /** Properties of a Requests. */ - interface IRequests { + /** + * Creates a plain object from a PathNodeAssociatedFinding message. Also converts values to other types if specified. + * @param message PathNodeAssociatedFinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Requests ratio */ - ratio?: (number|null); + /** + * Converts this PathNodeAssociatedFinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Requests shortTermAllowed */ - shortTermAllowed?: (number|null); + /** + * Gets the default type url for PathNodeAssociatedFinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Requests longTermAllowed */ - longTermAllowed?: (number|null); + /** NodeType enum. */ + enum NodeType { + NODE_TYPE_UNSPECIFIED = 0, + NODE_TYPE_AND = 1, + NODE_TYPE_OR = 2, + NODE_TYPE_DEFENSE = 3, + NODE_TYPE_ATTACKER = 4 + } - /** Requests longTermDenied */ - longTermDenied?: (number|null); - } + /** Properties of an AttackStepNode. */ + interface IAttackStepNode { - /** Represents a Requests. */ - class Requests implements IRequests { + /** AttackStepNode uuid */ + uuid?: (string|null); - /** - * Constructs a new Requests. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IRequests); + /** AttackStepNode type */ + type?: (google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType|keyof typeof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType|null); - /** Requests ratio. */ - public ratio: number; + /** AttackStepNode displayName */ + displayName?: (string|null); - /** Requests shortTermAllowed. */ - public shortTermAllowed: number; + /** AttackStepNode labels */ + labels?: ({ [k: string]: string }|null); - /** Requests longTermAllowed. */ - public longTermAllowed: number; + /** AttackStepNode description */ + description?: (string|null); + } - /** Requests longTermDenied. */ - public longTermDenied: number; + /** Represents an AttackStepNode. */ + class AttackStepNode implements IAttackStepNode { - /** - * Creates a new Requests instance using the specified properties. - * @param [properties] Properties to set - * @returns Requests instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IRequests): google.cloud.securitycenter.v1.Requests; + /** + * Constructs a new AttackStepNode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode); - /** - * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. - * @param message Requests message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; + /** AttackStepNode uuid. */ + public uuid: string; - /** - * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. - * @param message Requests message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; + /** AttackStepNode type. */ + public type: (google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType|keyof typeof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType); - /** - * Decodes a Requests message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Requests - * @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.cloud.securitycenter.v1.Requests; + /** AttackStepNode displayName. */ + public displayName: string; - /** - * Decodes a Requests message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Requests - * @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.cloud.securitycenter.v1.Requests; + /** AttackStepNode labels. */ + public labels: { [k: string]: string }; - /** - * Verifies a Requests 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); + /** AttackStepNode description. */ + public description: string; - /** - * Creates a Requests message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Requests - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Requests; + /** + * Creates a new AttackStepNode instance using the specified properties. + * @param [properties] Properties to set + * @returns AttackStepNode instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode): google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode; - /** - * Creates a plain object from a Requests message. Also converts values to other types if specified. - * @param message Requests - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Requests, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified AttackStepNode message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.verify|verify} messages. + * @param message AttackStepNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Requests to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified AttackStepNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.verify|verify} messages. + * @param message AttackStepNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for Requests - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes an AttackStepNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttackStepNode + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode; - /** Properties of an AdaptiveProtection. */ - interface IAdaptiveProtection { + /** + * Decodes an AttackStepNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttackStepNode + * @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.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode; - /** AdaptiveProtection confidence */ - confidence?: (number|null); - } + /** + * Verifies an AttackStepNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an AdaptiveProtection. */ - class AdaptiveProtection implements IAdaptiveProtection { + /** + * Creates an AttackStepNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttackStepNode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode; - /** - * Constructs a new AdaptiveProtection. + /** + * Creates a plain object from an AttackStepNode message. Also converts values to other types if specified. + * @param message AttackStepNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttackStepNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttackStepNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AttackPathEdge. */ + interface IAttackPathEdge { + + /** AttackPathEdge source */ + source?: (string|null); + + /** AttackPathEdge destination */ + destination?: (string|null); + } + + /** Represents an AttackPathEdge. */ + class AttackPathEdge implements IAttackPathEdge { + + /** + * Constructs a new AttackPathEdge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge); + + /** AttackPathEdge source. */ + public source: string; + + /** AttackPathEdge destination. */ + public destination: string; + + /** + * Creates a new AttackPathEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns AttackPathEdge instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge): google.cloud.securitycenter.v1.AttackPath.AttackPathEdge; + + /** + * Encodes the specified AttackPathEdge message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.verify|verify} messages. + * @param message AttackPathEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttackPathEdge message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.verify|verify} messages. + * @param message AttackPathEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttackPathEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttackPathEdge + * @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.cloud.securitycenter.v1.AttackPath.AttackPathEdge; + + /** + * Decodes an AttackPathEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttackPathEdge + * @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.cloud.securitycenter.v1.AttackPath.AttackPathEdge; + + /** + * Verifies an AttackPathEdge 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 AttackPathEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttackPathEdge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AttackPath.AttackPathEdge; + + /** + * Creates a plain object from an AttackPathEdge message. Also converts values to other types if specified. + * @param message AttackPathEdge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AttackPath.AttackPathEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttackPathEdge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttackPathEdge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BackupDisasterRecovery. */ + interface IBackupDisasterRecovery { + + /** BackupDisasterRecovery backupTemplate */ + backupTemplate?: (string|null); + + /** BackupDisasterRecovery policies */ + policies?: (string[]|null); + + /** BackupDisasterRecovery host */ + host?: (string|null); + + /** BackupDisasterRecovery applications */ + applications?: (string[]|null); + + /** BackupDisasterRecovery storagePool */ + storagePool?: (string|null); + + /** BackupDisasterRecovery policyOptions */ + policyOptions?: (string[]|null); + + /** BackupDisasterRecovery profile */ + profile?: (string|null); + + /** BackupDisasterRecovery appliance */ + appliance?: (string|null); + + /** BackupDisasterRecovery backupType */ + backupType?: (string|null); + + /** BackupDisasterRecovery backupCreateTime */ + backupCreateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupDisasterRecovery. */ + class BackupDisasterRecovery implements IBackupDisasterRecovery { + + /** + * Constructs a new BackupDisasterRecovery. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IAdaptiveProtection); + constructor(properties?: google.cloud.securitycenter.v1.IBackupDisasterRecovery); - /** AdaptiveProtection confidence. */ - public confidence: number; + /** BackupDisasterRecovery backupTemplate. */ + public backupTemplate: string; + + /** BackupDisasterRecovery policies. */ + public policies: string[]; + + /** BackupDisasterRecovery host. */ + public host: string; + + /** BackupDisasterRecovery applications. */ + public applications: string[]; + + /** BackupDisasterRecovery storagePool. */ + public storagePool: string; + + /** BackupDisasterRecovery policyOptions. */ + public policyOptions: string[]; + + /** BackupDisasterRecovery profile. */ + public profile: string; + + /** BackupDisasterRecovery appliance. */ + public appliance: string; + + /** BackupDisasterRecovery backupType. */ + public backupType: string; + + /** BackupDisasterRecovery backupCreateTime. */ + public backupCreateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new AdaptiveProtection instance using the specified properties. + * Creates a new BackupDisasterRecovery instance using the specified properties. * @param [properties] Properties to set - * @returns AdaptiveProtection instance + * @returns BackupDisasterRecovery instance */ - public static create(properties?: google.cloud.securitycenter.v1.IAdaptiveProtection): google.cloud.securitycenter.v1.AdaptiveProtection; + public static create(properties?: google.cloud.securitycenter.v1.IBackupDisasterRecovery): google.cloud.securitycenter.v1.BackupDisasterRecovery; /** - * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. - * @param message AdaptiveProtection message or plain object to encode + * Encodes the specified BackupDisasterRecovery message. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. + * @param message BackupDisasterRecovery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBackupDisasterRecovery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. - * @param message AdaptiveProtection message or plain object to encode + * Encodes the specified BackupDisasterRecovery message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. + * @param message BackupDisasterRecovery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBackupDisasterRecovery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdaptiveProtection message from the specified reader or buffer. + * Decodes a BackupDisasterRecovery message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdaptiveProtection + * @returns BackupDisasterRecovery * @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.cloud.securitycenter.v1.AdaptiveProtection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BackupDisasterRecovery; /** - * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. + * Decodes a BackupDisasterRecovery message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdaptiveProtection + * @returns BackupDisasterRecovery * @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.cloud.securitycenter.v1.AdaptiveProtection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BackupDisasterRecovery; /** - * Verifies an AdaptiveProtection message. + * Verifies a BackupDisasterRecovery 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 AdaptiveProtection message from a plain object. Also converts values to their respective internal types. + * Creates a BackupDisasterRecovery message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdaptiveProtection + * @returns BackupDisasterRecovery */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AdaptiveProtection; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BackupDisasterRecovery; /** - * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. - * @param message AdaptiveProtection + * Creates a plain object from a BackupDisasterRecovery message. Also converts values to other types if specified. + * @param message BackupDisasterRecovery * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.AdaptiveProtection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BackupDisasterRecovery, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdaptiveProtection to JSON. + * Converts this BackupDisasterRecovery to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdaptiveProtection + * Gets the default type url for BackupDisasterRecovery * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Attack. */ - interface IAttack { - - /** Attack volumePps */ - volumePps?: (number|null); + /** Properties of a BigQueryExport. */ + interface IBigQueryExport { - /** Attack volumeBps */ - volumeBps?: (number|null); + /** BigQueryExport name */ + name?: (string|null); - /** Attack classification */ - classification?: (string|null); - } + /** BigQueryExport description */ + description?: (string|null); - /** Represents an Attack. */ - class Attack implements IAttack { + /** BigQueryExport filter */ + filter?: (string|null); + + /** BigQueryExport dataset */ + dataset?: (string|null); + + /** BigQueryExport createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BigQueryExport updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BigQueryExport mostRecentEditor */ + mostRecentEditor?: (string|null); + + /** BigQueryExport principal */ + principal?: (string|null); + } + + /** Represents a BigQueryExport. */ + class BigQueryExport implements IBigQueryExport { /** - * Constructs a new Attack. + * Constructs a new BigQueryExport. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IAttack); + constructor(properties?: google.cloud.securitycenter.v1.IBigQueryExport); - /** Attack volumePps. */ - public volumePps: number; + /** BigQueryExport name. */ + public name: string; - /** Attack volumeBps. */ - public volumeBps: number; + /** BigQueryExport description. */ + public description: string; - /** Attack classification. */ - public classification: string; + /** BigQueryExport filter. */ + public filter: string; + + /** BigQueryExport dataset. */ + public dataset: string; + + /** BigQueryExport createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BigQueryExport updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BigQueryExport mostRecentEditor. */ + public mostRecentEditor: string; + + /** BigQueryExport principal. */ + public principal: string; /** - * Creates a new Attack instance using the specified properties. + * Creates a new BigQueryExport instance using the specified properties. * @param [properties] Properties to set - * @returns Attack instance + * @returns BigQueryExport instance */ - public static create(properties?: google.cloud.securitycenter.v1.IAttack): google.cloud.securitycenter.v1.Attack; + public static create(properties?: google.cloud.securitycenter.v1.IBigQueryExport): google.cloud.securitycenter.v1.BigQueryExport; /** - * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. - * @param message Attack message or plain object to encode + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. - * @param message Attack message or plain object to encode + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Attack message from the specified reader or buffer. + * Decodes a BigQueryExport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Attack + * @returns BigQueryExport * @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.cloud.securitycenter.v1.Attack; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BigQueryExport; /** - * Decodes an Attack message from the specified reader or buffer, length delimited. + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Attack + * @returns BigQueryExport * @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.cloud.securitycenter.v1.Attack; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BigQueryExport; /** - * Verifies an Attack message. + * Verifies a BigQueryExport 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 Attack message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Attack + * @returns BigQueryExport */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Attack; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BigQueryExport; /** - * Creates a plain object from an Attack message. Also converts values to other types if specified. - * @param message Attack + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * @param message BigQueryExport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Attack, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Attack to JSON. + * Converts this BigQueryExport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Attack + * Gets the default type url for BigQueryExport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudDlpDataProfile. */ - interface ICloudDlpDataProfile { + /** Properties of a CloudArmor. */ + interface ICloudArmor { - /** CloudDlpDataProfile dataProfile */ - dataProfile?: (string|null); + /** CloudArmor securityPolicy */ + securityPolicy?: (google.cloud.securitycenter.v1.ISecurityPolicy|null); - /** CloudDlpDataProfile parentType */ - parentType?: (google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|null); + /** CloudArmor requests */ + requests?: (google.cloud.securitycenter.v1.IRequests|null); + + /** CloudArmor adaptiveProtection */ + adaptiveProtection?: (google.cloud.securitycenter.v1.IAdaptiveProtection|null); + + /** CloudArmor attack */ + attack?: (google.cloud.securitycenter.v1.IAttack|null); + + /** CloudArmor threatVector */ + threatVector?: (string|null); + + /** CloudArmor duration */ + duration?: (google.protobuf.IDuration|null); } - /** Represents a CloudDlpDataProfile. */ - class CloudDlpDataProfile implements ICloudDlpDataProfile { + /** Represents a CloudArmor. */ + class CloudArmor implements ICloudArmor { /** - * Constructs a new CloudDlpDataProfile. + * Constructs a new CloudArmor. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile); + constructor(properties?: google.cloud.securitycenter.v1.ICloudArmor); - /** CloudDlpDataProfile dataProfile. */ - public dataProfile: string; + /** CloudArmor securityPolicy. */ + public securityPolicy?: (google.cloud.securitycenter.v1.ISecurityPolicy|null); - /** CloudDlpDataProfile parentType. */ - public parentType: (google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType); + /** CloudArmor requests. */ + public requests?: (google.cloud.securitycenter.v1.IRequests|null); + + /** CloudArmor adaptiveProtection. */ + public adaptiveProtection?: (google.cloud.securitycenter.v1.IAdaptiveProtection|null); + + /** CloudArmor attack. */ + public attack?: (google.cloud.securitycenter.v1.IAttack|null); + + /** CloudArmor threatVector. */ + public threatVector: string; + + /** CloudArmor duration. */ + public duration?: (google.protobuf.IDuration|null); /** - * Creates a new CloudDlpDataProfile instance using the specified properties. + * Creates a new CloudArmor instance using the specified properties. * @param [properties] Properties to set - * @returns CloudDlpDataProfile instance + * @returns CloudArmor instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile): google.cloud.securitycenter.v1.CloudDlpDataProfile; + public static create(properties?: google.cloud.securitycenter.v1.ICloudArmor): google.cloud.securitycenter.v1.CloudArmor; /** - * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. - * @param message CloudDlpDataProfile message or plain object to encode + * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. + * @param message CloudArmor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. - * @param message CloudDlpDataProfile message or plain object to encode + * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. + * @param message CloudArmor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudArmor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * Decodes a CloudArmor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudDlpDataProfile + * @returns CloudArmor * @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.cloud.securitycenter.v1.CloudDlpDataProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CloudArmor; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * Decodes a CloudArmor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudDlpDataProfile + * @returns CloudArmor * @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.cloud.securitycenter.v1.CloudDlpDataProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CloudArmor; /** - * Verifies a CloudDlpDataProfile message. + * Verifies a CloudArmor 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 CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudDlpDataProfile + * @returns CloudArmor */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpDataProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudArmor; /** - * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. - * @param message CloudDlpDataProfile + * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. + * @param message CloudArmor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CloudDlpDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CloudArmor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudDlpDataProfile to JSON. + * Converts this CloudArmor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudDlpDataProfile + * Gets the default type url for CloudArmor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CloudDlpDataProfile { - - /** ParentType enum. */ - enum ParentType { - PARENT_TYPE_UNSPECIFIED = 0, - ORGANIZATION = 1, - PROJECT = 2 - } - } - - /** Properties of a CloudDlpInspection. */ - interface ICloudDlpInspection { - - /** CloudDlpInspection inspectJob */ - inspectJob?: (string|null); + /** Properties of a SecurityPolicy. */ + interface ISecurityPolicy { - /** CloudDlpInspection infoType */ - infoType?: (string|null); + /** SecurityPolicy name */ + name?: (string|null); - /** CloudDlpInspection infoTypeCount */ - infoTypeCount?: (number|Long|string|null); + /** SecurityPolicy type */ + type?: (string|null); - /** CloudDlpInspection fullScan */ - fullScan?: (boolean|null); + /** SecurityPolicy preview */ + preview?: (boolean|null); } - /** Represents a CloudDlpInspection. */ - class CloudDlpInspection implements ICloudDlpInspection { + /** Represents a SecurityPolicy. */ + class SecurityPolicy implements ISecurityPolicy { /** - * Constructs a new CloudDlpInspection. + * Constructs a new SecurityPolicy. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection); - - /** CloudDlpInspection inspectJob. */ - public inspectJob: string; + constructor(properties?: google.cloud.securitycenter.v1.ISecurityPolicy); - /** CloudDlpInspection infoType. */ - public infoType: string; + /** SecurityPolicy name. */ + public name: string; - /** CloudDlpInspection infoTypeCount. */ - public infoTypeCount: (number|Long|string); + /** SecurityPolicy type. */ + public type: string; - /** CloudDlpInspection fullScan. */ - public fullScan: boolean; + /** SecurityPolicy preview. */ + public preview: boolean; /** - * Creates a new CloudDlpInspection instance using the specified properties. + * Creates a new SecurityPolicy instance using the specified properties. * @param [properties] Properties to set - * @returns CloudDlpInspection instance + * @returns SecurityPolicy instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection): google.cloud.securitycenter.v1.CloudDlpInspection; + public static create(properties?: google.cloud.securitycenter.v1.ISecurityPolicy): google.cloud.securitycenter.v1.SecurityPolicy; /** - * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. - * @param message CloudDlpInspection message or plain object to encode + * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. + * @param message SecurityPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. - * @param message CloudDlpInspection message or plain object to encode + * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. + * @param message SecurityPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer. + * Decodes a SecurityPolicy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudDlpInspection + * @returns SecurityPolicy * @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.cloud.securitycenter.v1.CloudDlpInspection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SecurityPolicy; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudDlpInspection + * @returns SecurityPolicy * @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.cloud.securitycenter.v1.CloudDlpInspection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SecurityPolicy; /** - * Verifies a CloudDlpInspection message. + * Verifies a SecurityPolicy 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 CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudDlpInspection + * @returns SecurityPolicy */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpInspection; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPolicy; /** - * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. - * @param message CloudDlpInspection + * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. + * @param message SecurityPolicy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CloudDlpInspection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SecurityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudDlpInspection to JSON. + * Converts this SecurityPolicy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudDlpInspection + * Gets the default type url for SecurityPolicy * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Compliance. */ - interface ICompliance { + /** Properties of a Requests. */ + interface IRequests { - /** Compliance standard */ - standard?: (string|null); + /** Requests ratio */ + ratio?: (number|null); - /** Compliance version */ - version?: (string|null); + /** Requests shortTermAllowed */ + shortTermAllowed?: (number|null); - /** Compliance ids */ - ids?: (string[]|null); + /** Requests longTermAllowed */ + longTermAllowed?: (number|null); + + /** Requests longTermDenied */ + longTermDenied?: (number|null); } - /** Represents a Compliance. */ - class Compliance implements ICompliance { + /** Represents a Requests. */ + class Requests implements IRequests { /** - * Constructs a new Compliance. + * Constructs a new Requests. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICompliance); + constructor(properties?: google.cloud.securitycenter.v1.IRequests); - /** Compliance standard. */ - public standard: string; + /** Requests ratio. */ + public ratio: number; - /** Compliance version. */ - public version: string; + /** Requests shortTermAllowed. */ + public shortTermAllowed: number; - /** Compliance ids. */ - public ids: string[]; + /** Requests longTermAllowed. */ + public longTermAllowed: number; + + /** Requests longTermDenied. */ + public longTermDenied: number; /** - * Creates a new Compliance instance using the specified properties. + * Creates a new Requests instance using the specified properties. * @param [properties] Properties to set - * @returns Compliance instance + * @returns Requests instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICompliance): google.cloud.securitycenter.v1.Compliance; + public static create(properties?: google.cloud.securitycenter.v1.IRequests): google.cloud.securitycenter.v1.Requests; /** - * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. - * @param message Compliance message or plain object to encode + * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. + * @param message Requests message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. - * @param message Compliance message or plain object to encode + * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. + * @param message Requests message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IRequests, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Compliance message from the specified reader or buffer. + * Decodes a Requests message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Compliance + * @returns Requests * @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.cloud.securitycenter.v1.Compliance; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Requests; /** - * Decodes a Compliance message from the specified reader or buffer, length delimited. + * Decodes a Requests message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Compliance + * @returns Requests * @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.cloud.securitycenter.v1.Compliance; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Requests; /** - * Verifies a Compliance message. + * Verifies a Requests 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 Compliance message from a plain object. Also converts values to their respective internal types. + * Creates a Requests message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Compliance + * @returns Requests */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Compliance; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Requests; /** - * Creates a plain object from a Compliance message. Also converts values to other types if specified. - * @param message Compliance + * Creates a plain object from a Requests message. Also converts values to other types if specified. + * @param message Requests * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Compliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Requests, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Compliance to JSON. + * Converts this Requests to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Compliance + * Gets the default type url for Requests * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Connection. */ - interface IConnection { - - /** Connection destinationIp */ - destinationIp?: (string|null); - - /** Connection destinationPort */ - destinationPort?: (number|null); - - /** Connection sourceIp */ - sourceIp?: (string|null); - - /** Connection sourcePort */ - sourcePort?: (number|null); + /** Properties of an AdaptiveProtection. */ + interface IAdaptiveProtection { - /** Connection protocol */ - protocol?: (google.cloud.securitycenter.v1.Connection.Protocol|keyof typeof google.cloud.securitycenter.v1.Connection.Protocol|null); + /** AdaptiveProtection confidence */ + confidence?: (number|null); } - /** Represents a Connection. */ - class Connection implements IConnection { + /** Represents an AdaptiveProtection. */ + class AdaptiveProtection implements IAdaptiveProtection { /** - * Constructs a new Connection. + * Constructs a new AdaptiveProtection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IConnection); - - /** Connection destinationIp. */ - public destinationIp: string; - - /** Connection destinationPort. */ - public destinationPort: number; - - /** Connection sourceIp. */ - public sourceIp: string; - - /** Connection sourcePort. */ - public sourcePort: number; + constructor(properties?: google.cloud.securitycenter.v1.IAdaptiveProtection); - /** Connection protocol. */ - public protocol: (google.cloud.securitycenter.v1.Connection.Protocol|keyof typeof google.cloud.securitycenter.v1.Connection.Protocol); + /** AdaptiveProtection confidence. */ + public confidence: number; /** - * Creates a new Connection instance using the specified properties. + * Creates a new AdaptiveProtection instance using the specified properties. * @param [properties] Properties to set - * @returns Connection instance + * @returns AdaptiveProtection instance */ - public static create(properties?: google.cloud.securitycenter.v1.IConnection): google.cloud.securitycenter.v1.Connection; + public static create(properties?: google.cloud.securitycenter.v1.IAdaptiveProtection): google.cloud.securitycenter.v1.AdaptiveProtection; /** - * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. - * @param message Connection message or plain object to encode + * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. + * @param message AdaptiveProtection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. - * @param message Connection message or plain object to encode + * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. + * @param message AdaptiveProtection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAdaptiveProtection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Connection message from the specified reader or buffer. + * Decodes an AdaptiveProtection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Connection + * @returns AdaptiveProtection * @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.cloud.securitycenter.v1.Connection; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.AdaptiveProtection; /** - * Decodes a Connection message from the specified reader or buffer, length delimited. + * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Connection + * @returns AdaptiveProtection * @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.cloud.securitycenter.v1.Connection; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.AdaptiveProtection; /** - * Verifies a Connection message. + * Verifies an AdaptiveProtection 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 Connection message from a plain object. Also converts values to their respective internal types. + * Creates an AdaptiveProtection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Connection + * @returns AdaptiveProtection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Connection; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AdaptiveProtection; /** - * Creates a plain object from a Connection message. Also converts values to other types if specified. - * @param message Connection + * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. + * @param message AdaptiveProtection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.AdaptiveProtection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Connection to JSON. + * Converts this AdaptiveProtection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Connection + * Gets the default type url for AdaptiveProtection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Connection { + /** Properties of an Attack. */ + interface IAttack { - /** Protocol enum. */ - enum Protocol { - PROTOCOL_UNSPECIFIED = 0, - ICMP = 1, - TCP = 6, - UDP = 17, - GRE = 47, - ESP = 50 - } - } + /** Attack volumePps */ + volumePps?: (number|null); - /** Properties of a ContactDetails. */ - interface IContactDetails { + /** Attack volumeBps */ + volumeBps?: (number|null); - /** ContactDetails contacts */ - contacts?: (google.cloud.securitycenter.v1.IContact[]|null); + /** Attack classification */ + classification?: (string|null); } - /** Represents a ContactDetails. */ - class ContactDetails implements IContactDetails { + /** Represents an Attack. */ + class Attack implements IAttack { /** - * Constructs a new ContactDetails. + * Constructs a new Attack. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IContactDetails); + constructor(properties?: google.cloud.securitycenter.v1.IAttack); - /** ContactDetails contacts. */ - public contacts: google.cloud.securitycenter.v1.IContact[]; + /** Attack volumePps. */ + public volumePps: number; + + /** Attack volumeBps. */ + public volumeBps: number; + + /** Attack classification. */ + public classification: string; /** - * Creates a new ContactDetails instance using the specified properties. + * Creates a new Attack instance using the specified properties. * @param [properties] Properties to set - * @returns ContactDetails instance + * @returns Attack instance */ - public static create(properties?: google.cloud.securitycenter.v1.IContactDetails): google.cloud.securitycenter.v1.ContactDetails; + public static create(properties?: google.cloud.securitycenter.v1.IAttack): google.cloud.securitycenter.v1.Attack; /** - * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. - * @param message ContactDetails message or plain object to encode + * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. + * @param message Attack message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. - * @param message ContactDetails message or plain object to encode + * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. + * @param message Attack message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAttack, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ContactDetails message from the specified reader or buffer. + * Decodes an Attack message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ContactDetails + * @returns Attack * @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.cloud.securitycenter.v1.ContactDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Attack; /** - * Decodes a ContactDetails message from the specified reader or buffer, length delimited. + * Decodes an Attack message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ContactDetails + * @returns Attack * @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.cloud.securitycenter.v1.ContactDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Attack; /** - * Verifies a ContactDetails message. + * Verifies an Attack 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 ContactDetails message from a plain object. Also converts values to their respective internal types. + * Creates an Attack message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ContactDetails + * @returns Attack */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ContactDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Attack; /** - * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. - * @param message ContactDetails + * Creates a plain object from an Attack message. Also converts values to other types if specified. + * @param message Attack * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ContactDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Attack, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ContactDetails to JSON. + * Converts this Attack to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ContactDetails + * Gets the default type url for Attack * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Contact. */ - interface IContact { + /** Properties of a CloudDlpDataProfile. */ + interface ICloudDlpDataProfile { - /** Contact email */ - email?: (string|null); + /** CloudDlpDataProfile dataProfile */ + dataProfile?: (string|null); + + /** CloudDlpDataProfile parentType */ + parentType?: (google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|null); } - /** Represents a Contact. */ - class Contact implements IContact { + /** Represents a CloudDlpDataProfile. */ + class CloudDlpDataProfile implements ICloudDlpDataProfile { /** - * Constructs a new Contact. + * Constructs a new CloudDlpDataProfile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IContact); + constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile); - /** Contact email. */ - public email: string; + /** CloudDlpDataProfile dataProfile. */ + public dataProfile: string; + + /** CloudDlpDataProfile parentType. */ + public parentType: (google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|keyof typeof google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType); /** - * Creates a new Contact instance using the specified properties. + * Creates a new CloudDlpDataProfile instance using the specified properties. * @param [properties] Properties to set - * @returns Contact instance + * @returns CloudDlpDataProfile instance */ - public static create(properties?: google.cloud.securitycenter.v1.IContact): google.cloud.securitycenter.v1.Contact; + public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile): google.cloud.securitycenter.v1.CloudDlpDataProfile; /** - * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. - * @param message Contact message or plain object to encode + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Contact + * @returns CloudDlpDataProfile * @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.cloud.securitycenter.v1.Contact; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CloudDlpDataProfile; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Contact + * @returns CloudDlpDataProfile * @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.cloud.securitycenter.v1.Contact; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CloudDlpDataProfile; /** - * Verifies a Contact message. + * Verifies a CloudDlpDataProfile 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 Contact message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Contact + * @returns CloudDlpDataProfile */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Contact; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpDataProfile; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. - * @param message Contact + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * @param message CloudDlpDataProfile * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CloudDlpDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Contact to JSON. + * Converts this CloudDlpDataProfile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Contact + * Gets the default type url for CloudDlpDataProfile * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Container. */ - interface IContainer { + namespace CloudDlpDataProfile { - /** Container name */ - name?: (string|null); + /** ParentType enum. */ + enum ParentType { + PARENT_TYPE_UNSPECIFIED = 0, + ORGANIZATION = 1, + PROJECT = 2 + } + } - /** Container uri */ - uri?: (string|null); + /** Properties of a CloudDlpInspection. */ + interface ICloudDlpInspection { - /** Container imageId */ - imageId?: (string|null); + /** CloudDlpInspection inspectJob */ + inspectJob?: (string|null); - /** Container labels */ - labels?: (google.cloud.securitycenter.v1.ILabel[]|null); + /** CloudDlpInspection infoType */ + infoType?: (string|null); - /** Container createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CloudDlpInspection infoTypeCount */ + infoTypeCount?: (number|Long|string|null); + + /** CloudDlpInspection fullScan */ + fullScan?: (boolean|null); } - /** Represents a Container. */ - class Container implements IContainer { + /** Represents a CloudDlpInspection. */ + class CloudDlpInspection implements ICloudDlpInspection { /** - * Constructs a new Container. + * Constructs a new CloudDlpInspection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IContainer); - - /** Container name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection); - /** Container uri. */ - public uri: string; + /** CloudDlpInspection inspectJob. */ + public inspectJob: string; - /** Container imageId. */ - public imageId: string; + /** CloudDlpInspection infoType. */ + public infoType: string; - /** Container labels. */ - public labels: google.cloud.securitycenter.v1.ILabel[]; + /** CloudDlpInspection infoTypeCount. */ + public infoTypeCount: (number|Long|string); - /** Container createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** CloudDlpInspection fullScan. */ + public fullScan: boolean; /** - * Creates a new Container instance using the specified properties. + * Creates a new CloudDlpInspection instance using the specified properties. * @param [properties] Properties to set - * @returns Container instance + * @returns CloudDlpInspection instance */ - public static create(properties?: google.cloud.securitycenter.v1.IContainer): google.cloud.securitycenter.v1.Container; + public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection): google.cloud.securitycenter.v1.CloudDlpInspection; /** - * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. - * @param message Container message or plain object to encode + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. - * @param message Container message or plain object to encode + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Container message from the specified reader or buffer. + * Decodes a CloudDlpInspection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Container + * @returns CloudDlpInspection * @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.cloud.securitycenter.v1.Container; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CloudDlpInspection; /** - * Decodes a Container message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Container + * @returns CloudDlpInspection * @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.cloud.securitycenter.v1.Container; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CloudDlpInspection; /** - * Verifies a Container message. + * Verifies a CloudDlpInspection message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Container message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Container + * @returns CloudDlpInspection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Container; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpInspection; /** - * Creates a plain object from a Container message. Also converts values to other types if specified. - * @param message Container + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * @param message CloudDlpInspection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CloudDlpInspection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Container to JSON. + * Converts this CloudDlpInspection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Container + * Gets the default type url for CloudDlpInspection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Label. */ - interface ILabel { + /** Properties of a Compliance. */ + interface ICompliance { - /** Label name */ - name?: (string|null); + /** Compliance standard */ + standard?: (string|null); - /** Label value */ - value?: (string|null); + /** Compliance version */ + version?: (string|null); + + /** Compliance ids */ + ids?: (string[]|null); } - /** Represents a Label. */ - class Label implements ILabel { + /** Represents a Compliance. */ + class Compliance implements ICompliance { /** - * Constructs a new Label. + * Constructs a new Compliance. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ILabel); + constructor(properties?: google.cloud.securitycenter.v1.ICompliance); - /** Label name. */ - public name: string; + /** Compliance standard. */ + public standard: string; - /** Label value. */ - public value: string; + /** Compliance version. */ + public version: string; + + /** Compliance ids. */ + public ids: string[]; /** - * Creates a new Label instance using the specified properties. + * Creates a new Compliance instance using the specified properties. * @param [properties] Properties to set - * @returns Label instance + * @returns Compliance instance */ - public static create(properties?: google.cloud.securitycenter.v1.ILabel): google.cloud.securitycenter.v1.Label; + public static create(properties?: google.cloud.securitycenter.v1.ICompliance): google.cloud.securitycenter.v1.Compliance; /** - * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. + * @param message Compliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. - * @param message Label message or plain object to encode + * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. + * @param message Compliance message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICompliance, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a Compliance message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Label + * @returns Compliance * @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.cloud.securitycenter.v1.Label; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Compliance; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a Compliance message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Label + * @returns Compliance * @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.cloud.securitycenter.v1.Label; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Compliance; /** - * Verifies a Label message. + * Verifies a Compliance 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 Label message from a plain object. Also converts values to their respective internal types. + * Creates a Compliance message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Label + * @returns Compliance */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Label; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Compliance; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. - * @param message Label + * Creates a plain object from a Compliance message. Also converts values to other types if specified. + * @param message Compliance * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Compliance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Label to JSON. + * Converts this Compliance to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Label + * Gets the default type url for Compliance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Database. */ - interface IDatabase { - - /** Database name */ - name?: (string|null); + /** Properties of a Connection. */ + interface IConnection { - /** Database displayName */ - displayName?: (string|null); + /** Connection destinationIp */ + destinationIp?: (string|null); - /** Database userName */ - userName?: (string|null); + /** Connection destinationPort */ + destinationPort?: (number|null); - /** Database query */ - query?: (string|null); + /** Connection sourceIp */ + sourceIp?: (string|null); - /** Database grantees */ - grantees?: (string[]|null); + /** Connection sourcePort */ + sourcePort?: (number|null); - /** Database version */ - version?: (string|null); + /** Connection protocol */ + protocol?: (google.cloud.securitycenter.v1.Connection.Protocol|keyof typeof google.cloud.securitycenter.v1.Connection.Protocol|null); } - /** Represents a Database. */ - class Database implements IDatabase { + /** Represents a Connection. */ + class Connection implements IConnection { /** - * Constructs a new Database. + * Constructs a new Connection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IDatabase); - - /** Database name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v1.IConnection); - /** Database displayName. */ - public displayName: string; + /** Connection destinationIp. */ + public destinationIp: string; - /** Database userName. */ - public userName: string; + /** Connection destinationPort. */ + public destinationPort: number; - /** Database query. */ - public query: string; + /** Connection sourceIp. */ + public sourceIp: string; - /** Database grantees. */ - public grantees: string[]; + /** Connection sourcePort. */ + public sourcePort: number; - /** Database version. */ - public version: string; + /** Connection protocol. */ + public protocol: (google.cloud.securitycenter.v1.Connection.Protocol|keyof typeof google.cloud.securitycenter.v1.Connection.Protocol); /** - * Creates a new Database instance using the specified properties. + * Creates a new Connection instance using the specified properties. * @param [properties] Properties to set - * @returns Database instance + * @returns Connection instance */ - public static create(properties?: google.cloud.securitycenter.v1.IDatabase): google.cloud.securitycenter.v1.Database; + public static create(properties?: google.cloud.securitycenter.v1.IConnection): google.cloud.securitycenter.v1.Connection; /** - * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. - * @param message Database message or plain object to encode + * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. - * @param message Database message or plain object to encode + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Database message from the specified reader or buffer. + * Decodes a Connection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Database + * @returns Connection * @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.cloud.securitycenter.v1.Database; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Connection; /** - * Decodes a Database message from the specified reader or buffer, length delimited. + * Decodes a Connection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Database + * @returns Connection * @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.cloud.securitycenter.v1.Database; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Connection; /** - * Verifies a Database message. + * Verifies a Connection 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 Database message from a plain object. Also converts values to their respective internal types. + * Creates a Connection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Database + * @returns Connection */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Database; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Connection; /** - * Creates a plain object from a Database message. Also converts values to other types if specified. - * @param message Database + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @param message Connection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Database, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Database to JSON. + * Converts this Connection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Database + * Gets the default type url for Connection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EffectiveSecurityHealthAnalyticsCustomModule. */ - interface IEffectiveSecurityHealthAnalyticsCustomModule { - - /** EffectiveSecurityHealthAnalyticsCustomModule name */ - name?: (string|null); + namespace Connection { - /** EffectiveSecurityHealthAnalyticsCustomModule customConfig */ - customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); + /** Protocol enum. */ + enum Protocol { + PROTOCOL_UNSPECIFIED = 0, + ICMP = 1, + TCP = 6, + UDP = 17, + GRE = 47, + ESP = 50 + } + } - /** EffectiveSecurityHealthAnalyticsCustomModule enablementState */ - enablementState?: (google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null); + /** Properties of a ContactDetails. */ + interface IContactDetails { - /** EffectiveSecurityHealthAnalyticsCustomModule displayName */ - displayName?: (string|null); + /** ContactDetails contacts */ + contacts?: (google.cloud.securitycenter.v1.IContact[]|null); } - /** Represents an EffectiveSecurityHealthAnalyticsCustomModule. */ - class EffectiveSecurityHealthAnalyticsCustomModule implements IEffectiveSecurityHealthAnalyticsCustomModule { + /** Represents a ContactDetails. */ + class ContactDetails implements IContactDetails { /** - * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. + * Constructs a new ContactDetails. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule); - - /** EffectiveSecurityHealthAnalyticsCustomModule name. */ - public name: string; - - /** EffectiveSecurityHealthAnalyticsCustomModule customConfig. */ - public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - - /** EffectiveSecurityHealthAnalyticsCustomModule enablementState. */ - public enablementState: (google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState); + constructor(properties?: google.cloud.securitycenter.v1.IContactDetails); - /** EffectiveSecurityHealthAnalyticsCustomModule displayName. */ - public displayName: string; + /** ContactDetails contacts. */ + public contacts: google.cloud.securitycenter.v1.IContact[]; /** - * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. + * Creates a new ContactDetails instance using the specified properties. * @param [properties] Properties to set - * @returns EffectiveSecurityHealthAnalyticsCustomModule instance + * @returns ContactDetails instance */ - public static create(properties?: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; + public static create(properties?: google.cloud.securitycenter.v1.IContactDetails): google.cloud.securitycenter.v1.ContactDetails; /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. + * @param message ContactDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. + * @param message ContactDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IContactDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * Decodes a ContactDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EffectiveSecurityHealthAnalyticsCustomModule + * @returns ContactDetails * @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.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ContactDetails; /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * Decodes a ContactDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EffectiveSecurityHealthAnalyticsCustomModule + * @returns ContactDetails * @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.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ContactDetails; /** - * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. + * Verifies a ContactDetails 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 EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EffectiveSecurityHealthAnalyticsCustomModule + * @returns ContactDetails */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ContactDetails; /** - * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @param message EffectiveSecurityHealthAnalyticsCustomModule + * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. + * @param message ContactDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ContactDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. + * Converts this ContactDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule + * Gets the default type url for ContactDetails * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EffectiveSecurityHealthAnalyticsCustomModule { + /** Properties of a Contact. */ + interface IContact { - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } + /** Contact email */ + email?: (string|null); } - /** Properties of a CustomConfig. */ - interface ICustomConfig { + /** Represents a Contact. */ + class Contact implements IContact { - /** CustomConfig predicate */ - predicate?: (google.type.IExpr|null); + /** + * Constructs a new Contact. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IContact); - /** CustomConfig customOutput */ - customOutput?: (google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null); + /** Contact email. */ + public email: string; - /** CustomConfig resourceSelector */ - resourceSelector?: (google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null); + /** + * Creates a new Contact instance using the specified properties. + * @param [properties] Properties to set + * @returns Contact instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IContact): google.cloud.securitycenter.v1.Contact; - /** CustomConfig severity */ - severity?: (google.cloud.securitycenter.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycenter.v1.CustomConfig.Severity|null); + /** + * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; - /** CustomConfig description */ - description?: (string|null); + /** + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * @param message Contact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IContact, writer?: $protobuf.Writer): $protobuf.Writer; - /** CustomConfig recommendation */ - recommendation?: (string|null); + /** + * Decodes a Contact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Contact + * @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.cloud.securitycenter.v1.Contact; + + /** + * Decodes a Contact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Contact + * @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.cloud.securitycenter.v1.Contact; + + /** + * Verifies a Contact 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 Contact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Contact + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Contact; + + /** + * Creates a plain object from a Contact message. Also converts values to other types if specified. + * @param message Contact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Contact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Contact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Contact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a CustomConfig. */ - class CustomConfig implements ICustomConfig { + /** Properties of a Container. */ + interface IContainer { + + /** Container name */ + name?: (string|null); + + /** Container uri */ + uri?: (string|null); + + /** Container imageId */ + imageId?: (string|null); + + /** Container labels */ + labels?: (google.cloud.securitycenter.v1.ILabel[]|null); + + /** Container createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Container. */ + class Container implements IContainer { /** - * Constructs a new CustomConfig. + * Constructs a new Container. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICustomConfig); - - /** CustomConfig predicate. */ - public predicate?: (google.type.IExpr|null); + constructor(properties?: google.cloud.securitycenter.v1.IContainer); - /** CustomConfig customOutput. */ - public customOutput?: (google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null); + /** Container name. */ + public name: string; - /** CustomConfig resourceSelector. */ - public resourceSelector?: (google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null); + /** Container uri. */ + public uri: string; - /** CustomConfig severity. */ - public severity: (google.cloud.securitycenter.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycenter.v1.CustomConfig.Severity); + /** Container imageId. */ + public imageId: string; - /** CustomConfig description. */ - public description: string; + /** Container labels. */ + public labels: google.cloud.securitycenter.v1.ILabel[]; - /** CustomConfig recommendation. */ - public recommendation: string; + /** Container createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new CustomConfig instance using the specified properties. + * Creates a new Container instance using the specified properties. * @param [properties] Properties to set - * @returns CustomConfig instance + * @returns Container instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICustomConfig): google.cloud.securitycenter.v1.CustomConfig; + public static create(properties?: google.cloud.securitycenter.v1.IContainer): google.cloud.securitycenter.v1.Container; /** - * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. - * @param message CustomConfig message or plain object to encode + * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * @param message Container message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. - * @param message CustomConfig message or plain object to encode + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * @param message Container message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomConfig message from the specified reader or buffer. + * Decodes a Container message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomConfig + * @returns Container * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CustomConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Container; /** - * Decodes a CustomConfig message from the specified reader or buffer, length delimited. + * Decodes a Container message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomConfig + * @returns Container * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CustomConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Container; /** - * Verifies a CustomConfig message. + * Verifies a Container message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Container message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomConfig + * @returns Container */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Container; /** - * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. - * @param message CustomConfig + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @param message Container * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CustomConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomConfig to JSON. + * Converts this Container to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomConfig + * Gets the default type url for Container * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CustomConfig { + /** Properties of a Label. */ + interface ILabel { - /** Properties of a CustomOutputSpec. */ - interface ICustomOutputSpec { + /** Label name */ + name?: (string|null); - /** CustomOutputSpec properties */ - properties?: (google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty[]|null); - } + /** Label value */ + value?: (string|null); + } - /** Represents a CustomOutputSpec. */ - class CustomOutputSpec implements ICustomOutputSpec { + /** Represents a Label. */ + class Label implements ILabel { - /** - * Constructs a new CustomOutputSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec); + /** + * Constructs a new Label. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ILabel); - /** CustomOutputSpec properties. */ - public properties: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty[]; + /** Label name. */ + public name: string; - /** - * Creates a new CustomOutputSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomOutputSpec instance - */ - public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; + /** Label value. */ + public value: string; - /** - * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @param message CustomOutputSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @param message CustomOutputSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Label instance using the specified properties. + * @param [properties] Properties to set + * @returns Label instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ILabel): google.cloud.securitycenter.v1.Label; - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomOutputSpec - * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; + /** + * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. + * @param message Label message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomOutputSpec - * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; + /** + * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. + * @param message Label message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ILabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CustomOutputSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a Label message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Label + * @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.cloud.securitycenter.v1.Label; - /** - * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomOutputSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; + /** + * Decodes a Label message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Label + * @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.cloud.securitycenter.v1.Label; - /** - * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. - * @param message CustomOutputSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a Label message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this CustomOutputSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a Label message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Label + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Label; - /** - * Gets the default type url for CustomOutputSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a Label message. Also converts values to other types if specified. + * @param message Label + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Label, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace CustomOutputSpec { + /** + * Converts this Label to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a Property. */ - interface IProperty { + /** + * Gets the default type url for Label + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Property name */ - name?: (string|null); + /** Properties of a Database. */ + interface IDatabase { - /** Property valueExpression */ - valueExpression?: (google.type.IExpr|null); - } + /** Database name */ + name?: (string|null); - /** Represents a Property. */ - class Property implements IProperty { + /** Database displayName */ + displayName?: (string|null); - /** - * Constructs a new Property. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty); + /** Database userName */ + userName?: (string|null); - /** Property name. */ - public name: string; + /** Database query */ + query?: (string|null); - /** Property valueExpression. */ - public valueExpression?: (google.type.IExpr|null); + /** Database grantees */ + grantees?: (string[]|null); - /** - * Creates a new Property instance using the specified properties. - * @param [properties] Properties to set - * @returns Property instance - */ - public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; + /** Database version */ + version?: (string|null); + } - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Database. */ + class Database implements IDatabase { - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Database. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IDatabase); - /** - * Decodes a Property message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Property - * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; + /** Database name. */ + public name: string; - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Property - * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; + /** Database displayName. */ + public displayName: string; - /** - * Verifies a Property 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); + /** Database userName. */ + public userName: string; - /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Property - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; + /** Database query. */ + public query: string; - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @param message Property - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Database grantees. */ + public grantees: string[]; - /** - * Converts this Property to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Database version. */ + public version: string; - /** - * Gets the default type url for Property - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ResourceSelector. */ - interface IResourceSelector { - - /** ResourceSelector resourceTypes */ - resourceTypes?: (string[]|null); - } - - /** Represents a ResourceSelector. */ - class ResourceSelector implements IResourceSelector { - - /** - * Constructs a new ResourceSelector. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector); - - /** ResourceSelector resourceTypes. */ - public resourceTypes: string[]; - - /** - * Creates a new ResourceSelector instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceSelector instance - */ - public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector): google.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - - /** - * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @param message ResourceSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @param message ResourceSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceSelector - * @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.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceSelector - * @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.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - - /** - * Verifies a ResourceSelector 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 ResourceSelector message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceSelector - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - - /** - * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. - * @param message ResourceSelector - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.ResourceSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceSelector to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceSelector - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } - } - - /** Properties of an Exfiltration. */ - interface IExfiltration { - - /** Exfiltration sources */ - sources?: (google.cloud.securitycenter.v1.IExfilResource[]|null); - - /** Exfiltration targets */ - targets?: (google.cloud.securitycenter.v1.IExfilResource[]|null); - - /** Exfiltration totalExfiltratedBytes */ - totalExfiltratedBytes?: (number|Long|string|null); - } - - /** Represents an Exfiltration. */ - class Exfiltration implements IExfiltration { - - /** - * Constructs a new Exfiltration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IExfiltration); - - /** Exfiltration sources. */ - public sources: google.cloud.securitycenter.v1.IExfilResource[]; - - /** Exfiltration targets. */ - public targets: google.cloud.securitycenter.v1.IExfilResource[]; - - /** Exfiltration totalExfiltratedBytes. */ - public totalExfiltratedBytes: (number|Long|string); - - /** - * Creates a new Exfiltration instance using the specified properties. - * @param [properties] Properties to set - * @returns Exfiltration instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IExfiltration): google.cloud.securitycenter.v1.Exfiltration; + /** + * Creates a new Database instance using the specified properties. + * @param [properties] Properties to set + * @returns Database instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IDatabase): google.cloud.securitycenter.v1.Database; /** - * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. - * @param message Exfiltration message or plain object to encode + * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. + * @param message Database message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. - * @param message Exfiltration message or plain object to encode + * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. + * @param message Database message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Exfiltration message from the specified reader or buffer. + * Decodes a Database message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Exfiltration + * @returns Database * @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.cloud.securitycenter.v1.Exfiltration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Database; /** - * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * Decodes a Database message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Exfiltration + * @returns Database * @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.cloud.securitycenter.v1.Exfiltration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Database; /** - * Verifies an Exfiltration message. + * Verifies a Database 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 Exfiltration message from a plain object. Also converts values to their respective internal types. + * Creates a Database message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Exfiltration + * @returns Database */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Exfiltration; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Database; /** - * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. - * @param message Exfiltration + * Creates a plain object from a Database message. Also converts values to other types if specified. + * @param message Database * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Exfiltration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Database, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Exfiltration to JSON. + * Converts this Database to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Exfiltration + * Gets the default type url for Database * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExfilResource. */ - interface IExfilResource { + /** Properties of an EffectiveEventThreatDetectionCustomModule. */ + interface IEffectiveEventThreatDetectionCustomModule { - /** ExfilResource name */ + /** EffectiveEventThreatDetectionCustomModule name */ name?: (string|null); - /** ExfilResource components */ - components?: (string[]|null); + /** EffectiveEventThreatDetectionCustomModule config */ + config?: (google.protobuf.IStruct|null); + + /** EffectiveEventThreatDetectionCustomModule enablementState */ + enablementState?: (google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null); + + /** EffectiveEventThreatDetectionCustomModule type */ + type?: (string|null); + + /** EffectiveEventThreatDetectionCustomModule displayName */ + displayName?: (string|null); + + /** EffectiveEventThreatDetectionCustomModule description */ + description?: (string|null); } - /** Represents an ExfilResource. */ - class ExfilResource implements IExfilResource { + /** Represents an EffectiveEventThreatDetectionCustomModule. */ + class EffectiveEventThreatDetectionCustomModule implements IEffectiveEventThreatDetectionCustomModule { /** - * Constructs a new ExfilResource. + * Constructs a new EffectiveEventThreatDetectionCustomModule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IExfilResource); + constructor(properties?: google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule); - /** ExfilResource name. */ + /** EffectiveEventThreatDetectionCustomModule name. */ public name: string; - /** ExfilResource components. */ - public components: string[]; + /** EffectiveEventThreatDetectionCustomModule config. */ + public config?: (google.protobuf.IStruct|null); + + /** EffectiveEventThreatDetectionCustomModule enablementState. */ + public enablementState: (google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState); + + /** EffectiveEventThreatDetectionCustomModule type. */ + public type: string; + + /** EffectiveEventThreatDetectionCustomModule displayName. */ + public displayName: string; + + /** EffectiveEventThreatDetectionCustomModule description. */ + public description: string; /** - * Creates a new ExfilResource instance using the specified properties. + * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. * @param [properties] Properties to set - * @returns ExfilResource instance + * @returns EffectiveEventThreatDetectionCustomModule instance */ - public static create(properties?: google.cloud.securitycenter.v1.IExfilResource): google.cloud.securitycenter.v1.ExfilResource; + public static create(properties?: google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule): google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule; /** - * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. - * @param message ExfilResource message or plain object to encode + * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. - * @param message ExfilResource message or plain object to encode + * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExfilResource message from the specified reader or buffer. + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExfilResource + * @returns EffectiveEventThreatDetectionCustomModule * @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.cloud.securitycenter.v1.ExfilResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule; /** - * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExfilResource + * @returns EffectiveEventThreatDetectionCustomModule * @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.cloud.securitycenter.v1.ExfilResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule; /** - * Verifies an ExfilResource message. + * Verifies an EffectiveEventThreatDetectionCustomModule 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 ExfilResource message from a plain object. Also converts values to their respective internal types. + * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExfilResource + * @returns EffectiveEventThreatDetectionCustomModule */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExfilResource; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule; /** - * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. - * @param message ExfilResource + * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @param message EffectiveEventThreatDetectionCustomModule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ExfilResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExfilResource to JSON. + * Converts this EffectiveEventThreatDetectionCustomModule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExfilResource + * Gets the default type url for EffectiveEventThreatDetectionCustomModule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExternalSystem. */ - interface IExternalSystem { + namespace EffectiveEventThreatDetectionCustomModule { - /** ExternalSystem name */ - name?: (string|null); + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } - /** ExternalSystem assignees */ - assignees?: (string[]|null); + /** Properties of an EffectiveSecurityHealthAnalyticsCustomModule. */ + interface IEffectiveSecurityHealthAnalyticsCustomModule { - /** ExternalSystem externalUid */ - externalUid?: (string|null); + /** EffectiveSecurityHealthAnalyticsCustomModule name */ + name?: (string|null); - /** ExternalSystem status */ - status?: (string|null); - - /** ExternalSystem externalSystemUpdateTime */ - externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - - /** ExternalSystem caseUri */ - caseUri?: (string|null); - - /** ExternalSystem casePriority */ - casePriority?: (string|null); - - /** ExternalSystem caseSla */ - caseSla?: (google.protobuf.ITimestamp|null); - - /** ExternalSystem caseCreateTime */ - caseCreateTime?: (google.protobuf.ITimestamp|null); + /** EffectiveSecurityHealthAnalyticsCustomModule customConfig */ + customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - /** ExternalSystem caseCloseTime */ - caseCloseTime?: (google.protobuf.ITimestamp|null); + /** EffectiveSecurityHealthAnalyticsCustomModule enablementState */ + enablementState?: (google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null); - /** ExternalSystem ticketInfo */ - ticketInfo?: (google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null); + /** EffectiveSecurityHealthAnalyticsCustomModule displayName */ + displayName?: (string|null); } - /** Represents an ExternalSystem. */ - class ExternalSystem implements IExternalSystem { + /** Represents an EffectiveSecurityHealthAnalyticsCustomModule. */ + class EffectiveSecurityHealthAnalyticsCustomModule implements IEffectiveSecurityHealthAnalyticsCustomModule { /** - * Constructs a new ExternalSystem. + * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IExternalSystem); + constructor(properties?: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule); - /** ExternalSystem name. */ + /** EffectiveSecurityHealthAnalyticsCustomModule name. */ public name: string; - /** ExternalSystem assignees. */ - public assignees: string[]; - - /** ExternalSystem externalUid. */ - public externalUid: string; - - /** ExternalSystem status. */ - public status: string; - - /** ExternalSystem externalSystemUpdateTime. */ - public externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - - /** ExternalSystem caseUri. */ - public caseUri: string; - - /** ExternalSystem casePriority. */ - public casePriority: string; - - /** ExternalSystem caseSla. */ - public caseSla?: (google.protobuf.ITimestamp|null); - - /** ExternalSystem caseCreateTime. */ - public caseCreateTime?: (google.protobuf.ITimestamp|null); + /** EffectiveSecurityHealthAnalyticsCustomModule customConfig. */ + public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - /** ExternalSystem caseCloseTime. */ - public caseCloseTime?: (google.protobuf.ITimestamp|null); + /** EffectiveSecurityHealthAnalyticsCustomModule enablementState. */ + public enablementState: (google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState); - /** ExternalSystem ticketInfo. */ - public ticketInfo?: (google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null); + /** EffectiveSecurityHealthAnalyticsCustomModule displayName. */ + public displayName: string; /** - * Creates a new ExternalSystem instance using the specified properties. + * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. * @param [properties] Properties to set - * @returns ExternalSystem instance + * @returns EffectiveSecurityHealthAnalyticsCustomModule instance */ - public static create(properties?: google.cloud.securitycenter.v1.IExternalSystem): google.cloud.securitycenter.v1.ExternalSystem; + public static create(properties?: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; /** - * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. - * @param message ExternalSystem message or plain object to encode + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. - * @param message ExternalSystem message or plain object to encode + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExternalSystem message from the specified reader or buffer. + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExternalSystem + * @returns EffectiveSecurityHealthAnalyticsCustomModule * @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.cloud.securitycenter.v1.ExternalSystem; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; /** - * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExternalSystem + * @returns EffectiveSecurityHealthAnalyticsCustomModule * @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.cloud.securitycenter.v1.ExternalSystem; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; /** - * Verifies an ExternalSystem message. + * Verifies an EffectiveSecurityHealthAnalyticsCustomModule 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 ExternalSystem message from a plain object. Also converts values to their respective internal types. + * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExternalSystem + * @returns EffectiveSecurityHealthAnalyticsCustomModule */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExternalSystem; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule; /** - * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. - * @param message ExternalSystem + * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @param message EffectiveSecurityHealthAnalyticsCustomModule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ExternalSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExternalSystem to JSON. + * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExternalSystem + * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ExternalSystem { - - /** Properties of a TicketInfo. */ - interface ITicketInfo { + namespace EffectiveSecurityHealthAnalyticsCustomModule { - /** TicketInfo id */ - id?: (string|null); + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } - /** TicketInfo assignee */ - assignee?: (string|null); + /** Properties of a CustomConfig. */ + interface ICustomConfig { - /** TicketInfo description */ - description?: (string|null); + /** CustomConfig predicate */ + predicate?: (google.type.IExpr|null); - /** TicketInfo uri */ - uri?: (string|null); + /** CustomConfig customOutput */ + customOutput?: (google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null); - /** TicketInfo status */ - status?: (string|null); + /** CustomConfig resourceSelector */ + resourceSelector?: (google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null); - /** TicketInfo updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** CustomConfig severity */ + severity?: (google.cloud.securitycenter.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycenter.v1.CustomConfig.Severity|null); - /** Represents a TicketInfo. */ - class TicketInfo implements ITicketInfo { + /** CustomConfig description */ + description?: (string|null); - /** - * Constructs a new TicketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo); + /** CustomConfig recommendation */ + recommendation?: (string|null); + } - /** TicketInfo id. */ - public id: string; + /** Represents a CustomConfig. */ + class CustomConfig implements ICustomConfig { - /** TicketInfo assignee. */ - public assignee: string; + /** + * Constructs a new CustomConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICustomConfig); - /** TicketInfo description. */ - public description: string; + /** CustomConfig predicate. */ + public predicate?: (google.type.IExpr|null); - /** TicketInfo uri. */ - public uri: string; + /** CustomConfig customOutput. */ + public customOutput?: (google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null); - /** TicketInfo status. */ - public status: string; + /** CustomConfig resourceSelector. */ + public resourceSelector?: (google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null); - /** TicketInfo updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** CustomConfig severity. */ + public severity: (google.cloud.securitycenter.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycenter.v1.CustomConfig.Severity); - /** - * Creates a new TicketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TicketInfo instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo): google.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + /** CustomConfig description. */ + public description: string; - /** - * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. - * @param message TicketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** CustomConfig recommendation. */ + public recommendation: string; - /** - * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. - * @param message TicketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CustomConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICustomConfig): google.cloud.securitycenter.v1.CustomConfig; - /** - * Decodes a TicketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TicketInfo - * @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.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + /** + * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * @param message CustomConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TicketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TicketInfo - * @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.cloud.securitycenter.v1.ExternalSystem.TicketInfo; - - /** - * Verifies a TicketInfo 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 TicketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TicketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExternalSystem.TicketInfo; - - /** - * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. - * @param message TicketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ExternalSystem.TicketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TicketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TicketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a File. */ - interface IFile { - - /** File path */ - path?: (string|null); - - /** File size */ - size?: (number|Long|string|null); - - /** File sha256 */ - sha256?: (string|null); - - /** File hashedSize */ - hashedSize?: (number|Long|string|null); - - /** File partiallyHashed */ - partiallyHashed?: (boolean|null); - - /** File contents */ - contents?: (string|null); - - /** File diskPath */ - diskPath?: (google.cloud.securitycenter.v1.File.IDiskPath|null); - } - - /** Represents a File. */ - class File implements IFile { - - /** - * Constructs a new File. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IFile); - - /** File path. */ - public path: string; - - /** File size. */ - public size: (number|Long|string); - - /** File sha256. */ - public sha256: string; - - /** File hashedSize. */ - public hashedSize: (number|Long|string); - - /** File partiallyHashed. */ - public partiallyHashed: boolean; - - /** File contents. */ - public contents: string; - - /** File diskPath. */ - public diskPath?: (google.cloud.securitycenter.v1.File.IDiskPath|null); - - /** - * Creates a new File instance using the specified properties. - * @param [properties] Properties to set - * @returns File instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IFile): google.cloud.securitycenter.v1.File; - - /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. - * @param message File message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * @param message CustomConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a File message from the specified reader or buffer. + * Decodes a CustomConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns File + * @returns CustomConfig * @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.cloud.securitycenter.v1.File; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CustomConfig; /** - * Decodes a File message from the specified reader or buffer, length delimited. + * Decodes a CustomConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns File + * @returns CustomConfig * @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.cloud.securitycenter.v1.File; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CustomConfig; /** - * Verifies a File message. + * Verifies a CustomConfig 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 File message from a plain object. Also converts values to their respective internal types. + * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns File + * @returns CustomConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.File; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig; /** - * Creates a plain object from a File message. Also converts values to other types if specified. - * @param message File + * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. + * @param message CustomConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CustomConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this File to JSON. + * Converts this CustomConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for File + * Gets the default type url for CustomConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace File { - - /** Properties of a DiskPath. */ - interface IDiskPath { + namespace CustomConfig { - /** DiskPath partitionUuid */ - partitionUuid?: (string|null); + /** Properties of a CustomOutputSpec. */ + interface ICustomOutputSpec { - /** DiskPath relativePath */ - relativePath?: (string|null); + /** CustomOutputSpec properties */ + properties?: (google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty[]|null); } - /** Represents a DiskPath. */ - class DiskPath implements IDiskPath { + /** Represents a CustomOutputSpec. */ + class CustomOutputSpec implements ICustomOutputSpec { /** - * Constructs a new DiskPath. + * Constructs a new CustomOutputSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.File.IDiskPath); - - /** DiskPath partitionUuid. */ - public partitionUuid: string; + constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec); - /** DiskPath relativePath. */ - public relativePath: string; + /** CustomOutputSpec properties. */ + public properties: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty[]; /** - * Creates a new DiskPath instance using the specified properties. + * Creates a new CustomOutputSpec instance using the specified properties. * @param [properties] Properties to set - * @returns DiskPath instance + * @returns CustomOutputSpec instance */ - public static create(properties?: google.cloud.securitycenter.v1.File.IDiskPath): google.cloud.securitycenter.v1.File.DiskPath; + public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; /** - * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. - * @param message DiskPath message or plain object to encode + * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @param message CustomOutputSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. - * @param message DiskPath message or plain object to encode + * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @param message CustomOutputSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiskPath message from the specified reader or buffer. + * Decodes a CustomOutputSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiskPath + * @returns CustomOutputSpec * @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.cloud.securitycenter.v1.File.DiskPath; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; /** - * Decodes a DiskPath message from the specified reader or buffer, length delimited. + * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiskPath + * @returns CustomOutputSpec * @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.cloud.securitycenter.v1.File.DiskPath; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; /** - * Verifies a DiskPath message. + * Verifies a CustomOutputSpec 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 DiskPath message from a plain object. Also converts values to their respective internal types. + * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiskPath + * @returns CustomOutputSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.File.DiskPath; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec; /** - * Creates a plain object from a DiskPath message. Also converts values to other types if specified. - * @param message DiskPath + * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. + * @param message CustomOutputSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.File.DiskPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiskPath to JSON. + * Converts this CustomOutputSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DiskPath + * Gets the default type url for CustomOutputSpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a Finding. */ - interface IFinding { - /** Finding name */ - name?: (string|null); + namespace CustomOutputSpec { - /** Finding parent */ - parent?: (string|null); + /** Properties of a Property. */ + interface IProperty { - /** Finding resourceName */ - resourceName?: (string|null); + /** Property name */ + name?: (string|null); - /** Finding state */ - state?: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State|null); + /** Property valueExpression */ + valueExpression?: (google.type.IExpr|null); + } - /** Finding category */ - category?: (string|null); + /** Represents a Property. */ + class Property implements IProperty { - /** Finding externalUri */ - externalUri?: (string|null); + /** + * Constructs a new Property. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty); - /** Finding sourceProperties */ - sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + /** Property name. */ + public name: string; - /** Finding securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); + /** Property valueExpression. */ + public valueExpression?: (google.type.IExpr|null); - /** Finding eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); - - /** Finding createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Finding severity */ - severity?: (google.cloud.securitycenter.v1.Finding.Severity|keyof typeof google.cloud.securitycenter.v1.Finding.Severity|null); - - /** Finding canonicalName */ - canonicalName?: (string|null); - - /** Finding mute */ - mute?: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute|null); + /** + * Creates a new Property instance using the specified properties. + * @param [properties] Properties to set + * @returns Property instance + */ + public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; - /** Finding findingClass */ - findingClass?: (google.cloud.securitycenter.v1.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v1.Finding.FindingClass|null); + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding indicator */ - indicator?: (google.cloud.securitycenter.v1.IIndicator|null); + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding vulnerability */ - vulnerability?: (google.cloud.securitycenter.v1.IVulnerability|null); + /** + * Decodes a Property message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Property + * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; - /** Finding muteUpdateTime */ - muteUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Property + * @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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; - /** Finding externalSystems */ - externalSystems?: ({ [k: string]: google.cloud.securitycenter.v1.IExternalSystem }|null); + /** + * Verifies a Property 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); - /** Finding mitreAttack */ - mitreAttack?: (google.cloud.securitycenter.v1.IMitreAttack|null); + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Property + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property; - /** Finding access */ - access?: (google.cloud.securitycenter.v1.IAccess|null); + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Finding connections */ - connections?: (google.cloud.securitycenter.v1.IConnection[]|null); + /** + * Converts this Property to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Finding muteInitiator */ - muteInitiator?: (string|null); + /** + * Gets the default type url for Property + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Finding processes */ - processes?: (google.cloud.securitycenter.v1.IProcess[]|null); + /** Properties of a ResourceSelector. */ + interface IResourceSelector { - /** Finding contacts */ - contacts?: ({ [k: string]: google.cloud.securitycenter.v1.IContactDetails }|null); + /** ResourceSelector resourceTypes */ + resourceTypes?: (string[]|null); + } - /** Finding compliances */ - compliances?: (google.cloud.securitycenter.v1.ICompliance[]|null); + /** Represents a ResourceSelector. */ + class ResourceSelector implements IResourceSelector { - /** Finding parentDisplayName */ - parentDisplayName?: (string|null); + /** + * Constructs a new ResourceSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector); - /** Finding description */ - description?: (string|null); + /** ResourceSelector resourceTypes. */ + public resourceTypes: string[]; - /** Finding exfiltration */ - exfiltration?: (google.cloud.securitycenter.v1.IExfiltration|null); + /** + * Creates a new ResourceSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSelector instance + */ + public static create(properties?: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector): google.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - /** Finding iamBindings */ - iamBindings?: (google.cloud.securitycenter.v1.IIamBinding[]|null); + /** + * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @param message ResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding nextSteps */ - nextSteps?: (string|null); + /** + * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @param message ResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - /** Finding moduleName */ - moduleName?: (string|null); + /** + * Decodes a ResourceSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSelector + * @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.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - /** Finding containers */ - containers?: (google.cloud.securitycenter.v1.IContainer[]|null); + /** + * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSelector + * @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.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - /** Finding kubernetes */ - kubernetes?: (google.cloud.securitycenter.v1.IKubernetes|null); + /** + * Verifies a ResourceSelector 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); - /** Finding database */ - database?: (google.cloud.securitycenter.v1.IDatabase|null); + /** + * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomConfig.ResourceSelector; - /** Finding files */ - files?: (google.cloud.securitycenter.v1.IFile[]|null); + /** + * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. + * @param message ResourceSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CustomConfig.ResourceSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Finding cloudDlpInspection */ - cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); + /** + * Converts this ResourceSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Finding cloudDlpDataProfile */ - cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); + /** + * Gets the default type url for ResourceSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Finding kernelRootkit */ - kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + } - /** Finding orgPolicies */ - orgPolicies?: (google.cloud.securitycenter.v1.IOrgPolicy[]|null); + /** Properties of an EventThreatDetectionCustomModule. */ + interface IEventThreatDetectionCustomModule { - /** Finding application */ - application?: (google.cloud.securitycenter.v1.IApplication|null); + /** EventThreatDetectionCustomModule name */ + name?: (string|null); - /** Finding backupDisasterRecovery */ - backupDisasterRecovery?: (google.cloud.securitycenter.v1.IBackupDisasterRecovery|null); + /** EventThreatDetectionCustomModule config */ + config?: (google.protobuf.IStruct|null); - /** Finding securityPosture */ - securityPosture?: (google.cloud.securitycenter.v1.ISecurityPosture|null); + /** EventThreatDetectionCustomModule ancestorModule */ + ancestorModule?: (string|null); - /** Finding logEntries */ - logEntries?: (google.cloud.securitycenter.v1.ILogEntry[]|null); + /** EventThreatDetectionCustomModule enablementState */ + enablementState?: (google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState|null); - /** Finding loadBalancers */ - loadBalancers?: (google.cloud.securitycenter.v1.ILoadBalancer[]|null); + /** EventThreatDetectionCustomModule type */ + type?: (string|null); - /** Finding cloudArmor */ - cloudArmor?: (google.cloud.securitycenter.v1.ICloudArmor|null); + /** EventThreatDetectionCustomModule displayName */ + displayName?: (string|null); - /** Finding notebook */ - notebook?: (google.cloud.securitycenter.v1.INotebook|null); + /** EventThreatDetectionCustomModule description */ + description?: (string|null); - /** Finding toxicCombination */ - toxicCombination?: (google.cloud.securitycenter.v1.IToxicCombination|null); + /** EventThreatDetectionCustomModule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Finding groupMemberships */ - groupMemberships?: (google.cloud.securitycenter.v1.IGroupMembership[]|null); + /** EventThreatDetectionCustomModule lastEditor */ + lastEditor?: (string|null); } - /** Represents a Finding. */ - class Finding implements IFinding { + /** Represents an EventThreatDetectionCustomModule. */ + class EventThreatDetectionCustomModule implements IEventThreatDetectionCustomModule { /** - * Constructs a new Finding. + * Constructs a new EventThreatDetectionCustomModule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IFinding); + constructor(properties?: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule); - /** Finding name. */ + /** EventThreatDetectionCustomModule name. */ public name: string; - /** Finding parent. */ - public parent: string; - - /** Finding resourceName. */ - public resourceName: string; - - /** Finding state. */ - public state: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State); - - /** Finding category. */ - public category: string; - - /** Finding externalUri. */ - public externalUri: string; - - /** Finding sourceProperties. */ - public sourceProperties: { [k: string]: google.protobuf.IValue }; - - /** Finding securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - - /** Finding eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); - - /** Finding createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Finding severity. */ - public severity: (google.cloud.securitycenter.v1.Finding.Severity|keyof typeof google.cloud.securitycenter.v1.Finding.Severity); - - /** Finding canonicalName. */ - public canonicalName: string; + /** EventThreatDetectionCustomModule config. */ + public config?: (google.protobuf.IStruct|null); - /** Finding mute. */ - public mute: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute); - - /** Finding findingClass. */ - public findingClass: (google.cloud.securitycenter.v1.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v1.Finding.FindingClass); - - /** Finding indicator. */ - public indicator?: (google.cloud.securitycenter.v1.IIndicator|null); - - /** Finding vulnerability. */ - public vulnerability?: (google.cloud.securitycenter.v1.IVulnerability|null); - - /** Finding muteUpdateTime. */ - public muteUpdateTime?: (google.protobuf.ITimestamp|null); - - /** Finding externalSystems. */ - public externalSystems: { [k: string]: google.cloud.securitycenter.v1.IExternalSystem }; - - /** Finding mitreAttack. */ - public mitreAttack?: (google.cloud.securitycenter.v1.IMitreAttack|null); - - /** Finding access. */ - public access?: (google.cloud.securitycenter.v1.IAccess|null); - - /** Finding connections. */ - public connections: google.cloud.securitycenter.v1.IConnection[]; - - /** Finding muteInitiator. */ - public muteInitiator: string; - - /** Finding processes. */ - public processes: google.cloud.securitycenter.v1.IProcess[]; + /** EventThreatDetectionCustomModule ancestorModule. */ + public ancestorModule: string; - /** Finding contacts. */ - public contacts: { [k: string]: google.cloud.securitycenter.v1.IContactDetails }; + /** EventThreatDetectionCustomModule enablementState. */ + public enablementState: (google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState); - /** Finding compliances. */ - public compliances: google.cloud.securitycenter.v1.ICompliance[]; + /** EventThreatDetectionCustomModule type. */ + public type: string; - /** Finding parentDisplayName. */ - public parentDisplayName: string; + /** EventThreatDetectionCustomModule displayName. */ + public displayName: string; - /** Finding description. */ + /** EventThreatDetectionCustomModule description. */ public description: string; - /** Finding exfiltration. */ - public exfiltration?: (google.cloud.securitycenter.v1.IExfiltration|null); - - /** Finding iamBindings. */ - public iamBindings: google.cloud.securitycenter.v1.IIamBinding[]; - - /** Finding nextSteps. */ - public nextSteps: string; - - /** Finding moduleName. */ - public moduleName: string; - - /** Finding containers. */ - public containers: google.cloud.securitycenter.v1.IContainer[]; - - /** Finding kubernetes. */ - public kubernetes?: (google.cloud.securitycenter.v1.IKubernetes|null); - - /** Finding database. */ - public database?: (google.cloud.securitycenter.v1.IDatabase|null); - - /** Finding files. */ - public files: google.cloud.securitycenter.v1.IFile[]; - - /** Finding cloudDlpInspection. */ - public cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); - - /** Finding cloudDlpDataProfile. */ - public cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); - - /** Finding kernelRootkit. */ - public kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); - - /** Finding orgPolicies. */ - public orgPolicies: google.cloud.securitycenter.v1.IOrgPolicy[]; - - /** Finding application. */ - public application?: (google.cloud.securitycenter.v1.IApplication|null); - - /** Finding backupDisasterRecovery. */ - public backupDisasterRecovery?: (google.cloud.securitycenter.v1.IBackupDisasterRecovery|null); - - /** Finding securityPosture. */ - public securityPosture?: (google.cloud.securitycenter.v1.ISecurityPosture|null); - - /** Finding logEntries. */ - public logEntries: google.cloud.securitycenter.v1.ILogEntry[]; - - /** Finding loadBalancers. */ - public loadBalancers: google.cloud.securitycenter.v1.ILoadBalancer[]; - - /** Finding cloudArmor. */ - public cloudArmor?: (google.cloud.securitycenter.v1.ICloudArmor|null); - - /** Finding notebook. */ - public notebook?: (google.cloud.securitycenter.v1.INotebook|null); - - /** Finding toxicCombination. */ - public toxicCombination?: (google.cloud.securitycenter.v1.IToxicCombination|null); + /** EventThreatDetectionCustomModule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** Finding groupMemberships. */ - public groupMemberships: google.cloud.securitycenter.v1.IGroupMembership[]; + /** EventThreatDetectionCustomModule lastEditor. */ + public lastEditor: string; /** - * Creates a new Finding instance using the specified properties. + * Creates a new EventThreatDetectionCustomModule instance using the specified properties. * @param [properties] Properties to set - * @returns Finding instance + * @returns EventThreatDetectionCustomModule instance */ - public static create(properties?: google.cloud.securitycenter.v1.IFinding): google.cloud.securitycenter.v1.Finding; + public static create(properties?: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule): google.cloud.securitycenter.v1.EventThreatDetectionCustomModule; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @param message EventThreatDetectionCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. - * @param message Finding message or plain object to encode + * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @param message EventThreatDetectionCustomModule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Finding + * @returns EventThreatDetectionCustomModule * @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.cloud.securitycenter.v1.Finding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.EventThreatDetectionCustomModule; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Finding + * @returns EventThreatDetectionCustomModule * @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.cloud.securitycenter.v1.Finding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.EventThreatDetectionCustomModule; /** - * Verifies a Finding message. + * Verifies an EventThreatDetectionCustomModule 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 Finding message from a plain object. Also converts values to their respective internal types. + * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Finding + * @returns EventThreatDetectionCustomModule */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Finding; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EventThreatDetectionCustomModule; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. - * @param message Finding + * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @param message EventThreatDetectionCustomModule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.EventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Finding to JSON. + * Converts this EventThreatDetectionCustomModule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Finding + * Gets the default type url for EventThreatDetectionCustomModule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Finding { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } - - /** Mute enum. */ - enum Mute { - MUTE_UNSPECIFIED = 0, - MUTED = 1, - UNMUTED = 2, - UNDEFINED = 4 - } + namespace EventThreatDetectionCustomModule { - /** FindingClass enum. */ - enum FindingClass { - FINDING_CLASS_UNSPECIFIED = 0, - THREAT = 1, - VULNERABILITY = 2, - MISCONFIGURATION = 3, - OBSERVATION = 4, - SCC_ERROR = 5, - POSTURE_VIOLATION = 6, - TOXIC_COMBINATION = 7 + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + INHERITED = 3 } } - /** Properties of a GroupMembership. */ - interface IGroupMembership { - - /** GroupMembership groupType */ - groupType?: (google.cloud.securitycenter.v1.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v1.GroupMembership.GroupType|null); + /** Properties of a CustomModuleValidationErrors. */ + interface ICustomModuleValidationErrors { - /** GroupMembership groupId */ - groupId?: (string|null); + /** CustomModuleValidationErrors errors */ + errors?: (google.cloud.securitycenter.v1.ICustomModuleValidationError[]|null); } - /** Represents a GroupMembership. */ - class GroupMembership implements IGroupMembership { + /** Represents a CustomModuleValidationErrors. */ + class CustomModuleValidationErrors implements ICustomModuleValidationErrors { /** - * Constructs a new GroupMembership. + * Constructs a new CustomModuleValidationErrors. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupMembership); - - /** GroupMembership groupType. */ - public groupType: (google.cloud.securitycenter.v1.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v1.GroupMembership.GroupType); + constructor(properties?: google.cloud.securitycenter.v1.ICustomModuleValidationErrors); - /** GroupMembership groupId. */ - public groupId: string; + /** CustomModuleValidationErrors errors. */ + public errors: google.cloud.securitycenter.v1.ICustomModuleValidationError[]; /** - * Creates a new GroupMembership instance using the specified properties. + * Creates a new CustomModuleValidationErrors instance using the specified properties. * @param [properties] Properties to set - * @returns GroupMembership instance + * @returns CustomModuleValidationErrors instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupMembership): google.cloud.securitycenter.v1.GroupMembership; + public static create(properties?: google.cloud.securitycenter.v1.ICustomModuleValidationErrors): google.cloud.securitycenter.v1.CustomModuleValidationErrors; /** - * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. - * @param message GroupMembership message or plain object to encode + * Encodes the specified CustomModuleValidationErrors message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationErrors.verify|verify} messages. + * @param message CustomModuleValidationErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICustomModuleValidationErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. - * @param message GroupMembership message or plain object to encode + * Encodes the specified CustomModuleValidationErrors message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationErrors.verify|verify} messages. + * @param message CustomModuleValidationErrors message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICustomModuleValidationErrors, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupMembership message from the specified reader or buffer. + * Decodes a CustomModuleValidationErrors message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupMembership + * @returns CustomModuleValidationErrors * @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.cloud.securitycenter.v1.GroupMembership; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CustomModuleValidationErrors; /** - * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * Decodes a CustomModuleValidationErrors message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupMembership + * @returns CustomModuleValidationErrors * @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.cloud.securitycenter.v1.GroupMembership; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CustomModuleValidationErrors; /** - * Verifies a GroupMembership message. + * Verifies a CustomModuleValidationErrors 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 GroupMembership message from a plain object. Also converts values to their respective internal types. + * Creates a CustomModuleValidationErrors message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupMembership + * @returns CustomModuleValidationErrors */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupMembership; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomModuleValidationErrors; /** - * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. - * @param message GroupMembership + * Creates a plain object from a CustomModuleValidationErrors message. Also converts values to other types if specified. + * @param message CustomModuleValidationErrors * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GroupMembership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CustomModuleValidationErrors, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupMembership to JSON. + * Converts this CustomModuleValidationErrors to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GroupMembership + * Gets the default type url for CustomModuleValidationErrors * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GroupMembership { + /** Properties of a CustomModuleValidationError. */ + interface ICustomModuleValidationError { - /** GroupType enum. */ - enum GroupType { - GROUP_TYPE_UNSPECIFIED = 0, - GROUP_TYPE_TOXIC_COMBINATION = 1 - } - } + /** CustomModuleValidationError description */ + description?: (string|null); - /** Properties of an IamBinding. */ - interface IIamBinding { + /** CustomModuleValidationError fieldPath */ + fieldPath?: (string|null); - /** IamBinding action */ - action?: (google.cloud.securitycenter.v1.IamBinding.Action|keyof typeof google.cloud.securitycenter.v1.IamBinding.Action|null); + /** CustomModuleValidationError start */ + start?: (google.cloud.securitycenter.v1.IPosition|null); - /** IamBinding role */ - role?: (string|null); - - /** IamBinding member */ - member?: (string|null); + /** CustomModuleValidationError end */ + end?: (google.cloud.securitycenter.v1.IPosition|null); } - /** Represents an IamBinding. */ - class IamBinding implements IIamBinding { + /** Represents a CustomModuleValidationError. */ + class CustomModuleValidationError implements ICustomModuleValidationError { /** - * Constructs a new IamBinding. + * Constructs a new CustomModuleValidationError. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IIamBinding); + constructor(properties?: google.cloud.securitycenter.v1.ICustomModuleValidationError); - /** IamBinding action. */ - public action: (google.cloud.securitycenter.v1.IamBinding.Action|keyof typeof google.cloud.securitycenter.v1.IamBinding.Action); + /** CustomModuleValidationError description. */ + public description: string; - /** IamBinding role. */ - public role: string; + /** CustomModuleValidationError fieldPath. */ + public fieldPath: string; - /** IamBinding member. */ - public member: string; + /** CustomModuleValidationError start. */ + public start?: (google.cloud.securitycenter.v1.IPosition|null); + + /** CustomModuleValidationError end. */ + public end?: (google.cloud.securitycenter.v1.IPosition|null); + + /** CustomModuleValidationError _start. */ + public _start?: "start"; + + /** CustomModuleValidationError _end. */ + public _end?: "end"; /** - * Creates a new IamBinding instance using the specified properties. + * Creates a new CustomModuleValidationError instance using the specified properties. * @param [properties] Properties to set - * @returns IamBinding instance + * @returns CustomModuleValidationError instance */ - public static create(properties?: google.cloud.securitycenter.v1.IIamBinding): google.cloud.securitycenter.v1.IamBinding; + public static create(properties?: google.cloud.securitycenter.v1.ICustomModuleValidationError): google.cloud.securitycenter.v1.CustomModuleValidationError; /** - * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. - * @param message IamBinding message or plain object to encode + * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationError.verify|verify} messages. + * @param message CustomModuleValidationError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. - * @param message IamBinding message or plain object to encode + * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationError.verify|verify} messages. + * @param message CustomModuleValidationError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IamBinding message from the specified reader or buffer. + * Decodes a CustomModuleValidationError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IamBinding + * @returns CustomModuleValidationError * @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.cloud.securitycenter.v1.IamBinding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CustomModuleValidationError; /** - * Decodes an IamBinding message from the specified reader or buffer, length delimited. + * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IamBinding + * @returns CustomModuleValidationError * @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.cloud.securitycenter.v1.IamBinding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CustomModuleValidationError; /** - * Verifies an IamBinding message. + * Verifies a CustomModuleValidationError 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 IamBinding message from a plain object. Also converts values to their respective internal types. + * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IamBinding + * @returns CustomModuleValidationError */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.IamBinding; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CustomModuleValidationError; /** - * Creates a plain object from an IamBinding message. Also converts values to other types if specified. - * @param message IamBinding + * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. + * @param message CustomModuleValidationError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.IamBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CustomModuleValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IamBinding to JSON. + * Converts this CustomModuleValidationError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IamBinding + * Gets the default type url for CustomModuleValidationError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace IamBinding { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an Indicator. */ - interface IIndicator { - - /** Indicator ipAddresses */ - ipAddresses?: (string[]|null); - - /** Indicator domains */ - domains?: (string[]|null); + /** Properties of a Position. */ + interface IPosition { - /** Indicator signatures */ - signatures?: (google.cloud.securitycenter.v1.Indicator.IProcessSignature[]|null); + /** Position lineNumber */ + lineNumber?: (number|null); - /** Indicator uris */ - uris?: (string[]|null); + /** Position columnNumber */ + columnNumber?: (number|null); } - /** Represents an Indicator. */ - class Indicator implements IIndicator { + /** Represents a Position. */ + class Position implements IPosition { /** - * Constructs a new Indicator. + * Constructs a new Position. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IIndicator); - - /** Indicator ipAddresses. */ - public ipAddresses: string[]; - - /** Indicator domains. */ - public domains: string[]; + constructor(properties?: google.cloud.securitycenter.v1.IPosition); - /** Indicator signatures. */ - public signatures: google.cloud.securitycenter.v1.Indicator.IProcessSignature[]; + /** Position lineNumber. */ + public lineNumber: number; - /** Indicator uris. */ - public uris: string[]; + /** Position columnNumber. */ + public columnNumber: number; /** - * Creates a new Indicator instance using the specified properties. + * Creates a new Position instance using the specified properties. * @param [properties] Properties to set - * @returns Indicator instance + * @returns Position instance */ - public static create(properties?: google.cloud.securitycenter.v1.IIndicator): google.cloud.securitycenter.v1.Indicator; + public static create(properties?: google.cloud.securitycenter.v1.IPosition): google.cloud.securitycenter.v1.Position; /** - * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. - * @param message Indicator message or plain object to encode + * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycenter.v1.Position.verify|verify} messages. + * @param message Position message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. - * @param message Indicator message or plain object to encode + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Position.verify|verify} messages. + * @param message Position message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Indicator message from the specified reader or buffer. + * Decodes a Position message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Indicator + * @returns Position * @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.cloud.securitycenter.v1.Indicator; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Position; /** - * Decodes an Indicator message from the specified reader or buffer, length delimited. + * Decodes a Position message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Indicator + * @returns Position * @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.cloud.securitycenter.v1.Indicator; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Position; /** - * Verifies an Indicator message. + * Verifies a Position 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 Indicator message from a plain object. Also converts values to their respective internal types. + * Creates a Position message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Indicator + * @returns Position */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Position; /** - * Creates a plain object from an Indicator message. Also converts values to other types if specified. - * @param message Indicator + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @param message Position * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Indicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Position, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Indicator to JSON. + * Converts this Position to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Indicator + * Gets the default type url for Position * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Indicator { - - /** Properties of a ProcessSignature. */ - interface IProcessSignature { + /** Properties of an Exfiltration. */ + interface IExfiltration { - /** ProcessSignature memoryHashSignature */ - memoryHashSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null); + /** Exfiltration sources */ + sources?: (google.cloud.securitycenter.v1.IExfilResource[]|null); - /** ProcessSignature yaraRuleSignature */ - yaraRuleSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null); + /** Exfiltration targets */ + targets?: (google.cloud.securitycenter.v1.IExfilResource[]|null); - /** ProcessSignature signatureType */ - signatureType?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|null); - } + /** Exfiltration totalExfiltratedBytes */ + totalExfiltratedBytes?: (number|Long|string|null); + } - /** Represents a ProcessSignature. */ - class ProcessSignature implements IProcessSignature { + /** Represents an Exfiltration. */ + class Exfiltration implements IExfiltration { - /** - * Constructs a new ProcessSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Indicator.IProcessSignature); + /** + * Constructs a new Exfiltration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IExfiltration); - /** ProcessSignature memoryHashSignature. */ - public memoryHashSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null); + /** Exfiltration sources. */ + public sources: google.cloud.securitycenter.v1.IExfilResource[]; - /** ProcessSignature yaraRuleSignature. */ - public yaraRuleSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null); + /** Exfiltration targets. */ + public targets: google.cloud.securitycenter.v1.IExfilResource[]; - /** ProcessSignature signatureType. */ - public signatureType: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType); + /** Exfiltration totalExfiltratedBytes. */ + public totalExfiltratedBytes: (number|Long|string); - /** ProcessSignature signature. */ - public signature?: ("memoryHashSignature"|"yaraRuleSignature"); + /** + * Creates a new Exfiltration instance using the specified properties. + * @param [properties] Properties to set + * @returns Exfiltration instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IExfiltration): google.cloud.securitycenter.v1.Exfiltration; - /** - * Creates a new ProcessSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns ProcessSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Indicator.IProcessSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature; + /** + * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * @param message Exfiltration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. - * @param message ProcessSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * @param message Exfiltration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IExfiltration, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. - * @param message ProcessSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an Exfiltration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exfiltration + * @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.cloud.securitycenter.v1.Exfiltration; - /** - * Decodes a ProcessSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProcessSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature; + /** + * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exfiltration + * @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.cloud.securitycenter.v1.Exfiltration; - /** - * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProcessSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature; + /** + * Verifies an Exfiltration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a ProcessSignature 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 Exfiltration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exfiltration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Exfiltration; - /** - * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProcessSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature; + /** + * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. + * @param message Exfiltration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Exfiltration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. - * @param message ProcessSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Exfiltration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ProcessSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for Exfiltration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for ProcessSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of an ExfilResource. */ + interface IExfilResource { - namespace ProcessSignature { + /** ExfilResource name */ + name?: (string|null); - /** Properties of a MemoryHashSignature. */ - interface IMemoryHashSignature { + /** ExfilResource components */ + components?: (string[]|null); + } - /** MemoryHashSignature binaryFamily */ - binaryFamily?: (string|null); + /** Represents an ExfilResource. */ + class ExfilResource implements IExfilResource { - /** MemoryHashSignature detections */ - detections?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]|null); - } + /** + * Constructs a new ExfilResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IExfilResource); - /** Represents a MemoryHashSignature. */ - class MemoryHashSignature implements IMemoryHashSignature { + /** ExfilResource name. */ + public name: string; - /** - * Constructs a new MemoryHashSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature); + /** ExfilResource components. */ + public components: string[]; - /** MemoryHashSignature binaryFamily. */ - public binaryFamily: string; + /** + * Creates a new ExfilResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExfilResource instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IExfilResource): google.cloud.securitycenter.v1.ExfilResource; - /** MemoryHashSignature detections. */ - public detections: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]; + /** + * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * @param message ExfilResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new MemoryHashSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns MemoryHashSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * @param message ExfilResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IExfilResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @param message MemoryHashSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an ExfilResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExfilResource + * @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.cloud.securitycenter.v1.ExfilResource; - /** - * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @param message MemoryHashSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExfilResource + * @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.cloud.securitycenter.v1.ExfilResource; - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MemoryHashSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Verifies an ExfilResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MemoryHashSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExfilResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExfilResource; - /** - * Verifies a MemoryHashSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * @param message ExfilResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ExfilResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MemoryHashSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + /** + * Converts this ExfilResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. - * @param message MemoryHashSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for ExfilResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this MemoryHashSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of an ExternalSystem. */ + interface IExternalSystem { - /** - * Gets the default type url for MemoryHashSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ExternalSystem name */ + name?: (string|null); - namespace MemoryHashSignature { + /** ExternalSystem assignees */ + assignees?: (string[]|null); - /** Properties of a Detection. */ - interface IDetection { + /** ExternalSystem externalUid */ + externalUid?: (string|null); - /** Detection binary */ - binary?: (string|null); + /** ExternalSystem status */ + status?: (string|null); - /** Detection percentPagesMatched */ - percentPagesMatched?: (number|null); - } + /** ExternalSystem externalSystemUpdateTime */ + externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - /** Represents a Detection. */ - class Detection implements IDetection { + /** ExternalSystem caseUri */ + caseUri?: (string|null); - /** - * Constructs a new Detection. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection); + /** ExternalSystem casePriority */ + casePriority?: (string|null); - /** Detection binary. */ - public binary: string; + /** ExternalSystem caseSla */ + caseSla?: (google.protobuf.ITimestamp|null); - /** Detection percentPagesMatched. */ - public percentPagesMatched: number; + /** ExternalSystem caseCreateTime */ + caseCreateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new Detection instance using the specified properties. - * @param [properties] Properties to set - * @returns Detection instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** ExternalSystem caseCloseTime */ + caseCloseTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @param message Detection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @param message Detection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExternalSystem ticketInfo */ + ticketInfo?: (google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null); + } - /** - * Decodes a Detection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Detection - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** Represents an ExternalSystem. */ + class ExternalSystem implements IExternalSystem { - /** - * Decodes a Detection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Detection - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** + * Constructs a new ExternalSystem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IExternalSystem); - /** - * Verifies a Detection 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); + /** ExternalSystem name. */ + public name: string; - /** - * Creates a Detection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Detection - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + /** ExternalSystem assignees. */ + public assignees: string[]; - /** - * Creates a plain object from a Detection message. Also converts values to other types if specified. - * @param message Detection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExternalSystem externalUid. */ + public externalUid: string; - /** - * Converts this Detection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExternalSystem status. */ + public status: string; - /** - * Gets the default type url for Detection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** ExternalSystem externalSystemUpdateTime. */ + public externalSystemUpdateTime?: (google.protobuf.ITimestamp|null); - /** Properties of a YaraRuleSignature. */ - interface IYaraRuleSignature { + /** ExternalSystem caseUri. */ + public caseUri: string; - /** YaraRuleSignature yaraRule */ - yaraRule?: (string|null); - } + /** ExternalSystem casePriority. */ + public casePriority: string; - /** Represents a YaraRuleSignature. */ - class YaraRuleSignature implements IYaraRuleSignature { + /** ExternalSystem caseSla. */ + public caseSla?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new YaraRuleSignature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature); + /** ExternalSystem caseCreateTime. */ + public caseCreateTime?: (google.protobuf.ITimestamp|null); - /** YaraRuleSignature yaraRule. */ - public yaraRule: string; + /** ExternalSystem caseCloseTime. */ + public caseCloseTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new YaraRuleSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns YaraRuleSignature instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + /** ExternalSystem ticketInfo. */ + public ticketInfo?: (google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null); - /** - * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @param message YaraRuleSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ExternalSystem instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalSystem instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IExternalSystem): google.cloud.securitycenter.v1.ExternalSystem; - /** - * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @param message YaraRuleSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * @param message ExternalSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns YaraRuleSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + /** + * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * @param message ExternalSystem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IExternalSystem, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns YaraRuleSignature - * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + /** + * Decodes an ExternalSystem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalSystem + * @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.cloud.securitycenter.v1.ExternalSystem; - /** - * Verifies a YaraRuleSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalSystem + * @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.cloud.securitycenter.v1.ExternalSystem; - /** - * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns YaraRuleSignature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + /** + * Verifies an ExternalSystem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. - * @param message YaraRuleSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalSystem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExternalSystem; - /** - * Converts this YaraRuleSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * @param message ExternalSystem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ExternalSystem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for YaraRuleSignature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this ExternalSystem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SignatureType enum. */ - enum SignatureType { - SIGNATURE_TYPE_UNSPECIFIED = 0, - SIGNATURE_TYPE_PROCESS = 1, - SIGNATURE_TYPE_FILE = 2 - } - } + /** + * Gets the default type url for ExternalSystem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KernelRootkit. */ - interface IKernelRootkit { + namespace ExternalSystem { - /** KernelRootkit name */ - name?: (string|null); + /** Properties of a TicketInfo. */ + interface ITicketInfo { - /** KernelRootkit unexpectedCodeModification */ - unexpectedCodeModification?: (boolean|null); + /** TicketInfo id */ + id?: (string|null); - /** KernelRootkit unexpectedReadOnlyDataModification */ - unexpectedReadOnlyDataModification?: (boolean|null); + /** TicketInfo assignee */ + assignee?: (string|null); - /** KernelRootkit unexpectedFtraceHandler */ - unexpectedFtraceHandler?: (boolean|null); + /** TicketInfo description */ + description?: (string|null); - /** KernelRootkit unexpectedKprobeHandler */ - unexpectedKprobeHandler?: (boolean|null); + /** TicketInfo uri */ + uri?: (string|null); - /** KernelRootkit unexpectedKernelCodePages */ - unexpectedKernelCodePages?: (boolean|null); + /** TicketInfo status */ + status?: (string|null); - /** KernelRootkit unexpectedSystemCallHandler */ - unexpectedSystemCallHandler?: (boolean|null); + /** TicketInfo updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** KernelRootkit unexpectedInterruptHandler */ - unexpectedInterruptHandler?: (boolean|null); + /** Represents a TicketInfo. */ + class TicketInfo implements ITicketInfo { - /** KernelRootkit unexpectedProcessesInRunqueue */ - unexpectedProcessesInRunqueue?: (boolean|null); + /** + * Constructs a new TicketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo); + + /** TicketInfo id. */ + public id: string; + + /** TicketInfo assignee. */ + public assignee: string; + + /** TicketInfo description. */ + public description: string; + + /** TicketInfo uri. */ + public uri: string; + + /** TicketInfo status. */ + public status: string; + + /** TicketInfo updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TicketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TicketInfo instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo): google.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + + /** + * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. + * @param message TicketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. + * @param message TicketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TicketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TicketInfo + * @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.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + + /** + * Decodes a TicketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TicketInfo + * @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.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + + /** + * Verifies a TicketInfo 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 TicketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TicketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ExternalSystem.TicketInfo; + + /** + * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. + * @param message TicketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ExternalSystem.TicketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TicketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TicketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a KernelRootkit. */ - class KernelRootkit implements IKernelRootkit { + /** Properties of a File. */ + interface IFile { + + /** File path */ + path?: (string|null); + + /** File size */ + size?: (number|Long|string|null); + + /** File sha256 */ + sha256?: (string|null); + + /** File hashedSize */ + hashedSize?: (number|Long|string|null); + + /** File partiallyHashed */ + partiallyHashed?: (boolean|null); + + /** File contents */ + contents?: (string|null); + + /** File diskPath */ + diskPath?: (google.cloud.securitycenter.v1.File.IDiskPath|null); + } + + /** Represents a File. */ + class File implements IFile { /** - * Constructs a new KernelRootkit. + * Constructs a new File. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IKernelRootkit); - - /** KernelRootkit name. */ - public name: string; - - /** KernelRootkit unexpectedCodeModification. */ - public unexpectedCodeModification: boolean; + constructor(properties?: google.cloud.securitycenter.v1.IFile); - /** KernelRootkit unexpectedReadOnlyDataModification. */ - public unexpectedReadOnlyDataModification: boolean; + /** File path. */ + public path: string; - /** KernelRootkit unexpectedFtraceHandler. */ - public unexpectedFtraceHandler: boolean; + /** File size. */ + public size: (number|Long|string); - /** KernelRootkit unexpectedKprobeHandler. */ - public unexpectedKprobeHandler: boolean; + /** File sha256. */ + public sha256: string; - /** KernelRootkit unexpectedKernelCodePages. */ - public unexpectedKernelCodePages: boolean; + /** File hashedSize. */ + public hashedSize: (number|Long|string); - /** KernelRootkit unexpectedSystemCallHandler. */ - public unexpectedSystemCallHandler: boolean; + /** File partiallyHashed. */ + public partiallyHashed: boolean; - /** KernelRootkit unexpectedInterruptHandler. */ - public unexpectedInterruptHandler: boolean; + /** File contents. */ + public contents: string; - /** KernelRootkit unexpectedProcessesInRunqueue. */ - public unexpectedProcessesInRunqueue: boolean; + /** File diskPath. */ + public diskPath?: (google.cloud.securitycenter.v1.File.IDiskPath|null); /** - * Creates a new KernelRootkit instance using the specified properties. + * Creates a new File instance using the specified properties. * @param [properties] Properties to set - * @returns KernelRootkit instance + * @returns File instance */ - public static create(properties?: google.cloud.securitycenter.v1.IKernelRootkit): google.cloud.securitycenter.v1.KernelRootkit; + public static create(properties?: google.cloud.securitycenter.v1.IFile): google.cloud.securitycenter.v1.File; /** - * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. - * @param message KernelRootkit message or plain object to encode + * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. + * @param message File message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. - * @param message KernelRootkit message or plain object to encode + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. + * @param message File message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IFile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KernelRootkit message from the specified reader or buffer. + * Decodes a File message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KernelRootkit + * @returns File * @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.cloud.securitycenter.v1.KernelRootkit; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.File; /** - * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KernelRootkit + * @returns File * @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.cloud.securitycenter.v1.KernelRootkit; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.File; /** - * Verifies a KernelRootkit message. + * Verifies a File 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 KernelRootkit message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KernelRootkit + * @returns File */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.KernelRootkit; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.File; /** - * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. - * @param message KernelRootkit + * Creates a plain object from a File message. Also converts values to other types if specified. + * @param message File * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.KernelRootkit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.File, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KernelRootkit to JSON. + * Converts this File to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KernelRootkit + * Gets the default type url for File * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Kubernetes. */ - interface IKubernetes { + namespace File { - /** Kubernetes pods */ - pods?: (google.cloud.securitycenter.v1.Kubernetes.IPod[]|null); + /** Properties of a DiskPath. */ + interface IDiskPath { - /** Kubernetes nodes */ - nodes?: (google.cloud.securitycenter.v1.Kubernetes.INode[]|null); + /** DiskPath partitionUuid */ + partitionUuid?: (string|null); - /** Kubernetes nodePools */ - nodePools?: (google.cloud.securitycenter.v1.Kubernetes.INodePool[]|null); - - /** Kubernetes roles */ - roles?: (google.cloud.securitycenter.v1.Kubernetes.IRole[]|null); - - /** Kubernetes bindings */ - bindings?: (google.cloud.securitycenter.v1.Kubernetes.IBinding[]|null); - - /** Kubernetes accessReviews */ - accessReviews?: (google.cloud.securitycenter.v1.Kubernetes.IAccessReview[]|null); - - /** Kubernetes objects */ - objects?: (google.cloud.securitycenter.v1.Kubernetes.IObject[]|null); - } - - /** Represents a Kubernetes. */ - class Kubernetes implements IKubernetes { - - /** - * Constructs a new Kubernetes. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IKubernetes); - - /** Kubernetes pods. */ - public pods: google.cloud.securitycenter.v1.Kubernetes.IPod[]; - - /** Kubernetes nodes. */ - public nodes: google.cloud.securitycenter.v1.Kubernetes.INode[]; - - /** Kubernetes nodePools. */ - public nodePools: google.cloud.securitycenter.v1.Kubernetes.INodePool[]; - - /** Kubernetes roles. */ - public roles: google.cloud.securitycenter.v1.Kubernetes.IRole[]; - - /** Kubernetes bindings. */ - public bindings: google.cloud.securitycenter.v1.Kubernetes.IBinding[]; - - /** Kubernetes accessReviews. */ - public accessReviews: google.cloud.securitycenter.v1.Kubernetes.IAccessReview[]; - - /** Kubernetes objects. */ - public objects: google.cloud.securitycenter.v1.Kubernetes.IObject[]; - - /** - * Creates a new Kubernetes instance using the specified properties. - * @param [properties] Properties to set - * @returns Kubernetes instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IKubernetes): google.cloud.securitycenter.v1.Kubernetes; - - /** - * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. - * @param message Kubernetes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. - * @param message Kubernetes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Kubernetes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Kubernetes - * @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.cloud.securitycenter.v1.Kubernetes; - - /** - * Decodes a Kubernetes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Kubernetes - * @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.cloud.securitycenter.v1.Kubernetes; - - /** - * Verifies a Kubernetes 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 Kubernetes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Kubernetes - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes; - - /** - * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. - * @param message Kubernetes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Kubernetes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Kubernetes - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Kubernetes { - - /** Properties of a Pod. */ - interface IPod { - - /** Pod ns */ - ns?: (string|null); - - /** Pod name */ - name?: (string|null); - - /** Pod labels */ - labels?: (google.cloud.securitycenter.v1.ILabel[]|null); - - /** Pod containers */ - containers?: (google.cloud.securitycenter.v1.IContainer[]|null); + /** DiskPath relativePath */ + relativePath?: (string|null); } - /** Represents a Pod. */ - class Pod implements IPod { + /** Represents a DiskPath. */ + class DiskPath implements IDiskPath { /** - * Constructs a new Pod. + * Constructs a new DiskPath. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IPod); - - /** Pod ns. */ - public ns: string; - - /** Pod name. */ - public name: string; + constructor(properties?: google.cloud.securitycenter.v1.File.IDiskPath); - /** Pod labels. */ - public labels: google.cloud.securitycenter.v1.ILabel[]; + /** DiskPath partitionUuid. */ + public partitionUuid: string; - /** Pod containers. */ - public containers: google.cloud.securitycenter.v1.IContainer[]; + /** DiskPath relativePath. */ + public relativePath: string; /** - * Creates a new Pod instance using the specified properties. + * Creates a new DiskPath instance using the specified properties. * @param [properties] Properties to set - * @returns Pod instance + * @returns DiskPath instance */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IPod): google.cloud.securitycenter.v1.Kubernetes.Pod; + public static create(properties?: google.cloud.securitycenter.v1.File.IDiskPath): google.cloud.securitycenter.v1.File.DiskPath; /** - * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. - * @param message Pod message or plain object to encode + * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. + * @param message DiskPath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. - * @param message Pod message or plain object to encode + * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. + * @param message DiskPath message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.File.IDiskPath, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Pod message from the specified reader or buffer. + * Decodes a DiskPath message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Pod + * @returns DiskPath * @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.cloud.securitycenter.v1.Kubernetes.Pod; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.File.DiskPath; /** - * Decodes a Pod message from the specified reader or buffer, length delimited. + * Decodes a DiskPath message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Pod + * @returns DiskPath * @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.cloud.securitycenter.v1.Kubernetes.Pod; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.File.DiskPath; /** - * Verifies a Pod message. + * Verifies a DiskPath 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 Pod message from a plain object. Also converts values to their respective internal types. + * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Pod + * @returns DiskPath */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Pod; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.File.DiskPath; /** - * Creates a plain object from a Pod message. Also converts values to other types if specified. - * @param message Pod + * Creates a plain object from a DiskPath message. Also converts values to other types if specified. + * @param message DiskPath * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Pod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.File.DiskPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Pod to JSON. + * Converts this DiskPath to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Pod + * Gets the default type url for DiskPath * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a Node. */ - interface INode { + /** Properties of a Finding. */ + interface IFinding { - /** Node name */ - name?: (string|null); - } + /** Finding name */ + name?: (string|null); - /** Represents a Node. */ - class Node implements INode { + /** Finding parent */ + parent?: (string|null); - /** - * Constructs a new Node. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.INode); + /** Finding resourceName */ + resourceName?: (string|null); - /** Node name. */ - public name: string; + /** Finding state */ + state?: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State|null); - /** - * Creates a new Node instance using the specified properties. - * @param [properties] Properties to set - * @returns Node instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.INode): google.cloud.securitycenter.v1.Kubernetes.Node; + /** Finding category */ + category?: (string|null); - /** - * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding externalUri */ + externalUri?: (string|null); - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding sourceProperties */ + sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - /** - * Decodes a Node message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Node - * @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.cloud.securitycenter.v1.Kubernetes.Node; + /** Finding securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Node - * @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.cloud.securitycenter.v1.Kubernetes.Node; + /** Finding eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a Node 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); + /** Finding createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Node - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Node; + /** Finding severity */ + severity?: (google.cloud.securitycenter.v1.Finding.Severity|keyof typeof google.cloud.securitycenter.v1.Finding.Severity|null); - /** - * Creates a plain object from a Node message. Also converts values to other types if specified. - * @param message Node - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Finding canonicalName */ + canonicalName?: (string|null); - /** - * Converts this Node to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding mute */ + mute?: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute|null); - /** - * Gets the default type url for Node - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Finding findingClass */ + findingClass?: (google.cloud.securitycenter.v1.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v1.Finding.FindingClass|null); - /** Properties of a NodePool. */ - interface INodePool { + /** Finding indicator */ + indicator?: (google.cloud.securitycenter.v1.IIndicator|null); - /** NodePool name */ - name?: (string|null); + /** Finding vulnerability */ + vulnerability?: (google.cloud.securitycenter.v1.IVulnerability|null); - /** NodePool nodes */ - nodes?: (google.cloud.securitycenter.v1.Kubernetes.INode[]|null); - } + /** Finding muteUpdateTime */ + muteUpdateTime?: (google.protobuf.ITimestamp|null); - /** Represents a NodePool. */ - class NodePool implements INodePool { + /** Finding externalSystems */ + externalSystems?: ({ [k: string]: google.cloud.securitycenter.v1.IExternalSystem }|null); - /** - * Constructs a new NodePool. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.INodePool); + /** Finding mitreAttack */ + mitreAttack?: (google.cloud.securitycenter.v1.IMitreAttack|null); - /** NodePool name. */ - public name: string; + /** Finding access */ + access?: (google.cloud.securitycenter.v1.IAccess|null); - /** NodePool nodes. */ - public nodes: google.cloud.securitycenter.v1.Kubernetes.INode[]; + /** Finding connections */ + connections?: (google.cloud.securitycenter.v1.IConnection[]|null); - /** - * Creates a new NodePool instance using the specified properties. - * @param [properties] Properties to set - * @returns NodePool instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.INodePool): google.cloud.securitycenter.v1.Kubernetes.NodePool; + /** Finding muteInitiator */ + muteInitiator?: (string|null); - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding processes */ + processes?: (google.cloud.securitycenter.v1.IProcess[]|null); - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. - * @param message NodePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding contacts */ + contacts?: ({ [k: string]: google.cloud.securitycenter.v1.IContactDetails }|null); - /** - * Decodes a NodePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodePool - * @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.cloud.securitycenter.v1.Kubernetes.NodePool; + /** Finding compliances */ + compliances?: (google.cloud.securitycenter.v1.ICompliance[]|null); - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodePool - * @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.cloud.securitycenter.v1.Kubernetes.NodePool; + /** Finding parentDisplayName */ + parentDisplayName?: (string|null); - /** - * Verifies a NodePool 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); + /** Finding description */ + description?: (string|null); - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodePool - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.NodePool; + /** Finding exfiltration */ + exfiltration?: (google.cloud.securitycenter.v1.IExfiltration|null); - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @param message NodePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Finding iamBindings */ + iamBindings?: (google.cloud.securitycenter.v1.IIamBinding[]|null); - /** - * Converts this NodePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding nextSteps */ + nextSteps?: (string|null); - /** - * Gets the default type url for NodePool - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Finding moduleName */ + moduleName?: (string|null); - /** Properties of a Role. */ - interface IRole { + /** Finding containers */ + containers?: (google.cloud.securitycenter.v1.IContainer[]|null); - /** Role kind */ - kind?: (google.cloud.securitycenter.v1.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Role.Kind|null); + /** Finding kubernetes */ + kubernetes?: (google.cloud.securitycenter.v1.IKubernetes|null); - /** Role ns */ - ns?: (string|null); + /** Finding database */ + database?: (google.cloud.securitycenter.v1.IDatabase|null); - /** Role name */ - name?: (string|null); - } + /** Finding attackExposure */ + attackExposure?: (google.cloud.securitycenter.v1.IAttackExposure|null); - /** Represents a Role. */ - class Role implements IRole { + /** Finding files */ + files?: (google.cloud.securitycenter.v1.IFile[]|null); - /** - * Constructs a new Role. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IRole); + /** Finding cloudDlpInspection */ + cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); - /** Role kind. */ - public kind: (google.cloud.securitycenter.v1.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Role.Kind); + /** Finding cloudDlpDataProfile */ + cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); - /** Role ns. */ - public ns: string; + /** Finding kernelRootkit */ + kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); - /** Role name. */ - public name: string; + /** Finding orgPolicies */ + orgPolicies?: (google.cloud.securitycenter.v1.IOrgPolicy[]|null); - /** - * Creates a new Role instance using the specified properties. - * @param [properties] Properties to set - * @returns Role instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IRole): google.cloud.securitycenter.v1.Kubernetes.Role; + /** Finding application */ + application?: (google.cloud.securitycenter.v1.IApplication|null); - /** - * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. - * @param message Role message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding backupDisasterRecovery */ + backupDisasterRecovery?: (google.cloud.securitycenter.v1.IBackupDisasterRecovery|null); - /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. - * @param message Role message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding securityPosture */ + securityPosture?: (google.cloud.securitycenter.v1.ISecurityPosture|null); - /** - * Decodes a Role message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Role - * @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.cloud.securitycenter.v1.Kubernetes.Role; + /** Finding logEntries */ + logEntries?: (google.cloud.securitycenter.v1.ILogEntry[]|null); - /** - * Decodes a Role message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Role - * @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.cloud.securitycenter.v1.Kubernetes.Role; + /** Finding loadBalancers */ + loadBalancers?: (google.cloud.securitycenter.v1.ILoadBalancer[]|null); - /** - * Verifies a Role 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); + /** Finding cloudArmor */ + cloudArmor?: (google.cloud.securitycenter.v1.ICloudArmor|null); - /** - * Creates a Role message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Role - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Role; + /** Finding notebook */ + notebook?: (google.cloud.securitycenter.v1.INotebook|null); - /** - * Creates a plain object from a Role message. Also converts values to other types if specified. - * @param message Role - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Finding toxicCombination */ + toxicCombination?: (google.cloud.securitycenter.v1.IToxicCombination|null); - /** - * Converts this Role to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding groupMemberships */ + groupMemberships?: (google.cloud.securitycenter.v1.IGroupMembership[]|null); + } - /** - * Gets the default type url for Role - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Finding. */ + class Finding implements IFinding { - namespace Role { + /** + * Constructs a new Finding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IFinding); - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - ROLE = 1, - CLUSTER_ROLE = 2 - } - } + /** Finding name. */ + public name: string; - /** Properties of a Binding. */ - interface IBinding { + /** Finding parent. */ + public parent: string; - /** Binding ns */ - ns?: (string|null); + /** Finding resourceName. */ + public resourceName: string; - /** Binding name */ - name?: (string|null); + /** Finding state. */ + public state: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State); - /** Binding role */ - role?: (google.cloud.securitycenter.v1.Kubernetes.IRole|null); + /** Finding category. */ + public category: string; - /** Binding subjects */ - subjects?: (google.cloud.securitycenter.v1.Kubernetes.ISubject[]|null); - } + /** Finding externalUri. */ + public externalUri: string; - /** Represents a Binding. */ - class Binding implements IBinding { + /** Finding sourceProperties. */ + public sourceProperties: { [k: string]: google.protobuf.IValue }; - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IBinding); + /** Finding securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** Binding ns. */ - public ns: string; + /** Finding eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); - /** Binding name. */ - public name: string; + /** Finding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Binding role. */ - public role?: (google.cloud.securitycenter.v1.Kubernetes.IRole|null); + /** Finding severity. */ + public severity: (google.cloud.securitycenter.v1.Finding.Severity|keyof typeof google.cloud.securitycenter.v1.Finding.Severity); - /** Binding subjects. */ - public subjects: google.cloud.securitycenter.v1.Kubernetes.ISubject[]; + /** Finding canonicalName. */ + public canonicalName: string; - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IBinding): google.cloud.securitycenter.v1.Kubernetes.Binding; + /** Finding mute. */ + public mute: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute); - /** - * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding findingClass. */ + public findingClass: (google.cloud.securitycenter.v1.Finding.FindingClass|keyof typeof google.cloud.securitycenter.v1.Finding.FindingClass); - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** Finding indicator. */ + public indicator?: (google.cloud.securitycenter.v1.IIndicator|null); - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @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.cloud.securitycenter.v1.Kubernetes.Binding; + /** Finding vulnerability. */ + public vulnerability?: (google.cloud.securitycenter.v1.IVulnerability|null); - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @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.cloud.securitycenter.v1.Kubernetes.Binding; + /** Finding muteUpdateTime. */ + public muteUpdateTime?: (google.protobuf.ITimestamp|null); - /** - * Verifies a Binding 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); + /** Finding externalSystems. */ + public externalSystems: { [k: string]: google.cloud.securitycenter.v1.IExternalSystem }; - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Binding; + /** Finding mitreAttack. */ + public mitreAttack?: (google.cloud.securitycenter.v1.IMitreAttack|null); - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Finding access. */ + public access?: (google.cloud.securitycenter.v1.IAccess|null); - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Finding connections. */ + public connections: google.cloud.securitycenter.v1.IConnection[]; - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Finding muteInitiator. */ + public muteInitiator: string; - /** Properties of a Subject. */ - interface ISubject { + /** Finding processes. */ + public processes: google.cloud.securitycenter.v1.IProcess[]; - /** Subject kind */ - kind?: (google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|null); + /** Finding contacts. */ + public contacts: { [k: string]: google.cloud.securitycenter.v1.IContactDetails }; - /** Subject ns */ - ns?: (string|null); + /** Finding compliances. */ + public compliances: google.cloud.securitycenter.v1.ICompliance[]; - /** Subject name */ - name?: (string|null); - } + /** Finding parentDisplayName. */ + public parentDisplayName: string; - /** Represents a Subject. */ - class Subject implements ISubject { + /** Finding description. */ + public description: string; + + /** Finding exfiltration. */ + public exfiltration?: (google.cloud.securitycenter.v1.IExfiltration|null); + + /** Finding iamBindings. */ + public iamBindings: google.cloud.securitycenter.v1.IIamBinding[]; + + /** Finding nextSteps. */ + public nextSteps: string; + + /** Finding moduleName. */ + public moduleName: string; + + /** Finding containers. */ + public containers: google.cloud.securitycenter.v1.IContainer[]; + + /** Finding kubernetes. */ + public kubernetes?: (google.cloud.securitycenter.v1.IKubernetes|null); + + /** Finding database. */ + public database?: (google.cloud.securitycenter.v1.IDatabase|null); + + /** Finding attackExposure. */ + public attackExposure?: (google.cloud.securitycenter.v1.IAttackExposure|null); + + /** Finding files. */ + public files: google.cloud.securitycenter.v1.IFile[]; + + /** Finding cloudDlpInspection. */ + public cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); + + /** Finding cloudDlpDataProfile. */ + public cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); + + /** Finding kernelRootkit. */ + public kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); + + /** Finding orgPolicies. */ + public orgPolicies: google.cloud.securitycenter.v1.IOrgPolicy[]; + + /** Finding application. */ + public application?: (google.cloud.securitycenter.v1.IApplication|null); + + /** Finding backupDisasterRecovery. */ + public backupDisasterRecovery?: (google.cloud.securitycenter.v1.IBackupDisasterRecovery|null); + + /** Finding securityPosture. */ + public securityPosture?: (google.cloud.securitycenter.v1.ISecurityPosture|null); + + /** Finding logEntries. */ + public logEntries: google.cloud.securitycenter.v1.ILogEntry[]; + + /** Finding loadBalancers. */ + public loadBalancers: google.cloud.securitycenter.v1.ILoadBalancer[]; + + /** Finding cloudArmor. */ + public cloudArmor?: (google.cloud.securitycenter.v1.ICloudArmor|null); + + /** Finding notebook. */ + public notebook?: (google.cloud.securitycenter.v1.INotebook|null); + + /** Finding toxicCombination. */ + public toxicCombination?: (google.cloud.securitycenter.v1.IToxicCombination|null); + + /** Finding groupMemberships. */ + public groupMemberships: google.cloud.securitycenter.v1.IGroupMembership[]; + + /** + * Creates a new Finding instance using the specified properties. + * @param [properties] Properties to set + * @returns Finding instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IFinding): google.cloud.securitycenter.v1.Finding; + + /** + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Finding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Finding + * @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.cloud.securitycenter.v1.Finding; + + /** + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Finding + * @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.cloud.securitycenter.v1.Finding; + + /** + * Verifies a Finding 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 Finding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Finding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Finding; + + /** + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @param message Finding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Finding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Finding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Finding { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + + /** Mute enum. */ + enum Mute { + MUTE_UNSPECIFIED = 0, + MUTED = 1, + UNMUTED = 2, + UNDEFINED = 4 + } + + /** FindingClass enum. */ + enum FindingClass { + FINDING_CLASS_UNSPECIFIED = 0, + THREAT = 1, + VULNERABILITY = 2, + MISCONFIGURATION = 3, + OBSERVATION = 4, + SCC_ERROR = 5, + POSTURE_VIOLATION = 6, + TOXIC_COMBINATION = 7 + } + } + + /** Properties of a GroupMembership. */ + interface IGroupMembership { + + /** GroupMembership groupType */ + groupType?: (google.cloud.securitycenter.v1.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v1.GroupMembership.GroupType|null); + + /** GroupMembership groupId */ + groupId?: (string|null); + } + + /** Represents a GroupMembership. */ + class GroupMembership implements IGroupMembership { + + /** + * Constructs a new GroupMembership. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IGroupMembership); + + /** GroupMembership groupType. */ + public groupType: (google.cloud.securitycenter.v1.GroupMembership.GroupType|keyof typeof google.cloud.securitycenter.v1.GroupMembership.GroupType); + + /** GroupMembership groupId. */ + public groupId: string; + + /** + * Creates a new GroupMembership instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupMembership instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IGroupMembership): google.cloud.securitycenter.v1.GroupMembership; + + /** + * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. + * @param message GroupMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. + * @param message GroupMembership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroupMembership message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupMembership + * @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.cloud.securitycenter.v1.GroupMembership; + + /** + * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupMembership + * @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.cloud.securitycenter.v1.GroupMembership; + + /** + * Verifies a GroupMembership 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 GroupMembership message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupMembership + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupMembership; + + /** + * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. + * @param message GroupMembership + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.GroupMembership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroupMembership to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroupMembership + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GroupMembership { + + /** GroupType enum. */ + enum GroupType { + GROUP_TYPE_UNSPECIFIED = 0, + GROUP_TYPE_TOXIC_COMBINATION = 1 + } + } + + /** Properties of an IamBinding. */ + interface IIamBinding { + + /** IamBinding action */ + action?: (google.cloud.securitycenter.v1.IamBinding.Action|keyof typeof google.cloud.securitycenter.v1.IamBinding.Action|null); + + /** IamBinding role */ + role?: (string|null); + + /** IamBinding member */ + member?: (string|null); + } + + /** Represents an IamBinding. */ + class IamBinding implements IIamBinding { + + /** + * Constructs a new IamBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IIamBinding); + + /** IamBinding action. */ + public action: (google.cloud.securitycenter.v1.IamBinding.Action|keyof typeof google.cloud.securitycenter.v1.IamBinding.Action); + + /** IamBinding role. */ + public role: string; + + /** IamBinding member. */ + public member: string; + + /** + * Creates a new IamBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns IamBinding instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IIamBinding): google.cloud.securitycenter.v1.IamBinding; + + /** + * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. + * @param message IamBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. + * @param message IamBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IIamBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IamBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IamBinding + * @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.cloud.securitycenter.v1.IamBinding; + + /** + * Decodes an IamBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IamBinding + * @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.cloud.securitycenter.v1.IamBinding; + + /** + * Verifies an IamBinding 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 IamBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IamBinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.IamBinding; + + /** + * Creates a plain object from an IamBinding message. Also converts values to other types if specified. + * @param message IamBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.IamBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IamBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IamBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IamBinding { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an Indicator. */ + interface IIndicator { + + /** Indicator ipAddresses */ + ipAddresses?: (string[]|null); + + /** Indicator domains */ + domains?: (string[]|null); + + /** Indicator signatures */ + signatures?: (google.cloud.securitycenter.v1.Indicator.IProcessSignature[]|null); + + /** Indicator uris */ + uris?: (string[]|null); + } + + /** Represents an Indicator. */ + class Indicator implements IIndicator { + + /** + * Constructs a new Indicator. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IIndicator); + + /** Indicator ipAddresses. */ + public ipAddresses: string[]; + + /** Indicator domains. */ + public domains: string[]; + + /** Indicator signatures. */ + public signatures: google.cloud.securitycenter.v1.Indicator.IProcessSignature[]; + + /** Indicator uris. */ + public uris: string[]; + + /** + * Creates a new Indicator instance using the specified properties. + * @param [properties] Properties to set + * @returns Indicator instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IIndicator): google.cloud.securitycenter.v1.Indicator; + + /** + * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. + * @param message Indicator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. + * @param message Indicator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Indicator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Indicator + * @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.cloud.securitycenter.v1.Indicator; + + /** + * Decodes an Indicator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Indicator + * @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.cloud.securitycenter.v1.Indicator; + + /** + * Verifies an Indicator 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 Indicator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Indicator + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator; + + /** + * Creates a plain object from an Indicator message. Also converts values to other types if specified. + * @param message Indicator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Indicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Indicator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Indicator + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Indicator { + + /** Properties of a ProcessSignature. */ + interface IProcessSignature { + + /** ProcessSignature memoryHashSignature */ + memoryHashSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null); + + /** ProcessSignature yaraRuleSignature */ + yaraRuleSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null); + + /** ProcessSignature signatureType */ + signatureType?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|null); + } + + /** Represents a ProcessSignature. */ + class ProcessSignature implements IProcessSignature { + + /** + * Constructs a new ProcessSignature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Indicator.IProcessSignature); + + /** ProcessSignature memoryHashSignature. */ + public memoryHashSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null); + + /** ProcessSignature yaraRuleSignature. */ + public yaraRuleSignature?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null); + + /** ProcessSignature signatureType. */ + public signatureType: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|keyof typeof google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType); + + /** ProcessSignature signature. */ + public signature?: ("memoryHashSignature"|"yaraRuleSignature"); + + /** + * Creates a new ProcessSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns ProcessSignature instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Indicator.IProcessSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature; + + /** + * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. + * @param message ProcessSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. + * @param message ProcessSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.IProcessSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProcessSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProcessSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature; + + /** + * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProcessSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature; + + /** + * Verifies a ProcessSignature 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 ProcessSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProcessSignature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature; + + /** + * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. + * @param message ProcessSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProcessSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProcessSignature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProcessSignature { + + /** Properties of a MemoryHashSignature. */ + interface IMemoryHashSignature { + + /** MemoryHashSignature binaryFamily */ + binaryFamily?: (string|null); + + /** MemoryHashSignature detections */ + detections?: (google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]|null); + } + + /** Represents a MemoryHashSignature. */ + class MemoryHashSignature implements IMemoryHashSignature { + + /** + * Constructs a new MemoryHashSignature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature); + + /** MemoryHashSignature binaryFamily. */ + public binaryFamily: string; + + /** MemoryHashSignature detections. */ + public detections: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection[]; + + /** + * Creates a new MemoryHashSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns MemoryHashSignature instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + + /** + * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @param message MemoryHashSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @param message MemoryHashSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MemoryHashSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MemoryHashSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + + /** + * Verifies a MemoryHashSignature 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 MemoryHashSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MemoryHashSignature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature; + + /** + * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. + * @param message MemoryHashSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MemoryHashSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MemoryHashSignature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MemoryHashSignature { + + /** Properties of a Detection. */ + interface IDetection { + + /** Detection binary */ + binary?: (string|null); + + /** Detection percentPagesMatched */ + percentPagesMatched?: (number|null); + } + + /** Represents a Detection. */ + class Detection implements IDetection { + + /** + * Constructs a new Detection. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection); + + /** Detection binary. */ + public binary: string; + + /** Detection percentPagesMatched. */ + public percentPagesMatched: number; + + /** + * Creates a new Detection instance using the specified properties. + * @param [properties] Properties to set + * @returns Detection instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + + /** + * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @param message Detection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @param message Detection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Detection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Detection + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + + /** + * Decodes a Detection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Detection + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + + /** + * Verifies a Detection 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 Detection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Detection + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection; + + /** + * Creates a plain object from a Detection message. Also converts values to other types if specified. + * @param message Detection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Detection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Detection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a YaraRuleSignature. */ + interface IYaraRuleSignature { + + /** YaraRuleSignature yaraRule */ + yaraRule?: (string|null); + } + + /** Represents a YaraRuleSignature. */ + class YaraRuleSignature implements IYaraRuleSignature { + + /** + * Constructs a new YaraRuleSignature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature); + + /** YaraRuleSignature yaraRule. */ + public yaraRule: string; + + /** + * Creates a new YaraRuleSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns YaraRuleSignature instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature): google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + + /** + * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @param message YaraRuleSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @param message YaraRuleSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns YaraRuleSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns YaraRuleSignature + * @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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + + /** + * Verifies a YaraRuleSignature 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 YaraRuleSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns YaraRuleSignature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature; + + /** + * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. + * @param message YaraRuleSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this YaraRuleSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for YaraRuleSignature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SignatureType enum. */ + enum SignatureType { + SIGNATURE_TYPE_UNSPECIFIED = 0, + SIGNATURE_TYPE_PROCESS = 1, + SIGNATURE_TYPE_FILE = 2 + } + } + } + + /** Properties of a KernelRootkit. */ + interface IKernelRootkit { + + /** KernelRootkit name */ + name?: (string|null); + + /** KernelRootkit unexpectedCodeModification */ + unexpectedCodeModification?: (boolean|null); + + /** KernelRootkit unexpectedReadOnlyDataModification */ + unexpectedReadOnlyDataModification?: (boolean|null); + + /** KernelRootkit unexpectedFtraceHandler */ + unexpectedFtraceHandler?: (boolean|null); + + /** KernelRootkit unexpectedKprobeHandler */ + unexpectedKprobeHandler?: (boolean|null); + + /** KernelRootkit unexpectedKernelCodePages */ + unexpectedKernelCodePages?: (boolean|null); + + /** KernelRootkit unexpectedSystemCallHandler */ + unexpectedSystemCallHandler?: (boolean|null); + + /** KernelRootkit unexpectedInterruptHandler */ + unexpectedInterruptHandler?: (boolean|null); + + /** KernelRootkit unexpectedProcessesInRunqueue */ + unexpectedProcessesInRunqueue?: (boolean|null); + } + + /** Represents a KernelRootkit. */ + class KernelRootkit implements IKernelRootkit { + + /** + * Constructs a new KernelRootkit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IKernelRootkit); + + /** KernelRootkit name. */ + public name: string; + + /** KernelRootkit unexpectedCodeModification. */ + public unexpectedCodeModification: boolean; + + /** KernelRootkit unexpectedReadOnlyDataModification. */ + public unexpectedReadOnlyDataModification: boolean; + + /** KernelRootkit unexpectedFtraceHandler. */ + public unexpectedFtraceHandler: boolean; + + /** KernelRootkit unexpectedKprobeHandler. */ + public unexpectedKprobeHandler: boolean; + + /** KernelRootkit unexpectedKernelCodePages. */ + public unexpectedKernelCodePages: boolean; + + /** KernelRootkit unexpectedSystemCallHandler. */ + public unexpectedSystemCallHandler: boolean; + + /** KernelRootkit unexpectedInterruptHandler. */ + public unexpectedInterruptHandler: boolean; + + /** KernelRootkit unexpectedProcessesInRunqueue. */ + public unexpectedProcessesInRunqueue: boolean; + + /** + * Creates a new KernelRootkit instance using the specified properties. + * @param [properties] Properties to set + * @returns KernelRootkit instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IKernelRootkit): google.cloud.securitycenter.v1.KernelRootkit; + + /** + * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * @param message KernelRootkit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * @param message KernelRootkit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IKernelRootkit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KernelRootkit + * @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.cloud.securitycenter.v1.KernelRootkit; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KernelRootkit + * @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.cloud.securitycenter.v1.KernelRootkit; + + /** + * Verifies a KernelRootkit 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 KernelRootkit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KernelRootkit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.KernelRootkit; + + /** + * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. + * @param message KernelRootkit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.KernelRootkit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KernelRootkit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KernelRootkit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Kubernetes. */ + interface IKubernetes { + + /** Kubernetes pods */ + pods?: (google.cloud.securitycenter.v1.Kubernetes.IPod[]|null); + + /** Kubernetes nodes */ + nodes?: (google.cloud.securitycenter.v1.Kubernetes.INode[]|null); + + /** Kubernetes nodePools */ + nodePools?: (google.cloud.securitycenter.v1.Kubernetes.INodePool[]|null); + + /** Kubernetes roles */ + roles?: (google.cloud.securitycenter.v1.Kubernetes.IRole[]|null); + + /** Kubernetes bindings */ + bindings?: (google.cloud.securitycenter.v1.Kubernetes.IBinding[]|null); + + /** Kubernetes accessReviews */ + accessReviews?: (google.cloud.securitycenter.v1.Kubernetes.IAccessReview[]|null); + + /** Kubernetes objects */ + objects?: (google.cloud.securitycenter.v1.Kubernetes.IObject[]|null); + } + + /** Represents a Kubernetes. */ + class Kubernetes implements IKubernetes { + + /** + * Constructs a new Kubernetes. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IKubernetes); + + /** Kubernetes pods. */ + public pods: google.cloud.securitycenter.v1.Kubernetes.IPod[]; + + /** Kubernetes nodes. */ + public nodes: google.cloud.securitycenter.v1.Kubernetes.INode[]; + + /** Kubernetes nodePools. */ + public nodePools: google.cloud.securitycenter.v1.Kubernetes.INodePool[]; + + /** Kubernetes roles. */ + public roles: google.cloud.securitycenter.v1.Kubernetes.IRole[]; + + /** Kubernetes bindings. */ + public bindings: google.cloud.securitycenter.v1.Kubernetes.IBinding[]; + + /** Kubernetes accessReviews. */ + public accessReviews: google.cloud.securitycenter.v1.Kubernetes.IAccessReview[]; + + /** Kubernetes objects. */ + public objects: google.cloud.securitycenter.v1.Kubernetes.IObject[]; + + /** + * Creates a new Kubernetes instance using the specified properties. + * @param [properties] Properties to set + * @returns Kubernetes instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IKubernetes): google.cloud.securitycenter.v1.Kubernetes; + + /** + * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. + * @param message Kubernetes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. + * @param message Kubernetes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IKubernetes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Kubernetes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Kubernetes + * @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.cloud.securitycenter.v1.Kubernetes; + + /** + * Decodes a Kubernetes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Kubernetes + * @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.cloud.securitycenter.v1.Kubernetes; + + /** + * Verifies a Kubernetes 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 Kubernetes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Kubernetes + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes; + + /** + * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. + * @param message Kubernetes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Kubernetes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Kubernetes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Kubernetes { + + /** Properties of a Pod. */ + interface IPod { + + /** Pod ns */ + ns?: (string|null); + + /** Pod name */ + name?: (string|null); + + /** Pod labels */ + labels?: (google.cloud.securitycenter.v1.ILabel[]|null); + + /** Pod containers */ + containers?: (google.cloud.securitycenter.v1.IContainer[]|null); + } + + /** Represents a Pod. */ + class Pod implements IPod { + + /** + * Constructs a new Pod. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IPod); + + /** Pod ns. */ + public ns: string; + + /** Pod name. */ + public name: string; + + /** Pod labels. */ + public labels: google.cloud.securitycenter.v1.ILabel[]; + + /** Pod containers. */ + public containers: google.cloud.securitycenter.v1.IContainer[]; + + /** + * Creates a new Pod instance using the specified properties. + * @param [properties] Properties to set + * @returns Pod instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IPod): google.cloud.securitycenter.v1.Kubernetes.Pod; + + /** + * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. + * @param message Pod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. + * @param message Pod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IPod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pod + * @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.cloud.securitycenter.v1.Kubernetes.Pod; + + /** + * Decodes a Pod message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pod + * @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.cloud.securitycenter.v1.Kubernetes.Pod; + + /** + * Verifies a Pod 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 Pod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pod + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Pod; + + /** + * Creates a plain object from a Pod message. Also converts values to other types if specified. + * @param message Pod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Pod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Pod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Node. */ + interface INode { + + /** Node name */ + name?: (string|null); + } + + /** Represents a Node. */ + class Node implements INode { + + /** + * Constructs a new Node. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.INode); + + /** Node name. */ + public name: string; + + /** + * Creates a new Node instance using the specified properties. + * @param [properties] Properties to set + * @returns Node instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.INode): google.cloud.securitycenter.v1.Kubernetes.Node; + + /** + * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. + * @param message Node message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. + * @param message Node message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.INode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Node message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Node + * @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.cloud.securitycenter.v1.Kubernetes.Node; + + /** + * Decodes a Node message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Node + * @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.cloud.securitycenter.v1.Kubernetes.Node; + + /** + * Verifies a Node 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 Node message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Node + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Node; + + /** + * Creates a plain object from a Node message. Also converts values to other types if specified. + * @param message Node + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Node to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Node + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodePool. */ + interface INodePool { + + /** NodePool name */ + name?: (string|null); + + /** NodePool nodes */ + nodes?: (google.cloud.securitycenter.v1.Kubernetes.INode[]|null); + } + + /** Represents a NodePool. */ + class NodePool implements INodePool { + + /** + * Constructs a new NodePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.INodePool); + + /** NodePool name. */ + public name: string; + + /** NodePool nodes. */ + public nodes: google.cloud.securitycenter.v1.Kubernetes.INode[]; + + /** + * Creates a new NodePool instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePool instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.INodePool): google.cloud.securitycenter.v1.Kubernetes.NodePool; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. + * @param message NodePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.INodePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePool + * @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.cloud.securitycenter.v1.Kubernetes.NodePool; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePool + * @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.cloud.securitycenter.v1.Kubernetes.NodePool; + + /** + * Verifies a NodePool 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 NodePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.NodePool; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @param message NodePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.NodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Role. */ + interface IRole { + + /** Role kind */ + kind?: (google.cloud.securitycenter.v1.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Role.Kind|null); + + /** Role ns */ + ns?: (string|null); + + /** Role name */ + name?: (string|null); + } + + /** Represents a Role. */ + class Role implements IRole { + + /** + * Constructs a new Role. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IRole); + + /** Role kind. */ + public kind: (google.cloud.securitycenter.v1.Kubernetes.Role.Kind|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Role.Kind); + + /** Role ns. */ + public ns: string; + + /** Role name. */ + public name: string; + + /** + * Creates a new Role instance using the specified properties. + * @param [properties] Properties to set + * @returns Role instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IRole): google.cloud.securitycenter.v1.Kubernetes.Role; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Role message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Role + * @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.cloud.securitycenter.v1.Kubernetes.Role; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Role + * @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.cloud.securitycenter.v1.Kubernetes.Role; + + /** + * Verifies a Role 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 Role message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Role + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Role; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @param message Role + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Role to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Role + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Role { + + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + ROLE = 1, + CLUSTER_ROLE = 2 + } + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding ns */ + ns?: (string|null); + + /** Binding name */ + name?: (string|null); + + /** Binding role */ + role?: (google.cloud.securitycenter.v1.Kubernetes.IRole|null); + + /** Binding subjects */ + subjects?: (google.cloud.securitycenter.v1.Kubernetes.ISubject[]|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IBinding); + + /** Binding ns. */ + public ns: string; + + /** Binding name. */ + public name: string; + + /** Binding role. */ + public role?: (google.cloud.securitycenter.v1.Kubernetes.IRole|null); + + /** Binding subjects. */ + public subjects: google.cloud.securitycenter.v1.Kubernetes.ISubject[]; + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IBinding): google.cloud.securitycenter.v1.Kubernetes.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @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.cloud.securitycenter.v1.Kubernetes.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @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.cloud.securitycenter.v1.Kubernetes.Binding; + + /** + * Verifies a Binding 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 Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Subject. */ + interface ISubject { + + /** Subject kind */ + kind?: (google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|null); + + /** Subject ns */ + ns?: (string|null); + + /** Subject name */ + name?: (string|null); + } + + /** Represents a Subject. */ + class Subject implements ISubject { + + /** + * Constructs a new Subject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.ISubject); + + /** Subject kind. */ + public kind: (google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType); + + /** Subject ns. */ + public ns: string; + + /** Subject name. */ + public name: string; + + /** + * Creates a new Subject instance using the specified properties. + * @param [properties] Properties to set + * @returns Subject instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.ISubject): google.cloud.securitycenter.v1.Kubernetes.Subject; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subject + * @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.cloud.securitycenter.v1.Kubernetes.Subject; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subject + * @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.cloud.securitycenter.v1.Kubernetes.Subject; + + /** + * Verifies a Subject 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 Subject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Subject; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Subject { + + /** AuthType enum. */ + enum AuthType { + AUTH_TYPE_UNSPECIFIED = 0, + USER = 1, + SERVICEACCOUNT = 2, + GROUP = 3 + } + } + + /** Properties of an AccessReview. */ + interface IAccessReview { + + /** AccessReview group */ + group?: (string|null); + + /** AccessReview ns */ + ns?: (string|null); + + /** AccessReview name */ + name?: (string|null); + + /** AccessReview resource */ + resource?: (string|null); + + /** AccessReview subresource */ + subresource?: (string|null); + + /** AccessReview verb */ + verb?: (string|null); + + /** AccessReview version */ + version?: (string|null); + } + + /** Represents an AccessReview. */ + class AccessReview implements IAccessReview { + + /** + * Constructs a new AccessReview. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IAccessReview); + + /** AccessReview group. */ + public group: string; + + /** AccessReview ns. */ + public ns: string; + + /** AccessReview name. */ + public name: string; + + /** AccessReview resource. */ + public resource: string; + + /** AccessReview subresource. */ + public subresource: string; + + /** AccessReview verb. */ + public verb: string; + + /** AccessReview version. */ + public version: string; + + /** + * Creates a new AccessReview instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessReview instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IAccessReview): google.cloud.securitycenter.v1.Kubernetes.AccessReview; + + /** + * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. + * @param message AccessReview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. + * @param message AccessReview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessReview message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessReview + * @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.cloud.securitycenter.v1.Kubernetes.AccessReview; + + /** + * Decodes an AccessReview message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessReview + * @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.cloud.securitycenter.v1.Kubernetes.AccessReview; + + /** + * Verifies an AccessReview 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 AccessReview message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessReview + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.AccessReview; + + /** + * Creates a plain object from an AccessReview message. Also converts values to other types if specified. + * @param message AccessReview + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.AccessReview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessReview to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessReview + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Object. */ + interface IObject { + + /** Object group */ + group?: (string|null); + + /** Object kind */ + kind?: (string|null); + + /** Object ns */ + ns?: (string|null); + + /** Object name */ + name?: (string|null); + + /** Object containers */ + containers?: (google.cloud.securitycenter.v1.IContainer[]|null); + } + + /** Represents an Object. */ + class Object implements IObject { + + /** + * Constructs a new Object. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IObject); + + /** Object group. */ + public group: string; + + /** Object kind. */ + public kind: string; + + /** Object ns. */ + public ns: string; + + /** Object name. */ + public name: string; + + /** Object containers. */ + public containers: google.cloud.securitycenter.v1.IContainer[]; + + /** + * Creates a new Object instance using the specified properties. + * @param [properties] Properties to set + * @returns Object instance + */ + public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IObject): google.cloud.securitycenter.v1.Kubernetes.Object; + + /** + * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. + * @param message Object message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. + * @param message Object message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Object message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Object + * @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.cloud.securitycenter.v1.Kubernetes.Object; + + /** + * Decodes an Object message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Object + * @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.cloud.securitycenter.v1.Kubernetes.Object; + + /** + * Verifies an Object 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 Object message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Object + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Object; + + /** + * Creates a plain object from an Object message. Also converts values to other types if specified. + * @param message Object + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Object, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Object to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Object + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LoadBalancer. */ + interface ILoadBalancer { + + /** LoadBalancer name */ + name?: (string|null); + } + + /** Represents a LoadBalancer. */ + class LoadBalancer implements ILoadBalancer { + + /** + * Constructs a new LoadBalancer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ILoadBalancer); + + /** LoadBalancer name. */ + public name: string; + + /** + * Creates a new LoadBalancer instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancer instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ILoadBalancer): google.cloud.securitycenter.v1.LoadBalancer; + + /** + * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. + * @param message LoadBalancer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. + * @param message LoadBalancer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancer + * @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.cloud.securitycenter.v1.LoadBalancer; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancer + * @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.cloud.securitycenter.v1.LoadBalancer; + + /** + * Verifies a LoadBalancer 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 LoadBalancer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.LoadBalancer; + + /** + * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. + * @param message LoadBalancer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.LoadBalancer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LogEntry. */ + interface ILogEntry { + + /** LogEntry cloudLoggingEntry */ + cloudLoggingEntry?: (google.cloud.securitycenter.v1.ICloudLoggingEntry|null); + } + + /** Represents a LogEntry. */ + class LogEntry implements ILogEntry { + + /** + * Constructs a new LogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ILogEntry); + + /** LogEntry cloudLoggingEntry. */ + public cloudLoggingEntry?: (google.cloud.securitycenter.v1.ICloudLoggingEntry|null); + + /** LogEntry logEntry. */ + public logEntry?: "cloudLoggingEntry"; + + /** + * Creates a new LogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns LogEntry instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ILogEntry): google.cloud.securitycenter.v1.LogEntry; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * @param message LogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogEntry + * @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.cloud.securitycenter.v1.LogEntry; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogEntry + * @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.cloud.securitycenter.v1.LogEntry; + + /** + * Verifies a LogEntry 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 LogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.LogEntry; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @param message LogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudLoggingEntry. */ + interface ICloudLoggingEntry { + + /** CloudLoggingEntry insertId */ + insertId?: (string|null); + + /** CloudLoggingEntry logId */ + logId?: (string|null); + + /** CloudLoggingEntry resourceContainer */ + resourceContainer?: (string|null); + + /** CloudLoggingEntry timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudLoggingEntry. */ + class CloudLoggingEntry implements ICloudLoggingEntry { + + /** + * Constructs a new CloudLoggingEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICloudLoggingEntry); + + /** CloudLoggingEntry insertId. */ + public insertId: string; + + /** CloudLoggingEntry logId. */ + public logId: string; + + /** CloudLoggingEntry resourceContainer. */ + public resourceContainer: string; + + /** CloudLoggingEntry timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CloudLoggingEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudLoggingEntry instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICloudLoggingEntry): google.cloud.securitycenter.v1.CloudLoggingEntry; + + /** + * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * @param message CloudLoggingEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * @param message CloudLoggingEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudLoggingEntry + * @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.cloud.securitycenter.v1.CloudLoggingEntry; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudLoggingEntry + * @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.cloud.securitycenter.v1.CloudLoggingEntry; + + /** + * Verifies a CloudLoggingEntry 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 CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudLoggingEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudLoggingEntry; + + /** + * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. + * @param message CloudLoggingEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CloudLoggingEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudLoggingEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudLoggingEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MitreAttack. */ + interface IMitreAttack { + + /** MitreAttack primaryTactic */ + primaryTactic?: (google.cloud.securitycenter.v1.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v1.MitreAttack.Tactic|null); + + /** MitreAttack primaryTechniques */ + primaryTechniques?: (google.cloud.securitycenter.v1.MitreAttack.Technique[]|null); + + /** MitreAttack additionalTactics */ + additionalTactics?: (google.cloud.securitycenter.v1.MitreAttack.Tactic[]|null); + + /** MitreAttack additionalTechniques */ + additionalTechniques?: (google.cloud.securitycenter.v1.MitreAttack.Technique[]|null); + + /** MitreAttack version */ + version?: (string|null); + } + + /** Represents a MitreAttack. */ + class MitreAttack implements IMitreAttack { + + /** + * Constructs a new MitreAttack. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IMitreAttack); + + /** MitreAttack primaryTactic. */ + public primaryTactic: (google.cloud.securitycenter.v1.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v1.MitreAttack.Tactic); + + /** MitreAttack primaryTechniques. */ + public primaryTechniques: google.cloud.securitycenter.v1.MitreAttack.Technique[]; + + /** MitreAttack additionalTactics. */ + public additionalTactics: google.cloud.securitycenter.v1.MitreAttack.Tactic[]; + + /** MitreAttack additionalTechniques. */ + public additionalTechniques: google.cloud.securitycenter.v1.MitreAttack.Technique[]; + + /** MitreAttack version. */ + public version: string; + + /** + * Creates a new MitreAttack instance using the specified properties. + * @param [properties] Properties to set + * @returns MitreAttack instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IMitreAttack): google.cloud.securitycenter.v1.MitreAttack; + + /** + * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * @param message MitreAttack message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * @param message MitreAttack message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MitreAttack message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MitreAttack + * @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.cloud.securitycenter.v1.MitreAttack; + + /** + * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MitreAttack + * @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.cloud.securitycenter.v1.MitreAttack; + + /** + * Verifies a MitreAttack 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 MitreAttack message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MitreAttack + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.MitreAttack; + + /** + * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. + * @param message MitreAttack + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.MitreAttack, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MitreAttack to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MitreAttack + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MitreAttack { + + /** Tactic enum. */ + enum Tactic { + TACTIC_UNSPECIFIED = 0, + RECONNAISSANCE = 1, + RESOURCE_DEVELOPMENT = 2, + INITIAL_ACCESS = 5, + EXECUTION = 3, + PERSISTENCE = 6, + PRIVILEGE_ESCALATION = 8, + DEFENSE_EVASION = 7, + CREDENTIAL_ACCESS = 9, + DISCOVERY = 10, + LATERAL_MOVEMENT = 11, + COLLECTION = 12, + COMMAND_AND_CONTROL = 4, + EXFILTRATION = 13, + IMPACT = 14 + } + + /** Technique enum. */ + enum Technique { + TECHNIQUE_UNSPECIFIED = 0, + MASQUERADING = 49, + MATCH_LEGITIMATE_NAME_OR_LOCATION = 50, + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37, + STARTUP_ITEMS = 38, + NETWORK_SERVICE_DISCOVERY = 32, + PROCESS_DISCOVERY = 56, + COMMAND_AND_SCRIPTING_INTERPRETER = 6, + UNIX_SHELL = 7, + PYTHON = 59, + PERMISSION_GROUPS_DISCOVERY = 18, + CLOUD_GROUPS = 19, + APPLICATION_LAYER_PROTOCOL = 45, + DNS = 46, + SOFTWARE_DEPLOYMENT_TOOLS = 47, + VALID_ACCOUNTS = 14, + DEFAULT_ACCOUNTS = 35, + LOCAL_ACCOUNTS = 15, + CLOUD_ACCOUNTS = 16, + PROXY = 9, + EXTERNAL_PROXY = 10, + MULTI_HOP_PROXY = 11, + ACCOUNT_MANIPULATION = 22, + ADDITIONAL_CLOUD_CREDENTIALS = 40, + SSH_AUTHORIZED_KEYS = 23, + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58, + INGRESS_TOOL_TRANSFER = 3, + NATIVE_API = 4, + BRUTE_FORCE = 44, + SHARED_MODULES = 5, + ACCESS_TOKEN_MANIPULATION = 33, + TOKEN_IMPERSONATION_OR_THEFT = 39, + EXPLOIT_PUBLIC_FACING_APPLICATION = 27, + DOMAIN_POLICY_MODIFICATION = 30, + DATA_DESTRUCTION = 29, + SERVICE_STOP = 52, + INHIBIT_SYSTEM_RECOVERY = 36, + RESOURCE_HIJACKING = 8, + NETWORK_DENIAL_OF_SERVICE = 17, + CLOUD_SERVICE_DISCOVERY = 48, + STEAL_APPLICATION_ACCESS_TOKEN = 42, + ACCOUNT_ACCESS_REMOVAL = 51, + STEAL_WEB_SESSION_COOKIE = 25, + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24, + ABUSE_ELEVATION_CONTROL_MECHANISM = 34, + UNSECURED_CREDENTIALS = 13, + MODIFY_AUTHENTICATION_PROCESS = 28, + IMPAIR_DEFENSES = 31, + DISABLE_OR_MODIFY_TOOLS = 55, + EXFILTRATION_OVER_WEB_SERVICE = 20, + EXFILTRATION_TO_CLOUD_STORAGE = 21, + DYNAMIC_RESOLUTION = 12, + LATERAL_TOOL_TRANSFER = 41, + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26, + CREATE_SNAPSHOT = 54, + CLOUD_INFRASTRUCTURE_DISCOVERY = 53, + OBTAIN_CAPABILITIES = 43, + ACTIVE_SCANNING = 1, + SCANNING_IP_BLOCKS = 2, + CONTAINER_ADMINISTRATION_COMMAND = 60, + ESCAPE_TO_HOST = 61, + CONTAINER_AND_RESOURCE_DISCOVERY = 57, + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + } + } + + /** Properties of a Notebook. */ + interface INotebook { + + /** Notebook name */ + name?: (string|null); + + /** Notebook service */ + service?: (string|null); + + /** Notebook lastAuthor */ + lastAuthor?: (string|null); + + /** Notebook notebookUpdateTime */ + notebookUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Notebook. */ + class Notebook implements INotebook { + + /** + * Constructs a new Notebook. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.INotebook); + + /** Notebook name. */ + public name: string; + + /** Notebook service. */ + public service: string; + + /** Notebook lastAuthor. */ + public lastAuthor: string; + + /** Notebook notebookUpdateTime. */ + public notebookUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Notebook instance using the specified properties. + * @param [properties] Properties to set + * @returns Notebook instance + */ + public static create(properties?: google.cloud.securitycenter.v1.INotebook): google.cloud.securitycenter.v1.Notebook; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Notebook + * @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.cloud.securitycenter.v1.Notebook; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Notebook + * @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.cloud.securitycenter.v1.Notebook; + + /** + * Verifies a Notebook 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 Notebook message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Notebook + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Notebook; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @param message Notebook + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Notebook to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Notebook + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OrgPolicy. */ + interface IOrgPolicy { + + /** OrgPolicy name */ + name?: (string|null); + } + + /** Represents an OrgPolicy. */ + class OrgPolicy implements IOrgPolicy { + + /** + * Constructs a new OrgPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IOrgPolicy); + + /** OrgPolicy name. */ + public name: string; + + /** + * Creates a new OrgPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns OrgPolicy instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IOrgPolicy): google.cloud.securitycenter.v1.OrgPolicy; + + /** + * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. + * @param message OrgPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. + * @param message OrgPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrgPolicy + * @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.cloud.securitycenter.v1.OrgPolicy; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrgPolicy + * @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.cloud.securitycenter.v1.OrgPolicy; + + /** + * Verifies an OrgPolicy 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 OrgPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrgPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrgPolicy; + + /** + * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. + * @param message OrgPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.OrgPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrgPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrgPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Process. */ + interface IProcess { + + /** Process name */ + name?: (string|null); + + /** Process binary */ + binary?: (google.cloud.securitycenter.v1.IFile|null); + + /** Process libraries */ + libraries?: (google.cloud.securitycenter.v1.IFile[]|null); + + /** Process script */ + script?: (google.cloud.securitycenter.v1.IFile|null); + + /** Process args */ + args?: (string[]|null); + + /** Process argumentsTruncated */ + argumentsTruncated?: (boolean|null); + + /** Process envVariables */ + envVariables?: (google.cloud.securitycenter.v1.IEnvironmentVariable[]|null); + + /** Process envVariablesTruncated */ + envVariablesTruncated?: (boolean|null); + + /** Process pid */ + pid?: (number|Long|string|null); + + /** Process parentPid */ + parentPid?: (number|Long|string|null); + } + + /** Represents a Process. */ + class Process implements IProcess { + + /** + * Constructs a new Process. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IProcess); + + /** Process name. */ + public name: string; + + /** Process binary. */ + public binary?: (google.cloud.securitycenter.v1.IFile|null); + + /** Process libraries. */ + public libraries: google.cloud.securitycenter.v1.IFile[]; + + /** Process script. */ + public script?: (google.cloud.securitycenter.v1.IFile|null); + + /** Process args. */ + public args: string[]; + + /** Process argumentsTruncated. */ + public argumentsTruncated: boolean; + + /** Process envVariables. */ + public envVariables: google.cloud.securitycenter.v1.IEnvironmentVariable[]; + + /** Process envVariablesTruncated. */ + public envVariablesTruncated: boolean; + + /** Process pid. */ + public pid: (number|Long|string); + + /** Process parentPid. */ + public parentPid: (number|Long|string); + + /** + * Creates a new Process instance using the specified properties. + * @param [properties] Properties to set + * @returns Process instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IProcess): google.cloud.securitycenter.v1.Process; + + /** + * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. + * @param message Process message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. + * @param message Process message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Process message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Process + * @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.cloud.securitycenter.v1.Process; + + /** + * Decodes a Process message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Process + * @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.cloud.securitycenter.v1.Process; + + /** + * Verifies a Process 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 Process message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Process + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Process; + + /** + * Creates a plain object from a Process message. Also converts values to other types if specified. + * @param message Process + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Process to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Process + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnvironmentVariable. */ + interface IEnvironmentVariable { + + /** EnvironmentVariable name */ + name?: (string|null); + + /** EnvironmentVariable val */ + val?: (string|null); + } + + /** Represents an EnvironmentVariable. */ + class EnvironmentVariable implements IEnvironmentVariable { + + /** + * Constructs a new EnvironmentVariable. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IEnvironmentVariable); + + /** EnvironmentVariable name. */ + public name: string; + + /** EnvironmentVariable val. */ + public val: string; + + /** + * Creates a new EnvironmentVariable instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentVariable instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IEnvironmentVariable): google.cloud.securitycenter.v1.EnvironmentVariable; + + /** + * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. + * @param message EnvironmentVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. + * @param message EnvironmentVariable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentVariable + * @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.cloud.securitycenter.v1.EnvironmentVariable; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentVariable + * @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.cloud.securitycenter.v1.EnvironmentVariable; + + /** + * Verifies an EnvironmentVariable 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 EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentVariable + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EnvironmentVariable; + + /** + * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. + * @param message EnvironmentVariable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.EnvironmentVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnvironmentVariable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnvironmentVariable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityPosture. */ + interface ISecurityPosture { + + /** SecurityPosture name */ + name?: (string|null); + + /** SecurityPosture revisionId */ + revisionId?: (string|null); + + /** SecurityPosture postureDeploymentResource */ + postureDeploymentResource?: (string|null); + + /** SecurityPosture postureDeployment */ + postureDeployment?: (string|null); + + /** SecurityPosture changedPolicy */ + changedPolicy?: (string|null); + + /** SecurityPosture policySet */ + policySet?: (string|null); + + /** SecurityPosture policy */ + policy?: (string|null); + + /** SecurityPosture policyDriftDetails */ + policyDriftDetails?: (google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails[]|null); + } + + /** Represents a SecurityPosture. */ + class SecurityPosture implements ISecurityPosture { + + /** + * Constructs a new SecurityPosture. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ISecurityPosture); + + /** SecurityPosture name. */ + public name: string; + + /** SecurityPosture revisionId. */ + public revisionId: string; + + /** SecurityPosture postureDeploymentResource. */ + public postureDeploymentResource: string; + + /** SecurityPosture postureDeployment. */ + public postureDeployment: string; + + /** SecurityPosture changedPolicy. */ + public changedPolicy: string; + + /** SecurityPosture policySet. */ + public policySet: string; + + /** SecurityPosture policy. */ + public policy: string; + + /** SecurityPosture policyDriftDetails. */ + public policyDriftDetails: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails[]; + + /** + * Creates a new SecurityPosture instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityPosture instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ISecurityPosture): google.cloud.securitycenter.v1.SecurityPosture; + + /** + * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * @param message SecurityPosture message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * @param message SecurityPosture message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityPosture + * @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.cloud.securitycenter.v1.SecurityPosture; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityPosture + * @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.cloud.securitycenter.v1.SecurityPosture; + + /** + * Verifies a SecurityPosture 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 SecurityPosture message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityPosture + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPosture; + + /** + * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. + * @param message SecurityPosture + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SecurityPosture, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityPosture to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityPosture + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityPosture { + + /** Properties of a PolicyDriftDetails. */ + interface IPolicyDriftDetails { + + /** PolicyDriftDetails field */ + field?: (string|null); + + /** PolicyDriftDetails expectedValue */ + expectedValue?: (string|null); + + /** PolicyDriftDetails detectedValue */ + detectedValue?: (string|null); + } + + /** Represents a PolicyDriftDetails. */ + class PolicyDriftDetails implements IPolicyDriftDetails { + + /** + * Constructs a new PolicyDriftDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails); + + /** PolicyDriftDetails field. */ + public field: string; + + /** PolicyDriftDetails expectedValue. */ + public expectedValue: string; + + /** PolicyDriftDetails detectedValue. */ + public detectedValue: string; + + /** + * Creates a new PolicyDriftDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDriftDetails instance + */ + public static create(properties?: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails): google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; + + /** + * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @param message PolicyDriftDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @param message PolicyDriftDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDriftDetails + * @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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDriftDetails + * @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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; + + /** + * Verifies a PolicyDriftDetails 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 PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDriftDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; + + /** + * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. + * @param message PolicyDriftDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDriftDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDriftDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ToxicCombination. */ + interface IToxicCombination { + + /** ToxicCombination attackExposureScore */ + attackExposureScore?: (number|null); + + /** ToxicCombination relatedFindings */ + relatedFindings?: (string[]|null); + } + + /** Represents a ToxicCombination. */ + class ToxicCombination implements IToxicCombination { + + /** + * Constructs a new ToxicCombination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IToxicCombination); + + /** ToxicCombination attackExposureScore. */ + public attackExposureScore: number; + + /** ToxicCombination relatedFindings. */ + public relatedFindings: string[]; + + /** + * Creates a new ToxicCombination instance using the specified properties. + * @param [properties] Properties to set + * @returns ToxicCombination instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IToxicCombination): google.cloud.securitycenter.v1.ToxicCombination; + + /** + * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * @param message ToxicCombination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * @param message ToxicCombination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToxicCombination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToxicCombination + * @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.cloud.securitycenter.v1.ToxicCombination; + + /** + * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToxicCombination + * @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.cloud.securitycenter.v1.ToxicCombination; + + /** + * Verifies a ToxicCombination 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 ToxicCombination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToxicCombination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ToxicCombination; + + /** + * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. + * @param message ToxicCombination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ToxicCombination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToxicCombination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToxicCombination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Vulnerability. */ + interface IVulnerability { + + /** Vulnerability cve */ + cve?: (google.cloud.securitycenter.v1.ICve|null); + + /** Vulnerability offendingPackage */ + offendingPackage?: (google.cloud.securitycenter.v1.IPackage|null); + + /** Vulnerability fixedPackage */ + fixedPackage?: (google.cloud.securitycenter.v1.IPackage|null); + + /** Vulnerability securityBulletin */ + securityBulletin?: (google.cloud.securitycenter.v1.ISecurityBulletin|null); + } + + /** Represents a Vulnerability. */ + class Vulnerability implements IVulnerability { + + /** + * Constructs a new Vulnerability. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IVulnerability); + + /** Vulnerability cve. */ + public cve?: (google.cloud.securitycenter.v1.ICve|null); + + /** Vulnerability offendingPackage. */ + public offendingPackage?: (google.cloud.securitycenter.v1.IPackage|null); + + /** Vulnerability fixedPackage. */ + public fixedPackage?: (google.cloud.securitycenter.v1.IPackage|null); + + /** Vulnerability securityBulletin. */ + public securityBulletin?: (google.cloud.securitycenter.v1.ISecurityBulletin|null); + + /** + * Creates a new Vulnerability instance using the specified properties. + * @param [properties] Properties to set + * @returns Vulnerability instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IVulnerability): google.cloud.securitycenter.v1.Vulnerability; + + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * @param message Vulnerability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vulnerability + * @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.cloud.securitycenter.v1.Vulnerability; + + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vulnerability + * @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.cloud.securitycenter.v1.Vulnerability; + + /** + * Verifies a Vulnerability 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 Vulnerability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vulnerability + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Vulnerability; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @param message Vulnerability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vulnerability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Vulnerability + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cve. */ + interface ICve { + + /** Cve id */ + id?: (string|null); + + /** Cve references */ + references?: (google.cloud.securitycenter.v1.IReference[]|null); + + /** Cve cvssv3 */ + cvssv3?: (google.cloud.securitycenter.v1.ICvssv3|null); + + /** Cve upstreamFixAvailable */ + upstreamFixAvailable?: (boolean|null); + + /** Cve impact */ + impact?: (google.cloud.securitycenter.v1.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v1.Cve.RiskRating|null); + + /** Cve exploitationActivity */ + exploitationActivity?: (google.cloud.securitycenter.v1.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v1.Cve.ExploitationActivity|null); + + /** Cve observedInTheWild */ + observedInTheWild?: (boolean|null); + + /** Cve zeroDay */ + zeroDay?: (boolean|null); + } + + /** Represents a Cve. */ + class Cve implements ICve { + + /** + * Constructs a new Cve. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICve); + + /** Cve id. */ + public id: string; + + /** Cve references. */ + public references: google.cloud.securitycenter.v1.IReference[]; + + /** Cve cvssv3. */ + public cvssv3?: (google.cloud.securitycenter.v1.ICvssv3|null); + + /** Cve upstreamFixAvailable. */ + public upstreamFixAvailable: boolean; + + /** Cve impact. */ + public impact: (google.cloud.securitycenter.v1.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v1.Cve.RiskRating); + + /** Cve exploitationActivity. */ + public exploitationActivity: (google.cloud.securitycenter.v1.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v1.Cve.ExploitationActivity); + + /** Cve observedInTheWild. */ + public observedInTheWild: boolean; + + /** Cve zeroDay. */ + public zeroDay: boolean; + + /** + * Creates a new Cve instance using the specified properties. + * @param [properties] Properties to set + * @returns Cve instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICve): google.cloud.securitycenter.v1.Cve; + + /** + * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * @param message Cve message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * @param message Cve message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cve message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cve + * @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.cloud.securitycenter.v1.Cve; + + /** + * Decodes a Cve message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cve + * @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.cloud.securitycenter.v1.Cve; + + /** + * Verifies a Cve 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 Cve message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cve + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Cve; + + /** + * Creates a plain object from a Cve message. Also converts values to other types if specified. + * @param message Cve + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Cve, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cve to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cve + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Cve { + + /** RiskRating enum. */ + enum RiskRating { + RISK_RATING_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3, + CRITICAL = 4 + } + + /** ExploitationActivity enum. */ + enum ExploitationActivity { + EXPLOITATION_ACTIVITY_UNSPECIFIED = 0, + WIDE = 1, + CONFIRMED = 2, + AVAILABLE = 3, + ANTICIPATED = 4, + NO_KNOWN = 5 + } + } + + /** Properties of a Reference. */ + interface IReference { + + /** Reference source */ + source?: (string|null); + + /** Reference uri */ + uri?: (string|null); + } + + /** Represents a Reference. */ + class Reference implements IReference { + + /** + * Constructs a new Reference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IReference); + + /** Reference source. */ + public source: string; + + /** Reference uri. */ + public uri: string; + + /** + * Creates a new Reference instance using the specified properties. + * @param [properties] Properties to set + * @returns Reference instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IReference): google.cloud.securitycenter.v1.Reference; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * @param message Reference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reference + * @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.cloud.securitycenter.v1.Reference; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reference + * @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.cloud.securitycenter.v1.Reference; + + /** + * Verifies a Reference 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 Reference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Reference; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @param message Reference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Cvssv3. */ + interface ICvssv3 { + + /** Cvssv3 baseScore */ + baseScore?: (number|null); + + /** Cvssv3 attackVector */ + attackVector?: (google.cloud.securitycenter.v1.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackVector|null); + + /** Cvssv3 attackComplexity */ + attackComplexity?: (google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|null); + + /** Cvssv3 privilegesRequired */ + privilegesRequired?: (google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|null); + + /** Cvssv3 userInteraction */ + userInteraction?: (google.cloud.securitycenter.v1.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v1.Cvssv3.UserInteraction|null); + + /** Cvssv3 scope */ + scope?: (google.cloud.securitycenter.v1.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Scope|null); + + /** Cvssv3 confidentialityImpact */ + confidentialityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + + /** Cvssv3 integrityImpact */ + integrityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + + /** Cvssv3 availabilityImpact */ + availabilityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + } + + /** Represents a Cvssv3. */ + class Cvssv3 implements ICvssv3 { + + /** + * Constructs a new Cvssv3. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICvssv3); + + /** Cvssv3 baseScore. */ + public baseScore: number; + + /** Cvssv3 attackVector. */ + public attackVector: (google.cloud.securitycenter.v1.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackVector); + + /** Cvssv3 attackComplexity. */ + public attackComplexity: (google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackComplexity); + + /** Cvssv3 privilegesRequired. */ + public privilegesRequired: (google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired); + + /** Cvssv3 userInteraction. */ + public userInteraction: (google.cloud.securitycenter.v1.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v1.Cvssv3.UserInteraction); + + /** Cvssv3 scope. */ + public scope: (google.cloud.securitycenter.v1.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Scope); + + /** Cvssv3 confidentialityImpact. */ + public confidentialityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + + /** Cvssv3 integrityImpact. */ + public integrityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + + /** Cvssv3 availabilityImpact. */ + public availabilityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + + /** + * Creates a new Cvssv3 instance using the specified properties. + * @param [properties] Properties to set + * @returns Cvssv3 instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICvssv3): google.cloud.securitycenter.v1.Cvssv3; + + /** + * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * @param message Cvssv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * @param message Cvssv3 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cvssv3 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cvssv3 + * @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.cloud.securitycenter.v1.Cvssv3; + + /** + * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cvssv3 + * @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.cloud.securitycenter.v1.Cvssv3; + + /** + * Verifies a Cvssv3 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 Cvssv3 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cvssv3 + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Cvssv3; + + /** + * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. + * @param message Cvssv3 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Cvssv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cvssv3 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cvssv3 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Cvssv3 { + + /** AttackVector enum. */ + enum AttackVector { + ATTACK_VECTOR_UNSPECIFIED = 0, + ATTACK_VECTOR_NETWORK = 1, + ATTACK_VECTOR_ADJACENT = 2, + ATTACK_VECTOR_LOCAL = 3, + ATTACK_VECTOR_PHYSICAL = 4 + } + + /** AttackComplexity enum. */ + enum AttackComplexity { + ATTACK_COMPLEXITY_UNSPECIFIED = 0, + ATTACK_COMPLEXITY_LOW = 1, + ATTACK_COMPLEXITY_HIGH = 2 + } + + /** PrivilegesRequired enum. */ + enum PrivilegesRequired { + PRIVILEGES_REQUIRED_UNSPECIFIED = 0, + PRIVILEGES_REQUIRED_NONE = 1, + PRIVILEGES_REQUIRED_LOW = 2, + PRIVILEGES_REQUIRED_HIGH = 3 + } + + /** UserInteraction enum. */ + enum UserInteraction { + USER_INTERACTION_UNSPECIFIED = 0, + USER_INTERACTION_NONE = 1, + USER_INTERACTION_REQUIRED = 2 + } + + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + SCOPE_UNCHANGED = 1, + SCOPE_CHANGED = 2 + } + + /** Impact enum. */ + enum Impact { + IMPACT_UNSPECIFIED = 0, + IMPACT_HIGH = 1, + IMPACT_LOW = 2, + IMPACT_NONE = 3 + } + } + + /** Properties of a Package. */ + interface IPackage { + + /** Package packageName */ + packageName?: (string|null); + + /** Package cpeUri */ + cpeUri?: (string|null); + + /** Package packageType */ + packageType?: (string|null); + + /** Package packageVersion */ + packageVersion?: (string|null); + } + + /** Represents a Package. */ + class Package implements IPackage { + + /** + * Constructs a new Package. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IPackage); + + /** Package packageName. */ + public packageName: string; + + /** Package cpeUri. */ + public cpeUri: string; + + /** Package packageType. */ + public packageType: string; + + /** Package packageVersion. */ + public packageVersion: string; + + /** + * Creates a new Package instance using the specified properties. + * @param [properties] Properties to set + * @returns Package instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IPackage): google.cloud.securitycenter.v1.Package; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * @param message Package message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Package message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Package + * @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.cloud.securitycenter.v1.Package; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Package + * @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.cloud.securitycenter.v1.Package; + + /** + * Verifies a Package 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 Package message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Package + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Package; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @param message Package + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Package to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Package + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityBulletin. */ + interface ISecurityBulletin { + + /** SecurityBulletin bulletinId */ + bulletinId?: (string|null); + + /** SecurityBulletin submissionTime */ + submissionTime?: (google.protobuf.ITimestamp|null); + + /** SecurityBulletin suggestedUpgradeVersion */ + suggestedUpgradeVersion?: (string|null); + } + + /** Represents a SecurityBulletin. */ + class SecurityBulletin implements ISecurityBulletin { + + /** + * Constructs a new SecurityBulletin. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ISecurityBulletin); + + /** SecurityBulletin bulletinId. */ + public bulletinId: string; + + /** SecurityBulletin submissionTime. */ + public submissionTime?: (google.protobuf.ITimestamp|null); + + /** SecurityBulletin suggestedUpgradeVersion. */ + public suggestedUpgradeVersion: string; + + /** + * Creates a new SecurityBulletin instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityBulletin instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ISecurityBulletin): google.cloud.securitycenter.v1.SecurityBulletin; + + /** + * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * @param message SecurityBulletin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * @param message SecurityBulletin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityBulletin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityBulletin + * @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.cloud.securitycenter.v1.SecurityBulletin; + + /** + * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityBulletin + * @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.cloud.securitycenter.v1.SecurityBulletin; + + /** + * Verifies a SecurityBulletin 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 SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityBulletin + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityBulletin; + + /** + * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. + * @param message SecurityBulletin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SecurityBulletin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityBulletin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityBulletin + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MuteConfig. */ + interface IMuteConfig { + + /** MuteConfig name */ + name?: (string|null); + + /** MuteConfig displayName */ + displayName?: (string|null); + + /** MuteConfig description */ + description?: (string|null); + + /** MuteConfig filter */ + filter?: (string|null); + + /** MuteConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig mostRecentEditor */ + mostRecentEditor?: (string|null); + } + + /** Represents a MuteConfig. */ + class MuteConfig implements IMuteConfig { + + /** + * Constructs a new MuteConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IMuteConfig); + + /** MuteConfig name. */ + public name: string; + + /** MuteConfig displayName. */ + public displayName: string; + + /** MuteConfig description. */ + public description: string; + + /** MuteConfig filter. */ + public filter: string; + + /** MuteConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MuteConfig mostRecentEditor. */ + public mostRecentEditor: string; + + /** + * Creates a new MuteConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MuteConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IMuteConfig): google.cloud.securitycenter.v1.MuteConfig; + + /** + * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * @param message MuteConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * @param message MuteConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MuteConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MuteConfig + * @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.cloud.securitycenter.v1.MuteConfig; + + /** + * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MuteConfig + * @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.cloud.securitycenter.v1.MuteConfig; + + /** + * Verifies a MuteConfig 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 MuteConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MuteConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.MuteConfig; + + /** + * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. + * @param message MuteConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.MuteConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuteConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MuteConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NotificationConfig. */ + interface INotificationConfig { + + /** NotificationConfig name */ + name?: (string|null); + + /** NotificationConfig description */ + description?: (string|null); + + /** NotificationConfig pubsubTopic */ + pubsubTopic?: (string|null); + + /** NotificationConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NotificationConfig streamingConfig */ + streamingConfig?: (google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null); + } + + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { + + /** + * Constructs a new NotificationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.INotificationConfig); + + /** NotificationConfig name. */ + public name: string; + + /** NotificationConfig description. */ + public description: string; + + /** NotificationConfig pubsubTopic. */ + public pubsubTopic: string; + + /** NotificationConfig serviceAccount. */ + public serviceAccount: string; + + /** NotificationConfig streamingConfig. */ + public streamingConfig?: (google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null); + + /** NotificationConfig notifyConfig. */ + public notifyConfig?: "streamingConfig"; + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.INotificationConfig): google.cloud.securitycenter.v1.NotificationConfig; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationConfig + * @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.cloud.securitycenter.v1.NotificationConfig; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationConfig + * @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.cloud.securitycenter.v1.NotificationConfig; + + /** + * Verifies a NotificationConfig 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 NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationConfig; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NotificationConfig { + + /** Properties of a StreamingConfig. */ + interface IStreamingConfig { + + /** StreamingConfig filter */ + filter?: (string|null); + } + + /** Represents a StreamingConfig. */ + class StreamingConfig implements IStreamingConfig { + + /** + * Constructs a new StreamingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig); + + /** StreamingConfig filter. */ + public filter: string; + + /** + * Creates a new StreamingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamingConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig): google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; + + /** + * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. + * @param message StreamingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. + * @param message StreamingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamingConfig + * @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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamingConfig + * @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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; + + /** + * Verifies a StreamingConfig 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 StreamingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; + + /** + * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. + * @param message StreamingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NotificationMessage. */ + interface INotificationMessage { + + /** NotificationMessage notificationConfigName */ + notificationConfigName?: (string|null); + + /** NotificationMessage finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); + + /** NotificationMessage resource */ + resource?: (google.cloud.securitycenter.v1.IResource|null); + } + + /** Represents a NotificationMessage. */ + class NotificationMessage implements INotificationMessage { + + /** + * Constructs a new NotificationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.INotificationMessage); + + /** NotificationMessage notificationConfigName. */ + public notificationConfigName: string; + + /** NotificationMessage finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); + + /** NotificationMessage resource. */ + public resource?: (google.cloud.securitycenter.v1.IResource|null); + + /** NotificationMessage event. */ + public event?: "finding"; + + /** + * Creates a new NotificationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationMessage instance + */ + public static create(properties?: google.cloud.securitycenter.v1.INotificationMessage): google.cloud.securitycenter.v1.NotificationMessage; + + /** + * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * @param message NotificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * @param message NotificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationMessage + * @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.cloud.securitycenter.v1.NotificationMessage; + + /** + * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationMessage + * @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.cloud.securitycenter.v1.NotificationMessage; + + /** + * Verifies a NotificationMessage 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 NotificationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationMessage; + + /** + * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. + * @param message NotificationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.NotificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); + + /** Resource displayName */ + displayName?: (string|null); + + /** Resource type */ + type?: (string|null); + + /** Resource project */ + project?: (string|null); + + /** Resource projectDisplayName */ + projectDisplayName?: (string|null); + + /** Resource parent */ + parent?: (string|null); + + /** Resource parentDisplayName */ + parentDisplayName?: (string|null); + + /** Resource folders */ + folders?: (google.cloud.securitycenter.v1.IFolder[]|null); + + /** Resource cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider|null); + + /** Resource organization */ + organization?: (string|null); + + /** Resource service */ + service?: (string|null); + + /** Resource location */ + location?: (string|null); + + /** Resource awsMetadata */ + awsMetadata?: (google.cloud.securitycenter.v1.IAwsMetadata|null); + + /** Resource azureMetadata */ + azureMetadata?: (google.cloud.securitycenter.v1.IAzureMetadata|null); + + /** Resource resourcePath */ + resourcePath?: (google.cloud.securitycenter.v1.IResourcePath|null); + + /** Resource resourcePathString */ + resourcePathString?: (string|null); + } + + /** Represents a Resource. */ + class Resource implements IResource { + + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IResource); + + /** Resource name. */ + public name: string; + + /** Resource displayName. */ + public displayName: string; + + /** Resource type. */ + public type: string; + + /** Resource project. */ + public project: string; + + /** Resource projectDisplayName. */ + public projectDisplayName: string; + + /** Resource parent. */ + public parent: string; + + /** Resource parentDisplayName. */ + public parentDisplayName: string; + + /** Resource folders. */ + public folders: google.cloud.securitycenter.v1.IFolder[]; + + /** Resource cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider); + + /** Resource organization. */ + public organization: string; + + /** Resource service. */ + public service: string; + + /** Resource location. */ + public location: string; + + /** Resource awsMetadata. */ + public awsMetadata?: (google.cloud.securitycenter.v1.IAwsMetadata|null); + + /** Resource azureMetadata. */ + public azureMetadata?: (google.cloud.securitycenter.v1.IAzureMetadata|null); + + /** Resource resourcePath. */ + public resourcePath?: (google.cloud.securitycenter.v1.IResourcePath|null); + + /** Resource resourcePathString. */ + public resourcePathString: string; + + /** Resource cloudProviderMetadata. */ + public cloudProviderMetadata?: ("awsMetadata"|"azureMetadata"); + + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IResource): google.cloud.securitycenter.v1.Resource; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @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.cloud.securitycenter.v1.Resource; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @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.cloud.securitycenter.v1.Resource; + + /** + * Verifies a Resource 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 Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Resource; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Resource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** CloudProvider enum. */ + enum CloudProvider { + CLOUD_PROVIDER_UNSPECIFIED = 0, + GOOGLE_CLOUD_PLATFORM = 1, + AMAZON_WEB_SERVICES = 2, + MICROSOFT_AZURE = 3 + } + + /** Properties of an AwsMetadata. */ + interface IAwsMetadata { + + /** AwsMetadata organization */ + organization?: (google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization|null); + + /** AwsMetadata organizationalUnits */ + organizationalUnits?: (google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit[]|null); + + /** AwsMetadata account */ + account?: (google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount|null); + } + + /** Represents an AwsMetadata. */ + class AwsMetadata implements IAwsMetadata { + + /** + * Constructs a new AwsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IAwsMetadata); + + /** AwsMetadata organization. */ + public organization?: (google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization|null); + + /** AwsMetadata organizationalUnits. */ + public organizationalUnits: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit[]; + + /** AwsMetadata account. */ + public account?: (google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount|null); + + /** + * Creates a new AwsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsMetadata instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IAwsMetadata): google.cloud.securitycenter.v1.AwsMetadata; + + /** + * Encodes the specified AwsMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.verify|verify} messages. + * @param message AwsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IAwsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.verify|verify} messages. + * @param message AwsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAwsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsMetadata + * @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.cloud.securitycenter.v1.AwsMetadata; + + /** + * Decodes an AwsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsMetadata + * @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.cloud.securitycenter.v1.AwsMetadata; + + /** + * Verifies an AwsMetadata 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 AwsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AwsMetadata; + + /** + * Creates a plain object from an AwsMetadata message. Also converts values to other types if specified. + * @param message AwsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AwsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AwsMetadata { + + /** Properties of an AwsOrganization. */ + interface IAwsOrganization { + + /** AwsOrganization id */ + id?: (string|null); + } + + /** Represents an AwsOrganization. */ + class AwsOrganization implements IAwsOrganization { + + /** + * Constructs a new AwsOrganization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization); + + /** AwsOrganization id. */ + public id: string; + + /** + * Creates a new AwsOrganization instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsOrganization instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization): google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization; + + /** + * Encodes the specified AwsOrganization message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.verify|verify} messages. + * @param message AwsOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsOrganization message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.verify|verify} messages. + * @param message AwsOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsOrganization + * @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.cloud.securitycenter.v1.AwsMetadata.AwsOrganization; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsOrganization + * @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.cloud.securitycenter.v1.AwsMetadata.AwsOrganization; + + /** + * Verifies an AwsOrganization 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 AwsOrganization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsOrganization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization; + + /** + * Creates a plain object from an AwsOrganization message. Also converts values to other types if specified. + * @param message AwsOrganization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsOrganization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsOrganization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsOrganizationalUnit. */ + interface IAwsOrganizationalUnit { + + /** AwsOrganizationalUnit id */ + id?: (string|null); + + /** AwsOrganizationalUnit name */ + name?: (string|null); + } + + /** Represents an AwsOrganizationalUnit. */ + class AwsOrganizationalUnit implements IAwsOrganizationalUnit { + + /** + * Constructs a new AwsOrganizationalUnit. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit); + + /** AwsOrganizationalUnit id. */ + public id: string; + + /** AwsOrganizationalUnit name. */ + public name: string; + + /** + * Creates a new AwsOrganizationalUnit instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsOrganizationalUnit instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit): google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit; + + /** + * Encodes the specified AwsOrganizationalUnit message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @param message AwsOrganizationalUnit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsOrganizationalUnit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @param message AwsOrganizationalUnit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsOrganizationalUnit + * @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.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsOrganizationalUnit + * @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.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit; + + /** + * Verifies an AwsOrganizationalUnit 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 AwsOrganizationalUnit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsOrganizationalUnit + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit; + + /** + * Creates a plain object from an AwsOrganizationalUnit message. Also converts values to other types if specified. + * @param message AwsOrganizationalUnit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsOrganizationalUnit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsOrganizationalUnit + * @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 id */ + id?: (string|null); + + /** AwsAccount name */ + name?: (string|null); + } + + /** Represents an AwsAccount. */ + class AwsAccount implements IAwsAccount { + + /** + * Constructs a new AwsAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount); + + /** AwsAccount id. */ + public id: string; + + /** AwsAccount name. */ + public name: string; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccount instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount): google.cloud.securitycenter.v1.AwsMetadata.AwsAccount; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata.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 AzureMetadata. */ + interface IAzureMetadata { + + /** AzureMetadata managementGroups */ + managementGroups?: (google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup[]|null); + + /** AzureMetadata subscription */ + subscription?: (google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription|null); + + /** AzureMetadata resourceGroup */ + resourceGroup?: (google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup|null); + } + + /** Represents an AzureMetadata. */ + class AzureMetadata implements IAzureMetadata { + + /** + * Constructs a new AzureMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IAzureMetadata); + + /** AzureMetadata managementGroups. */ + public managementGroups: google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup[]; + + /** AzureMetadata subscription. */ + public subscription?: (google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription|null); + + /** AzureMetadata resourceGroup. */ + public resourceGroup?: (google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup|null); + + /** + * Creates a new AzureMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureMetadata instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IAzureMetadata): google.cloud.securitycenter.v1.AzureMetadata; + + /** + * Encodes the specified AzureMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.verify|verify} messages. + * @param message AzureMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IAzureMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.verify|verify} messages. + * @param message AzureMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IAzureMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureMetadata + * @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.cloud.securitycenter.v1.AzureMetadata; + + /** + * Decodes an AzureMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureMetadata + * @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.cloud.securitycenter.v1.AzureMetadata; + + /** + * Verifies an AzureMetadata 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 AzureMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AzureMetadata; + + /** + * Creates a plain object from an AzureMetadata message. Also converts values to other types if specified. + * @param message AzureMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AzureMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AzureMetadata { + + /** Properties of an AzureManagementGroup. */ + interface IAzureManagementGroup { + + /** AzureManagementGroup id */ + id?: (string|null); + + /** AzureManagementGroup displayName */ + displayName?: (string|null); + } + + /** Represents an AzureManagementGroup. */ + class AzureManagementGroup implements IAzureManagementGroup { + + /** + * Constructs a new AzureManagementGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup); + + /** AzureManagementGroup id. */ + public id: string; + + /** AzureManagementGroup displayName. */ + public displayName: string; + + /** + * Creates a new AzureManagementGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureManagementGroup instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup): google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup; + + /** + * Encodes the specified AzureManagementGroup message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @param message AzureManagementGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureManagementGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @param message AzureManagementGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureManagementGroup + * @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.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureManagementGroup + * @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.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup; + + /** + * Verifies an AzureManagementGroup 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 AzureManagementGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureManagementGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup; + + /** + * Creates a plain object from an AzureManagementGroup message. Also converts values to other types if specified. + * @param message AzureManagementGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureManagementGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureManagementGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AzureSubscription. */ + interface IAzureSubscription { + + /** AzureSubscription id */ + id?: (string|null); + + /** AzureSubscription displayName */ + displayName?: (string|null); + } + + /** Represents an AzureSubscription. */ + class AzureSubscription implements IAzureSubscription { + + /** + * Constructs a new AzureSubscription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription); + + /** AzureSubscription id. */ + public id: string; + + /** AzureSubscription displayName. */ + public displayName: string; + + /** + * Creates a new AzureSubscription instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureSubscription instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription): google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription; + + /** + * Encodes the specified AzureSubscription message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.verify|verify} messages. + * @param message AzureSubscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureSubscription message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.verify|verify} messages. + * @param message AzureSubscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureSubscription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureSubscription + * @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.cloud.securitycenter.v1.AzureMetadata.AzureSubscription; + + /** + * Decodes an AzureSubscription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureSubscription + * @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.cloud.securitycenter.v1.AzureMetadata.AzureSubscription; + + /** + * Verifies an AzureSubscription 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 AzureSubscription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureSubscription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription; + + /** + * Creates a plain object from an AzureSubscription message. Also converts values to other types if specified. + * @param message AzureSubscription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureSubscription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureSubscription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AzureResourceGroup. */ + interface IAzureResourceGroup { + + /** AzureResourceGroup name */ + name?: (string|null); + } + + /** Represents an AzureResourceGroup. */ + class AzureResourceGroup implements IAzureResourceGroup { + + /** + * Constructs a new AzureResourceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup); + + /** AzureResourceGroup name. */ + public name: string; + + /** + * Creates a new AzureResourceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureResourceGroup instance + */ + public static create(properties?: google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup): google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup; + + /** + * Encodes the specified AzureResourceGroup message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @param message AzureResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureResourceGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @param message AzureResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureResourceGroup + * @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.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup; + + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureResourceGroup + * @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.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup; + + /** + * Verifies an AzureResourceGroup 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 AzureResourceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureResourceGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup; + + /** + * Creates a plain object from an AzureResourceGroup message. Also converts values to other types if specified. + * @param message AzureResourceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureResourceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureResourceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResourcePath. */ + interface IResourcePath { + + /** ResourcePath nodes */ + nodes?: (google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode[]|null); + } + + /** Represents a ResourcePath. */ + class ResourcePath implements IResourcePath { + + /** + * Constructs a new ResourcePath. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IResourcePath); + + /** ResourcePath nodes. */ + public nodes: google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode[]; + + /** + * Creates a new ResourcePath instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourcePath instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IResourcePath): google.cloud.securitycenter.v1.ResourcePath; + + /** + * Encodes the specified ResourcePath message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.verify|verify} messages. + * @param message ResourcePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IResourcePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourcePath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.verify|verify} messages. + * @param message ResourcePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IResourcePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourcePath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourcePath + * @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.cloud.securitycenter.v1.ResourcePath; + + /** + * Decodes a ResourcePath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourcePath + * @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.cloud.securitycenter.v1.ResourcePath; + + /** + * Verifies a ResourcePath 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 ResourcePath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourcePath + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ResourcePath; + + /** + * Creates a plain object from a ResourcePath message. Also converts values to other types if specified. + * @param message ResourcePath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ResourcePath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourcePath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourcePath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourcePath { + + /** ResourcePathNodeType enum. */ + enum ResourcePathNodeType { + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0, + GCP_ORGANIZATION = 1, + GCP_FOLDER = 2, + GCP_PROJECT = 3, + AWS_ORGANIZATION = 4, + AWS_ORGANIZATIONAL_UNIT = 5, + AWS_ACCOUNT = 6, + AZURE_MANAGEMENT_GROUP = 7, + AZURE_SUBSCRIPTION = 8, + AZURE_RESOURCE_GROUP = 9 + } + + /** Properties of a ResourcePathNode. */ + interface IResourcePathNode { + + /** ResourcePathNode nodeType */ + nodeType?: (google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType|keyof typeof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType|null); + + /** ResourcePathNode id */ + id?: (string|null); + + /** ResourcePathNode displayName */ + displayName?: (string|null); + } + + /** Represents a ResourcePathNode. */ + class ResourcePathNode implements IResourcePathNode { + + /** + * Constructs a new ResourcePathNode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode); + + /** ResourcePathNode nodeType. */ + public nodeType: (google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType|keyof typeof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType); + + /** ResourcePathNode id. */ + public id: string; + + /** ResourcePathNode displayName. */ + public displayName: string; + + /** + * Creates a new ResourcePathNode instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourcePathNode instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode): google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode; + + /** + * Encodes the specified ResourcePathNode message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.verify|verify} messages. + * @param message ResourcePathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourcePathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.verify|verify} messages. + * @param message ResourcePathNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourcePathNode + * @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.cloud.securitycenter.v1.ResourcePath.ResourcePathNode; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourcePathNode + * @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.cloud.securitycenter.v1.ResourcePath.ResourcePathNode; + + /** + * Verifies a ResourcePathNode 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 ResourcePathNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourcePathNode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode; + + /** + * Creates a plain object from a ResourcePathNode message. Also converts values to other types if specified. + * @param message ResourcePathNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourcePathNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourcePathNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OrganizationSettings. */ + interface IOrganizationSettings { + + /** OrganizationSettings name */ + name?: (string|null); + + /** OrganizationSettings enableAssetDiscovery */ + enableAssetDiscovery?: (boolean|null); + + /** OrganizationSettings assetDiscoveryConfig */ + assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); + } + + /** Represents an OrganizationSettings. */ + class OrganizationSettings implements IOrganizationSettings { + + /** + * Constructs a new OrganizationSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IOrganizationSettings); + + /** OrganizationSettings name. */ + public name: string; + + /** OrganizationSettings enableAssetDiscovery. */ + public enableAssetDiscovery: boolean; + + /** OrganizationSettings assetDiscoveryConfig. */ + public assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); + + /** + * Creates a new OrganizationSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns OrganizationSettings instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IOrganizationSettings): google.cloud.securitycenter.v1.OrganizationSettings; + + /** + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @param message OrganizationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrganizationSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrganizationSettings + * @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.cloud.securitycenter.v1.OrganizationSettings; + + /** + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrganizationSettings + * @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.cloud.securitycenter.v1.OrganizationSettings; + + /** + * Verifies an OrganizationSettings 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 OrganizationSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrganizationSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings; + + /** + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. + * @param message OrganizationSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrganizationSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrganizationSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OrganizationSettings { + + /** Properties of an AssetDiscoveryConfig. */ + interface IAssetDiscoveryConfig { + + /** AssetDiscoveryConfig projectIds */ + projectIds?: (string[]|null); + + /** AssetDiscoveryConfig inclusionMode */ + inclusionMode?: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|keyof typeof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); + + /** AssetDiscoveryConfig folderIds */ + folderIds?: (string[]|null); + } + + /** Represents an AssetDiscoveryConfig. */ + class AssetDiscoveryConfig implements IAssetDiscoveryConfig { + + /** + * Constructs a new AssetDiscoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig); + + /** AssetDiscoveryConfig projectIds. */ + public projectIds: string[]; + + /** AssetDiscoveryConfig inclusionMode. */ + public inclusionMode: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|keyof typeof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode); + + /** AssetDiscoveryConfig folderIds. */ + public folderIds: string[]; + + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetDiscoveryConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @param message AssetDiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetDiscoveryConfig + * @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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetDiscoveryConfig + * @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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + + /** + * Verifies an AssetDiscoveryConfig 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 AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetDiscoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; + + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @param message AssetDiscoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetDiscoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssetDiscoveryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AssetDiscoveryConfig { + + /** InclusionMode enum. */ + enum InclusionMode { + INCLUSION_MODE_UNSPECIFIED = 0, + INCLUDE_ONLY = 1, + EXCLUDE = 2 + } + } + } + + /** Properties of a ResourceValueConfig. */ + interface IResourceValueConfig { + + /** ResourceValueConfig name */ + name?: (string|null); + + /** ResourceValueConfig resourceValue */ + resourceValue?: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue|null); + + /** ResourceValueConfig tagValues */ + tagValues?: (string[]|null); + + /** ResourceValueConfig resourceType */ + resourceType?: (string|null); + + /** ResourceValueConfig scope */ + scope?: (string|null); + + /** ResourceValueConfig resourceLabelsSelector */ + resourceLabelsSelector?: ({ [k: string]: string }|null); + + /** ResourceValueConfig description */ + description?: (string|null); + + /** ResourceValueConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ResourceValueConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ResourceValueConfig cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider|null); + + /** ResourceValueConfig sensitiveDataProtectionMapping */ + sensitiveDataProtectionMapping?: (google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping|null); + } + + /** Represents a ResourceValueConfig. */ + class ResourceValueConfig implements IResourceValueConfig { + + /** + * Constructs a new ResourceValueConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IResourceValueConfig); + + /** ResourceValueConfig name. */ + public name: string; + + /** ResourceValueConfig resourceValue. */ + public resourceValue: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue); + + /** ResourceValueConfig tagValues. */ + public tagValues: string[]; + + /** ResourceValueConfig resourceType. */ + public resourceType: string; + + /** ResourceValueConfig scope. */ + public scope: string; + + /** ResourceValueConfig resourceLabelsSelector. */ + public resourceLabelsSelector: { [k: string]: string }; + + /** ResourceValueConfig description. */ + public description: string; + + /** ResourceValueConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ResourceValueConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ResourceValueConfig cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider); + + /** ResourceValueConfig sensitiveDataProtectionMapping. */ + public sensitiveDataProtectionMapping?: (google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping|null); + + /** + * Creates a new ResourceValueConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceValueConfig instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IResourceValueConfig): google.cloud.securitycenter.v1.ResourceValueConfig; + + /** + * Encodes the specified ResourceValueConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.verify|verify} messages. + * @param message ResourceValueConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IResourceValueConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceValueConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.verify|verify} messages. + * @param message ResourceValueConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IResourceValueConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceValueConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceValueConfig + * @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.cloud.securitycenter.v1.ResourceValueConfig; + + /** + * Decodes a ResourceValueConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceValueConfig + * @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.cloud.securitycenter.v1.ResourceValueConfig; + + /** + * Verifies a ResourceValueConfig 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 ResourceValueConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceValueConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ResourceValueConfig; + + /** + * Creates a plain object from a ResourceValueConfig message. Also converts values to other types if specified. + * @param message ResourceValueConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ResourceValueConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceValueConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceValueConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceValueConfig { + + /** Properties of a SensitiveDataProtectionMapping. */ + interface ISensitiveDataProtectionMapping { + + /** SensitiveDataProtectionMapping highSensitivityMapping */ + highSensitivityMapping?: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue|null); + + /** SensitiveDataProtectionMapping mediumSensitivityMapping */ + mediumSensitivityMapping?: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue|null); + } + + /** Represents a SensitiveDataProtectionMapping. */ + class SensitiveDataProtectionMapping implements ISensitiveDataProtectionMapping { + + /** + * Constructs a new SensitiveDataProtectionMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping); + + /** SensitiveDataProtectionMapping highSensitivityMapping. */ + public highSensitivityMapping: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue); + + /** SensitiveDataProtectionMapping mediumSensitivityMapping. */ + public mediumSensitivityMapping: (google.cloud.securitycenter.v1.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ResourceValue); + + /** + * Creates a new SensitiveDataProtectionMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns SensitiveDataProtectionMapping instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping): google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping; + + /** + * Encodes the specified SensitiveDataProtectionMapping message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.verify|verify} messages. + * @param message SensitiveDataProtectionMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SensitiveDataProtectionMapping message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.verify|verify} messages. + * @param message SensitiveDataProtectionMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SensitiveDataProtectionMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SensitiveDataProtectionMapping + * @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.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping; + + /** + * Decodes a SensitiveDataProtectionMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SensitiveDataProtectionMapping + * @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.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping; + + /** + * Verifies a SensitiveDataProtectionMapping 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 SensitiveDataProtectionMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SensitiveDataProtectionMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping; + + /** + * Creates a plain object from a SensitiveDataProtectionMapping message. Also converts values to other types if specified. + * @param message SensitiveDataProtectionMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SensitiveDataProtectionMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SensitiveDataProtectionMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ResourceValue enum. */ + enum ResourceValue { + RESOURCE_VALUE_UNSPECIFIED = 0, + HIGH = 1, + MEDIUM = 2, + LOW = 3, + NONE = 4 + } + + /** Properties of a RunAssetDiscoveryResponse. */ + interface IRunAssetDiscoveryResponse { + + /** RunAssetDiscoveryResponse state */ + state?: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|keyof typeof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null); + + /** RunAssetDiscoveryResponse duration */ + duration?: (google.protobuf.IDuration|null); + } + + /** Represents a RunAssetDiscoveryResponse. */ + class RunAssetDiscoveryResponse implements IRunAssetDiscoveryResponse { + + /** + * Constructs a new RunAssetDiscoveryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse); + + /** RunAssetDiscoveryResponse state. */ + public state: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|keyof typeof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State); + + /** RunAssetDiscoveryResponse duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAssetDiscoveryResponse instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + + /** + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @param message RunAssetDiscoveryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAssetDiscoveryResponse + * @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.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + + /** + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAssetDiscoveryResponse + * @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.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + + /** + * Verifies a RunAssetDiscoveryResponse 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 RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAssetDiscoveryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + + /** + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAssetDiscoveryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAssetDiscoveryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RunAssetDiscoveryResponse { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + COMPLETED = 1, + SUPERSEDED = 2, + TERMINATED = 3 + } + } + + /** Properties of a SecurityHealthAnalyticsCustomModule. */ + interface ISecurityHealthAnalyticsCustomModule { + + /** SecurityHealthAnalyticsCustomModule name */ + name?: (string|null); + + /** SecurityHealthAnalyticsCustomModule displayName */ + displayName?: (string|null); + + /** SecurityHealthAnalyticsCustomModule enablementState */ + enablementState?: (google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null); + + /** SecurityHealthAnalyticsCustomModule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityHealthAnalyticsCustomModule lastEditor */ + lastEditor?: (string|null); + + /** SecurityHealthAnalyticsCustomModule ancestorModule */ + ancestorModule?: (string|null); + + /** SecurityHealthAnalyticsCustomModule customConfig */ + customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); + } + + /** Represents a SecurityHealthAnalyticsCustomModule. */ + class SecurityHealthAnalyticsCustomModule implements ISecurityHealthAnalyticsCustomModule { + + /** + * Constructs a new SecurityHealthAnalyticsCustomModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule); + + /** SecurityHealthAnalyticsCustomModule name. */ + public name: string; + + /** SecurityHealthAnalyticsCustomModule displayName. */ + public displayName: string; + + /** SecurityHealthAnalyticsCustomModule enablementState. */ + public enablementState: (google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState); + + /** SecurityHealthAnalyticsCustomModule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityHealthAnalyticsCustomModule lastEditor. */ + public lastEditor: string; + + /** SecurityHealthAnalyticsCustomModule ancestorModule. */ + public ancestorModule: string; + + /** SecurityHealthAnalyticsCustomModule customConfig. */ + public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); + + /** + * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityHealthAnalyticsCustomModule instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule): google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityHealthAnalyticsCustomModule + * @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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityHealthAnalyticsCustomModule + * @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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Verifies a SecurityHealthAnalyticsCustomModule 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 SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityHealthAnalyticsCustomModule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @param message SecurityHealthAnalyticsCustomModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityHealthAnalyticsCustomModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityHealthAnalyticsCustomModule { + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + INHERITED = 3 + } + } + + /** Represents a SecurityCenter */ + class SecurityCenter extends $protobuf.rpc.Service { + + /** + * Constructs a new SecurityCenter service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new SecurityCenter service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; + + /** + * Calls BulkMuteFindings. + * @param request BulkMuteFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public bulkMuteFindings(request: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindingsCallback): void; + + /** + * Calls BulkMuteFindings. + * @param request BulkMuteFindingsRequest message or plain object + * @returns Promise + */ + public bulkMuteFindings(request: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest): Promise; + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source + */ + public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback): void; + + /** + * Calls CreateSource. + * @param request CreateSourceRequest message or plain object + * @returns Promise + */ + public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest): Promise; + + /** + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding + */ + public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback): void; + + /** + * Calls CreateFinding. + * @param request CreateFindingRequest message or plain object + * @returns Promise + */ + public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest): Promise; + + /** + * Calls CreateMuteConfig. + * @param request CreateMuteConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MuteConfig + */ + public createMuteConfig(request: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfigCallback): void; + + /** + * Calls CreateMuteConfig. + * @param request CreateMuteConfigRequest message or plain object + * @returns Promise + */ + public createMuteConfig(request: google.cloud.securitycenter.v1.ICreateMuteConfigRequest): Promise; + + /** + * Calls CreateNotificationConfig. + * @param request CreateNotificationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationConfig + */ + public createNotificationConfig(request: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfigCallback): void; + + /** + * Calls CreateNotificationConfig. + * @param request CreateNotificationConfigRequest message or plain object + * @returns Promise + */ + public createNotificationConfig(request: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest): Promise; + + /** + * Calls DeleteMuteConfig. + * @param request DeleteMuteConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMuteConfig(request: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfigCallback): void; + + /** + * Calls DeleteMuteConfig. + * @param request DeleteMuteConfigRequest message or plain object + * @returns Promise + */ + public deleteMuteConfig(request: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest): Promise; + + /** + * Calls DeleteNotificationConfig. + * @param request DeleteNotificationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteNotificationConfig(request: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfigCallback): void; + + /** + * Calls DeleteNotificationConfig. + * @param request DeleteNotificationConfigRequest message or plain object + * @returns Promise + */ + public deleteNotificationConfig(request: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest): Promise; + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls GetSimulation. + * @param request GetSimulationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Simulation + */ + public getSimulation(request: google.cloud.securitycenter.v1.IGetSimulationRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSimulationCallback): void; + + /** + * Calls GetSimulation. + * @param request GetSimulationRequest message or plain object + * @returns Promise + */ + public getSimulation(request: google.cloud.securitycenter.v1.IGetSimulationRequest): Promise; + + /** + * Calls GetValuedResource. + * @param request GetValuedResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ValuedResource + */ + public getValuedResource(request: google.cloud.securitycenter.v1.IGetValuedResourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetValuedResourceCallback): void; + + /** + * Calls GetValuedResource. + * @param request GetValuedResourceRequest message or plain object + * @returns Promise + */ + public getValuedResource(request: google.cloud.securitycenter.v1.IGetValuedResourceRequest): Promise; + + /** + * Calls GetBigQueryExport. + * @param request GetBigQueryExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BigQueryExport + */ + public getBigQueryExport(request: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExportCallback): void; + + /** + * Calls GetBigQueryExport. + * @param request GetBigQueryExportRequest message or plain object + * @returns Promise + */ + public getBigQueryExport(request: google.cloud.securitycenter.v1.IGetBigQueryExportRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls GetMuteConfig. + * @param request GetMuteConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MuteConfig + */ + public getMuteConfig(request: google.cloud.securitycenter.v1.IGetMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfigCallback): void; + + /** + * Calls GetMuteConfig. + * @param request GetMuteConfigRequest message or plain object + * @returns Promise + */ + public getMuteConfig(request: google.cloud.securitycenter.v1.IGetMuteConfigRequest): Promise; + + /** + * Calls GetNotificationConfig. + * @param request GetNotificationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationConfig + */ + public getNotificationConfig(request: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfigCallback): void; + + /** + * Calls GetNotificationConfig. + * @param request GetNotificationConfigRequest message or plain object + * @returns Promise + */ + public getNotificationConfig(request: google.cloud.securitycenter.v1.IGetNotificationConfigRequest): Promise; + + /** + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings + */ + public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback): void; + + /** + * Calls GetOrganizationSettings. + * @param request GetOrganizationSettingsRequest message or plain object + * @returns Promise + */ + public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): Promise; + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule + */ + public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source + */ + public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback): void; + + /** + * Calls GetSource. + * @param request GetSourceRequest message or plain object + * @returns Promise + */ + public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest): Promise; + + /** + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse + */ + public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback): void; + + /** + * Calls GroupAssets. + * @param request GroupAssetsRequest message or plain object + * @returns Promise + */ + public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest): Promise; + + /** + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse + */ + public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback): void; + + /** + * Calls GroupFindings. + * @param request GroupFindingsRequest message or plain object + * @returns Promise + */ + public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest): Promise; + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFindingsResponse + */ + public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback): void; + + /** + * Calls ListFindings. + * @param request ListFindingsRequest message or plain object + * @returns Promise + */ + public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest): Promise; + + /** + * Calls ListMuteConfigs. + * @param request ListMuteConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMuteConfigsResponse + */ + public listMuteConfigs(request: google.cloud.securitycenter.v1.IListMuteConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigsCallback): void; + + /** + * Calls ListMuteConfigs. + * @param request ListMuteConfigsRequest message or plain object + * @returns Promise + */ + public listMuteConfigs(request: google.cloud.securitycenter.v1.IListMuteConfigsRequest): Promise; + + /** + * Calls ListNotificationConfigs. + * @param request ListNotificationConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationConfigsResponse + */ + public listNotificationConfigs(request: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigsCallback): void; + + /** + * Calls ListNotificationConfigs. + * @param request ListNotificationConfigsRequest message or plain object + * @returns Promise + */ + public listNotificationConfigs(request: google.cloud.securitycenter.v1.IListNotificationConfigsRequest): Promise; + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse + */ + public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSourcesResponse + */ + public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback): void; + + /** + * Calls ListSources. + * @param request ListSourcesRequest message or plain object + * @returns Promise + */ + public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest): Promise; + + /** + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback): void; + + /** + * Calls RunAssetDiscovery. + * @param request RunAssetDiscoveryRequest message or plain object + * @returns Promise + */ + public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): Promise; + + /** + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding + */ + public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback): void; + + /** + * Calls SetFindingState. + * @param request SetFindingStateRequest message or plain object + * @returns Promise + */ + public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest): Promise; + + /** + * Calls SetMute. + * @param request SetMuteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding + */ + public setMute(request: google.cloud.securitycenter.v1.ISetMuteRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetMuteCallback): void; + + /** + * Calls SetMute. + * @param request SetMuteRequest message or plain object + * @returns Promise + */ + public setMute(request: google.cloud.securitycenter.v1.ISetMuteRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls UpdateExternalSystem. + * @param request UpdateExternalSystemRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExternalSystem + */ + public updateExternalSystem(request: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystemCallback): void; + + /** + * Calls UpdateExternalSystem. + * @param request UpdateExternalSystemRequest message or plain object + * @returns Promise + */ + public updateExternalSystem(request: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest): Promise; + + /** + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Finding + */ + public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback): void; + + /** + * Calls UpdateFinding. + * @param request UpdateFindingRequest message or plain object + * @returns Promise + */ + public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest): Promise; + + /** + * Calls UpdateMuteConfig. + * @param request UpdateMuteConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MuteConfig + */ + public updateMuteConfig(request: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfigCallback): void; + + /** + * Calls UpdateMuteConfig. + * @param request UpdateMuteConfigRequest message or plain object + * @returns Promise + */ + public updateMuteConfig(request: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest): Promise; + + /** + * Calls UpdateNotificationConfig. + * @param request UpdateNotificationConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationConfig + */ + public updateNotificationConfig(request: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfigCallback): void; + + /** + * Calls UpdateNotificationConfig. + * @param request UpdateNotificationConfigRequest message or plain object + * @returns Promise + */ + public updateNotificationConfig(request: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest): Promise; + + /** + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and OrganizationSettings + */ + public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback): void; + + /** + * Calls UpdateOrganizationSettings. + * @param request UpdateOrganizationSettingsRequest message or plain object + * @returns Promise + */ + public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): Promise; + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): Promise; - /** - * Constructs a new Subject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.ISubject); + /** + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Source + */ + public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback): void; - /** Subject kind. */ - public kind: (google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|keyof typeof google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType); + /** + * Calls UpdateSource. + * @param request UpdateSourceRequest message or plain object + * @returns Promise + */ + public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest): Promise; - /** Subject ns. */ - public ns: string; + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityMarks + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback): void; - /** Subject name. */ - public name: string; + /** + * Calls UpdateSecurityMarks. + * @param request UpdateSecurityMarksRequest message or plain object + * @returns Promise + */ + public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): Promise; - /** - * Creates a new Subject instance using the specified properties. - * @param [properties] Properties to set - * @returns Subject instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.ISubject): google.cloud.securitycenter.v1.Kubernetes.Subject; + /** + * Calls CreateBigQueryExport. + * @param request CreateBigQueryExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BigQueryExport + */ + public createBigQueryExport(request: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExportCallback): void; - /** - * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls CreateBigQueryExport. + * @param request CreateBigQueryExportRequest message or plain object + * @returns Promise + */ + public createBigQueryExport(request: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest): Promise; - /** - * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. - * @param message Subject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls DeleteBigQueryExport. + * @param request DeleteBigQueryExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteBigQueryExport(request: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExportCallback): void; - /** - * Decodes a Subject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Subject - * @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.cloud.securitycenter.v1.Kubernetes.Subject; + /** + * Calls DeleteBigQueryExport. + * @param request DeleteBigQueryExportRequest message or plain object + * @returns Promise + */ + public deleteBigQueryExport(request: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest): Promise; - /** - * Decodes a Subject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Subject - * @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.cloud.securitycenter.v1.Kubernetes.Subject; + /** + * Calls UpdateBigQueryExport. + * @param request UpdateBigQueryExportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BigQueryExport + */ + public updateBigQueryExport(request: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExportCallback): void; - /** - * Verifies a Subject 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); + /** + * Calls UpdateBigQueryExport. + * @param request UpdateBigQueryExportRequest message or plain object + * @returns Promise + */ + public updateBigQueryExport(request: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest): Promise; - /** - * Creates a Subject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Subject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Subject; + /** + * Calls ListBigQueryExports. + * @param request ListBigQueryExportsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBigQueryExportsResponse + */ + public listBigQueryExports(request: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExportsCallback): void; - /** - * Creates a plain object from a Subject message. Also converts values to other types if specified. - * @param message Subject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls ListBigQueryExports. + * @param request ListBigQueryExportsRequest message or plain object + * @returns Promise + */ + public listBigQueryExports(request: google.cloud.securitycenter.v1.IListBigQueryExportsRequest): Promise; - /** - * Converts this Subject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls CreateEventThreatDetectionCustomModule. + * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public createEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModuleCallback): void; - /** - * Gets the default type url for Subject - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls CreateEventThreatDetectionCustomModule. + * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public createEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest): Promise; - namespace Subject { + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModuleCallback): void; - /** AuthType enum. */ - enum AuthType { - AUTH_TYPE_UNSPECIFIED = 0, - USER = 1, - SERVICEACCOUNT = 2, - GROUP = 3 - } - } + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest): Promise; - /** Properties of an AccessReview. */ - interface IAccessReview { + /** + * Calls GetEventThreatDetectionCustomModule. + * @param request GetEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public getEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModuleCallback): void; - /** AccessReview group */ - group?: (string|null); + /** + * Calls GetEventThreatDetectionCustomModule. + * @param request GetEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public getEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest): Promise; - /** AccessReview ns */ - ns?: (string|null); + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse + */ + public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModulesCallback): void; - /** AccessReview name */ - name?: (string|null); + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest): Promise; - /** AccessReview resource */ - resource?: (string|null); + /** + * Calls ListEventThreatDetectionCustomModules. + * @param request ListEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse + */ + public listEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModulesCallback): void; - /** AccessReview subresource */ - subresource?: (string|null); + /** + * Calls ListEventThreatDetectionCustomModules. + * @param request ListEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest): Promise; - /** AccessReview verb */ - verb?: (string|null); + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public updateEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModuleCallback): void; - /** AccessReview version */ - version?: (string|null); - } + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public updateEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest): Promise; - /** Represents an AccessReview. */ - class AccessReview implements IAccessReview { + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse + */ + public validateEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModuleCallback): void; - /** - * Constructs a new AccessReview. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IAccessReview); + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public validateEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest): Promise; - /** AccessReview group. */ - public group: string; + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule + */ + public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModuleCallback): void; - /** AccessReview ns. */ - public ns: string; + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): Promise; - /** AccessReview name. */ - public name: string; + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse + */ + public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModulesCallback): void; - /** AccessReview resource. */ - public resource: string; + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): Promise; - /** AccessReview subresource. */ - public subresource: string; + /** + * Calls BatchCreateResourceValueConfigs. + * @param request BatchCreateResourceValueConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateResourceValueConfigsResponse + */ + public batchCreateResourceValueConfigs(request: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigsCallback): void; - /** AccessReview verb. */ - public verb: string; + /** + * Calls BatchCreateResourceValueConfigs. + * @param request BatchCreateResourceValueConfigsRequest message or plain object + * @returns Promise + */ + public batchCreateResourceValueConfigs(request: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest): Promise; - /** AccessReview version. */ - public version: string; + /** + * Calls DeleteResourceValueConfig. + * @param request DeleteResourceValueConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteResourceValueConfig(request: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfigCallback): void; - /** - * Creates a new AccessReview instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessReview instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IAccessReview): google.cloud.securitycenter.v1.Kubernetes.AccessReview; + /** + * Calls DeleteResourceValueConfig. + * @param request DeleteResourceValueConfigRequest message or plain object + * @returns Promise + */ + public deleteResourceValueConfig(request: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest): Promise; - /** - * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. - * @param message AccessReview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetResourceValueConfig. + * @param request GetResourceValueConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceValueConfig + */ + public getResourceValueConfig(request: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfigCallback): void; - /** - * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. - * @param message AccessReview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IAccessReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetResourceValueConfig. + * @param request GetResourceValueConfigRequest message or plain object + * @returns Promise + */ + public getResourceValueConfig(request: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest): Promise; - /** - * Decodes an AccessReview message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessReview - * @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.cloud.securitycenter.v1.Kubernetes.AccessReview; + /** + * Calls ListResourceValueConfigs. + * @param request ListResourceValueConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceValueConfigsResponse + */ + public listResourceValueConfigs(request: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigsCallback): void; - /** - * Decodes an AccessReview message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessReview - * @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.cloud.securitycenter.v1.Kubernetes.AccessReview; + /** + * Calls ListResourceValueConfigs. + * @param request ListResourceValueConfigsRequest message or plain object + * @returns Promise + */ + public listResourceValueConfigs(request: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest): Promise; - /** - * Verifies an AccessReview 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); + /** + * Calls UpdateResourceValueConfig. + * @param request UpdateResourceValueConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceValueConfig + */ + public updateResourceValueConfig(request: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfigCallback): void; - /** - * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessReview - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.AccessReview; + /** + * Calls UpdateResourceValueConfig. + * @param request UpdateResourceValueConfigRequest message or plain object + * @returns Promise + */ + public updateResourceValueConfig(request: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest): Promise; - /** - * Creates a plain object from an AccessReview message. Also converts values to other types if specified. - * @param message AccessReview - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.AccessReview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls ListValuedResources. + * @param request ListValuedResourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListValuedResourcesResponse + */ + public listValuedResources(request: google.cloud.securitycenter.v1.IListValuedResourcesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListValuedResourcesCallback): void; - /** - * Converts this AccessReview to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls ListValuedResources. + * @param request ListValuedResourcesRequest message or plain object + * @returns Promise + */ + public listValuedResources(request: google.cloud.securitycenter.v1.IListValuedResourcesRequest): Promise; - /** - * Gets the default type url for AccessReview - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls ListAttackPaths. + * @param request ListAttackPathsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAttackPathsResponse + */ + public listAttackPaths(request: google.cloud.securitycenter.v1.IListAttackPathsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListAttackPathsCallback): void; - /** Properties of an Object. */ - interface IObject { + /** + * Calls ListAttackPaths. + * @param request ListAttackPathsRequest message or plain object + * @returns Promise + */ + public listAttackPaths(request: google.cloud.securitycenter.v1.IListAttackPathsRequest): Promise; + } - /** Object group */ - group?: (string|null); + namespace SecurityCenter { - /** Object kind */ - kind?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|bulkMuteFindings}. + * @param error Error, if any + * @param [response] Operation + */ + type BulkMuteFindingsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Object ns */ - ns?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule + */ + type CreateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; - /** Object name */ - name?: (string|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSource}. + * @param error Error, if any + * @param [response] Source + */ + type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; - /** Object containers */ - containers?: (google.cloud.securitycenter.v1.IContainer[]|null); - } + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createFinding}. + * @param error Error, if any + * @param [response] Finding + */ + type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; - /** Represents an Object. */ - class Object implements IObject { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createMuteConfig}. + * @param error Error, if any + * @param [response] MuteConfig + */ + type CreateMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; - /** - * Constructs a new Object. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.Kubernetes.IObject); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createNotificationConfig}. + * @param error Error, if any + * @param [response] NotificationConfig + */ + type CreateNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; - /** Object group. */ - public group: string; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteMuteConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMuteConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** Object kind. */ - public kind: string; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteNotificationConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteNotificationConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** Object ns. */ - public ns: string; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** Object name. */ - public name: string; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSimulation}. + * @param error Error, if any + * @param [response] Simulation + */ + type GetSimulationCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Simulation) => void; - /** Object containers. */ - public containers: google.cloud.securitycenter.v1.IContainer[]; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getValuedResource}. + * @param error Error, if any + * @param [response] ValuedResource + */ + type GetValuedResourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ValuedResource) => void; - /** - * Creates a new Object instance using the specified properties. - * @param [properties] Properties to set - * @returns Object instance - */ - public static create(properties?: google.cloud.securitycenter.v1.Kubernetes.IObject): google.cloud.securitycenter.v1.Kubernetes.Object; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getBigQueryExport}. + * @param error Error, if any + * @param [response] BigQueryExport + */ + type GetBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; - /** - * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. - * @param message Object message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getMuteConfig}. + * @param error Error, if any + * @param [response] MuteConfig + */ + type GetMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; - /** - * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. - * @param message Object message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.Kubernetes.IObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getNotificationConfig}. + * @param error Error, if any + * @param [response] NotificationConfig + */ + type GetNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; - /** - * Decodes an Object message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Object - * @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.cloud.securitycenter.v1.Kubernetes.Object; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings + */ + type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; - /** - * Decodes an Object message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Object - * @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.cloud.securitycenter.v1.Kubernetes.Object; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] EffectiveSecurityHealthAnalyticsCustomModule + */ + type GetEffectiveSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule) => void; - /** - * Verifies an Object 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); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule + */ + type GetSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; - /** - * Creates an Object message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Object - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Kubernetes.Object; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSource}. + * @param error Error, if any + * @param [response] Source + */ + type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; - /** - * Creates a plain object from an Object message. Also converts values to other types if specified. - * @param message Object - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.Kubernetes.Object, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupAssets}. + * @param error Error, if any + * @param [response] GroupAssetsResponse + */ + type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupAssetsResponse) => void; - /** - * Converts this Object to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupFindings}. + * @param error Error, if any + * @param [response] GroupFindingsResponse + */ + type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupFindingsResponse) => void; - /** - * Gets the default type url for Object - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListAssetsResponse) => void; - /** Properties of a LoadBalancer. */ - interface ILoadBalancer { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + type ListDescendantSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) => void; - /** LoadBalancer name */ - name?: (string|null); - } + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listFindings}. + * @param error Error, if any + * @param [response] ListFindingsResponse + */ + type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListFindingsResponse) => void; - /** Represents a LoadBalancer. */ - class LoadBalancer implements ILoadBalancer { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listMuteConfigs}. + * @param error Error, if any + * @param [response] ListMuteConfigsResponse + */ + type ListMuteConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListMuteConfigsResponse) => void; /** - * Constructs a new LoadBalancer. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listNotificationConfigs}. + * @param error Error, if any + * @param [response] ListNotificationConfigsResponse */ - constructor(properties?: google.cloud.securitycenter.v1.ILoadBalancer); + type ListNotificationConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListNotificationConfigsResponse) => void; - /** LoadBalancer name. */ - public name: string; + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + type ListEffectiveSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) => void; /** - * Creates a new LoadBalancer instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancer instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListSecurityHealthAnalyticsCustomModulesResponse */ - public static create(properties?: google.cloud.securitycenter.v1.ILoadBalancer): google.cloud.securitycenter.v1.LoadBalancer; + type ListSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse) => void; /** - * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. - * @param message LoadBalancer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSources}. + * @param error Error, if any + * @param [response] ListSourcesResponse */ - public static encode(message: google.cloud.securitycenter.v1.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSourcesResponse) => void; /** - * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. - * @param message LoadBalancer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|runAssetDiscovery}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ILoadBalancer, writer?: $protobuf.Writer): $protobuf.Writer; + type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a LoadBalancer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setFindingState}. + * @param error Error, if any + * @param [response] Finding */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.LoadBalancer; + type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; /** - * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setMute}. + * @param error Error, if any + * @param [response] Finding */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.LoadBalancer; + type SetMuteCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; /** - * Verifies a LoadBalancer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy */ - public static verify(message: { [k: string]: any }): (string|null); + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; /** - * Creates a LoadBalancer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.LoadBalancer; + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; /** - * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. - * @param message LoadBalancer - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|simulateSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SimulateSecurityHealthAnalyticsCustomModuleResponse */ - public static toObject(message: google.cloud.securitycenter.v1.LoadBalancer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type SimulateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) => void; /** - * Converts this LoadBalancer to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateExternalSystem}. + * @param error Error, if any + * @param [response] ExternalSystem */ - public toJSON(): { [k: string]: any }; + type UpdateExternalSystemCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ExternalSystem) => void; /** - * Gets the default type url for LoadBalancer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateFinding}. + * @param error Error, if any + * @param [response] Finding */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; - /** Properties of a LogEntry. */ - interface ILogEntry { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateMuteConfig}. + * @param error Error, if any + * @param [response] MuteConfig + */ + type UpdateMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; - /** LogEntry cloudLoggingEntry */ - cloudLoggingEntry?: (google.cloud.securitycenter.v1.ICloudLoggingEntry|null); - } + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateNotificationConfig}. + * @param error Error, if any + * @param [response] NotificationConfig + */ + type UpdateNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; - /** Represents a LogEntry. */ - class LogEntry implements ILogEntry { + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateOrganizationSettings}. + * @param error Error, if any + * @param [response] OrganizationSettings + */ + type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; /** - * Constructs a new LogEntry. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule */ - constructor(properties?: google.cloud.securitycenter.v1.ILogEntry); - - /** LogEntry cloudLoggingEntry. */ - public cloudLoggingEntry?: (google.cloud.securitycenter.v1.ICloudLoggingEntry|null); - - /** LogEntry logEntry. */ - public logEntry?: "cloudLoggingEntry"; + type UpdateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; /** - * Creates a new LogEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns LogEntry instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSource}. + * @param error Error, if any + * @param [response] Source */ - public static create(properties?: google.cloud.securitycenter.v1.ILogEntry): google.cloud.securitycenter.v1.LogEntry; + type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityMarks}. + * @param error Error, if any + * @param [response] SecurityMarks */ - public static encode(message: google.cloud.securitycenter.v1.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityMarks) => void; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. - * @param message LogEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createBigQueryExport}. + * @param error Error, if any + * @param [response] BigQueryExport */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ILogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; /** - * Decodes a LogEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteBigQueryExport}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.LogEntry; + type DeleteBigQueryExportCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LogEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateBigQueryExport}. + * @param error Error, if any + * @param [response] BigQueryExport */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.LogEntry; + type UpdateBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; /** - * Verifies a LogEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listBigQueryExports}. + * @param error Error, if any + * @param [response] ListBigQueryExportsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListBigQueryExportsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListBigQueryExportsResponse) => void; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LogEntry + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.LogEntry; + type CreateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EventThreatDetectionCustomModule) => void; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. - * @param message LogEntry - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.cloud.securitycenter.v1.LogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeleteEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this LogEntry to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule */ - public toJSON(): { [k: string]: any }; + type GetEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EventThreatDetectionCustomModule) => void; /** - * Gets the default type url for LogEntry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListDescendantEventThreatDetectionCustomModulesResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudLoggingEntry. */ - interface ICloudLoggingEntry { - - /** CloudLoggingEntry insertId */ - insertId?: (string|null); - - /** CloudLoggingEntry logId */ - logId?: (string|null); - - /** CloudLoggingEntry resourceContainer */ - resourceContainer?: (string|null); - - /** CloudLoggingEntry timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents a CloudLoggingEntry. */ - class CloudLoggingEntry implements ICloudLoggingEntry { + type ListDescendantEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse) => void; /** - * Constructs a new CloudLoggingEntry. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListEventThreatDetectionCustomModulesResponse */ - constructor(properties?: google.cloud.securitycenter.v1.ICloudLoggingEntry); - - /** CloudLoggingEntry insertId. */ - public insertId: string; - - /** CloudLoggingEntry logId. */ - public logId: string; + type ListEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse) => void; - /** CloudLoggingEntry resourceContainer. */ - public resourceContainer: string; - - /** CloudLoggingEntry timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule + */ + type UpdateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EventThreatDetectionCustomModule) => void; /** - * Creates a new CloudLoggingEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudLoggingEntry instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|validateEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] ValidateEventThreatDetectionCustomModuleResponse */ - public static create(properties?: google.cloud.securitycenter.v1.ICloudLoggingEntry): google.cloud.securitycenter.v1.CloudLoggingEntry; + type ValidateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse) => void; /** - * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. - * @param message CloudLoggingEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EffectiveEventThreatDetectionCustomModule */ - public static encode(message: google.cloud.securitycenter.v1.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + type GetEffectiveEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule) => void; /** - * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. - * @param message CloudLoggingEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListEffectiveEventThreatDetectionCustomModulesResponse */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudLoggingEntry, writer?: $protobuf.Writer): $protobuf.Writer; + type ListEffectiveEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) => void; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudLoggingEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|batchCreateResourceValueConfigs}. + * @param error Error, if any + * @param [response] BatchCreateResourceValueConfigsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CloudLoggingEntry; + type BatchCreateResourceValueConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse) => void; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudLoggingEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteResourceValueConfig}. + * @param error Error, if any + * @param [response] Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CloudLoggingEntry; + type DeleteResourceValueConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Verifies a CloudLoggingEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getResourceValueConfig}. + * @param error Error, if any + * @param [response] ResourceValueConfig */ - public static verify(message: { [k: string]: any }): (string|null); + type GetResourceValueConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ResourceValueConfig) => void; /** - * Creates a CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudLoggingEntry + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listResourceValueConfigs}. + * @param error Error, if any + * @param [response] ListResourceValueConfigsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudLoggingEntry; + type ListResourceValueConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListResourceValueConfigsResponse) => void; /** - * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. - * @param message CloudLoggingEntry - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateResourceValueConfig}. + * @param error Error, if any + * @param [response] ResourceValueConfig */ - public static toObject(message: google.cloud.securitycenter.v1.CloudLoggingEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type UpdateResourceValueConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ResourceValueConfig) => void; /** - * Converts this CloudLoggingEntry to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listValuedResources}. + * @param error Error, if any + * @param [response] ListValuedResourcesResponse */ - public toJSON(): { [k: string]: any }; + type ListValuedResourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListValuedResourcesResponse) => void; /** - * Gets the default type url for CloudLoggingEntry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAttackPaths}. + * @param error Error, if any + * @param [response] ListAttackPathsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ListAttackPathsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListAttackPathsResponse) => void; } - /** Properties of a MitreAttack. */ - interface IMitreAttack { - - /** MitreAttack primaryTactic */ - primaryTactic?: (google.cloud.securitycenter.v1.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v1.MitreAttack.Tactic|null); - - /** MitreAttack primaryTechniques */ - primaryTechniques?: (google.cloud.securitycenter.v1.MitreAttack.Technique[]|null); + /** Properties of a BulkMuteFindingsRequest. */ + interface IBulkMuteFindingsRequest { - /** MitreAttack additionalTactics */ - additionalTactics?: (google.cloud.securitycenter.v1.MitreAttack.Tactic[]|null); + /** BulkMuteFindingsRequest parent */ + parent?: (string|null); - /** MitreAttack additionalTechniques */ - additionalTechniques?: (google.cloud.securitycenter.v1.MitreAttack.Technique[]|null); + /** BulkMuteFindingsRequest filter */ + filter?: (string|null); - /** MitreAttack version */ - version?: (string|null); + /** BulkMuteFindingsRequest muteAnnotation */ + muteAnnotation?: (string|null); } - /** Represents a MitreAttack. */ - class MitreAttack implements IMitreAttack { + /** Represents a BulkMuteFindingsRequest. */ + class BulkMuteFindingsRequest implements IBulkMuteFindingsRequest { /** - * Constructs a new MitreAttack. + * Constructs a new BulkMuteFindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IMitreAttack); - - /** MitreAttack primaryTactic. */ - public primaryTactic: (google.cloud.securitycenter.v1.MitreAttack.Tactic|keyof typeof google.cloud.securitycenter.v1.MitreAttack.Tactic); - - /** MitreAttack primaryTechniques. */ - public primaryTechniques: google.cloud.securitycenter.v1.MitreAttack.Technique[]; + constructor(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest); - /** MitreAttack additionalTactics. */ - public additionalTactics: google.cloud.securitycenter.v1.MitreAttack.Tactic[]; + /** BulkMuteFindingsRequest parent. */ + public parent: string; - /** MitreAttack additionalTechniques. */ - public additionalTechniques: google.cloud.securitycenter.v1.MitreAttack.Technique[]; + /** BulkMuteFindingsRequest filter. */ + public filter: string; - /** MitreAttack version. */ - public version: string; + /** BulkMuteFindingsRequest muteAnnotation. */ + public muteAnnotation: string; /** - * Creates a new MitreAttack instance using the specified properties. + * Creates a new BulkMuteFindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MitreAttack instance + * @returns BulkMuteFindingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IMitreAttack): google.cloud.securitycenter.v1.MitreAttack; + public static create(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; /** - * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. - * @param message MitreAttack message or plain object to encode + * Encodes the specified BulkMuteFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. + * @param message BulkMuteFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. - * @param message MitreAttack message or plain object to encode + * Encodes the specified BulkMuteFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. + * @param message BulkMuteFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IMitreAttack, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MitreAttack message from the specified reader or buffer. + * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MitreAttack + * @returns BulkMuteFindingsRequest * @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.cloud.securitycenter.v1.MitreAttack; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; /** - * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MitreAttack + * @returns BulkMuteFindingsRequest * @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.cloud.securitycenter.v1.MitreAttack; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; /** - * Verifies a MitreAttack message. + * Verifies a BulkMuteFindingsRequest 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 MitreAttack message from a plain object. Also converts values to their respective internal types. + * Creates a BulkMuteFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MitreAttack + * @returns BulkMuteFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.MitreAttack; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; /** - * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. - * @param message MitreAttack + * Creates a plain object from a BulkMuteFindingsRequest message. Also converts values to other types if specified. + * @param message BulkMuteFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.MitreAttack, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BulkMuteFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MitreAttack to JSON. + * Converts this BulkMuteFindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MitreAttack + * Gets the default type url for BulkMuteFindingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MitreAttack { - - /** Tactic enum. */ - enum Tactic { - TACTIC_UNSPECIFIED = 0, - RECONNAISSANCE = 1, - RESOURCE_DEVELOPMENT = 2, - INITIAL_ACCESS = 5, - EXECUTION = 3, - PERSISTENCE = 6, - PRIVILEGE_ESCALATION = 8, - DEFENSE_EVASION = 7, - CREDENTIAL_ACCESS = 9, - DISCOVERY = 10, - LATERAL_MOVEMENT = 11, - COLLECTION = 12, - COMMAND_AND_CONTROL = 4, - EXFILTRATION = 13, - IMPACT = 14 - } - - /** Technique enum. */ - enum Technique { - TECHNIQUE_UNSPECIFIED = 0, - MASQUERADING = 49, - MATCH_LEGITIMATE_NAME_OR_LOCATION = 50, - BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37, - STARTUP_ITEMS = 38, - NETWORK_SERVICE_DISCOVERY = 32, - PROCESS_DISCOVERY = 56, - COMMAND_AND_SCRIPTING_INTERPRETER = 6, - UNIX_SHELL = 7, - PERMISSION_GROUPS_DISCOVERY = 18, - CLOUD_GROUPS = 19, - APPLICATION_LAYER_PROTOCOL = 45, - DNS = 46, - SOFTWARE_DEPLOYMENT_TOOLS = 47, - VALID_ACCOUNTS = 14, - DEFAULT_ACCOUNTS = 35, - LOCAL_ACCOUNTS = 15, - CLOUD_ACCOUNTS = 16, - PROXY = 9, - EXTERNAL_PROXY = 10, - MULTI_HOP_PROXY = 11, - ACCOUNT_MANIPULATION = 22, - ADDITIONAL_CLOUD_CREDENTIALS = 40, - SSH_AUTHORIZED_KEYS = 23, - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58, - INGRESS_TOOL_TRANSFER = 3, - NATIVE_API = 4, - BRUTE_FORCE = 44, - SHARED_MODULES = 5, - ACCESS_TOKEN_MANIPULATION = 33, - TOKEN_IMPERSONATION_OR_THEFT = 39, - EXPLOIT_PUBLIC_FACING_APPLICATION = 27, - DOMAIN_POLICY_MODIFICATION = 30, - DATA_DESTRUCTION = 29, - SERVICE_STOP = 52, - INHIBIT_SYSTEM_RECOVERY = 36, - RESOURCE_HIJACKING = 8, - NETWORK_DENIAL_OF_SERVICE = 17, - CLOUD_SERVICE_DISCOVERY = 48, - STEAL_APPLICATION_ACCESS_TOKEN = 42, - ACCOUNT_ACCESS_REMOVAL = 51, - STEAL_WEB_SESSION_COOKIE = 25, - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24, - ABUSE_ELEVATION_CONTROL_MECHANISM = 34, - UNSECURED_CREDENTIALS = 13, - MODIFY_AUTHENTICATION_PROCESS = 28, - IMPAIR_DEFENSES = 31, - DISABLE_OR_MODIFY_TOOLS = 55, - EXFILTRATION_OVER_WEB_SERVICE = 20, - EXFILTRATION_TO_CLOUD_STORAGE = 21, - DYNAMIC_RESOLUTION = 12, - LATERAL_TOOL_TRANSFER = 41, - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26, - CREATE_SNAPSHOT = 54, - CLOUD_INFRASTRUCTURE_DISCOVERY = 53, - OBTAIN_CAPABILITIES = 43, - ACTIVE_SCANNING = 1, - SCANNING_IP_BLOCKS = 2, - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - } - } - - /** Properties of a Notebook. */ - interface INotebook { - - /** Notebook name */ - name?: (string|null); - - /** Notebook service */ - service?: (string|null); - - /** Notebook lastAuthor */ - lastAuthor?: (string|null); - - /** Notebook notebookUpdateTime */ - notebookUpdateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a BulkMuteFindingsResponse. */ + interface IBulkMuteFindingsResponse { } - /** Represents a Notebook. */ - class Notebook implements INotebook { + /** Represents a BulkMuteFindingsResponse. */ + class BulkMuteFindingsResponse implements IBulkMuteFindingsResponse { /** - * Constructs a new Notebook. + * Constructs a new BulkMuteFindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.INotebook); - - /** Notebook name. */ - public name: string; - - /** Notebook service. */ - public service: string; - - /** Notebook lastAuthor. */ - public lastAuthor: string; - - /** Notebook notebookUpdateTime. */ - public notebookUpdateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse); /** - * Creates a new Notebook instance using the specified properties. + * Creates a new BulkMuteFindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Notebook instance + * @returns BulkMuteFindingsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.INotebook): google.cloud.securitycenter.v1.Notebook; + public static create(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; /** - * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. - * @param message Notebook message or plain object to encode + * Encodes the specified BulkMuteFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * @param message BulkMuteFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. - * @param message Notebook message or plain object to encode + * Encodes the specified BulkMuteFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * @param message BulkMuteFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Notebook message from the specified reader or buffer. + * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Notebook + * @returns BulkMuteFindingsResponse * @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.cloud.securitycenter.v1.Notebook; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; /** - * Decodes a Notebook message from the specified reader or buffer, length delimited. + * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Notebook + * @returns BulkMuteFindingsResponse * @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.cloud.securitycenter.v1.Notebook; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; /** - * Verifies a Notebook message. + * Verifies a BulkMuteFindingsResponse 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 Notebook message from a plain object. Also converts values to their respective internal types. + * Creates a BulkMuteFindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Notebook + * @returns BulkMuteFindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Notebook; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; /** - * Creates a plain object from a Notebook message. Also converts values to other types if specified. - * @param message Notebook + * Creates a plain object from a BulkMuteFindingsResponse message. Also converts values to other types if specified. + * @param message BulkMuteFindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BulkMuteFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Notebook to JSON. + * Converts this BulkMuteFindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Notebook + * Gets the default type url for BulkMuteFindingsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OrgPolicy. */ - interface IOrgPolicy { + /** Properties of a CreateFindingRequest. */ + interface ICreateFindingRequest { - /** OrgPolicy name */ - name?: (string|null); + /** CreateFindingRequest parent */ + parent?: (string|null); + + /** CreateFindingRequest findingId */ + findingId?: (string|null); + + /** CreateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); } - /** Represents an OrgPolicy. */ - class OrgPolicy implements IOrgPolicy { + /** Represents a CreateFindingRequest. */ + class CreateFindingRequest implements ICreateFindingRequest { /** - * Constructs a new OrgPolicy. + * Constructs a new CreateFindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IOrgPolicy); + constructor(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest); - /** OrgPolicy name. */ - public name: string; + /** CreateFindingRequest parent. */ + public parent: string; + + /** CreateFindingRequest findingId. */ + public findingId: string; + + /** CreateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); /** - * Creates a new OrgPolicy instance using the specified properties. + * Creates a new CreateFindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OrgPolicy instance + * @returns CreateFindingRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IOrgPolicy): google.cloud.securitycenter.v1.OrgPolicy; + public static create(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. - * @param message OrgPolicy message or plain object to encode + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. - * @param message OrgPolicy message or plain object to encode + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * @param message CreateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrgPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OrgPolicy message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OrgPolicy + * @returns CreateFindingRequest * @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.cloud.securitycenter.v1.OrgPolicy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OrgPolicy + * @returns CreateFindingRequest * @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.cloud.securitycenter.v1.OrgPolicy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Verifies an OrgPolicy message. + * Verifies a CreateFindingRequest 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 OrgPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OrgPolicy + * @returns CreateFindingRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrgPolicy; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateFindingRequest; /** - * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. - * @param message OrgPolicy + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * @param message CreateFindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.OrgPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OrgPolicy to JSON. + * Converts this CreateFindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OrgPolicy + * Gets the default type url for CreateFindingRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Process. */ - interface IProcess { - - /** Process name */ - name?: (string|null); - - /** Process binary */ - binary?: (google.cloud.securitycenter.v1.IFile|null); - - /** Process libraries */ - libraries?: (google.cloud.securitycenter.v1.IFile[]|null); - - /** Process script */ - script?: (google.cloud.securitycenter.v1.IFile|null); - - /** Process args */ - args?: (string[]|null); - - /** Process argumentsTruncated */ - argumentsTruncated?: (boolean|null); - - /** Process envVariables */ - envVariables?: (google.cloud.securitycenter.v1.IEnvironmentVariable[]|null); + /** Properties of a CreateMuteConfigRequest. */ + interface ICreateMuteConfigRequest { - /** Process envVariablesTruncated */ - envVariablesTruncated?: (boolean|null); + /** CreateMuteConfigRequest parent */ + parent?: (string|null); - /** Process pid */ - pid?: (number|Long|string|null); + /** CreateMuteConfigRequest muteConfig */ + muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); - /** Process parentPid */ - parentPid?: (number|Long|string|null); + /** CreateMuteConfigRequest muteConfigId */ + muteConfigId?: (string|null); } - /** Represents a Process. */ - class Process implements IProcess { + /** Represents a CreateMuteConfigRequest. */ + class CreateMuteConfigRequest implements ICreateMuteConfigRequest { /** - * Constructs a new Process. + * Constructs a new CreateMuteConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IProcess); - - /** Process name. */ - public name: string; - - /** Process binary. */ - public binary?: (google.cloud.securitycenter.v1.IFile|null); - - /** Process libraries. */ - public libraries: google.cloud.securitycenter.v1.IFile[]; - - /** Process script. */ - public script?: (google.cloud.securitycenter.v1.IFile|null); - - /** Process args. */ - public args: string[]; - - /** Process argumentsTruncated. */ - public argumentsTruncated: boolean; - - /** Process envVariables. */ - public envVariables: google.cloud.securitycenter.v1.IEnvironmentVariable[]; + constructor(properties?: google.cloud.securitycenter.v1.ICreateMuteConfigRequest); - /** Process envVariablesTruncated. */ - public envVariablesTruncated: boolean; + /** CreateMuteConfigRequest parent. */ + public parent: string; - /** Process pid. */ - public pid: (number|Long|string); + /** CreateMuteConfigRequest muteConfig. */ + public muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); - /** Process parentPid. */ - public parentPid: (number|Long|string); + /** CreateMuteConfigRequest muteConfigId. */ + public muteConfigId: string; /** - * Creates a new Process instance using the specified properties. + * Creates a new CreateMuteConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Process instance + * @returns CreateMuteConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IProcess): google.cloud.securitycenter.v1.Process; + public static create(properties?: google.cloud.securitycenter.v1.ICreateMuteConfigRequest): google.cloud.securitycenter.v1.CreateMuteConfigRequest; /** - * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. - * @param message Process message or plain object to encode + * Encodes the specified CreateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. + * @param message CreateMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. - * @param message Process message or plain object to encode + * Encodes the specified CreateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. + * @param message CreateMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Process message from the specified reader or buffer. + * Decodes a CreateMuteConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Process + * @returns CreateMuteConfigRequest * @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.cloud.securitycenter.v1.Process; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateMuteConfigRequest; /** - * Decodes a Process message from the specified reader or buffer, length delimited. + * Decodes a CreateMuteConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Process + * @returns CreateMuteConfigRequest * @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.cloud.securitycenter.v1.Process; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateMuteConfigRequest; /** - * Verifies a Process message. + * Verifies a CreateMuteConfigRequest 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 Process message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Process + * @returns CreateMuteConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Process; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateMuteConfigRequest; /** - * Creates a plain object from a Process message. Also converts values to other types if specified. - * @param message Process + * Creates a plain object from a CreateMuteConfigRequest message. Also converts values to other types if specified. + * @param message CreateMuteConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Process to JSON. + * Converts this CreateMuteConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Process + * Gets the default type url for CreateMuteConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnvironmentVariable. */ - interface IEnvironmentVariable { + /** Properties of a CreateResourceValueConfigRequest. */ + interface ICreateResourceValueConfigRequest { - /** EnvironmentVariable name */ - name?: (string|null); + /** CreateResourceValueConfigRequest parent */ + parent?: (string|null); - /** EnvironmentVariable val */ - val?: (string|null); + /** CreateResourceValueConfigRequest resourceValueConfig */ + resourceValueConfig?: (google.cloud.securitycenter.v1.IResourceValueConfig|null); } - /** Represents an EnvironmentVariable. */ - class EnvironmentVariable implements IEnvironmentVariable { + /** Represents a CreateResourceValueConfigRequest. */ + class CreateResourceValueConfigRequest implements ICreateResourceValueConfigRequest { /** - * Constructs a new EnvironmentVariable. + * Constructs a new CreateResourceValueConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IEnvironmentVariable); + constructor(properties?: google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest); - /** EnvironmentVariable name. */ - public name: string; + /** CreateResourceValueConfigRequest parent. */ + public parent: string; - /** EnvironmentVariable val. */ - public val: string; + /** CreateResourceValueConfigRequest resourceValueConfig. */ + public resourceValueConfig?: (google.cloud.securitycenter.v1.IResourceValueConfig|null); /** - * Creates a new EnvironmentVariable instance using the specified properties. + * Creates a new CreateResourceValueConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EnvironmentVariable instance + * @returns CreateResourceValueConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IEnvironmentVariable): google.cloud.securitycenter.v1.EnvironmentVariable; + public static create(properties?: google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest): google.cloud.securitycenter.v1.CreateResourceValueConfigRequest; /** - * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. - * @param message EnvironmentVariable message or plain object to encode + * Encodes the specified CreateResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.verify|verify} messages. + * @param message CreateResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. - * @param message EnvironmentVariable message or plain object to encode + * Encodes the specified CreateResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.verify|verify} messages. + * @param message CreateResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IEnvironmentVariable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer. + * Decodes a CreateResourceValueConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnvironmentVariable + * @returns CreateResourceValueConfigRequest * @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.cloud.securitycenter.v1.EnvironmentVariable; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateResourceValueConfigRequest; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * Decodes a CreateResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnvironmentVariable + * @returns CreateResourceValueConfigRequest * @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.cloud.securitycenter.v1.EnvironmentVariable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateResourceValueConfigRequest; /** - * Verifies an EnvironmentVariable message. + * Verifies a CreateResourceValueConfigRequest 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 EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * Creates a CreateResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnvironmentVariable + * @returns CreateResourceValueConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.EnvironmentVariable; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateResourceValueConfigRequest; /** - * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. - * @param message EnvironmentVariable + * Creates a plain object from a CreateResourceValueConfigRequest message. Also converts values to other types if specified. + * @param message CreateResourceValueConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.EnvironmentVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateResourceValueConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnvironmentVariable to JSON. + * Converts this CreateResourceValueConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnvironmentVariable + * Gets the default type url for CreateResourceValueConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecurityPosture. */ - interface ISecurityPosture { - - /** SecurityPosture name */ - name?: (string|null); - - /** SecurityPosture revisionId */ - revisionId?: (string|null); - - /** SecurityPosture postureDeploymentResource */ - postureDeploymentResource?: (string|null); - - /** SecurityPosture postureDeployment */ - postureDeployment?: (string|null); - - /** SecurityPosture changedPolicy */ - changedPolicy?: (string|null); - - /** SecurityPosture policySet */ - policySet?: (string|null); - - /** SecurityPosture policy */ - policy?: (string|null); - - /** SecurityPosture policyDriftDetails */ - policyDriftDetails?: (google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails[]|null); - } - - /** Represents a SecurityPosture. */ - class SecurityPosture implements ISecurityPosture { - - /** - * Constructs a new SecurityPosture. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ISecurityPosture); - - /** SecurityPosture name. */ - public name: string; + } - /** SecurityPosture revisionId. */ - public revisionId: string; + /** Properties of a BatchCreateResourceValueConfigsRequest. */ + interface IBatchCreateResourceValueConfigsRequest { - /** SecurityPosture postureDeploymentResource. */ - public postureDeploymentResource: string; + /** BatchCreateResourceValueConfigsRequest parent */ + parent?: (string|null); - /** SecurityPosture postureDeployment. */ - public postureDeployment: string; + /** BatchCreateResourceValueConfigsRequest requests */ + requests?: (google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest[]|null); + } - /** SecurityPosture changedPolicy. */ - public changedPolicy: string; + /** Represents a BatchCreateResourceValueConfigsRequest. */ + class BatchCreateResourceValueConfigsRequest implements IBatchCreateResourceValueConfigsRequest { - /** SecurityPosture policySet. */ - public policySet: string; + /** + * Constructs a new BatchCreateResourceValueConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest); - /** SecurityPosture policy. */ - public policy: string; + /** BatchCreateResourceValueConfigsRequest parent. */ + public parent: string; - /** SecurityPosture policyDriftDetails. */ - public policyDriftDetails: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails[]; + /** BatchCreateResourceValueConfigsRequest requests. */ + public requests: google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest[]; /** - * Creates a new SecurityPosture instance using the specified properties. + * Creates a new BatchCreateResourceValueConfigsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityPosture instance + * @returns BatchCreateResourceValueConfigsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISecurityPosture): google.cloud.securitycenter.v1.SecurityPosture; + public static create(properties?: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest; /** - * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. - * @param message SecurityPosture message or plain object to encode + * Encodes the specified BatchCreateResourceValueConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.verify|verify} messages. + * @param message BatchCreateResourceValueConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. - * @param message SecurityPosture message or plain object to encode + * Encodes the specified BatchCreateResourceValueConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.verify|verify} messages. + * @param message BatchCreateResourceValueConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityPosture, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityPosture message from the specified reader or buffer. + * Decodes a BatchCreateResourceValueConfigsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityPosture + * @returns BatchCreateResourceValueConfigsRequest * @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.cloud.securitycenter.v1.SecurityPosture; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest; /** - * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateResourceValueConfigsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityPosture + * @returns BatchCreateResourceValueConfigsRequest * @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.cloud.securitycenter.v1.SecurityPosture; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest; /** - * Verifies a SecurityPosture message. + * Verifies a BatchCreateResourceValueConfigsRequest 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 SecurityPosture message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateResourceValueConfigsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityPosture + * @returns BatchCreateResourceValueConfigsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPosture; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest; /** - * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. - * @param message SecurityPosture + * Creates a plain object from a BatchCreateResourceValueConfigsRequest message. Also converts values to other types if specified. + * @param message BatchCreateResourceValueConfigsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityPosture, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityPosture to JSON. + * Converts this BatchCreateResourceValueConfigsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityPosture + * Gets the default type url for BatchCreateResourceValueConfigsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SecurityPosture { - - /** Properties of a PolicyDriftDetails. */ - interface IPolicyDriftDetails { - - /** PolicyDriftDetails field */ - field?: (string|null); - - /** PolicyDriftDetails expectedValue */ - expectedValue?: (string|null); - - /** PolicyDriftDetails detectedValue */ - detectedValue?: (string|null); - } - - /** Represents a PolicyDriftDetails. */ - class PolicyDriftDetails implements IPolicyDriftDetails { - - /** - * Constructs a new PolicyDriftDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails); - - /** PolicyDriftDetails field. */ - public field: string; - - /** PolicyDriftDetails expectedValue. */ - public expectedValue: string; - - /** PolicyDriftDetails detectedValue. */ - public detectedValue: string; - - /** - * Creates a new PolicyDriftDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDriftDetails instance - */ - public static create(properties?: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails): google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; - - /** - * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @param message PolicyDriftDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @param message PolicyDriftDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDriftDetails - * @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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; - - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDriftDetails - * @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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; - - /** - * Verifies a PolicyDriftDetails 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 PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDriftDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails; - - /** - * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. - * @param message PolicyDriftDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDriftDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDriftDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ToxicCombination. */ - interface IToxicCombination { - - /** ToxicCombination attackExposureScore */ - attackExposureScore?: (number|null); + /** Properties of a BatchCreateResourceValueConfigsResponse. */ + interface IBatchCreateResourceValueConfigsResponse { - /** ToxicCombination relatedFindings */ - relatedFindings?: (string[]|null); + /** BatchCreateResourceValueConfigsResponse resourceValueConfigs */ + resourceValueConfigs?: (google.cloud.securitycenter.v1.IResourceValueConfig[]|null); } - /** Represents a ToxicCombination. */ - class ToxicCombination implements IToxicCombination { + /** Represents a BatchCreateResourceValueConfigsResponse. */ + class BatchCreateResourceValueConfigsResponse implements IBatchCreateResourceValueConfigsResponse { /** - * Constructs a new ToxicCombination. + * Constructs a new BatchCreateResourceValueConfigsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IToxicCombination); - - /** ToxicCombination attackExposureScore. */ - public attackExposureScore: number; + constructor(properties?: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse); - /** ToxicCombination relatedFindings. */ - public relatedFindings: string[]; + /** BatchCreateResourceValueConfigsResponse resourceValueConfigs. */ + public resourceValueConfigs: google.cloud.securitycenter.v1.IResourceValueConfig[]; /** - * Creates a new ToxicCombination instance using the specified properties. + * Creates a new BatchCreateResourceValueConfigsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ToxicCombination instance + * @returns BatchCreateResourceValueConfigsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IToxicCombination): google.cloud.securitycenter.v1.ToxicCombination; + public static create(properties?: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse; /** - * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. - * @param message ToxicCombination message or plain object to encode + * Encodes the specified BatchCreateResourceValueConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.verify|verify} messages. + * @param message BatchCreateResourceValueConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. - * @param message ToxicCombination message or plain object to encode + * Encodes the specified BatchCreateResourceValueConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.verify|verify} messages. + * @param message BatchCreateResourceValueConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IToxicCombination, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ToxicCombination message from the specified reader or buffer. + * Decodes a BatchCreateResourceValueConfigsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ToxicCombination + * @returns BatchCreateResourceValueConfigsResponse * @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.cloud.securitycenter.v1.ToxicCombination; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse; /** - * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateResourceValueConfigsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ToxicCombination + * @returns BatchCreateResourceValueConfigsResponse * @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.cloud.securitycenter.v1.ToxicCombination; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse; /** - * Verifies a ToxicCombination message. + * Verifies a BatchCreateResourceValueConfigsResponse 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 ToxicCombination message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateResourceValueConfigsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ToxicCombination + * @returns BatchCreateResourceValueConfigsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ToxicCombination; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse; /** - * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. - * @param message ToxicCombination + * Creates a plain object from a BatchCreateResourceValueConfigsResponse message. Also converts values to other types if specified. + * @param message BatchCreateResourceValueConfigsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ToxicCombination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ToxicCombination to JSON. + * Converts this BatchCreateResourceValueConfigsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ToxicCombination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Vulnerability. */ - interface IVulnerability { - - /** Vulnerability cve */ - cve?: (google.cloud.securitycenter.v1.ICve|null); - - /** Vulnerability offendingPackage */ - offendingPackage?: (google.cloud.securitycenter.v1.IPackage|null); + * Gets the default type url for BatchCreateResourceValueConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Vulnerability fixedPackage */ - fixedPackage?: (google.cloud.securitycenter.v1.IPackage|null); + /** Properties of a DeleteResourceValueConfigRequest. */ + interface IDeleteResourceValueConfigRequest { - /** Vulnerability securityBulletin */ - securityBulletin?: (google.cloud.securitycenter.v1.ISecurityBulletin|null); + /** DeleteResourceValueConfigRequest name */ + name?: (string|null); } - /** Represents a Vulnerability. */ - class Vulnerability implements IVulnerability { + /** Represents a DeleteResourceValueConfigRequest. */ + class DeleteResourceValueConfigRequest implements IDeleteResourceValueConfigRequest { /** - * Constructs a new Vulnerability. + * Constructs a new DeleteResourceValueConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IVulnerability); - - /** Vulnerability cve. */ - public cve?: (google.cloud.securitycenter.v1.ICve|null); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest); - /** Vulnerability offendingPackage. */ - public offendingPackage?: (google.cloud.securitycenter.v1.IPackage|null); - - /** Vulnerability fixedPackage. */ - public fixedPackage?: (google.cloud.securitycenter.v1.IPackage|null); - - /** Vulnerability securityBulletin. */ - public securityBulletin?: (google.cloud.securitycenter.v1.ISecurityBulletin|null); + /** DeleteResourceValueConfigRequest name. */ + public name: string; /** - * Creates a new Vulnerability instance using the specified properties. + * Creates a new DeleteResourceValueConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Vulnerability instance + * @returns DeleteResourceValueConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IVulnerability): google.cloud.securitycenter.v1.Vulnerability; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest): google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest; /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode + * Encodes the specified DeleteResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest.verify|verify} messages. + * @param message DeleteResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. - * @param message Vulnerability message or plain object to encode + * Encodes the specified DeleteResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest.verify|verify} messages. + * @param message DeleteResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IVulnerability, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Vulnerability message from the specified reader or buffer. + * Decodes a DeleteResourceValueConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Vulnerability + * @returns DeleteResourceValueConfigRequest * @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.cloud.securitycenter.v1.Vulnerability; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest; /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * Decodes a DeleteResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Vulnerability + * @returns DeleteResourceValueConfigRequest * @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.cloud.securitycenter.v1.Vulnerability; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest; /** - * Verifies a Vulnerability message. + * Verifies a DeleteResourceValueConfigRequest 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 Vulnerability message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Vulnerability + * @returns DeleteResourceValueConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Vulnerability; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest; /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. - * @param message Vulnerability + * Creates a plain object from a DeleteResourceValueConfigRequest message. Also converts values to other types if specified. + * @param message DeleteResourceValueConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Vulnerability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Vulnerability to JSON. + * Converts this DeleteResourceValueConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Vulnerability + * Gets the default type url for DeleteResourceValueConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Cve. */ - interface ICve { - - /** Cve id */ - id?: (string|null); - - /** Cve references */ - references?: (google.cloud.securitycenter.v1.IReference[]|null); - - /** Cve cvssv3 */ - cvssv3?: (google.cloud.securitycenter.v1.ICvssv3|null); - - /** Cve upstreamFixAvailable */ - upstreamFixAvailable?: (boolean|null); - - /** Cve impact */ - impact?: (google.cloud.securitycenter.v1.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v1.Cve.RiskRating|null); - - /** Cve exploitationActivity */ - exploitationActivity?: (google.cloud.securitycenter.v1.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v1.Cve.ExploitationActivity|null); - - /** Cve observedInTheWild */ - observedInTheWild?: (boolean|null); + /** Properties of a GetResourceValueConfigRequest. */ + interface IGetResourceValueConfigRequest { - /** Cve zeroDay */ - zeroDay?: (boolean|null); + /** GetResourceValueConfigRequest name */ + name?: (string|null); } - /** Represents a Cve. */ - class Cve implements ICve { + /** Represents a GetResourceValueConfigRequest. */ + class GetResourceValueConfigRequest implements IGetResourceValueConfigRequest { /** - * Constructs a new Cve. + * Constructs a new GetResourceValueConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICve); - - /** Cve id. */ - public id: string; - - /** Cve references. */ - public references: google.cloud.securitycenter.v1.IReference[]; - - /** Cve cvssv3. */ - public cvssv3?: (google.cloud.securitycenter.v1.ICvssv3|null); - - /** Cve upstreamFixAvailable. */ - public upstreamFixAvailable: boolean; - - /** Cve impact. */ - public impact: (google.cloud.securitycenter.v1.Cve.RiskRating|keyof typeof google.cloud.securitycenter.v1.Cve.RiskRating); - - /** Cve exploitationActivity. */ - public exploitationActivity: (google.cloud.securitycenter.v1.Cve.ExploitationActivity|keyof typeof google.cloud.securitycenter.v1.Cve.ExploitationActivity); - - /** Cve observedInTheWild. */ - public observedInTheWild: boolean; + constructor(properties?: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest); - /** Cve zeroDay. */ - public zeroDay: boolean; + /** GetResourceValueConfigRequest name. */ + public name: string; /** - * Creates a new Cve instance using the specified properties. + * Creates a new GetResourceValueConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Cve instance + * @returns GetResourceValueConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICve): google.cloud.securitycenter.v1.Cve; + public static create(properties?: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest): google.cloud.securitycenter.v1.GetResourceValueConfigRequest; /** - * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. - * @param message Cve message or plain object to encode + * Encodes the specified GetResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetResourceValueConfigRequest.verify|verify} messages. + * @param message GetResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. - * @param message Cve message or plain object to encode + * Encodes the specified GetResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetResourceValueConfigRequest.verify|verify} messages. + * @param message GetResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cve message from the specified reader or buffer. + * Decodes a GetResourceValueConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Cve + * @returns GetResourceValueConfigRequest * @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.cloud.securitycenter.v1.Cve; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetResourceValueConfigRequest; /** - * Decodes a Cve message from the specified reader or buffer, length delimited. + * Decodes a GetResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cve + * @returns GetResourceValueConfigRequest * @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.cloud.securitycenter.v1.Cve; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetResourceValueConfigRequest; /** - * Verifies a Cve message. + * Verifies a GetResourceValueConfigRequest 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 Cve message from a plain object. Also converts values to their respective internal types. + * Creates a GetResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cve + * @returns GetResourceValueConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Cve; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetResourceValueConfigRequest; /** - * Creates a plain object from a Cve message. Also converts values to other types if specified. - * @param message Cve + * Creates a plain object from a GetResourceValueConfigRequest message. Also converts values to other types if specified. + * @param message GetResourceValueConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Cve, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetResourceValueConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cve to JSON. + * Converts this GetResourceValueConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cve + * Gets the default type url for GetResourceValueConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Cve { - - /** RiskRating enum. */ - enum RiskRating { - RISK_RATING_UNSPECIFIED = 0, - LOW = 1, - MEDIUM = 2, - HIGH = 3, - CRITICAL = 4 - } - - /** ExploitationActivity enum. */ - enum ExploitationActivity { - EXPLOITATION_ACTIVITY_UNSPECIFIED = 0, - WIDE = 1, - CONFIRMED = 2, - AVAILABLE = 3, - ANTICIPATED = 4, - NO_KNOWN = 5 - } - } + /** Properties of a ListResourceValueConfigsRequest. */ + interface IListResourceValueConfigsRequest { - /** Properties of a Reference. */ - interface IReference { + /** ListResourceValueConfigsRequest parent */ + parent?: (string|null); - /** Reference source */ - source?: (string|null); + /** ListResourceValueConfigsRequest pageSize */ + pageSize?: (number|null); - /** Reference uri */ - uri?: (string|null); + /** ListResourceValueConfigsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a Reference. */ - class Reference implements IReference { + /** Represents a ListResourceValueConfigsRequest. */ + class ListResourceValueConfigsRequest implements IListResourceValueConfigsRequest { /** - * Constructs a new Reference. + * Constructs a new ListResourceValueConfigsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IReference); + constructor(properties?: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest); - /** Reference source. */ - public source: string; + /** ListResourceValueConfigsRequest parent. */ + public parent: string; - /** Reference uri. */ - public uri: string; + /** ListResourceValueConfigsRequest pageSize. */ + public pageSize: number; + + /** ListResourceValueConfigsRequest pageToken. */ + public pageToken: string; /** - * Creates a new Reference instance using the specified properties. + * Creates a new ListResourceValueConfigsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Reference instance + * @returns ListResourceValueConfigsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IReference): google.cloud.securitycenter.v1.Reference; + public static create(properties?: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest): google.cloud.securitycenter.v1.ListResourceValueConfigsRequest; /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode + * Encodes the specified ListResourceValueConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsRequest.verify|verify} messages. + * @param message ListResourceValueConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. - * @param message Reference message or plain object to encode + * Encodes the specified ListResourceValueConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsRequest.verify|verify} messages. + * @param message ListResourceValueConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Reference message from the specified reader or buffer. + * Decodes a ListResourceValueConfigsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Reference + * @returns ListResourceValueConfigsRequest * @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.cloud.securitycenter.v1.Reference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListResourceValueConfigsRequest; /** - * Decodes a Reference message from the specified reader or buffer, length delimited. + * Decodes a ListResourceValueConfigsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Reference + * @returns ListResourceValueConfigsRequest * @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.cloud.securitycenter.v1.Reference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListResourceValueConfigsRequest; /** - * Verifies a Reference message. + * Verifies a ListResourceValueConfigsRequest 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 Reference message from a plain object. Also converts values to their respective internal types. + * Creates a ListResourceValueConfigsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Reference + * @returns ListResourceValueConfigsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Reference; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListResourceValueConfigsRequest; /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. - * @param message Reference + * Creates a plain object from a ListResourceValueConfigsRequest message. Also converts values to other types if specified. + * @param message ListResourceValueConfigsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Reference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListResourceValueConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Reference to JSON. + * Converts this ListResourceValueConfigsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Reference + * Gets the default type url for ListResourceValueConfigsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Cvssv3. */ - interface ICvssv3 { - - /** Cvssv3 baseScore */ - baseScore?: (number|null); - - /** Cvssv3 attackVector */ - attackVector?: (google.cloud.securitycenter.v1.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackVector|null); - - /** Cvssv3 attackComplexity */ - attackComplexity?: (google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|null); - - /** Cvssv3 privilegesRequired */ - privilegesRequired?: (google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|null); - - /** Cvssv3 userInteraction */ - userInteraction?: (google.cloud.securitycenter.v1.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v1.Cvssv3.UserInteraction|null); - - /** Cvssv3 scope */ - scope?: (google.cloud.securitycenter.v1.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Scope|null); - - /** Cvssv3 confidentialityImpact */ - confidentialityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + /** Properties of a ListResourceValueConfigsResponse. */ + interface IListResourceValueConfigsResponse { - /** Cvssv3 integrityImpact */ - integrityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + /** ListResourceValueConfigsResponse resourceValueConfigs */ + resourceValueConfigs?: (google.cloud.securitycenter.v1.IResourceValueConfig[]|null); - /** Cvssv3 availabilityImpact */ - availabilityImpact?: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact|null); + /** ListResourceValueConfigsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a Cvssv3. */ - class Cvssv3 implements ICvssv3 { + /** Represents a ListResourceValueConfigsResponse. */ + class ListResourceValueConfigsResponse implements IListResourceValueConfigsResponse { /** - * Constructs a new Cvssv3. + * Constructs a new ListResourceValueConfigsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICvssv3); - - /** Cvssv3 baseScore. */ - public baseScore: number; - - /** Cvssv3 attackVector. */ - public attackVector: (google.cloud.securitycenter.v1.Cvssv3.AttackVector|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackVector); - - /** Cvssv3 attackComplexity. */ - public attackComplexity: (google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|keyof typeof google.cloud.securitycenter.v1.Cvssv3.AttackComplexity); - - /** Cvssv3 privilegesRequired. */ - public privilegesRequired: (google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|keyof typeof google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired); - - /** Cvssv3 userInteraction. */ - public userInteraction: (google.cloud.securitycenter.v1.Cvssv3.UserInteraction|keyof typeof google.cloud.securitycenter.v1.Cvssv3.UserInteraction); - - /** Cvssv3 scope. */ - public scope: (google.cloud.securitycenter.v1.Cvssv3.Scope|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Scope); - - /** Cvssv3 confidentialityImpact. */ - public confidentialityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + constructor(properties?: google.cloud.securitycenter.v1.IListResourceValueConfigsResponse); - /** Cvssv3 integrityImpact. */ - public integrityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + /** ListResourceValueConfigsResponse resourceValueConfigs. */ + public resourceValueConfigs: google.cloud.securitycenter.v1.IResourceValueConfig[]; - /** Cvssv3 availabilityImpact. */ - public availabilityImpact: (google.cloud.securitycenter.v1.Cvssv3.Impact|keyof typeof google.cloud.securitycenter.v1.Cvssv3.Impact); + /** ListResourceValueConfigsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Cvssv3 instance using the specified properties. + * Creates a new ListResourceValueConfigsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Cvssv3 instance + * @returns ListResourceValueConfigsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICvssv3): google.cloud.securitycenter.v1.Cvssv3; + public static create(properties?: google.cloud.securitycenter.v1.IListResourceValueConfigsResponse): google.cloud.securitycenter.v1.ListResourceValueConfigsResponse; /** - * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. - * @param message Cvssv3 message or plain object to encode + * Encodes the specified ListResourceValueConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.verify|verify} messages. + * @param message ListResourceValueConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListResourceValueConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. - * @param message Cvssv3 message or plain object to encode + * Encodes the specified ListResourceValueConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.verify|verify} messages. + * @param message ListResourceValueConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICvssv3, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListResourceValueConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Cvssv3 message from the specified reader or buffer. + * Decodes a ListResourceValueConfigsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Cvssv3 + * @returns ListResourceValueConfigsResponse * @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.cloud.securitycenter.v1.Cvssv3; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListResourceValueConfigsResponse; /** - * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. + * Decodes a ListResourceValueConfigsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Cvssv3 + * @returns ListResourceValueConfigsResponse * @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.cloud.securitycenter.v1.Cvssv3; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListResourceValueConfigsResponse; /** - * Verifies a Cvssv3 message. + * Verifies a ListResourceValueConfigsResponse 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 Cvssv3 message from a plain object. Also converts values to their respective internal types. + * Creates a ListResourceValueConfigsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Cvssv3 + * @returns ListResourceValueConfigsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Cvssv3; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListResourceValueConfigsResponse; /** - * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. - * @param message Cvssv3 + * Creates a plain object from a ListResourceValueConfigsResponse message. Also converts values to other types if specified. + * @param message ListResourceValueConfigsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Cvssv3, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListResourceValueConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Cvssv3 to JSON. + * Converts this ListResourceValueConfigsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Cvssv3 + * Gets the default type url for ListResourceValueConfigsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Cvssv3 { - - /** AttackVector enum. */ - enum AttackVector { - ATTACK_VECTOR_UNSPECIFIED = 0, - ATTACK_VECTOR_NETWORK = 1, - ATTACK_VECTOR_ADJACENT = 2, - ATTACK_VECTOR_LOCAL = 3, - ATTACK_VECTOR_PHYSICAL = 4 - } - - /** AttackComplexity enum. */ - enum AttackComplexity { - ATTACK_COMPLEXITY_UNSPECIFIED = 0, - ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 - } - - /** PrivilegesRequired enum. */ - enum PrivilegesRequired { - PRIVILEGES_REQUIRED_UNSPECIFIED = 0, - PRIVILEGES_REQUIRED_NONE = 1, - PRIVILEGES_REQUIRED_LOW = 2, - PRIVILEGES_REQUIRED_HIGH = 3 - } - - /** UserInteraction enum. */ - enum UserInteraction { - USER_INTERACTION_UNSPECIFIED = 0, - USER_INTERACTION_NONE = 1, - USER_INTERACTION_REQUIRED = 2 - } - - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - SCOPE_UNCHANGED = 1, - SCOPE_CHANGED = 2 - } - - /** Impact enum. */ - enum Impact { - IMPACT_UNSPECIFIED = 0, - IMPACT_HIGH = 1, - IMPACT_LOW = 2, - IMPACT_NONE = 3 - } - } - - /** Properties of a Package. */ - interface IPackage { - - /** Package packageName */ - packageName?: (string|null); - - /** Package cpeUri */ - cpeUri?: (string|null); + /** Properties of an UpdateResourceValueConfigRequest. */ + interface IUpdateResourceValueConfigRequest { - /** Package packageType */ - packageType?: (string|null); + /** UpdateResourceValueConfigRequest resourceValueConfig */ + resourceValueConfig?: (google.cloud.securitycenter.v1.IResourceValueConfig|null); - /** Package packageVersion */ - packageVersion?: (string|null); + /** UpdateResourceValueConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Package. */ - class Package implements IPackage { + /** Represents an UpdateResourceValueConfigRequest. */ + class UpdateResourceValueConfigRequest implements IUpdateResourceValueConfigRequest { /** - * Constructs a new Package. + * Constructs a new UpdateResourceValueConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IPackage); - - /** Package packageName. */ - public packageName: string; - - /** Package cpeUri. */ - public cpeUri: string; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest); - /** Package packageType. */ - public packageType: string; + /** UpdateResourceValueConfigRequest resourceValueConfig. */ + public resourceValueConfig?: (google.cloud.securitycenter.v1.IResourceValueConfig|null); - /** Package packageVersion. */ - public packageVersion: string; + /** UpdateResourceValueConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Package instance using the specified properties. + * Creates a new UpdateResourceValueConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Package instance + * @returns UpdateResourceValueConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IPackage): google.cloud.securitycenter.v1.Package; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest): google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest; /** - * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified UpdateResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.verify|verify} messages. + * @param message UpdateResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. - * @param message Package message or plain object to encode + * Encodes the specified UpdateResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.verify|verify} messages. + * @param message UpdateResourceValueConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IPackage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Package message from the specified reader or buffer. + * Decodes an UpdateResourceValueConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Package + * @returns UpdateResourceValueConfigRequest * @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.cloud.securitycenter.v1.Package; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest; /** - * Decodes a Package message from the specified reader or buffer, length delimited. + * Decodes an UpdateResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Package + * @returns UpdateResourceValueConfigRequest * @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.cloud.securitycenter.v1.Package; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest; /** - * Verifies a Package message. + * Verifies an UpdateResourceValueConfigRequest 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 Package message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Package + * @returns UpdateResourceValueConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Package; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest; /** - * Creates a plain object from a Package message. Also converts values to other types if specified. - * @param message Package + * Creates a plain object from an UpdateResourceValueConfigRequest message. Also converts values to other types if specified. + * @param message UpdateResourceValueConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Package, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Package to JSON. + * Converts this UpdateResourceValueConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Package + * Gets the default type url for UpdateResourceValueConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecurityBulletin. */ - interface ISecurityBulletin { + /** Properties of a CreateNotificationConfigRequest. */ + interface ICreateNotificationConfigRequest { - /** SecurityBulletin bulletinId */ - bulletinId?: (string|null); + /** CreateNotificationConfigRequest parent */ + parent?: (string|null); - /** SecurityBulletin submissionTime */ - submissionTime?: (google.protobuf.ITimestamp|null); + /** CreateNotificationConfigRequest configId */ + configId?: (string|null); - /** SecurityBulletin suggestedUpgradeVersion */ - suggestedUpgradeVersion?: (string|null); + /** CreateNotificationConfigRequest notificationConfig */ + notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); } - /** Represents a SecurityBulletin. */ - class SecurityBulletin implements ISecurityBulletin { + /** Represents a CreateNotificationConfigRequest. */ + class CreateNotificationConfigRequest implements ICreateNotificationConfigRequest { /** - * Constructs a new SecurityBulletin. + * Constructs a new CreateNotificationConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISecurityBulletin); + constructor(properties?: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest); - /** SecurityBulletin bulletinId. */ - public bulletinId: string; + /** CreateNotificationConfigRequest parent. */ + public parent: string; - /** SecurityBulletin submissionTime. */ - public submissionTime?: (google.protobuf.ITimestamp|null); + /** CreateNotificationConfigRequest configId. */ + public configId: string; - /** SecurityBulletin suggestedUpgradeVersion. */ - public suggestedUpgradeVersion: string; + /** CreateNotificationConfigRequest notificationConfig. */ + public notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); /** - * Creates a new SecurityBulletin instance using the specified properties. + * Creates a new CreateNotificationConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityBulletin instance + * @returns CreateNotificationConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISecurityBulletin): google.cloud.securitycenter.v1.SecurityBulletin; + public static create(properties?: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; /** - * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. - * @param message SecurityBulletin message or plain object to encode + * Encodes the specified CreateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. + * @param message CreateNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. - * @param message SecurityBulletin message or plain object to encode + * Encodes the specified CreateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. + * @param message CreateNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityBulletin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityBulletin message from the specified reader or buffer. + * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityBulletin + * @returns CreateNotificationConfigRequest * @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.cloud.securitycenter.v1.SecurityBulletin; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; /** - * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityBulletin + * @returns CreateNotificationConfigRequest * @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.cloud.securitycenter.v1.SecurityBulletin; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; /** - * Verifies a SecurityBulletin message. + * Verifies a CreateNotificationConfigRequest 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 SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * Creates a CreateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityBulletin + * @returns CreateNotificationConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityBulletin; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; /** - * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. - * @param message SecurityBulletin + * Creates a plain object from a CreateNotificationConfigRequest message. Also converts values to other types if specified. + * @param message CreateNotificationConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityBulletin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityBulletin to JSON. + * Converts this CreateNotificationConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityBulletin + * Gets the default type url for CreateNotificationConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MuteConfig. */ - interface IMuteConfig { - - /** MuteConfig name */ - name?: (string|null); - - /** MuteConfig displayName */ - displayName?: (string|null); - - /** MuteConfig description */ - description?: (string|null); - - /** MuteConfig filter */ - filter?: (string|null); - - /** MuteConfig createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. */ + interface ICreateSecurityHealthAnalyticsCustomModuleRequest { - /** MuteConfig updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** CreateSecurityHealthAnalyticsCustomModuleRequest parent */ + parent?: (string|null); - /** MuteConfig mostRecentEditor */ - mostRecentEditor?: (string|null); + /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ + securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); } - /** Represents a MuteConfig. */ - class MuteConfig implements IMuteConfig { + /** Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. */ + class CreateSecurityHealthAnalyticsCustomModuleRequest implements ICreateSecurityHealthAnalyticsCustomModuleRequest { /** - * Constructs a new MuteConfig. + * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IMuteConfig); - - /** MuteConfig name. */ - public name: string; - - /** MuteConfig displayName. */ - public displayName: string; - - /** MuteConfig description. */ - public description: string; - - /** MuteConfig filter. */ - public filter: string; - - /** MuteConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest); - /** MuteConfig updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** CreateSecurityHealthAnalyticsCustomModuleRequest parent. */ + public parent: string; - /** MuteConfig mostRecentEditor. */ - public mostRecentEditor: string; + /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ + public securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); /** - * Creates a new MuteConfig instance using the specified properties. + * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MuteConfig instance + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IMuteConfig): google.cloud.securitycenter.v1.MuteConfig; + public static create(properties?: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; /** - * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. - * @param message MuteConfig message or plain object to encode + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. - * @param message MuteConfig message or plain object to encode + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IMuteConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MuteConfig message from the specified reader or buffer. + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MuteConfig + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.MuteConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; /** - * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MuteConfig + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.MuteConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; /** - * Verifies a MuteConfig message. + * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest 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 MuteConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MuteConfig + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.MuteConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; /** - * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. - * @param message MuteConfig + * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.MuteConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MuteConfig to JSON. + * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MuteConfig + * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NotificationConfig. */ - interface INotificationConfig { - - /** NotificationConfig name */ - name?: (string|null); - - /** NotificationConfig description */ - description?: (string|null); - - /** NotificationConfig pubsubTopic */ - pubsubTopic?: (string|null); + /** Properties of a CreateSourceRequest. */ + interface ICreateSourceRequest { - /** NotificationConfig serviceAccount */ - serviceAccount?: (string|null); + /** CreateSourceRequest parent */ + parent?: (string|null); - /** NotificationConfig streamingConfig */ - streamingConfig?: (google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null); + /** CreateSourceRequest source */ + source?: (google.cloud.securitycenter.v1.ISource|null); } - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { + /** Represents a CreateSourceRequest. */ + class CreateSourceRequest implements ICreateSourceRequest { /** - * Constructs a new NotificationConfig. + * Constructs a new CreateSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.INotificationConfig); - - /** NotificationConfig name. */ - public name: string; - - /** NotificationConfig description. */ - public description: string; - - /** NotificationConfig pubsubTopic. */ - public pubsubTopic: string; - - /** NotificationConfig serviceAccount. */ - public serviceAccount: string; + constructor(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest); - /** NotificationConfig streamingConfig. */ - public streamingConfig?: (google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null); + /** CreateSourceRequest parent. */ + public parent: string; - /** NotificationConfig notifyConfig. */ - public notifyConfig?: "streamingConfig"; + /** CreateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1.ISource|null); /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationConfig instance + * @returns CreateSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.INotificationConfig): google.cloud.securitycenter.v1.NotificationConfig; + public static create(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * @param message CreateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationConfig + * @returns CreateSourceRequest * @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.cloud.securitycenter.v1.NotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationConfig + * @returns CreateSourceRequest * @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.cloud.securitycenter.v1.NotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Verifies a NotificationConfig message. + * Verifies a CreateSourceRequest 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 NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationConfig + * @returns CreateSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSourceRequest; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. + * @param message CreateSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationConfig to JSON. + * Converts this CreateSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NotificationConfig + * Gets the default type url for CreateSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NotificationConfig { - - /** Properties of a StreamingConfig. */ - interface IStreamingConfig { - - /** StreamingConfig filter */ - filter?: (string|null); - } - - /** Represents a StreamingConfig. */ - class StreamingConfig implements IStreamingConfig { - - /** - * Constructs a new StreamingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig); - - /** StreamingConfig filter. */ - public filter: string; - - /** - * Creates a new StreamingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamingConfig instance - */ - public static create(properties?: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig): google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; - - /** - * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. - * @param message StreamingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. - * @param message StreamingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamingConfig - * @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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; - - /** - * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamingConfig - * @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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; - - /** - * Verifies a StreamingConfig 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 StreamingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig; - - /** - * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. - * @param message StreamingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StreamingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NotificationMessage. */ - interface INotificationMessage { - - /** NotificationMessage notificationConfigName */ - notificationConfigName?: (string|null); - - /** NotificationMessage finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** Properties of a DeleteMuteConfigRequest. */ + interface IDeleteMuteConfigRequest { - /** NotificationMessage resource */ - resource?: (google.cloud.securitycenter.v1.IResource|null); + /** DeleteMuteConfigRequest name */ + name?: (string|null); } - /** Represents a NotificationMessage. */ - class NotificationMessage implements INotificationMessage { + /** Represents a DeleteMuteConfigRequest. */ + class DeleteMuteConfigRequest implements IDeleteMuteConfigRequest { /** - * Constructs a new NotificationMessage. + * Constructs a new DeleteMuteConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.INotificationMessage); - - /** NotificationMessage notificationConfigName. */ - public notificationConfigName: string; - - /** NotificationMessage finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); - - /** NotificationMessage resource. */ - public resource?: (google.cloud.securitycenter.v1.IResource|null); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest); - /** NotificationMessage event. */ - public event?: "finding"; + /** DeleteMuteConfigRequest name. */ + public name: string; /** - * Creates a new NotificationMessage instance using the specified properties. + * Creates a new DeleteMuteConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationMessage instance + * @returns DeleteMuteConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.INotificationMessage): google.cloud.securitycenter.v1.NotificationMessage; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; /** - * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. - * @param message NotificationMessage message or plain object to encode + * Encodes the specified DeleteMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * @param message DeleteMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. - * @param message NotificationMessage message or plain object to encode + * Encodes the specified DeleteMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * @param message DeleteMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.INotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationMessage message from the specified reader or buffer. + * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationMessage + * @returns DeleteMuteConfigRequest * @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.cloud.securitycenter.v1.NotificationMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; /** - * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationMessage + * @returns DeleteMuteConfigRequest * @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.cloud.securitycenter.v1.NotificationMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; /** - * Verifies a NotificationMessage message. + * Verifies a DeleteMuteConfigRequest 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 NotificationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMuteConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationMessage + * @returns DeleteMuteConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.NotificationMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; /** - * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. - * @param message NotificationMessage + * Creates a plain object from a DeleteMuteConfigRequest message. Also converts values to other types if specified. + * @param message DeleteMuteConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.NotificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.DeleteMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationMessage to JSON. + * Converts this DeleteMuteConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NotificationMessage + * Gets the default type url for DeleteMuteConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Resource. */ - interface IResource { + /** Properties of a DeleteNotificationConfigRequest. */ + interface IDeleteNotificationConfigRequest { - /** Resource name */ + /** DeleteNotificationConfigRequest name */ name?: (string|null); - - /** Resource displayName */ - displayName?: (string|null); - - /** Resource type */ - type?: (string|null); - - /** Resource project */ - project?: (string|null); - - /** Resource projectDisplayName */ - projectDisplayName?: (string|null); - - /** Resource parent */ - parent?: (string|null); - - /** Resource parentDisplayName */ - parentDisplayName?: (string|null); - - /** Resource folders */ - folders?: (google.cloud.securitycenter.v1.IFolder[]|null); } - /** Represents a Resource. */ - class Resource implements IResource { + /** Represents a DeleteNotificationConfigRequest. */ + class DeleteNotificationConfigRequest implements IDeleteNotificationConfigRequest { /** - * Constructs a new Resource. + * Constructs a new DeleteNotificationConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IResource); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest); - /** Resource name. */ + /** DeleteNotificationConfigRequest name. */ public name: string; - /** Resource displayName. */ - public displayName: string; - - /** Resource type. */ - public type: string; - - /** Resource project. */ - public project: string; - - /** Resource projectDisplayName. */ - public projectDisplayName: string; - - /** Resource parent. */ - public parent: string; - - /** Resource parentDisplayName. */ - public parentDisplayName: string; - - /** Resource folders. */ - public folders: google.cloud.securitycenter.v1.IFolder[]; - /** - * Creates a new Resource instance using the specified properties. + * Creates a new DeleteNotificationConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Resource instance + * @returns DeleteNotificationConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IResource): google.cloud.securitycenter.v1.Resource; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified DeleteNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. + * @param message DeleteNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode + * Encodes the specified DeleteNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. + * @param message DeleteNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Resource + * @returns DeleteNotificationConfigRequest * @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.cloud.securitycenter.v1.Resource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Resource + * @returns DeleteNotificationConfigRequest * @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.cloud.securitycenter.v1.Resource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; /** - * Verifies a Resource message. + * Verifies a DeleteNotificationConfigRequest 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 Resource message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Resource + * @returns DeleteNotificationConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Resource; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource + * Creates a plain object from a DeleteNotificationConfigRequest message. Also converts values to other types if specified. + * @param message DeleteNotificationConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.DeleteNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Resource to JSON. + * Converts this DeleteNotificationConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Resource + * Gets the default type url for DeleteNotificationConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OrganizationSettings. */ - interface IOrganizationSettings { + /** Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ + interface IDeleteSecurityHealthAnalyticsCustomModuleRequest { - /** OrganizationSettings name */ + /** DeleteSecurityHealthAnalyticsCustomModuleRequest name */ name?: (string|null); - - /** OrganizationSettings enableAssetDiscovery */ - enableAssetDiscovery?: (boolean|null); - - /** OrganizationSettings assetDiscoveryConfig */ - assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); } - /** Represents an OrganizationSettings. */ - class OrganizationSettings implements IOrganizationSettings { + /** Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ + class DeleteSecurityHealthAnalyticsCustomModuleRequest implements IDeleteSecurityHealthAnalyticsCustomModuleRequest { /** - * Constructs a new OrganizationSettings. + * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IOrganizationSettings); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest); - /** OrganizationSettings name. */ + /** DeleteSecurityHealthAnalyticsCustomModuleRequest name. */ public name: string; - /** OrganizationSettings enableAssetDiscovery. */ - public enableAssetDiscovery: boolean; - - /** OrganizationSettings assetDiscoveryConfig. */ - public assetDiscoveryConfig?: (google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null); - /** - * Creates a new OrganizationSettings instance using the specified properties. + * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OrganizationSettings instance + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IOrganizationSettings): google.cloud.securitycenter.v1.OrganizationSettings; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. - * @param message OrganizationSettings message or plain object to encode + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IOrganizationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OrganizationSettings message from the specified reader or buffer. + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OrganizationSettings + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.OrganizationSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OrganizationSettings + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.OrganizationSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; /** - * Verifies an OrganizationSettings message. + * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest 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 OrganizationSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OrganizationSettings + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. - * @param message OrganizationSettings + * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrganizationSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OrganizationSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OrganizationSettings { - - /** Properties of an AssetDiscoveryConfig. */ - interface IAssetDiscoveryConfig { - - /** AssetDiscoveryConfig projectIds */ - projectIds?: (string[]|null); - - /** AssetDiscoveryConfig inclusionMode */ - inclusionMode?: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|keyof typeof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null); - - /** AssetDiscoveryConfig folderIds */ - folderIds?: (string[]|null); - } - - /** Represents an AssetDiscoveryConfig. */ - class AssetDiscoveryConfig implements IAssetDiscoveryConfig { - - /** - * Constructs a new AssetDiscoveryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig); - - /** AssetDiscoveryConfig projectIds. */ - public projectIds: string[]; - - /** AssetDiscoveryConfig inclusionMode. */ - public inclusionMode: (google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|keyof typeof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode); - - /** AssetDiscoveryConfig folderIds. */ - public folderIds: string[]; - - /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AssetDiscoveryConfig instance - */ - public static create(properties?: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - - /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @param message AssetDiscoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssetDiscoveryConfig - * @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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssetDiscoveryConfig - * @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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - - /** - * Verifies an AssetDiscoveryConfig 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 AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssetDiscoveryConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig; - - /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. - * @param message AssetDiscoveryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssetDiscoveryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssetDiscoveryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AssetDiscoveryConfig { - - /** InclusionMode enum. */ - enum InclusionMode { - INCLUSION_MODE_UNSPECIFIED = 0, - INCLUDE_ONLY = 1, - EXCLUDE = 2 - } - } - } + public static toObject(message: google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a RunAssetDiscoveryResponse. */ - interface IRunAssetDiscoveryResponse { + /** + * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RunAssetDiscoveryResponse state */ - state?: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|keyof typeof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null); + /** + * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** RunAssetDiscoveryResponse duration */ - duration?: (google.protobuf.IDuration|null); + /** Properties of a GetBigQueryExportRequest. */ + interface IGetBigQueryExportRequest { + + /** GetBigQueryExportRequest name */ + name?: (string|null); } - /** Represents a RunAssetDiscoveryResponse. */ - class RunAssetDiscoveryResponse implements IRunAssetDiscoveryResponse { + /** Represents a GetBigQueryExportRequest. */ + class GetBigQueryExportRequest implements IGetBigQueryExportRequest { /** - * Constructs a new RunAssetDiscoveryResponse. + * Constructs a new GetBigQueryExportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse); - - /** RunAssetDiscoveryResponse state. */ - public state: (google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|keyof typeof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State); + constructor(properties?: google.cloud.securitycenter.v1.IGetBigQueryExportRequest); - /** RunAssetDiscoveryResponse duration. */ - public duration?: (google.protobuf.IDuration|null); + /** GetBigQueryExportRequest name. */ + public name: string; /** - * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * Creates a new GetBigQueryExportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RunAssetDiscoveryResponse instance + * @returns GetBigQueryExportRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static create(properties?: google.cloud.securitycenter.v1.IGetBigQueryExportRequest): google.cloud.securitycenter.v1.GetBigQueryExportRequest; /** - * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. - * @param message RunAssetDiscoveryResponse message or plain object to encode + * Encodes the specified GetBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * @param message GetBigQueryExportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. - * @param message RunAssetDiscoveryResponse message or plain object to encode + * Encodes the specified GetBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * @param message GetBigQueryExportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * Decodes a GetBigQueryExportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunAssetDiscoveryResponse + * @returns GetBigQueryExportRequest * @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.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetBigQueryExportRequest; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBigQueryExportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunAssetDiscoveryResponse + * @returns GetBigQueryExportRequest * @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.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetBigQueryExportRequest; /** - * Verifies a RunAssetDiscoveryResponse message. + * Verifies a GetBigQueryExportRequest 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 RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunAssetDiscoveryResponse + * @returns GetBigQueryExportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetBigQueryExportRequest; /** - * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. - * @param message RunAssetDiscoveryResponse + * Creates a plain object from a GetBigQueryExportRequest message. Also converts values to other types if specified. + * @param message GetBigQueryExportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunAssetDiscoveryResponse to JSON. + * Converts this GetBigQueryExportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RunAssetDiscoveryResponse + * Gets the default type url for GetBigQueryExportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace RunAssetDiscoveryResponse { + /** Properties of a GetMuteConfigRequest. */ + interface IGetMuteConfigRequest { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - COMPLETED = 1, - SUPERSEDED = 2, - TERMINATED = 3 - } + /** GetMuteConfigRequest name */ + name?: (string|null); } - /** Properties of a SecurityHealthAnalyticsCustomModule. */ - interface ISecurityHealthAnalyticsCustomModule { + /** Represents a GetMuteConfigRequest. */ + class GetMuteConfigRequest implements IGetMuteConfigRequest { - /** SecurityHealthAnalyticsCustomModule name */ - name?: (string|null); + /** + * Constructs a new GetMuteConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IGetMuteConfigRequest); - /** SecurityHealthAnalyticsCustomModule displayName */ - displayName?: (string|null); + /** GetMuteConfigRequest name. */ + public name: string; - /** SecurityHealthAnalyticsCustomModule enablementState */ - enablementState?: (google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null); + /** + * Creates a new GetMuteConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMuteConfigRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IGetMuteConfigRequest): google.cloud.securitycenter.v1.GetMuteConfigRequest; - /** SecurityHealthAnalyticsCustomModule updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified GetMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * @param message GetMuteConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IGetMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** SecurityHealthAnalyticsCustomModule lastEditor */ - lastEditor?: (string|null); + /** + * Encodes the specified GetMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * @param message GetMuteConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** SecurityHealthAnalyticsCustomModule ancestorModule */ - ancestorModule?: (string|null); + /** + * Decodes a GetMuteConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMuteConfigRequest + * @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.cloud.securitycenter.v1.GetMuteConfigRequest; - /** SecurityHealthAnalyticsCustomModule customConfig */ - customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - } + /** + * Decodes a GetMuteConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMuteConfigRequest + * @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.cloud.securitycenter.v1.GetMuteConfigRequest; - /** Represents a SecurityHealthAnalyticsCustomModule. */ - class SecurityHealthAnalyticsCustomModule implements ISecurityHealthAnalyticsCustomModule { + /** + * Verifies a GetMuteConfigRequest 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); /** - * Constructs a new SecurityHealthAnalyticsCustomModule. - * @param [properties] Properties to set + * Creates a GetMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMuteConfigRequest */ - constructor(properties?: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule); + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetMuteConfigRequest; - /** SecurityHealthAnalyticsCustomModule name. */ - public name: string; + /** + * Creates a plain object from a GetMuteConfigRequest message. Also converts values to other types if specified. + * @param message GetMuteConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.GetMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SecurityHealthAnalyticsCustomModule displayName. */ - public displayName: string; + /** + * Converts this GetMuteConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SecurityHealthAnalyticsCustomModule enablementState. */ - public enablementState: (google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState); + /** + * Gets the default type url for GetMuteConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SecurityHealthAnalyticsCustomModule updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of a GetNotificationConfigRequest. */ + interface IGetNotificationConfigRequest { - /** SecurityHealthAnalyticsCustomModule lastEditor. */ - public lastEditor: string; + /** GetNotificationConfigRequest name */ + name?: (string|null); + } - /** SecurityHealthAnalyticsCustomModule ancestorModule. */ - public ancestorModule: string; + /** Represents a GetNotificationConfigRequest. */ + class GetNotificationConfigRequest implements IGetNotificationConfigRequest { - /** SecurityHealthAnalyticsCustomModule customConfig. */ - public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); + /** + * Constructs a new GetNotificationConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IGetNotificationConfigRequest); + + /** GetNotificationConfigRequest name. */ + public name: string; /** - * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * Creates a new GetNotificationConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityHealthAnalyticsCustomModule instance + * @returns GetNotificationConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule): google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + public static create(properties?: google.cloud.securitycenter.v1.IGetNotificationConfigRequest): google.cloud.securitycenter.v1.GetNotificationConfigRequest; /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * Encodes the specified GetNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * @param message GetNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * Encodes the specified GetNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * @param message GetNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * Decodes a GetNotificationConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityHealthAnalyticsCustomModule + * @returns GetNotificationConfigRequest * @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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetNotificationConfigRequest; /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityHealthAnalyticsCustomModule + * @returns GetNotificationConfigRequest * @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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetNotificationConfigRequest; /** - * Verifies a SecurityHealthAnalyticsCustomModule message. + * Verifies a GetNotificationConfigRequest 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 SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityHealthAnalyticsCustomModule + * @returns GetNotificationConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetNotificationConfigRequest; /** - * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @param message SecurityHealthAnalyticsCustomModule + * Creates a plain object from a GetNotificationConfigRequest message. Also converts values to other types if specified. + * @param message GetNotificationConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * Converts this GetNotificationConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityHealthAnalyticsCustomModule + * Gets the default type url for GetNotificationConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SecurityHealthAnalyticsCustomModule { + /** Properties of a GetOrganizationSettingsRequest. */ + interface IGetOrganizationSettingsRequest { - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2, - INHERITED = 3 - } + /** GetOrganizationSettingsRequest name */ + name?: (string|null); } - /** Represents a SecurityCenter */ - class SecurityCenter extends $protobuf.rpc.Service { + /** Represents a GetOrganizationSettingsRequest. */ + class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { /** - * Constructs a new SecurityCenter service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new GetOrganizationSettingsRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest); - /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SecurityCenter; + /** GetOrganizationSettingsRequest name. */ + public name: string; /** - * Calls BulkMuteFindings. - * @param request BulkMuteFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOrganizationSettingsRequest instance */ - public bulkMuteFindings(request: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindingsCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Calls BulkMuteFindings. - * @param request BulkMuteFindingsRequest message or plain object - * @returns Promise + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public bulkMuteFindings(request: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @param message GetOrganizationSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModuleCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Calls CreateSource. - * @param request CreateSourceRequest message or plain object - * @returns Promise + * Verifies a GetOrganizationSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createSource(request: google.cloud.securitycenter.v1.ICreateSourceRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOrganizationSettingsRequest */ - public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; /** - * Calls CreateFinding. - * @param request CreateFindingRequest message or plain object - * @returns Promise + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message GetOrganizationSettingsRequest + * @param [options] Conversion options + * @returns Plain object */ - public createFinding(request: google.cloud.securitycenter.v1.ICreateFindingRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateMuteConfig. - * @param request CreateMuteConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MuteConfig + * Converts this GetOrganizationSettingsRequest to JSON. + * @returns JSON object */ - public createMuteConfig(request: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfigCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls CreateMuteConfig. - * @param request CreateMuteConfigRequest message or plain object - * @returns Promise + * Gets the default type url for GetOrganizationSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public createMuteConfig(request: google.cloud.securitycenter.v1.ICreateMuteConfigRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ + interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + + /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ + class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { /** - * Calls CreateNotificationConfig. - * @param request CreateNotificationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationConfig + * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set */ - public createNotificationConfig(request: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfigCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest); + + /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. */ + public name: string; /** - * Calls CreateNotificationConfig. - * @param request CreateNotificationConfigRequest message or plain object - * @returns Promise + * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance */ - public createNotificationConfig(request: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest): Promise; + public static create(properties?: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls DeleteMuteConfig. - * @param request DeleteMuteConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteMuteConfig(request: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfigCallback): void; + public static encode(message: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteMuteConfig. - * @param request DeleteMuteConfigRequest message or plain object - * @returns Promise + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteMuteConfig(request: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest): Promise; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteNotificationConfig. - * @param request DeleteNotificationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteNotificationConfig(request: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfigCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls DeleteNotificationConfig. - * @param request DeleteNotificationConfigRequest message or plain object - * @returns Promise + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteNotificationConfig(request: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModuleCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise + * Creates a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest */ - public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls GetBigQueryExport. - * @param request GetBigQueryExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BigQueryExport + * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object */ - public getBigQueryExport(request: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExportCallback): void; + public static toObject(message: google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetBigQueryExport. - * @param request GetBigQueryExportRequest message or plain object - * @returns Promise + * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object */ - public getBigQueryExport(request: google.cloud.securitycenter.v1.IGetBigQueryExportRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy + * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. */ + interface IGetSecurityHealthAnalyticsCustomModuleRequest { + + /** GetSecurityHealthAnalyticsCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetSecurityHealthAnalyticsCustomModuleRequest. */ + class GetSecurityHealthAnalyticsCustomModuleRequest implements IGetSecurityHealthAnalyticsCustomModuleRequest { /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise + * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + constructor(properties?: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest); - /** - * Calls GetMuteConfig. - * @param request GetMuteConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MuteConfig - */ - public getMuteConfig(request: google.cloud.securitycenter.v1.IGetMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfigCallback): void; + /** GetSecurityHealthAnalyticsCustomModuleRequest name. */ + public name: string; /** - * Calls GetMuteConfig. - * @param request GetMuteConfigRequest message or plain object - * @returns Promise + * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSecurityHealthAnalyticsCustomModuleRequest instance */ - public getMuteConfig(request: google.cloud.securitycenter.v1.IGetMuteConfigRequest): Promise; + public static create(properties?: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls GetNotificationConfig. - * @param request GetNotificationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationConfig + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNotificationConfig(request: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfigCallback): void; + public static encode(message: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetNotificationConfig. - * @param request GetNotificationConfigRequest message or plain object - * @returns Promise + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNotificationConfig(request: google.cloud.securitycenter.v1.IGetNotificationConfigRequest): Promise; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls GetOrganizationSettings. - * @param request GetOrganizationSettingsRequest message or plain object - * @returns Promise + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getOrganizationSettings(request: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule + * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise + * Creates a GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSecurityHealthAnalyticsCustomModuleRequest */ - public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object */ - public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModuleCallback): void; + public static toObject(message: google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise + * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object */ - public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSourceRequest. */ + interface IGetSourceRequest { + + /** GetSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetSourceRequest. */ + class GetSourceRequest implements IGetSourceRequest { /** - * Calls GetSource. - * @param request GetSourceRequest message or plain object - * @returns Promise + * Constructs a new GetSourceRequest. + * @param [properties] Properties to set */ - public getSource(request: google.cloud.securitycenter.v1.IGetSourceRequest): Promise; + constructor(properties?: google.cloud.securitycenter.v1.IGetSourceRequest); + + /** GetSourceRequest name. */ + public name: string; /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupAssetsResponse + * Creates a new GetSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSourceRequest instance */ - public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IGetSourceRequest): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Calls GroupAssets. - * @param request GroupAssetsRequest message or plain object - * @returns Promise + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupAssets(request: google.cloud.securitycenter.v1.IGroupAssetsRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GroupFindingsResponse + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @param message GetSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GroupFindings. - * @param request GroupFindingsRequest message or plain object - * @returns Promise + * Decodes a GetSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public groupFindings(request: google.cloud.securitycenter.v1.IGroupFindingsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Verifies a GetSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listAssets(request: google.cloud.securitycenter.v1.IListAssetsRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSourceRequest */ - public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModulesCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSourceRequest; /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * @param message GetSourceRequest + * @param [options] Conversion options + * @returns Plain object */ - public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFindingsResponse + * Converts this GetSourceRequest to JSON. + * @returns JSON object */ - public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ListFindings. - * @param request ListFindingsRequest message or plain object - * @returns Promise + * Gets the default type url for GetSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listFindings(request: google.cloud.securitycenter.v1.IListFindingsRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroupAssetsRequest. */ + interface IGroupAssetsRequest { + + /** GroupAssetsRequest parent */ + parent?: (string|null); + + /** GroupAssetsRequest filter */ + filter?: (string|null); + + /** GroupAssetsRequest groupBy */ + groupBy?: (string|null); + + /** GroupAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); + + /** GroupAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupAssetsRequest pageToken */ + pageToken?: (string|null); + + /** GroupAssetsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a GroupAssetsRequest. */ + class GroupAssetsRequest implements IGroupAssetsRequest { /** - * Calls ListMuteConfigs. - * @param request ListMuteConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMuteConfigsResponse + * Constructs a new GroupAssetsRequest. + * @param [properties] Properties to set */ - public listMuteConfigs(request: google.cloud.securitycenter.v1.IListMuteConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigsCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest); + + /** GroupAssetsRequest parent. */ + public parent: string; + + /** GroupAssetsRequest filter. */ + public filter: string; + + /** GroupAssetsRequest groupBy. */ + public groupBy: string; + + /** GroupAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** - * Calls ListMuteConfigs. - * @param request ListMuteConfigsRequest message or plain object - * @returns Promise - */ - public listMuteConfigs(request: google.cloud.securitycenter.v1.IListMuteConfigsRequest): Promise; + /** GroupAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** - * Calls ListNotificationConfigs. - * @param request ListNotificationConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNotificationConfigsResponse - */ - public listNotificationConfigs(request: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigsCallback): void; + /** GroupAssetsRequest pageToken. */ + public pageToken: string; - /** - * Calls ListNotificationConfigs. - * @param request ListNotificationConfigsRequest message or plain object - * @returns Promise - */ - public listNotificationConfigs(request: google.cloud.securitycenter.v1.IListNotificationConfigsRequest): Promise; + /** GroupAssetsRequest pageSize. */ + public pageSize: number; /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * Creates a new GroupAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupAssetsRequest instance */ - public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @param message GroupAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModulesCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise + * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSourcesResponse + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Calls ListSources. - * @param request ListSourcesRequest message or plain object - * @returns Promise + * Verifies a GroupAssetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listSources(request: google.cloud.securitycenter.v1.IListSourcesRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupAssetsRequest */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsRequest; /** - * Calls RunAssetDiscovery. - * @param request RunAssetDiscoveryRequest message or plain object - * @returns Promise + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * @param message GroupAssetsRequest + * @param [options] Conversion options + * @returns Plain object */ - public runAssetDiscovery(request: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding + * Converts this GroupAssetsRequest to JSON. + * @returns JSON object */ - public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls SetFindingState. - * @param request SetFindingStateRequest message or plain object - * @returns Promise + * Gets the default type url for GroupAssetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public setFindingState(request: google.cloud.securitycenter.v1.ISetFindingStateRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls SetMute. - * @param request SetMuteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding - */ - public setMute(request: google.cloud.securitycenter.v1.ISetMuteRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetMuteCallback): void; + /** Properties of a GroupAssetsResponse. */ + interface IGroupAssetsResponse { - /** - * Calls SetMute. - * @param request SetMuteRequest message or plain object - * @returns Promise - */ - public setMute(request: google.cloud.securitycenter.v1.ISetMuteRequest): Promise; + /** GroupAssetsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback): void; + /** GroupAssetsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + /** GroupAssetsResponse nextPageToken */ + nextPageToken?: (string|null); - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback): void; + /** GroupAssetsResponse totalSize */ + totalSize?: (number|null); + } - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + /** Represents a GroupAssetsResponse. */ + class GroupAssetsResponse implements IGroupAssetsResponse { /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse + * Constructs a new GroupAssetsResponse. + * @param [properties] Properties to set */ - public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModuleCallback): void; + constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse); - /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): Promise; + /** GroupAssetsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; - /** - * Calls UpdateExternalSystem. - * @param request UpdateExternalSystemRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExternalSystem - */ - public updateExternalSystem(request: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystemCallback): void; + /** GroupAssetsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); - /** - * Calls UpdateExternalSystem. - * @param request UpdateExternalSystemRequest message or plain object - * @returns Promise - */ - public updateExternalSystem(request: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest): Promise; + /** GroupAssetsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Finding - */ - public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback): void; + /** GroupAssetsResponse totalSize. */ + public totalSize: number; /** - * Calls UpdateFinding. - * @param request UpdateFindingRequest message or plain object - * @returns Promise + * Creates a new GroupAssetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupAssetsResponse instance */ - public updateFinding(request: google.cloud.securitycenter.v1.IUpdateFindingRequest): Promise; + public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Calls UpdateMuteConfig. - * @param request UpdateMuteConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MuteConfig + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateMuteConfig(request: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfigCallback): void; + public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateMuteConfig. - * @param request UpdateMuteConfigRequest message or plain object - * @returns Promise + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * @param message GroupAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateMuteConfig(request: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest): Promise; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateNotificationConfig. - * @param request UpdateNotificationConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationConfig + * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateNotificationConfig(request: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfigCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Calls UpdateNotificationConfig. - * @param request UpdateNotificationConfigRequest message or plain object - * @returns Promise + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateNotificationConfig(request: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and OrganizationSettings + * Verifies a GroupAssetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateOrganizationSettings. - * @param request UpdateOrganizationSettingsRequest message or plain object - * @returns Promise + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupAssetsResponse */ - public updateOrganizationSettings(request: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsResponse; /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * @param message GroupAssetsResponse + * @param [options] Conversion options + * @returns Plain object */ - public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModuleCallback): void; + public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise + * Converts this GroupAssetsResponse to JSON. + * @returns JSON object */ - public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Source + * Gets the default type url for GroupAssetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroupFindingsRequest. */ + interface IGroupFindingsRequest { + + /** GroupFindingsRequest parent */ + parent?: (string|null); + + /** GroupFindingsRequest filter */ + filter?: (string|null); + + /** GroupFindingsRequest groupBy */ + groupBy?: (string|null); + + /** GroupFindingsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); + + /** GroupFindingsRequest pageToken */ + pageToken?: (string|null); + + /** GroupFindingsRequest pageSize */ + pageSize?: (number|null); + } + + /** Represents a GroupFindingsRequest. */ + class GroupFindingsRequest implements IGroupFindingsRequest { /** - * Calls UpdateSource. - * @param request UpdateSourceRequest message or plain object - * @returns Promise + * Constructs a new GroupFindingsRequest. + * @param [properties] Properties to set */ - public updateSource(request: google.cloud.securitycenter.v1.IUpdateSourceRequest): Promise; + constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest); + + /** GroupFindingsRequest parent. */ + public parent: string; + + /** GroupFindingsRequest filter. */ + public filter: string; + + /** GroupFindingsRequest groupBy. */ + public groupBy: string; + + /** GroupFindingsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); + + /** GroupFindingsRequest pageToken. */ + public pageToken: string; + + /** GroupFindingsRequest pageSize. */ + public pageSize: number; /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityMarks + * Creates a new GroupFindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupFindingsRequest instance */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback): void; + public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Calls UpdateSecurityMarks. - * @param request UpdateSecurityMarksRequest message or plain object - * @returns Promise + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateSecurityMarks(request: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): Promise; + public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateBigQueryExport. - * @param request CreateBigQueryExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BigQueryExport + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * @param message GroupFindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createBigQueryExport(request: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExportCallback): void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateBigQueryExport. - * @param request CreateBigQueryExportRequest message or plain object - * @returns Promise + * Decodes a GroupFindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupFindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createBigQueryExport(request: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Calls DeleteBigQueryExport. - * @param request DeleteBigQueryExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupFindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteBigQueryExport(request: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExportCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Calls DeleteBigQueryExport. - * @param request DeleteBigQueryExportRequest message or plain object - * @returns Promise + * Verifies a GroupFindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteBigQueryExport(request: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateBigQueryExport. - * @param request UpdateBigQueryExportRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BigQueryExport + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupFindingsRequest */ - public updateBigQueryExport(request: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExportCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsRequest; /** - * Calls UpdateBigQueryExport. - * @param request UpdateBigQueryExportRequest message or plain object - * @returns Promise + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. + * @param message GroupFindingsRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateBigQueryExport(request: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest): Promise; + public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListBigQueryExports. - * @param request ListBigQueryExportsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBigQueryExportsResponse + * Converts this GroupFindingsRequest to JSON. + * @returns JSON object */ - public listBigQueryExports(request: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, callback: google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExportsCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ListBigQueryExports. - * @param request ListBigQueryExportsRequest message or plain object - * @returns Promise + * Gets the default type url for GroupFindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listBigQueryExports(request: google.cloud.securitycenter.v1.IListBigQueryExportsRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SecurityCenter { + /** Properties of a GroupFindingsResponse. */ + interface IGroupFindingsResponse { - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|bulkMuteFindings}. - * @param error Error, if any - * @param [response] Operation - */ - type BulkMuteFindingsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** GroupFindingsResponse groupByResults */ + groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); + + /** GroupFindingsResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** GroupFindingsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a GroupFindingsResponse. */ + class GroupFindingsResponse implements IGroupFindingsResponse { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule + * Constructs a new GroupFindingsResponse. + * @param [properties] Properties to set */ - type CreateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; + constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse); + + /** GroupFindingsResponse groupByResults. */ + public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; + + /** GroupFindingsResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** GroupFindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** GroupFindingsResponse totalSize. */ + public totalSize: number; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSource}. - * @param error Error, if any - * @param [response] Source + * Creates a new GroupFindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupFindingsResponse instance */ - type CreateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createFinding}. - * @param error Error, if any - * @param [response] Finding + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createMuteConfig}. - * @param error Error, if any - * @param [response] MuteConfig + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * @param message GroupFindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createNotificationConfig}. - * @param error Error, if any - * @param [response] NotificationConfig + * Decodes a GroupFindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteMuteConfig}. - * @param error Error, if any - * @param [response] Empty + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteMuteConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteNotificationConfig}. - * @param error Error, if any - * @param [response] Empty + * Verifies a GroupFindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteNotificationConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] Empty + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupFindingsResponse */ - type DeleteSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getBigQueryExport}. - * @param error Error, if any - * @param [response] BigQueryExport + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. + * @param message GroupFindingsResponse + * @param [options] Conversion options + * @returns Plain object */ - type GetBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; + public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Converts this GroupFindingsResponse to JSON. + * @returns JSON object */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getMuteConfig}. - * @param error Error, if any - * @param [response] MuteConfig + * Gets the default type url for GroupFindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type GetMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroupResult. */ + interface IGroupResult { + + /** GroupResult properties */ + properties?: ({ [k: string]: google.protobuf.IValue }|null); + + /** GroupResult count */ + count?: (number|Long|string|null); + } + + /** Represents a GroupResult. */ + class GroupResult implements IGroupResult { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getNotificationConfig}. - * @param error Error, if any - * @param [response] NotificationConfig + * Constructs a new GroupResult. + * @param [properties] Properties to set */ - type GetNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; + constructor(properties?: google.cloud.securitycenter.v1.IGroupResult); + + /** GroupResult properties. */ + public properties: { [k: string]: google.protobuf.IValue }; + + /** GroupResult count. */ + public count: (number|Long|string); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings + * Creates a new GroupResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupResult instance */ - type GetOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; + public static create(properties?: google.cloud.securitycenter.v1.IGroupResult): google.cloud.securitycenter.v1.GroupResult; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] EffectiveSecurityHealthAnalyticsCustomModule + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetEffectiveSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule) => void; + public static encode(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * @param message GroupResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSource}. - * @param error Error, if any - * @param [response] Source + * Decodes a GroupResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GroupResult; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupAssets}. - * @param error Error, if any - * @param [response] GroupAssetsResponse + * Decodes a GroupResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GroupAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupAssetsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GroupResult; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupFindings}. - * @param error Error, if any - * @param [response] GroupFindingsResponse + * Verifies a GroupResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GroupFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.GroupFindingsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupResult */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListAssetsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupResult; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. + * @param message GroupResult + * @param [options] Conversion options + * @returns Plain object */ - type ListDescendantSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) => void; + public static toObject(message: google.cloud.securitycenter.v1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listFindings}. - * @param error Error, if any - * @param [response] ListFindingsResponse + * Converts this GroupResult to JSON. + * @returns JSON object */ - type ListFindingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListFindingsResponse) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listMuteConfigs}. - * @param error Error, if any - * @param [response] ListMuteConfigsResponse + * Gets the default type url for GroupResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListMuteConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListMuteConfigsResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest { + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ + class ListDescendantSecurityHealthAnalyticsCustomModulesRequest implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listNotificationConfigs}. - * @param error Error, if any - * @param [response] ListNotificationConfigsResponse + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @param [properties] Properties to set */ - type ListNotificationConfigsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListNotificationConfigsResponse) => void; + constructor(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance */ - type ListEffectiveSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) => void; + public static create(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListSecurityHealthAnalyticsCustomModulesResponse + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse) => void; + public static encode(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSources}. - * @param error Error, if any - * @param [response] ListSourcesResponse + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListSourcesCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListSourcesResponse) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|runAssetDiscovery}. - * @param error Error, if any - * @param [response] Operation + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type RunAssetDiscoveryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setFindingState}. - * @param error Error, if any - * @param [response] Finding + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type SetFindingStateCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setMute}. - * @param error Error, if any - * @param [response] Finding + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type SetMuteCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public static toObject(message: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|simulateSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SimulateSecurityHealthAnalyticsCustomModuleResponse + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @returns JSON object */ - type SimulateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateExternalSystem}. - * @param error Error, if any - * @param [response] ExternalSystem + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type UpdateExternalSystemCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ExternalSystem) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse { + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ + securityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ + class ListDescendantSecurityHealthAnalyticsCustomModulesResponse implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateFinding}. - * @param error Error, if any - * @param [response] Finding + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @param [properties] Properties to set */ - type UpdateFindingCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Finding) => void; + constructor(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ + public securityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateMuteConfig}. - * @param error Error, if any - * @param [response] MuteConfig + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance */ - type UpdateMuteConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.MuteConfig) => void; + public static create(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateNotificationConfig}. - * @param error Error, if any - * @param [response] NotificationConfig + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateNotificationConfigCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.NotificationConfig) => void; + public static encode(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateOrganizationSettings}. - * @param error Error, if any - * @param [response] OrganizationSettings + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateOrganizationSettingsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.OrganizationSettings) => void; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSource}. - * @param error Error, if any - * @param [response] Source + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateSourceCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.Source) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityMarks}. - * @param error Error, if any - * @param [response] SecurityMarks + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type UpdateSecurityMarksCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.SecurityMarks) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createBigQueryExport}. - * @param error Error, if any - * @param [response] BigQueryExport + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse */ - type CreateBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteBigQueryExport}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object */ - type DeleteBigQueryExportCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateBigQueryExport}. - * @param error Error, if any - * @param [response] BigQueryExport + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @returns JSON object */ - type UpdateBigQueryExportCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.BigQueryExport) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listBigQueryExports}. - * @param error Error, if any - * @param [response] ListBigQueryExportsResponse + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListBigQueryExportsCallback = (error: (Error|null), response?: google.cloud.securitycenter.v1.ListBigQueryExportsResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BulkMuteFindingsRequest. */ - interface IBulkMuteFindingsRequest { + /** Properties of a ListValuedResourcesRequest. */ + interface IListValuedResourcesRequest { - /** BulkMuteFindingsRequest parent */ + /** ListValuedResourcesRequest parent */ parent?: (string|null); - /** BulkMuteFindingsRequest filter */ + /** ListValuedResourcesRequest filter */ filter?: (string|null); - /** BulkMuteFindingsRequest muteAnnotation */ - muteAnnotation?: (string|null); + /** ListValuedResourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListValuedResourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListValuedResourcesRequest orderBy */ + orderBy?: (string|null); } - /** Represents a BulkMuteFindingsRequest. */ - class BulkMuteFindingsRequest implements IBulkMuteFindingsRequest { + /** Represents a ListValuedResourcesRequest. */ + class ListValuedResourcesRequest implements IListValuedResourcesRequest { /** - * Constructs a new BulkMuteFindingsRequest. + * Constructs a new ListValuedResourcesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListValuedResourcesRequest); - /** BulkMuteFindingsRequest parent. */ + /** ListValuedResourcesRequest parent. */ public parent: string; - /** BulkMuteFindingsRequest filter. */ + /** ListValuedResourcesRequest filter. */ public filter: string; - /** BulkMuteFindingsRequest muteAnnotation. */ - public muteAnnotation: string; + /** ListValuedResourcesRequest pageToken. */ + public pageToken: string; + + /** ListValuedResourcesRequest pageSize. */ + public pageSize: number; + + /** ListValuedResourcesRequest orderBy. */ + public orderBy: string; /** - * Creates a new BulkMuteFindingsRequest instance using the specified properties. + * Creates a new ListValuedResourcesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BulkMuteFindingsRequest instance + * @returns ListValuedResourcesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListValuedResourcesRequest): google.cloud.securitycenter.v1.ListValuedResourcesRequest; /** - * Encodes the specified BulkMuteFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. - * @param message BulkMuteFindingsRequest message or plain object to encode + * Encodes the specified ListValuedResourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesRequest.verify|verify} messages. + * @param message ListValuedResourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListValuedResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BulkMuteFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. - * @param message BulkMuteFindingsRequest message or plain object to encode + * Encodes the specified ListValuedResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesRequest.verify|verify} messages. + * @param message ListValuedResourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListValuedResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer. + * Decodes a ListValuedResourcesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BulkMuteFindingsRequest + * @returns ListValuedResourcesRequest * @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.cloud.securitycenter.v1.BulkMuteFindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListValuedResourcesRequest; /** - * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListValuedResourcesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BulkMuteFindingsRequest + * @returns ListValuedResourcesRequest * @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.cloud.securitycenter.v1.BulkMuteFindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListValuedResourcesRequest; /** - * Verifies a BulkMuteFindingsRequest message. + * Verifies a ListValuedResourcesRequest 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 BulkMuteFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListValuedResourcesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BulkMuteFindingsRequest + * @returns ListValuedResourcesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BulkMuteFindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListValuedResourcesRequest; /** - * Creates a plain object from a BulkMuteFindingsRequest message. Also converts values to other types if specified. - * @param message BulkMuteFindingsRequest + * Creates a plain object from a ListValuedResourcesRequest message. Also converts values to other types if specified. + * @param message ListValuedResourcesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.BulkMuteFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListValuedResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BulkMuteFindingsRequest to JSON. + * Converts this ListValuedResourcesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BulkMuteFindingsRequest + * Gets the default type url for ListValuedResourcesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BulkMuteFindingsResponse. */ - interface IBulkMuteFindingsResponse { + /** Properties of a ListValuedResourcesResponse. */ + interface IListValuedResourcesResponse { + + /** ListValuedResourcesResponse valuedResources */ + valuedResources?: (google.cloud.securitycenter.v1.IValuedResource[]|null); + + /** ListValuedResourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListValuedResourcesResponse totalSize */ + totalSize?: (number|null); } - /** Represents a BulkMuteFindingsResponse. */ - class BulkMuteFindingsResponse implements IBulkMuteFindingsResponse { + /** Represents a ListValuedResourcesResponse. */ + class ListValuedResourcesResponse implements IListValuedResourcesResponse { /** - * Constructs a new BulkMuteFindingsResponse. + * Constructs a new ListValuedResourcesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse); + constructor(properties?: google.cloud.securitycenter.v1.IListValuedResourcesResponse); + + /** ListValuedResourcesResponse valuedResources. */ + public valuedResources: google.cloud.securitycenter.v1.IValuedResource[]; + + /** ListValuedResourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListValuedResourcesResponse totalSize. */ + public totalSize: number; /** - * Creates a new BulkMuteFindingsResponse instance using the specified properties. + * Creates a new ListValuedResourcesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BulkMuteFindingsResponse instance + * @returns ListValuedResourcesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IListValuedResourcesResponse): google.cloud.securitycenter.v1.ListValuedResourcesResponse; - /** - * Encodes the specified BulkMuteFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. - * @param message BulkMuteFindingsResponse message or plain object to encode + /** + * Encodes the specified ListValuedResourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesResponse.verify|verify} messages. + * @param message ListValuedResourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListValuedResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BulkMuteFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. - * @param message BulkMuteFindingsResponse message or plain object to encode + * Encodes the specified ListValuedResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesResponse.verify|verify} messages. + * @param message ListValuedResourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListValuedResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer. + * Decodes a ListValuedResourcesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BulkMuteFindingsResponse + * @returns ListValuedResourcesResponse * @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.cloud.securitycenter.v1.BulkMuteFindingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListValuedResourcesResponse; /** - * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListValuedResourcesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BulkMuteFindingsResponse + * @returns ListValuedResourcesResponse * @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.cloud.securitycenter.v1.BulkMuteFindingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListValuedResourcesResponse; /** - * Verifies a BulkMuteFindingsResponse message. + * Verifies a ListValuedResourcesResponse 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 BulkMuteFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListValuedResourcesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BulkMuteFindingsResponse + * @returns ListValuedResourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.BulkMuteFindingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListValuedResourcesResponse; /** - * Creates a plain object from a BulkMuteFindingsResponse message. Also converts values to other types if specified. - * @param message BulkMuteFindingsResponse + * Creates a plain object from a ListValuedResourcesResponse message. Also converts values to other types if specified. + * @param message ListValuedResourcesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.BulkMuteFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListValuedResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BulkMuteFindingsResponse to JSON. + * Converts this ListValuedResourcesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BulkMuteFindingsResponse + * Gets the default type url for ListValuedResourcesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFindingRequest. */ - interface ICreateFindingRequest { + /** Properties of a ListAttackPathsRequest. */ + interface IListAttackPathsRequest { - /** CreateFindingRequest parent */ + /** ListAttackPathsRequest parent */ parent?: (string|null); - /** CreateFindingRequest findingId */ - findingId?: (string|null); + /** ListAttackPathsRequest filter */ + filter?: (string|null); - /** CreateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** ListAttackPathsRequest pageToken */ + pageToken?: (string|null); + + /** ListAttackPathsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a CreateFindingRequest. */ - class CreateFindingRequest implements ICreateFindingRequest { + /** Represents a ListAttackPathsRequest. */ + class ListAttackPathsRequest implements IListAttackPathsRequest { /** - * Constructs a new CreateFindingRequest. + * Constructs a new ListAttackPathsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListAttackPathsRequest); - /** CreateFindingRequest parent. */ + /** ListAttackPathsRequest parent. */ public parent: string; - /** CreateFindingRequest findingId. */ - public findingId: string; + /** ListAttackPathsRequest filter. */ + public filter: string; - /** CreateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** ListAttackPathsRequest pageToken. */ + public pageToken: string; + + /** ListAttackPathsRequest pageSize. */ + public pageSize: number; /** - * Creates a new CreateFindingRequest instance using the specified properties. + * Creates a new ListAttackPathsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFindingRequest instance + * @returns ListAttackPathsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateFindingRequest): google.cloud.securitycenter.v1.CreateFindingRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListAttackPathsRequest): google.cloud.securitycenter.v1.ListAttackPathsRequest; /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode + * Encodes the specified ListAttackPathsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsRequest.verify|verify} messages. + * @param message ListAttackPathsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAttackPathsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. - * @param message CreateFindingRequest message or plain object to encode + * Encodes the specified ListAttackPathsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsRequest.verify|verify} messages. + * @param message ListAttackPathsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAttackPathsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. + * Decodes a ListAttackPathsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFindingRequest + * @returns ListAttackPathsRequest * @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.cloud.securitycenter.v1.CreateFindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAttackPathsRequest; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAttackPathsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFindingRequest + * @returns ListAttackPathsRequest * @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.cloud.securitycenter.v1.CreateFindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAttackPathsRequest; /** - * Verifies a CreateFindingRequest message. + * Verifies a ListAttackPathsRequest 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 CreateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttackPathsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFindingRequest + * @returns ListAttackPathsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateFindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAttackPathsRequest; /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. - * @param message CreateFindingRequest + * Creates a plain object from a ListAttackPathsRequest message. Also converts values to other types if specified. + * @param message ListAttackPathsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAttackPathsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFindingRequest to JSON. + * Converts this ListAttackPathsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFindingRequest + * Gets the default type url for ListAttackPathsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateMuteConfigRequest. */ - interface ICreateMuteConfigRequest { - - /** CreateMuteConfigRequest parent */ - parent?: (string|null); + /** Properties of a ListAttackPathsResponse. */ + interface IListAttackPathsResponse { - /** CreateMuteConfigRequest muteConfig */ - muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); + /** ListAttackPathsResponse attackPaths */ + attackPaths?: (google.cloud.securitycenter.v1.IAttackPath[]|null); - /** CreateMuteConfigRequest muteConfigId */ - muteConfigId?: (string|null); + /** ListAttackPathsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateMuteConfigRequest. */ - class CreateMuteConfigRequest implements ICreateMuteConfigRequest { + /** Represents a ListAttackPathsResponse. */ + class ListAttackPathsResponse implements IListAttackPathsResponse { /** - * Constructs a new CreateMuteConfigRequest. + * Constructs a new ListAttackPathsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateMuteConfigRequest); - - /** CreateMuteConfigRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1.IListAttackPathsResponse); - /** CreateMuteConfigRequest muteConfig. */ - public muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); + /** ListAttackPathsResponse attackPaths. */ + public attackPaths: google.cloud.securitycenter.v1.IAttackPath[]; - /** CreateMuteConfigRequest muteConfigId. */ - public muteConfigId: string; + /** ListAttackPathsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateMuteConfigRequest instance using the specified properties. + * Creates a new ListAttackPathsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMuteConfigRequest instance + * @returns ListAttackPathsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateMuteConfigRequest): google.cloud.securitycenter.v1.CreateMuteConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListAttackPathsResponse): google.cloud.securitycenter.v1.ListAttackPathsResponse; /** - * Encodes the specified CreateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. - * @param message CreateMuteConfigRequest message or plain object to encode + * Encodes the specified ListAttackPathsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsResponse.verify|verify} messages. + * @param message ListAttackPathsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAttackPathsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. - * @param message CreateMuteConfigRequest message or plain object to encode + * Encodes the specified ListAttackPathsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsResponse.verify|verify} messages. + * @param message ListAttackPathsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAttackPathsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListAttackPathsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMuteConfigRequest + * @returns ListAttackPathsResponse * @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.cloud.securitycenter.v1.CreateMuteConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAttackPathsResponse; /** - * Decodes a CreateMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAttackPathsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMuteConfigRequest + * @returns ListAttackPathsResponse * @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.cloud.securitycenter.v1.CreateMuteConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAttackPathsResponse; /** - * Verifies a CreateMuteConfigRequest message. + * Verifies a ListAttackPathsResponse 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 CreateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttackPathsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMuteConfigRequest + * @returns ListAttackPathsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateMuteConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAttackPathsResponse; /** - * Creates a plain object from a CreateMuteConfigRequest message. Also converts values to other types if specified. - * @param message CreateMuteConfigRequest + * Creates a plain object from a ListAttackPathsResponse message. Also converts values to other types if specified. + * @param message ListAttackPathsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAttackPathsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMuteConfigRequest to JSON. + * Converts this ListAttackPathsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateMuteConfigRequest + * Gets the default type url for ListAttackPathsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateNotificationConfigRequest. */ - interface ICreateNotificationConfigRequest { - - /** CreateNotificationConfigRequest parent */ - parent?: (string|null); - - /** CreateNotificationConfigRequest configId */ - configId?: (string|null); + /** Properties of a GetSimulationRequest. */ + interface IGetSimulationRequest { - /** CreateNotificationConfigRequest notificationConfig */ - notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); + /** GetSimulationRequest name */ + name?: (string|null); } - /** Represents a CreateNotificationConfigRequest. */ - class CreateNotificationConfigRequest implements ICreateNotificationConfigRequest { + /** Represents a GetSimulationRequest. */ + class GetSimulationRequest implements IGetSimulationRequest { /** - * Constructs a new CreateNotificationConfigRequest. + * Constructs a new GetSimulationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IGetSimulationRequest); - /** CreateNotificationConfigRequest parent. */ - public parent: string; - - /** CreateNotificationConfigRequest configId. */ - public configId: string; - - /** CreateNotificationConfigRequest notificationConfig. */ - public notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); + /** GetSimulationRequest name. */ + public name: string; /** - * Creates a new CreateNotificationConfigRequest instance using the specified properties. + * Creates a new GetSimulationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateNotificationConfigRequest instance + * @returns GetSimulationRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGetSimulationRequest): google.cloud.securitycenter.v1.GetSimulationRequest; /** - * Encodes the specified CreateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. - * @param message CreateNotificationConfigRequest message or plain object to encode + * Encodes the specified GetSimulationRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSimulationRequest.verify|verify} messages. + * @param message GetSimulationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetSimulationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. - * @param message CreateNotificationConfigRequest message or plain object to encode + * Encodes the specified GetSimulationRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSimulationRequest.verify|verify} messages. + * @param message GetSimulationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSimulationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer. + * Decodes a GetSimulationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateNotificationConfigRequest + * @returns GetSimulationRequest * @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.cloud.securitycenter.v1.CreateNotificationConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetSimulationRequest; /** - * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSimulationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateNotificationConfigRequest + * @returns GetSimulationRequest * @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.cloud.securitycenter.v1.CreateNotificationConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetSimulationRequest; /** - * Verifies a CreateNotificationConfigRequest message. + * Verifies a GetSimulationRequest 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 CreateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSimulationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateNotificationConfigRequest + * @returns GetSimulationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateNotificationConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSimulationRequest; /** - * Creates a plain object from a CreateNotificationConfigRequest message. Also converts values to other types if specified. - * @param message CreateNotificationConfigRequest + * Creates a plain object from a GetSimulationRequest message. Also converts values to other types if specified. + * @param message GetSimulationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetSimulationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateNotificationConfigRequest to JSON. + * Converts this GetSimulationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateNotificationConfigRequest + * Gets the default type url for GetSimulationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. */ - interface ICreateSecurityHealthAnalyticsCustomModuleRequest { - - /** CreateSecurityHealthAnalyticsCustomModuleRequest parent */ - parent?: (string|null); + /** Properties of a GetValuedResourceRequest. */ + interface IGetValuedResourceRequest { - /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ - securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); + /** GetValuedResourceRequest name */ + name?: (string|null); } - /** Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. */ - class CreateSecurityHealthAnalyticsCustomModuleRequest implements ICreateSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a GetValuedResourceRequest. */ + class GetValuedResourceRequest implements IGetValuedResourceRequest { /** - * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new GetValuedResourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest); - - /** CreateSecurityHealthAnalyticsCustomModuleRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1.IGetValuedResourceRequest); - /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ - public securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); + /** GetValuedResourceRequest name. */ + public name: string; /** - * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new GetValuedResourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest instance + * @returns GetValuedResourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGetValuedResourceRequest): google.cloud.securitycenter.v1.GetValuedResourceRequest; /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified GetValuedResourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetValuedResourceRequest.verify|verify} messages. + * @param message GetValuedResourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetValuedResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified GetValuedResourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetValuedResourceRequest.verify|verify} messages. + * @param message GetValuedResourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetValuedResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a GetValuedResourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns GetValuedResourceRequest * @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.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetValuedResourceRequest; /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a GetValuedResourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns GetValuedResourceRequest * @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.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetValuedResourceRequest; /** - * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a GetValuedResourceRequest 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 CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetValuedResourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns GetValuedResourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetValuedResourceRequest; /** - * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a GetValuedResourceRequest message. Also converts values to other types if specified. + * @param message GetValuedResourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetValuedResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this GetValuedResourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for GetValuedResourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateSourceRequest. */ - interface ICreateSourceRequest { + /** Properties of a ListMuteConfigsRequest. */ + interface IListMuteConfigsRequest { - /** CreateSourceRequest parent */ + /** ListMuteConfigsRequest parent */ parent?: (string|null); - /** CreateSourceRequest source */ - source?: (google.cloud.securitycenter.v1.ISource|null); + /** ListMuteConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListMuteConfigsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateSourceRequest. */ - class CreateSourceRequest implements ICreateSourceRequest { + /** Represents a ListMuteConfigsRequest. */ + class ListMuteConfigsRequest implements IListMuteConfigsRequest { /** - * Constructs a new CreateSourceRequest. + * Constructs a new ListMuteConfigsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListMuteConfigsRequest); - /** CreateSourceRequest parent. */ + /** ListMuteConfigsRequest parent. */ public parent: string; - /** CreateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1.ISource|null); + /** ListMuteConfigsRequest pageSize. */ + public pageSize: number; + + /** ListMuteConfigsRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateSourceRequest instance using the specified properties. + * Creates a new ListMuteConfigsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSourceRequest instance + * @returns ListMuteConfigsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateSourceRequest): google.cloud.securitycenter.v1.CreateSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListMuteConfigsRequest): google.cloud.securitycenter.v1.ListMuteConfigsRequest; /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode + * Encodes the specified ListMuteConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. + * @param message ListMuteConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListMuteConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. - * @param message CreateSourceRequest message or plain object to encode + * Encodes the specified ListMuteConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. + * @param message ListMuteConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListMuteConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. + * Decodes a ListMuteConfigsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSourceRequest + * @returns ListMuteConfigsRequest * @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.cloud.securitycenter.v1.CreateSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListMuteConfigsRequest; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMuteConfigsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSourceRequest + * @returns ListMuteConfigsRequest * @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.cloud.securitycenter.v1.CreateSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListMuteConfigsRequest; /** - * Verifies a CreateSourceRequest message. + * Verifies a ListMuteConfigsRequest 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 CreateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMuteConfigsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSourceRequest + * @returns ListMuteConfigsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListMuteConfigsRequest; /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. - * @param message CreateSourceRequest + * Creates a plain object from a ListMuteConfigsRequest message. Also converts values to other types if specified. + * @param message ListMuteConfigsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListMuteConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSourceRequest to JSON. + * Converts this ListMuteConfigsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateSourceRequest + * Gets the default type url for ListMuteConfigsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteMuteConfigRequest. */ - interface IDeleteMuteConfigRequest { + /** Properties of a ListMuteConfigsResponse. */ + interface IListMuteConfigsResponse { - /** DeleteMuteConfigRequest name */ - name?: (string|null); + /** ListMuteConfigsResponse muteConfigs */ + muteConfigs?: (google.cloud.securitycenter.v1.IMuteConfig[]|null); + + /** ListMuteConfigsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteMuteConfigRequest. */ - class DeleteMuteConfigRequest implements IDeleteMuteConfigRequest { + /** Represents a ListMuteConfigsResponse. */ + class ListMuteConfigsResponse implements IListMuteConfigsResponse { /** - * Constructs a new DeleteMuteConfigRequest. + * Constructs a new ListMuteConfigsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListMuteConfigsResponse); - /** DeleteMuteConfigRequest name. */ - public name: string; + /** ListMuteConfigsResponse muteConfigs. */ + public muteConfigs: google.cloud.securitycenter.v1.IMuteConfig[]; + + /** ListMuteConfigsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteMuteConfigRequest instance using the specified properties. + * Creates a new ListMuteConfigsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteMuteConfigRequest instance + * @returns ListMuteConfigsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListMuteConfigsResponse): google.cloud.securitycenter.v1.ListMuteConfigsResponse; /** - * Encodes the specified DeleteMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. - * @param message DeleteMuteConfigRequest message or plain object to encode + * Encodes the specified ListMuteConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. + * @param message ListMuteConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListMuteConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. - * @param message DeleteMuteConfigRequest message or plain object to encode + * Encodes the specified ListMuteConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. + * @param message ListMuteConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListMuteConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListMuteConfigsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteMuteConfigRequest + * @returns ListMuteConfigsResponse * @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.cloud.securitycenter.v1.DeleteMuteConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListMuteConfigsResponse; /** - * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMuteConfigsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteMuteConfigRequest + * @returns ListMuteConfigsResponse * @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.cloud.securitycenter.v1.DeleteMuteConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListMuteConfigsResponse; /** - * Verifies a DeleteMuteConfigRequest message. + * Verifies a ListMuteConfigsResponse 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 DeleteMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMuteConfigsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteMuteConfigRequest + * @returns ListMuteConfigsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteMuteConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListMuteConfigsResponse; /** - * Creates a plain object from a DeleteMuteConfigRequest message. Also converts values to other types if specified. - * @param message DeleteMuteConfigRequest + * Creates a plain object from a ListMuteConfigsResponse message. Also converts values to other types if specified. + * @param message ListMuteConfigsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.DeleteMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListMuteConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteMuteConfigRequest to JSON. + * Converts this ListMuteConfigsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteMuteConfigRequest + * Gets the default type url for ListMuteConfigsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteNotificationConfigRequest. */ - interface IDeleteNotificationConfigRequest { + /** Properties of a ListNotificationConfigsRequest. */ + interface IListNotificationConfigsRequest { - /** DeleteNotificationConfigRequest name */ - name?: (string|null); + /** ListNotificationConfigsRequest parent */ + parent?: (string|null); + + /** ListNotificationConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListNotificationConfigsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a DeleteNotificationConfigRequest. */ - class DeleteNotificationConfigRequest implements IDeleteNotificationConfigRequest { + /** Represents a ListNotificationConfigsRequest. */ + class ListNotificationConfigsRequest implements IListNotificationConfigsRequest { /** - * Constructs a new DeleteNotificationConfigRequest. + * Constructs a new ListNotificationConfigsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsRequest); - /** DeleteNotificationConfigRequest name. */ - public name: string; + /** ListNotificationConfigsRequest parent. */ + public parent: string; + + /** ListNotificationConfigsRequest pageToken. */ + public pageToken: string; + + /** ListNotificationConfigsRequest pageSize. */ + public pageSize: number; /** - * Creates a new DeleteNotificationConfigRequest instance using the specified properties. + * Creates a new ListNotificationConfigsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteNotificationConfigRequest instance + * @returns ListNotificationConfigsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsRequest): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; /** - * Encodes the specified DeleteNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. - * @param message DeleteNotificationConfigRequest message or plain object to encode + * Encodes the specified ListNotificationConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. + * @param message ListNotificationConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DeleteNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. - * @param message DeleteNotificationConfigRequest message or plain object to encode + /** + * Encodes the specified ListNotificationConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. + * @param message ListNotificationConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteNotificationConfigRequest + * @returns ListNotificationConfigsRequest * @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.cloud.securitycenter.v1.DeleteNotificationConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; /** - * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteNotificationConfigRequest + * @returns ListNotificationConfigsRequest * @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.cloud.securitycenter.v1.DeleteNotificationConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; /** - * Verifies a DeleteNotificationConfigRequest message. + * Verifies a ListNotificationConfigsRequest 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 DeleteNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationConfigsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteNotificationConfigRequest + * @returns ListNotificationConfigsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteNotificationConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; /** - * Creates a plain object from a DeleteNotificationConfigRequest message. Also converts values to other types if specified. - * @param message DeleteNotificationConfigRequest + * Creates a plain object from a ListNotificationConfigsRequest message. Also converts values to other types if specified. + * @param message ListNotificationConfigsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.DeleteNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListNotificationConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteNotificationConfigRequest to JSON. + * Converts this ListNotificationConfigsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteNotificationConfigRequest + * Gets the default type url for ListNotificationConfigsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ - interface IDeleteSecurityHealthAnalyticsCustomModuleRequest { + /** Properties of a ListNotificationConfigsResponse. */ + interface IListNotificationConfigsResponse { - /** DeleteSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); + /** ListNotificationConfigsResponse notificationConfigs */ + notificationConfigs?: (google.cloud.securitycenter.v1.INotificationConfig[]|null); + + /** ListNotificationConfigsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ - class DeleteSecurityHealthAnalyticsCustomModuleRequest implements IDeleteSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a ListNotificationConfigsResponse. */ + class ListNotificationConfigsResponse implements IListNotificationConfigsResponse { /** - * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListNotificationConfigsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsResponse); - /** DeleteSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; + /** ListNotificationConfigsResponse notificationConfigs. */ + public notificationConfigs: google.cloud.securitycenter.v1.INotificationConfig[]; + + /** ListNotificationConfigsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListNotificationConfigsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest instance + * @returns ListNotificationConfigsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsResponse): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListNotificationConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. + * @param message ListNotificationConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListNotificationConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListNotificationConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. + * @param message ListNotificationConfigsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListNotificationConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns ListNotificationConfigsResponse * @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.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns ListNotificationConfigsResponse * @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.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; /** - * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListNotificationConfigsResponse 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 DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationConfigsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns ListNotificationConfigsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; /** - * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a ListNotificationConfigsResponse message. Also converts values to other types if specified. + * @param message ListNotificationConfigsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListNotificationConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListNotificationConfigsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListNotificationConfigsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetBigQueryExportRequest. */ - interface IGetBigQueryExportRequest { + /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { - /** GetBigQueryExportRequest name */ - name?: (string|null); + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetBigQueryExportRequest. */ - class GetBigQueryExportRequest implements IGetBigQueryExportRequest { + /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ + class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { /** - * Constructs a new GetBigQueryExportRequest. + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetBigQueryExportRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest); - /** GetBigQueryExportRequest name. */ - public name: string; + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetBigQueryExportRequest instance using the specified properties. + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetBigQueryExportRequest instance + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetBigQueryExportRequest): google.cloud.securitycenter.v1.GetBigQueryExportRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; /** - * Encodes the specified GetBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. - * @param message GetBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. - * @param message GetBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBigQueryExportRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @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.cloud.securitycenter.v1.GetBigQueryExportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; /** - * Decodes a GetBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBigQueryExportRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @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.cloud.securitycenter.v1.GetBigQueryExportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; /** - * Verifies a GetBigQueryExportRequest message. + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest 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 GetBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBigQueryExportRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetBigQueryExportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; /** - * Creates a plain object from a GetBigQueryExportRequest message. Also converts values to other types if specified. - * @param message GetBigQueryExportRequest + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBigQueryExportRequest to JSON. + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBigQueryExportRequest + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetMuteConfigRequest. */ - interface IGetMuteConfigRequest { + /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { - /** GetMuteConfigRequest name */ - name?: (string|null); + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules */ + effectiveSecurityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetMuteConfigRequest. */ - class GetMuteConfigRequest implements IGetMuteConfigRequest { + /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ + class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { /** - * Constructs a new GetMuteConfigRequest. + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetMuteConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse); - /** GetMuteConfigRequest name. */ - public name: string; + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. */ + public effectiveSecurityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetMuteConfigRequest instance using the specified properties. + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetMuteConfigRequest instance + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetMuteConfigRequest): google.cloud.securitycenter.v1.GetMuteConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; /** - * Encodes the specified GetMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. - * @param message GetMuteConfigRequest message or plain object to encode + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. - * @param message GetMuteConfigRequest message or plain object to encode + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMuteConfigRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @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.cloud.securitycenter.v1.GetMuteConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; /** - * Decodes a GetMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMuteConfigRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @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.cloud.securitycenter.v1.GetMuteConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; /** - * Verifies a GetMuteConfigRequest message. + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse 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 GetMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMuteConfigRequest + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetMuteConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; /** - * Creates a plain object from a GetMuteConfigRequest message. Also converts values to other types if specified. - * @param message GetMuteConfigRequest + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMuteConfigRequest to JSON. + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetMuteConfigRequest + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetNotificationConfigRequest. */ - interface IGetNotificationConfigRequest { + /** Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListSecurityHealthAnalyticsCustomModulesRequest { - /** GetNotificationConfigRequest name */ - name?: (string|null); + /** ListSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetNotificationConfigRequest. */ - class GetNotificationConfigRequest implements IGetNotificationConfigRequest { + /** Represents a ListSecurityHealthAnalyticsCustomModulesRequest. */ + class ListSecurityHealthAnalyticsCustomModulesRequest implements IListSecurityHealthAnalyticsCustomModulesRequest { /** - * Constructs a new GetNotificationConfigRequest. + * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetNotificationConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest); - /** GetNotificationConfigRequest name. */ - public name: string; + /** ListSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetNotificationConfigRequest instance using the specified properties. + * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetNotificationConfigRequest instance + * @returns ListSecurityHealthAnalyticsCustomModulesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetNotificationConfigRequest): google.cloud.securitycenter.v1.GetNotificationConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; /** - * Encodes the specified GetNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. - * @param message GetNotificationConfigRequest message or plain object to encode + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. - * @param message GetNotificationConfigRequest message or plain object to encode + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNotificationConfigRequest + * @returns ListSecurityHealthAnalyticsCustomModulesRequest * @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.cloud.securitycenter.v1.GetNotificationConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; /** - * Decodes a GetNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNotificationConfigRequest + * @returns ListSecurityHealthAnalyticsCustomModulesRequest * @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.cloud.securitycenter.v1.GetNotificationConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; /** - * Verifies a GetNotificationConfigRequest message. + * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest 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 GetNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNotificationConfigRequest + * @returns ListSecurityHealthAnalyticsCustomModulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetNotificationConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; /** - * Creates a plain object from a GetNotificationConfigRequest message. Also converts values to other types if specified. - * @param message GetNotificationConfigRequest + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNotificationConfigRequest to JSON. + * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetNotificationConfigRequest + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetOrganizationSettingsRequest. */ - interface IGetOrganizationSettingsRequest { + /** Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListSecurityHealthAnalyticsCustomModulesResponse { - /** GetOrganizationSettingsRequest name */ - name?: (string|null); + /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ + securityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]|null); + + /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetOrganizationSettingsRequest. */ - class GetOrganizationSettingsRequest implements IGetOrganizationSettingsRequest { + /** Represents a ListSecurityHealthAnalyticsCustomModulesResponse. */ + class ListSecurityHealthAnalyticsCustomModulesResponse implements IListSecurityHealthAnalyticsCustomModulesResponse { /** - * Constructs a new GetOrganizationSettingsRequest. + * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse); - /** GetOrganizationSettingsRequest name. */ - public name: string; + /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ + public securityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]; + + /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetOrganizationSettingsRequest instance + * @returns ListSecurityHealthAnalyticsCustomModulesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. - * @param message GetOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOrganizationSettingsRequest + * @returns ListSecurityHealthAnalyticsCustomModulesResponse * @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.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOrganizationSettingsRequest + * @returns ListSecurityHealthAnalyticsCustomModulesResponse * @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.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; /** - * Verifies a GetOrganizationSettingsRequest message. + * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse 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 GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOrganizationSettingsRequest + * @returns ListSecurityHealthAnalyticsCustomModulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message GetOrganizationSettingsRequest + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOrganizationSettingsRequest to JSON. + * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetOrganizationSettingsRequest + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ - interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + /** Properties of a ListSourcesRequest. */ + interface IListSourcesRequest { - /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); + /** ListSourcesRequest parent */ + parent?: (string|null); + + /** ListSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListSourcesRequest pageSize */ + pageSize?: (number|null); } - /** Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ - class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a ListSourcesRequest. */ + class ListSourcesRequest implements IListSourcesRequest { /** - * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListSourcesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSourcesRequest); - /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; + /** ListSourcesRequest parent. */ + public parent: string; + + /** ListSourcesRequest pageToken. */ + public pageToken: string; + + /** ListSourcesRequest pageSize. */ + public pageSize: number; /** - * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListSourcesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance + * @returns ListSourcesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSourcesRequest): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * @param message ListSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesRequest * @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.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesRequest * @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.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListSourcesRequest 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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesRequest; /** - * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. + * @param message ListSourcesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListSourcesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListSourcesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. */ - interface IGetSecurityHealthAnalyticsCustomModuleRequest { + /** Properties of a ListSourcesResponse. */ + interface IListSourcesResponse { - /** GetSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); + /** ListSourcesResponse sources */ + sources?: (google.cloud.securitycenter.v1.ISource[]|null); + + /** ListSourcesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetSecurityHealthAnalyticsCustomModuleRequest. */ - class GetSecurityHealthAnalyticsCustomModuleRequest implements IGetSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a ListSourcesResponse. */ + class ListSourcesResponse implements IListSourcesResponse { /** - * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListSourcesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListSourcesResponse); - /** GetSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; + /** ListSourcesResponse sources. */ + public sources: google.cloud.securitycenter.v1.ISource[]; + + /** ListSourcesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSecurityHealthAnalyticsCustomModuleRequest instance + * @returns ListSourcesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListSourcesResponse): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * @param message ListSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesResponse * @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.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesResponse * @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.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListSourcesResponse 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 GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @returns ListSourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesResponse; /** - * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. + * @param message ListSourcesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListSourcesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListSourcesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetSourceRequest. */ - interface IGetSourceRequest { + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { - /** GetSourceRequest name */ - name?: (string|null); + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); + + /** ListAssetsRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + + /** ListAssetsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); + + /** ListAssetsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a GetSourceRequest. */ - class GetSourceRequest implements IGetSourceRequest { + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { /** - * Constructs a new GetSourceRequest. + * Constructs a new ListAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGetSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListAssetsRequest); - /** GetSourceRequest name. */ - public name: string; + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** ListAssetsRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** ListAssetsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); + + /** ListAssetsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; /** - * Creates a new GetSourceRequest instance using the specified properties. + * Creates a new ListAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSourceRequest instance + * @returns ListAssetsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGetSourceRequest): google.cloud.securitycenter.v1.GetSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListAssetsRequest): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. - * @param message GetSourceRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSourceRequest + * @returns ListAssetsRequest * @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.cloud.securitycenter.v1.GetSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSourceRequest + * @returns ListAssetsRequest * @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.cloud.securitycenter.v1.GetSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Verifies a GetSourceRequest message. + * Verifies a ListAssetsRequest 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 GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSourceRequest + * @returns ListAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsRequest; /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. - * @param message GetSourceRequest + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GetSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSourceRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetSourceRequest + * Gets the default type url for ListAssetsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GroupAssetsRequest. */ - interface IGroupAssetsRequest { - - /** GroupAssetsRequest parent */ - parent?: (string|null); - - /** GroupAssetsRequest filter */ - filter?: (string|null); - - /** GroupAssetsRequest groupBy */ - groupBy?: (string|null); + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { - /** GroupAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); + /** ListAssetsResponse listAssetsResults */ + listAssetsResults?: (google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]|null); - /** GroupAssetsRequest readTime */ + /** ListAssetsResponse readTime */ readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsRequest pageToken */ - pageToken?: (string|null); + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); - /** GroupAssetsRequest pageSize */ - pageSize?: (number|null); + /** ListAssetsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a GroupAssetsRequest. */ - class GroupAssetsRequest implements IGroupAssetsRequest { + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { /** - * Constructs a new GroupAssetsRequest. + * Constructs a new ListAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest); - - /** GroupAssetsRequest parent. */ - public parent: string; - - /** GroupAssetsRequest filter. */ - public filter: string; - - /** GroupAssetsRequest groupBy. */ - public groupBy: string; + constructor(properties?: google.cloud.securitycenter.v1.IListAssetsResponse); - /** GroupAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); + /** ListAssetsResponse listAssetsResults. */ + public listAssetsResults: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]; - /** GroupAssetsRequest readTime. */ + /** ListAssetsResponse readTime. */ public readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsRequest pageToken. */ - public pageToken: string; + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; - /** GroupAssetsRequest pageSize. */ - public pageSize: number; + /** ListAssetsResponse totalSize. */ + public totalSize: number; /** - * Creates a new GroupAssetsRequest instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GroupAssetsRequest instance + * @returns ListAssetsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsRequest): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListAssetsResponse): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. - * @param message GroupAssetsRequest message or plain object to encode + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupAssetsRequest + * @returns ListAssetsResponse * @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.cloud.securitycenter.v1.GroupAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupAssetsRequest + * @returns ListAssetsResponse * @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.cloud.securitycenter.v1.GroupAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Verifies a GroupAssetsRequest message. + * Verifies a ListAssetsResponse 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 GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupAssetsRequest + * @returns ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. - * @param message GroupAssetsRequest + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this ListAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GroupAssetsRequest + * Gets the default type url for ListAssetsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GroupAssetsResponse. */ - interface IGroupAssetsResponse { + namespace ListAssetsResponse { - /** GroupAssetsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); + /** Properties of a ListAssetsResult. */ + interface IListAssetsResult { - /** GroupAssetsResponse readTime */ + /** ListAssetsResult asset */ + asset?: (google.cloud.securitycenter.v1.IAsset|null); + + /** ListAssetsResult stateChange */ + stateChange?: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null); + } + + /** Represents a ListAssetsResult. */ + class ListAssetsResult implements IListAssetsResult { + + /** + * Constructs a new ListAssetsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult); + + /** ListAssetsResult asset. */ + public asset?: (google.cloud.securitycenter.v1.IAsset|null); + + /** ListAssetsResult stateChange. */ + public stateChange: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange); + + /** + * Creates a new ListAssetsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsResult instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + + /** + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @param message ListAssetsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsResult + * @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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + + /** + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsResult + * @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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + + /** + * Verifies a ListAssetsResult 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 ListAssetsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; + + /** + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. + * @param message ListAssetsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListAssetsResult { + + /** StateChange enum. */ + enum StateChange { + UNUSED = 0, + ADDED = 1, + REMOVED = 2, + ACTIVE = 3 + } + } + } + + /** Properties of a ListFindingsRequest. */ + interface IListFindingsRequest { + + /** ListFindingsRequest parent */ + parent?: (string|null); + + /** ListFindingsRequest filter */ + filter?: (string|null); + + /** ListFindingsRequest orderBy */ + orderBy?: (string|null); + + /** ListFindingsRequest readTime */ readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListFindingsRequest compareDuration */ + compareDuration?: (google.protobuf.IDuration|null); - /** GroupAssetsResponse totalSize */ - totalSize?: (number|null); + /** ListFindingsRequest fieldMask */ + fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListFindingsRequest pageToken */ + pageToken?: (string|null); + + /** ListFindingsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a GroupAssetsResponse. */ - class GroupAssetsResponse implements IGroupAssetsResponse { + /** Represents a ListFindingsRequest. */ + class ListFindingsRequest implements IListFindingsRequest { /** - * Constructs a new GroupAssetsResponse. + * Constructs a new ListFindingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse); + constructor(properties?: google.cloud.securitycenter.v1.IListFindingsRequest); - /** GroupAssetsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; + /** ListFindingsRequest parent. */ + public parent: string; - /** GroupAssetsResponse readTime. */ + /** ListFindingsRequest filter. */ + public filter: string; + + /** ListFindingsRequest orderBy. */ + public orderBy: string; + + /** ListFindingsRequest readTime. */ public readTime?: (google.protobuf.ITimestamp|null); - /** GroupAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** ListFindingsRequest compareDuration. */ + public compareDuration?: (google.protobuf.IDuration|null); - /** GroupAssetsResponse totalSize. */ - public totalSize: number; + /** ListFindingsRequest fieldMask. */ + public fieldMask?: (google.protobuf.IFieldMask|null); + + /** ListFindingsRequest pageToken. */ + public pageToken: string; + + /** ListFindingsRequest pageSize. */ + public pageSize: number; /** - * Creates a new GroupAssetsResponse instance using the specified properties. + * Creates a new ListFindingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GroupAssetsResponse instance + * @returns ListFindingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupAssetsResponse): google.cloud.securitycenter.v1.GroupAssetsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IListFindingsRequest): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. - * @param message GroupAssetsResponse message or plain object to encode + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * @param message ListFindingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * Decodes a ListFindingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupAssetsResponse + * @returns ListFindingsRequest * @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.cloud.securitycenter.v1.GroupAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupAssetsResponse + * @returns ListFindingsRequest * @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.cloud.securitycenter.v1.GroupAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Verifies a GroupAssetsResponse message. + * Verifies a ListFindingsRequest 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 GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupAssetsResponse + * @returns ListFindingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsRequest; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. - * @param message GroupAssetsResponse + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * @param message ListFindingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GroupAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupAssetsResponse to JSON. + * Converts this ListFindingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GroupAssetsResponse + * Gets the default type url for ListFindingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GroupFindingsRequest. */ - interface IGroupFindingsRequest { - - /** GroupFindingsRequest parent */ - parent?: (string|null); + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** GroupFindingsRequest filter */ - filter?: (string|null); + /** Properties of a ListFindingsResponse. */ + interface IListFindingsResponse { - /** GroupFindingsRequest groupBy */ - groupBy?: (string|null); + /** ListFindingsResponse listFindingsResults */ + listFindingsResults?: (google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]|null); - /** GroupFindingsRequest readTime */ + /** ListFindingsResponse readTime */ readTime?: (google.protobuf.ITimestamp|null); - /** GroupFindingsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** GroupFindingsRequest pageToken */ - pageToken?: (string|null); + /** ListFindingsResponse nextPageToken */ + nextPageToken?: (string|null); - /** GroupFindingsRequest pageSize */ - pageSize?: (number|null); + /** ListFindingsResponse totalSize */ + totalSize?: (number|null); } - /** Represents a GroupFindingsRequest. */ - class GroupFindingsRequest implements IGroupFindingsRequest { + /** Represents a ListFindingsResponse. */ + class ListFindingsResponse implements IListFindingsResponse { /** - * Constructs a new GroupFindingsRequest. + * Constructs a new ListFindingsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest); - - /** GroupFindingsRequest parent. */ - public parent: string; - - /** GroupFindingsRequest filter. */ - public filter: string; + constructor(properties?: google.cloud.securitycenter.v1.IListFindingsResponse); - /** GroupFindingsRequest groupBy. */ - public groupBy: string; + /** ListFindingsResponse listFindingsResults. */ + public listFindingsResults: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]; - /** GroupFindingsRequest readTime. */ + /** ListFindingsResponse readTime. */ public readTime?: (google.protobuf.ITimestamp|null); - /** GroupFindingsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** GroupFindingsRequest pageToken. */ - public pageToken: string; + /** ListFindingsResponse nextPageToken. */ + public nextPageToken: string; - /** GroupFindingsRequest pageSize. */ - public pageSize: number; + /** ListFindingsResponse totalSize. */ + public totalSize: number; /** - * Creates a new GroupFindingsRequest instance using the specified properties. + * Creates a new ListFindingsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GroupFindingsRequest instance + * @returns ListFindingsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsRequest): google.cloud.securitycenter.v1.GroupFindingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListFindingsResponse): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. - * @param message GroupFindingsRequest message or plain object to encode + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * @param message ListFindingsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. + * Decodes a ListFindingsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GroupFindingsRequest + * @returns ListFindingsResponse * @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.cloud.securitycenter.v1.GroupFindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GroupFindingsRequest + * @returns ListFindingsResponse * @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.cloud.securitycenter.v1.GroupFindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Verifies a GroupFindingsRequest message. + * Verifies a ListFindingsResponse 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 GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GroupFindingsRequest + * @returns ListFindingsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. - * @param message GroupFindingsRequest + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * @param message ListFindingsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GroupFindingsRequest to JSON. + * Converts this ListFindingsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GroupFindingsRequest + * Gets the default type url for ListFindingsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GroupFindingsResponse. */ - interface IGroupFindingsResponse { + namespace ListFindingsResponse { - /** GroupFindingsResponse groupByResults */ - groupByResults?: (google.cloud.securitycenter.v1.IGroupResult[]|null); + /** Properties of a ListFindingsResult. */ + interface IListFindingsResult { - /** GroupFindingsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResult finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** GroupFindingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListFindingsResult stateChange */ + stateChange?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null); - /** GroupFindingsResponse totalSize */ - totalSize?: (number|null); - } + /** ListFindingsResult resource */ + resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); + } - /** Represents a GroupFindingsResponse. */ - class GroupFindingsResponse implements IGroupFindingsResponse { + /** Represents a ListFindingsResult. */ + class ListFindingsResult implements IListFindingsResult { - /** - * Constructs a new GroupFindingsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse); + /** + * Constructs a new ListFindingsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult); - /** GroupFindingsResponse groupByResults. */ - public groupByResults: google.cloud.securitycenter.v1.IGroupResult[]; + /** ListFindingsResult finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** GroupFindingsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** ListFindingsResult stateChange. */ + public stateChange: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange); - /** GroupFindingsResponse nextPageToken. */ - public nextPageToken: string; + /** ListFindingsResult resource. */ + public resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); - /** GroupFindingsResponse totalSize. */ - public totalSize: number; + /** + * Creates a new ListFindingsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFindingsResult instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - /** - * Creates a new GroupFindingsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupFindingsResponse instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupFindingsResponse): google.cloud.securitycenter.v1.GroupFindingsResponse; + /** + * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @param message ListFindingsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @param message ListFindingsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFindingsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFindingsResult + * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; + + /** + * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFindingsResult + * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; + + /** + * Verifies a ListFindingsResult 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 ListFindingsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFindingsResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; + + /** + * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. + * @param message ListFindingsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFindingsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFindingsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListFindingsResult { + + /** StateChange enum. */ + enum StateChange { + UNUSED = 0, + CHANGED = 1, + UNCHANGED = 2, + ADDED = 3, + REMOVED = 4 + } + + /** Properties of a Resource. */ + interface IResource { + + /** Resource name */ + name?: (string|null); - /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. - * @param message GroupFindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Resource displayName */ + displayName?: (string|null); - /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupFindingsResponse - * @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.cloud.securitycenter.v1.GroupFindingsResponse; + /** Resource type */ + type?: (string|null); - /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupFindingsResponse - * @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.cloud.securitycenter.v1.GroupFindingsResponse; + /** Resource projectName */ + projectName?: (string|null); - /** - * Verifies a GroupFindingsResponse 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); + /** Resource projectDisplayName */ + projectDisplayName?: (string|null); - /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupFindingsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupFindingsResponse; + /** Resource parentName */ + parentName?: (string|null); - /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. - * @param message GroupFindingsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.GroupFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Resource parentDisplayName */ + parentDisplayName?: (string|null); - /** - * Converts this GroupFindingsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Resource folders */ + folders?: (google.cloud.securitycenter.v1.IFolder[]|null); - /** - * Gets the default type url for GroupFindingsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Resource cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider|null); - /** Properties of a GroupResult. */ - interface IGroupResult { + /** Resource organization */ + organization?: (string|null); - /** GroupResult properties */ - properties?: ({ [k: string]: google.protobuf.IValue }|null); + /** Resource service */ + service?: (string|null); - /** GroupResult count */ - count?: (number|Long|string|null); - } + /** Resource location */ + location?: (string|null); - /** Represents a GroupResult. */ - class GroupResult implements IGroupResult { + /** Resource awsMetadata */ + awsMetadata?: (google.cloud.securitycenter.v1.IAwsMetadata|null); - /** - * Constructs a new GroupResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IGroupResult); + /** Resource azureMetadata */ + azureMetadata?: (google.cloud.securitycenter.v1.IAzureMetadata|null); - /** GroupResult properties. */ - public properties: { [k: string]: google.protobuf.IValue }; + /** Resource resourcePath */ + resourcePath?: (google.cloud.securitycenter.v1.IResourcePath|null); - /** GroupResult count. */ - public count: (number|Long|string); + /** Resource resourcePathString */ + resourcePathString?: (string|null); + } - /** - * Creates a new GroupResult instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IGroupResult): google.cloud.securitycenter.v1.GroupResult; + /** Represents a Resource. */ + class Resource implements IResource { - /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Resource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource); - /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. - * @param message GroupResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IGroupResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** Resource name. */ + public name: string; - /** - * Decodes a GroupResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupResult - * @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.cloud.securitycenter.v1.GroupResult; + /** Resource displayName. */ + public displayName: string; - /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupResult - * @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.cloud.securitycenter.v1.GroupResult; + /** Resource type. */ + public type: string; - /** - * Verifies a GroupResult 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); + /** Resource projectName. */ + public projectName: string; - /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GroupResult; + /** Resource projectDisplayName. */ + public projectDisplayName: string; - /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. - * @param message GroupResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.GroupResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Resource parentName. */ + public parentName: string; - /** - * Converts this GroupResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Resource parentDisplayName. */ + public parentDisplayName: string; - /** - * Gets the default type url for GroupResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Resource folders. */ + public folders: google.cloud.securitycenter.v1.IFolder[]; - /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest { + /** Resource cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider); - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); + /** Resource organization. */ + public organization: string; - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); + /** Resource service. */ + public service: string; - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); - } + /** Resource location. */ + public location: string; - /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ - class ListDescendantSecurityHealthAnalyticsCustomModulesRequest implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest { + /** Resource awsMetadata. */ + public awsMetadata?: (google.cloud.securitycenter.v1.IAwsMetadata|null); - /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest); + /** Resource azureMetadata. */ + public azureMetadata?: (google.cloud.securitycenter.v1.IAzureMetadata|null); - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; + /** Resource resourcePath. */ + public resourcePath?: (google.cloud.securitycenter.v1.IResourcePath|null); - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; + /** Resource resourcePathString. */ + public resourcePathString: string; - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; + /** Resource cloudProviderMetadata. */ + public cloudProviderMetadata?: ("awsMetadata"|"azureMetadata"); - /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + /** + * Creates a new Resource instance using the specified properties. + * @param [properties] Properties to set + * @returns Resource instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @param message Resource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + /** + * Decodes a Resource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Resource + * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Resource + * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; - /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Resource 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 ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Resource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @param message Resource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Resource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Gets the default type url for Resource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } - /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse { + /** Properties of a SetFindingStateRequest. */ + interface ISetFindingStateRequest { - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ - securityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]|null); + /** SetFindingStateRequest name */ + name?: (string|null); - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); + /** SetFindingStateRequest state */ + state?: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State|null); + + /** SetFindingStateRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ - class ListDescendantSecurityHealthAnalyticsCustomModulesResponse implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse { + /** Represents a SetFindingStateRequest. */ + class SetFindingStateRequest implements ISetFindingStateRequest { /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * Constructs a new SetFindingStateRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse); + constructor(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest); - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ - public securityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]; + /** SetFindingStateRequest name. */ + public name: string; - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; + /** SetFindingStateRequest state. */ + public state: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State); + + /** SetFindingStateRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * Creates a new SetFindingStateRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance + * @returns SetFindingStateRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + public static create(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * @param message SetFindingStateRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * Decodes a SetFindingStateRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns SetFindingStateRequest * @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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns SetFindingStateRequest * @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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. + * Verifies a SetFindingStateRequest 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 ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns SetFindingStateRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetFindingStateRequest; /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * @param message SetFindingStateRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. + * Converts this SetFindingStateRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * Gets the default type url for SetFindingStateRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMuteConfigsRequest. */ - interface IListMuteConfigsRequest { - - /** ListMuteConfigsRequest parent */ - parent?: (string|null); + /** Properties of a SetMuteRequest. */ + interface ISetMuteRequest { - /** ListMuteConfigsRequest pageSize */ - pageSize?: (number|null); + /** SetMuteRequest name */ + name?: (string|null); - /** ListMuteConfigsRequest pageToken */ - pageToken?: (string|null); + /** SetMuteRequest mute */ + mute?: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute|null); } - /** Represents a ListMuteConfigsRequest. */ - class ListMuteConfigsRequest implements IListMuteConfigsRequest { + /** Represents a SetMuteRequest. */ + class SetMuteRequest implements ISetMuteRequest { /** - * Constructs a new ListMuteConfigsRequest. + * Constructs a new SetMuteRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListMuteConfigsRequest); - - /** ListMuteConfigsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1.ISetMuteRequest); - /** ListMuteConfigsRequest pageSize. */ - public pageSize: number; + /** SetMuteRequest name. */ + public name: string; - /** ListMuteConfigsRequest pageToken. */ - public pageToken: string; + /** SetMuteRequest mute. */ + public mute: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute); /** - * Creates a new ListMuteConfigsRequest instance using the specified properties. + * Creates a new SetMuteRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMuteConfigsRequest instance + * @returns SetMuteRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListMuteConfigsRequest): google.cloud.securitycenter.v1.ListMuteConfigsRequest; + public static create(properties?: google.cloud.securitycenter.v1.ISetMuteRequest): google.cloud.securitycenter.v1.SetMuteRequest; /** - * Encodes the specified ListMuteConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. - * @param message ListMuteConfigsRequest message or plain object to encode + * Encodes the specified SetMuteRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. + * @param message SetMuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListMuteConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISetMuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMuteConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. - * @param message ListMuteConfigsRequest message or plain object to encode + * Encodes the specified SetMuteRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. + * @param message SetMuteRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListMuteConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetMuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMuteConfigsRequest message from the specified reader or buffer. + * Decodes a SetMuteRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMuteConfigsRequest + * @returns SetMuteRequest * @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.cloud.securitycenter.v1.ListMuteConfigsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SetMuteRequest; /** - * Decodes a ListMuteConfigsRequest message from the specified reader or buffer, length delimited. + * Decodes a SetMuteRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMuteConfigsRequest + * @returns SetMuteRequest * @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.cloud.securitycenter.v1.ListMuteConfigsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SetMuteRequest; /** - * Verifies a ListMuteConfigsRequest message. + * Verifies a SetMuteRequest 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 ListMuteConfigsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetMuteRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMuteConfigsRequest + * @returns SetMuteRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListMuteConfigsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetMuteRequest; /** - * Creates a plain object from a ListMuteConfigsRequest message. Also converts values to other types if specified. - * @param message ListMuteConfigsRequest + * Creates a plain object from a SetMuteRequest message. Also converts values to other types if specified. + * @param message SetMuteRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListMuteConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SetMuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMuteConfigsRequest to JSON. + * Converts this SetMuteRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMuteConfigsRequest + * Gets the default type url for SetMuteRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMuteConfigsResponse. */ - interface IListMuteConfigsResponse { - - /** ListMuteConfigsResponse muteConfigs */ - muteConfigs?: (google.cloud.securitycenter.v1.IMuteConfig[]|null); + /** Properties of a RunAssetDiscoveryRequest. */ + interface IRunAssetDiscoveryRequest { - /** ListMuteConfigsResponse nextPageToken */ - nextPageToken?: (string|null); + /** RunAssetDiscoveryRequest parent */ + parent?: (string|null); } - /** Represents a ListMuteConfigsResponse. */ - class ListMuteConfigsResponse implements IListMuteConfigsResponse { + /** Represents a RunAssetDiscoveryRequest. */ + class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { /** - * Constructs a new ListMuteConfigsResponse. + * Constructs a new RunAssetDiscoveryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListMuteConfigsResponse); - - /** ListMuteConfigsResponse muteConfigs. */ - public muteConfigs: google.cloud.securitycenter.v1.IMuteConfig[]; + constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest); - /** ListMuteConfigsResponse nextPageToken. */ - public nextPageToken: string; + /** RunAssetDiscoveryRequest parent. */ + public parent: string; /** - * Creates a new ListMuteConfigsResponse instance using the specified properties. + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMuteConfigsResponse instance + * @returns RunAssetDiscoveryRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListMuteConfigsResponse): google.cloud.securitycenter.v1.ListMuteConfigsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Encodes the specified ListMuteConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. - * @param message ListMuteConfigsResponse message or plain object to encode + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListMuteConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMuteConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. - * @param message ListMuteConfigsResponse message or plain object to encode + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * @param message RunAssetDiscoveryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListMuteConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMuteConfigsResponse message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMuteConfigsResponse + * @returns RunAssetDiscoveryRequest * @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.cloud.securitycenter.v1.ListMuteConfigsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Decodes a ListMuteConfigsResponse message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMuteConfigsResponse + * @returns RunAssetDiscoveryRequest * @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.cloud.securitycenter.v1.ListMuteConfigsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Verifies a ListMuteConfigsResponse message. + * Verifies a RunAssetDiscoveryRequest 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 ListMuteConfigsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMuteConfigsResponse + * @returns RunAssetDiscoveryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListMuteConfigsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; /** - * Creates a plain object from a ListMuteConfigsResponse message. Also converts values to other types if specified. - * @param message ListMuteConfigsResponse + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * @param message RunAssetDiscoveryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListMuteConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMuteConfigsResponse to JSON. + * Converts this RunAssetDiscoveryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMuteConfigsResponse + * Gets the default type url for RunAssetDiscoveryRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListNotificationConfigsRequest. */ - interface IListNotificationConfigsRequest { + /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ + interface ISimulateSecurityHealthAnalyticsCustomModuleRequest { - /** ListNotificationConfigsRequest parent */ + /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent */ parent?: (string|null); - /** ListNotificationConfigsRequest pageToken */ - pageToken?: (string|null); + /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig */ + customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - /** ListNotificationConfigsRequest pageSize */ - pageSize?: (number|null); + /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource */ + resource?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); } - /** Represents a ListNotificationConfigsRequest. */ - class ListNotificationConfigsRequest implements IListNotificationConfigsRequest { + /** Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ + class SimulateSecurityHealthAnalyticsCustomModuleRequest implements ISimulateSecurityHealthAnalyticsCustomModuleRequest { /** - * Constructs a new ListNotificationConfigsRequest. + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsRequest); + constructor(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest); - /** ListNotificationConfigsRequest parent. */ + /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent. */ public parent: string; - /** ListNotificationConfigsRequest pageToken. */ - public pageToken: string; + /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. */ + public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - /** ListNotificationConfigsRequest pageSize. */ - public pageSize: number; + /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource. */ + public resource?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); /** - * Creates a new ListNotificationConfigsRequest instance using the specified properties. + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotificationConfigsRequest instance + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsRequest): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; + public static create(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; /** - * Encodes the specified ListNotificationConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. - * @param message ListNotificationConfigsRequest message or plain object to encode + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNotificationConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. - * @param message ListNotificationConfigsRequest message or plain object to encode + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListNotificationConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNotificationConfigsRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.ListNotificationConfigsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; /** - * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer, length delimited. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNotificationConfigsRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.ListNotificationConfigsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; /** - * Verifies a ListNotificationConfigsRequest message. + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest 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 ListNotificationConfigsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNotificationConfigsRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListNotificationConfigsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; /** - * Creates a plain object from a ListNotificationConfigsRequest message. Also converts values to other types if specified. - * @param message ListNotificationConfigsRequest + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListNotificationConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotificationConfigsRequest to JSON. + * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListNotificationConfigsRequest + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListNotificationConfigsResponse. */ - interface IListNotificationConfigsResponse { + namespace SimulateSecurityHealthAnalyticsCustomModuleRequest { - /** ListNotificationConfigsResponse notificationConfigs */ - notificationConfigs?: (google.cloud.securitycenter.v1.INotificationConfig[]|null); + /** Properties of a SimulatedResource. */ + interface ISimulatedResource { - /** ListNotificationConfigsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** SimulatedResource resourceType */ + resourceType?: (string|null); - /** Represents a ListNotificationConfigsResponse. */ - class ListNotificationConfigsResponse implements IListNotificationConfigsResponse { + /** SimulatedResource resourceData */ + resourceData?: (google.protobuf.IStruct|null); - /** - * Constructs a new ListNotificationConfigsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsResponse); + /** SimulatedResource iamPolicyData */ + iamPolicyData?: (google.iam.v1.IPolicy|null); + } - /** ListNotificationConfigsResponse notificationConfigs. */ - public notificationConfigs: google.cloud.securitycenter.v1.INotificationConfig[]; + /** Represents a SimulatedResource. */ + class SimulatedResource implements ISimulatedResource { - /** ListNotificationConfigsResponse nextPageToken. */ - public nextPageToken: string; + /** + * Constructs a new SimulatedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource); - /** - * Creates a new ListNotificationConfigsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNotificationConfigsResponse instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IListNotificationConfigsResponse): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; + /** SimulatedResource resourceType. */ + public resourceType: string; - /** - * Encodes the specified ListNotificationConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. - * @param message ListNotificationConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IListNotificationConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** SimulatedResource resourceData. */ + public resourceData?: (google.protobuf.IStruct|null); - /** - * Encodes the specified ListNotificationConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. - * @param message ListNotificationConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListNotificationConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** SimulatedResource iamPolicyData. */ + public iamPolicyData?: (google.iam.v1.IPolicy|null); - /** - * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNotificationConfigsResponse - * @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.cloud.securitycenter.v1.ListNotificationConfigsResponse; + /** + * Creates a new SimulatedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulatedResource instance + */ + public static create(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - /** - * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNotificationConfigsResponse - * @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.cloud.securitycenter.v1.ListNotificationConfigsResponse; + /** + * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @param message SimulatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @param message SimulatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ListNotificationConfigsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a SimulatedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulatedResource + * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - /** - * Creates a ListNotificationConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNotificationConfigsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListNotificationConfigsResponse; + /** + * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulatedResource + * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - /** - * Creates a plain object from a ListNotificationConfigsResponse message. Also converts values to other types if specified. - * @param message ListNotificationConfigsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListNotificationConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a SimulatedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ListNotificationConfigsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulatedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - /** - * Gets the default type url for ListNotificationConfigsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. + * @param message SimulatedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { + /** + * Converts this SimulatedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); + /** + * Gets the default type url for SimulatedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); + /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ + interface ISimulateSecurityHealthAnalyticsCustomModuleResponse { - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); + /** SimulateSecurityHealthAnalyticsCustomModuleResponse result */ + result?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); } - /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ - class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { + /** Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ + class SimulateSecurityHealthAnalyticsCustomModuleResponse implements ISimulateSecurityHealthAnalyticsCustomModuleResponse { /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse); - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; + /** SimulateSecurityHealthAnalyticsCustomModuleResponse result. */ + public result?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + public static create(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse * @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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse * @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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse 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 ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. + * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { + namespace SimulateSecurityHealthAnalyticsCustomModuleResponse { - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules */ - effectiveSecurityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null); + /** Properties of a SimulatedResult. */ + interface ISimulatedResult { - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** SimulatedResult finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ - class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { + /** SimulatedResult noViolation */ + noViolation?: (google.protobuf.IEmpty|null); - /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse); + /** SimulatedResult error */ + error?: (google.rpc.IStatus|null); + } - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. */ - public effectiveSecurityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]; + /** Represents a SimulatedResult. */ + class SimulatedResult implements ISimulatedResult { - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; + /** + * Constructs a new SimulatedResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult); - /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + /** SimulatedResult finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** SimulatedResult noViolation. */ + public noViolation?: (google.protobuf.IEmpty|null); - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** SimulatedResult error. */ + public error?: (google.rpc.IStatus|null); - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + /** SimulatedResult result. */ + public result?: ("finding"|"noViolation"|"error"); + + /** + * Creates a new SimulatedResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulatedResult instance + */ + public static create(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + + /** + * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @param message SimulatedResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @param message SimulatedResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + /** + * Decodes a SimulatedResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulatedResult + * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulatedResult + * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + /** + * Verifies a SimulatedResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulatedResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. + * @param message SimulatedResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this SimulatedResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListSecurityHealthAnalyticsCustomModulesRequest { + /** + * Gets the default type url for SimulatedResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** ListSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); + /** Properties of an UpdateExternalSystemRequest. */ + interface IUpdateExternalSystemRequest { - /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); + /** UpdateExternalSystemRequest externalSystem */ + externalSystem?: (google.cloud.securitycenter.v1.IExternalSystem|null); - /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); + /** UpdateExternalSystemRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListSecurityHealthAnalyticsCustomModulesRequest. */ - class ListSecurityHealthAnalyticsCustomModulesRequest implements IListSecurityHealthAnalyticsCustomModulesRequest { + /** Represents an UpdateExternalSystemRequest. */ + class UpdateExternalSystemRequest implements IUpdateExternalSystemRequest { /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. + * Constructs a new UpdateExternalSystemRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest); - - /** ListSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest); - /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; + /** UpdateExternalSystemRequest externalSystem. */ + public externalSystem?: (google.cloud.securitycenter.v1.IExternalSystem|null); - /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; + /** UpdateExternalSystemRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * Creates a new UpdateExternalSystemRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecurityHealthAnalyticsCustomModulesRequest instance + * @returns UpdateExternalSystemRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * Encodes the specified UpdateExternalSystemRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. + * @param message UpdateExternalSystemRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * Encodes the specified UpdateExternalSystemRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. + * @param message UpdateExternalSystemRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecurityHealthAnalyticsCustomModulesRequest + * @returns UpdateExternalSystemRequest * @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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecurityHealthAnalyticsCustomModulesRequest + * @returns UpdateExternalSystemRequest * @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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. + * Verifies an UpdateExternalSystemRequest 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 ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExternalSystemRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecurityHealthAnalyticsCustomModulesRequest + * @returns UpdateExternalSystemRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest + * Creates a plain object from an UpdateExternalSystemRequest message. Also converts values to other types if specified. + * @param message UpdateExternalSystemRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateExternalSystemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. + * Converts this UpdateExternalSystemRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest + * Gets the default type url for UpdateExternalSystemRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListSecurityHealthAnalyticsCustomModulesResponse { + /** Properties of an UpdateFindingRequest. */ + interface IUpdateFindingRequest { - /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ - securityHealthAnalyticsCustomModules?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]|null); + /** UpdateFindingRequest finding */ + finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateFindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListSecurityHealthAnalyticsCustomModulesResponse. */ - class ListSecurityHealthAnalyticsCustomModulesResponse implements IListSecurityHealthAnalyticsCustomModulesResponse { + /** Represents an UpdateFindingRequest. */ + class UpdateFindingRequest implements IUpdateFindingRequest { /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. + * Constructs a new UpdateFindingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse); + constructor(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest); - /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ - public securityHealthAnalyticsCustomModules: google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[]; + /** UpdateFindingRequest finding. */ + public finding?: (google.cloud.securitycenter.v1.IFinding|null); - /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateFindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * Creates a new UpdateFindingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSecurityHealthAnalyticsCustomModulesResponse instance + * @returns UpdateFindingRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * @param message UpdateFindingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * Decodes an UpdateFindingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSecurityHealthAnalyticsCustomModulesResponse + * @returns UpdateFindingRequest * @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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSecurityHealthAnalyticsCustomModulesResponse + * @returns UpdateFindingRequest * @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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. + * Verifies an UpdateFindingRequest 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 ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSecurityHealthAnalyticsCustomModulesResponse + * @returns UpdateFindingRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateFindingRequest; /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * @param message UpdateFindingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. + * Converts this UpdateFindingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse + * Gets the default type url for UpdateFindingRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSourcesRequest. */ - interface IListSourcesRequest { - - /** ListSourcesRequest parent */ - parent?: (string|null); + /** Properties of an UpdateMuteConfigRequest. */ + interface IUpdateMuteConfigRequest { - /** ListSourcesRequest pageToken */ - pageToken?: (string|null); + /** UpdateMuteConfigRequest muteConfig */ + muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); - /** ListSourcesRequest pageSize */ - pageSize?: (number|null); + /** UpdateMuteConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListSourcesRequest. */ - class ListSourcesRequest implements IListSourcesRequest { + /** Represents an UpdateMuteConfigRequest. */ + class UpdateMuteConfigRequest implements IUpdateMuteConfigRequest { /** - * Constructs a new ListSourcesRequest. + * Constructs a new UpdateMuteConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSourcesRequest); - - /** ListSourcesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest); - /** ListSourcesRequest pageToken. */ - public pageToken: string; + /** UpdateMuteConfigRequest muteConfig. */ + public muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); - /** ListSourcesRequest pageSize. */ - public pageSize: number; + /** UpdateMuteConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListSourcesRequest instance using the specified properties. + * Creates a new UpdateMuteConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSourcesRequest instance + * @returns UpdateMuteConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSourcesRequest): google.cloud.securitycenter.v1.ListSourcesRequest; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode + * Encodes the specified UpdateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. + * @param message UpdateMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. - * @param message ListSourcesRequest message or plain object to encode + * Encodes the specified UpdateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. + * @param message UpdateMuteConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. + * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSourcesRequest + * @returns UpdateMuteConfigRequest * @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.cloud.securitycenter.v1.ListSourcesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSourcesRequest + * @returns UpdateMuteConfigRequest * @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.cloud.securitycenter.v1.ListSourcesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; /** - * Verifies a ListSourcesRequest message. + * Verifies an UpdateMuteConfigRequest 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 ListSourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSourcesRequest + * @returns UpdateMuteConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. - * @param message ListSourcesRequest + * Creates a plain object from an UpdateMuteConfigRequest message. Also converts values to other types if specified. + * @param message UpdateMuteConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSourcesRequest to JSON. + * Converts this UpdateMuteConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSourcesRequest + * Gets the default type url for UpdateMuteConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSourcesResponse. */ - interface IListSourcesResponse { + /** Properties of an UpdateNotificationConfigRequest. */ + interface IUpdateNotificationConfigRequest { - /** ListSourcesResponse sources */ - sources?: (google.cloud.securitycenter.v1.ISource[]|null); + /** UpdateNotificationConfigRequest notificationConfig */ + notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); - /** ListSourcesResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateNotificationConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListSourcesResponse. */ - class ListSourcesResponse implements IListSourcesResponse { + /** Represents an UpdateNotificationConfigRequest. */ + class UpdateNotificationConfigRequest implements IUpdateNotificationConfigRequest { /** - * Constructs a new ListSourcesResponse. + * Constructs a new UpdateNotificationConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListSourcesResponse); + constructor(properties?: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest); - /** ListSourcesResponse sources. */ - public sources: google.cloud.securitycenter.v1.ISource[]; + /** UpdateNotificationConfigRequest notificationConfig. */ + public notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); - /** ListSourcesResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateNotificationConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListSourcesResponse instance using the specified properties. + * Creates a new UpdateNotificationConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSourcesResponse instance + * @returns UpdateNotificationConfigRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListSourcesResponse): google.cloud.securitycenter.v1.ListSourcesResponse; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode + * Encodes the specified UpdateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * @param message UpdateNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. - * @param message ListSourcesResponse message or plain object to encode + * Encodes the specified UpdateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * @param message UpdateNotificationConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. + * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSourcesResponse + * @returns UpdateNotificationConfigRequest * @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.cloud.securitycenter.v1.ListSourcesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSourcesResponse + * @returns UpdateNotificationConfigRequest * @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.cloud.securitycenter.v1.ListSourcesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; /** - * Verifies a ListSourcesResponse message. + * Verifies an UpdateNotificationConfigRequest 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 ListSourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSourcesResponse + * @returns UpdateNotificationConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListSourcesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. - * @param message ListSourcesResponse + * Creates a plain object from an UpdateNotificationConfigRequest message. Also converts values to other types if specified. + * @param message UpdateNotificationConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSourcesResponse to JSON. + * Converts this UpdateNotificationConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSourcesResponse + * Gets the default type url for UpdateNotificationConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { - - /** ListAssetsRequest parent */ - parent?: (string|null); - - /** ListAssetsRequest filter */ - filter?: (string|null); - - /** ListAssetsRequest orderBy */ - orderBy?: (string|null); - - /** ListAssetsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** ListAssetsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); + /** Properties of an UpdateOrganizationSettingsRequest. */ + interface IUpdateOrganizationSettingsRequest { - /** ListAssetsRequest pageToken */ - pageToken?: (string|null); + /** UpdateOrganizationSettingsRequest organizationSettings */ + organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); - /** ListAssetsRequest pageSize */ - pageSize?: (number|null); + /** UpdateOrganizationSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { + /** Represents an UpdateOrganizationSettingsRequest. */ + class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { /** - * Constructs a new ListAssetsRequest. + * Constructs a new UpdateOrganizationSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListAssetsRequest); - - /** ListAssetsRequest parent. */ - public parent: string; - - /** ListAssetsRequest filter. */ - public filter: string; - - /** ListAssetsRequest orderBy. */ - public orderBy: string; - - /** ListAssetsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); - - /** ListAssetsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); - - /** ListAssetsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest); - /** ListAssetsRequest pageToken. */ - public pageToken: string; + /** UpdateOrganizationSettingsRequest organizationSettings. */ + public organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); - /** ListAssetsRequest pageSize. */ - public pageSize: number; + /** UpdateOrganizationSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsRequest instance + * @returns UpdateOrganizationSettingsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListAssetsRequest): google.cloud.securitycenter.v1.ListAssetsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * @param message UpdateOrganizationSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsRequest + * @returns UpdateOrganizationSettingsRequest * @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.cloud.securitycenter.v1.ListAssetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest + * @returns UpdateOrganizationSettingsRequest * @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.cloud.securitycenter.v1.ListAssetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Verifies a ListAssetsRequest message. + * Verifies an UpdateOrganizationSettingsRequest 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 ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsRequest + * @returns UpdateOrganizationSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateOrganizationSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this UpdateOrganizationSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAssetsRequest + * Gets the default type url for UpdateOrganizationSettingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { - - /** ListAssetsResponse listAssetsResults */ - listAssetsResults?: (google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]|null); - - /** ListAssetsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ + interface IUpdateSecurityHealthAnalyticsCustomModuleRequest { - /** ListAssetsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ + securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); - /** ListAssetsResponse totalSize */ - totalSize?: (number|null); + /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { + /** Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ + class UpdateSecurityHealthAnalyticsCustomModuleRequest implements IUpdateSecurityHealthAnalyticsCustomModuleRequest { /** - * Constructs a new ListAssetsResponse. + * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListAssetsResponse); - - /** ListAssetsResponse listAssetsResults. */ - public listAssetsResults: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[]; - - /** ListAssetsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest); - /** ListAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ + public securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); - /** ListAssetsResponse totalSize. */ - public totalSize: number; + /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsResponse instance + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListAssetsResponse): google.cloud.securitycenter.v1.ListAssetsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsResponse + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.ListAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest * @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.cloud.securitycenter.v1.ListAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; /** - * Verifies a ListAssetsResponse message. + * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest 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 ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsResponse + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse + * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAssetsResponse + * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ListAssetsResponse { - - /** Properties of a ListAssetsResult. */ - interface IListAssetsResult { - - /** ListAssetsResult asset */ - asset?: (google.cloud.securitycenter.v1.IAsset|null); - - /** ListAssetsResult stateChange */ - stateChange?: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null); - } - - /** Represents a ListAssetsResult. */ - class ListAssetsResult implements IListAssetsResult { - - /** - * Constructs a new ListAssetsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult); - - /** ListAssetsResult asset. */ - public asset?: (google.cloud.securitycenter.v1.IAsset|null); - - /** ListAssetsResult stateChange. */ - public stateChange: (google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange); - - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; - - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @param message ListAssetsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsResult - * @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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsResult - * @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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; - - /** - * Verifies a ListAssetsResult 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 ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult; - - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @param message ListAssetsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAssetsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAssetsResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ListAssetsResult { - - /** StateChange enum. */ - enum StateChange { - UNUSED = 0, - ADDED = 1, - REMOVED = 2, - ACTIVE = 3 - } - } - } - - /** Properties of a ListFindingsRequest. */ - interface IListFindingsRequest { - - /** ListFindingsRequest parent */ - parent?: (string|null); - - /** ListFindingsRequest filter */ - filter?: (string|null); - - /** ListFindingsRequest orderBy */ - orderBy?: (string|null); - - /** ListFindingsRequest readTime */ - readTime?: (google.protobuf.ITimestamp|null); - - /** ListFindingsRequest compareDuration */ - compareDuration?: (google.protobuf.IDuration|null); - - /** ListFindingsRequest fieldMask */ - fieldMask?: (google.protobuf.IFieldMask|null); - - /** ListFindingsRequest pageToken */ - pageToken?: (string|null); - - /** ListFindingsRequest pageSize */ - pageSize?: (number|null); - } - - /** Represents a ListFindingsRequest. */ - class ListFindingsRequest implements IListFindingsRequest { - - /** - * Constructs a new ListFindingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.IListFindingsRequest); - - /** ListFindingsRequest parent. */ - public parent: string; - - /** ListFindingsRequest filter. */ - public filter: string; + /** Properties of an UpdateSourceRequest. */ + interface IUpdateSourceRequest { - /** ListFindingsRequest orderBy. */ - public orderBy: string; + /** UpdateSourceRequest source */ + source?: (google.cloud.securitycenter.v1.ISource|null); - /** ListFindingsRequest readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** UpdateSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** ListFindingsRequest compareDuration. */ - public compareDuration?: (google.protobuf.IDuration|null); + /** Represents an UpdateSourceRequest. */ + class UpdateSourceRequest implements IUpdateSourceRequest { - /** ListFindingsRequest fieldMask. */ - public fieldMask?: (google.protobuf.IFieldMask|null); + /** + * Constructs a new UpdateSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest); - /** ListFindingsRequest pageToken. */ - public pageToken: string; + /** UpdateSourceRequest source. */ + public source?: (google.cloud.securitycenter.v1.ISource|null); - /** ListFindingsRequest pageSize. */ - public pageSize: number; + /** UpdateSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListFindingsRequest instance using the specified properties. + * Creates a new UpdateSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFindingsRequest instance + * @returns UpdateSourceRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListFindingsRequest): google.cloud.securitycenter.v1.ListFindingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. - * @param message ListFindingsRequest message or plain object to encode + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @param message UpdateSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes an UpdateSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsRequest + * @returns UpdateSourceRequest * @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.cloud.securitycenter.v1.ListFindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsRequest + * @returns UpdateSourceRequest * @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.cloud.securitycenter.v1.ListFindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Verifies a ListFindingsRequest message. + * Verifies an UpdateSourceRequest 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 ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsRequest + * @returns UpdateSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSourceRequest; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. - * @param message ListFindingsRequest + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @param message UpdateSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this UpdateSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFindingsRequest + * Gets the default type url for UpdateSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFindingsResponse. */ - interface IListFindingsResponse { - - /** ListFindingsResponse listFindingsResults */ - listFindingsResults?: (google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]|null); + /** Properties of an UpdateSecurityMarksRequest. */ + interface IUpdateSecurityMarksRequest { - /** ListFindingsResponse readTime */ - readTime?: (google.protobuf.ITimestamp|null); + /** UpdateSecurityMarksRequest securityMarks */ + securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** ListFindingsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateSecurityMarksRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ListFindingsResponse totalSize */ - totalSize?: (number|null); + /** UpdateSecurityMarksRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListFindingsResponse. */ - class ListFindingsResponse implements IListFindingsResponse { + /** Represents an UpdateSecurityMarksRequest. */ + class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { /** - * Constructs a new ListFindingsResponse. + * Constructs a new UpdateSecurityMarksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListFindingsResponse); - - /** ListFindingsResponse listFindingsResults. */ - public listFindingsResults: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[]; + constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest); - /** ListFindingsResponse readTime. */ - public readTime?: (google.protobuf.ITimestamp|null); + /** UpdateSecurityMarksRequest securityMarks. */ + public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - /** ListFindingsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateSecurityMarksRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ListFindingsResponse totalSize. */ - public totalSize: number; + /** UpdateSecurityMarksRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFindingsResponse instance + * @returns UpdateSecurityMarksRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListFindingsResponse): google.cloud.securitycenter.v1.ListFindingsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. - * @param message ListFindingsResponse message or plain object to encode + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @param message UpdateSecurityMarksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListFindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFindingsResponse + * @returns UpdateSecurityMarksRequest * @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.cloud.securitycenter.v1.ListFindingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFindingsResponse + * @returns UpdateSecurityMarksRequest * @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.cloud.securitycenter.v1.ListFindingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Verifies a ListFindingsResponse message. + * Verifies an UpdateSecurityMarksRequest 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 ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFindingsResponse + * @returns UpdateSecurityMarksRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. - * @param message ListFindingsResponse + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityMarksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this UpdateSecurityMarksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFindingsResponse + * Gets the default type url for UpdateSecurityMarksRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ListFindingsResponse { - - /** Properties of a ListFindingsResult. */ - interface IListFindingsResult { - - /** ListFindingsResult finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); - - /** ListFindingsResult stateChange */ - stateChange?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null); - - /** ListFindingsResult resource */ - resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); - } - - /** Represents a ListFindingsResult. */ - class ListFindingsResult implements IListFindingsResult { - - /** - * Constructs a new ListFindingsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult); - - /** ListFindingsResult finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); - - /** ListFindingsResult stateChange. */ - public stateChange: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|keyof typeof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange); - - /** ListFindingsResult resource. */ - public resource?: (google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null); - - /** - * Creates a new ListFindingsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ListFindingsResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @param message ListFindingsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @param message ListFindingsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListFindingsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListFindingsResult - * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListFindingsResult - * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; - - /** - * Verifies a ListFindingsResult 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 ListFindingsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFindingsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult; + /** Properties of a CreateBigQueryExportRequest. */ + interface ICreateBigQueryExportRequest { - /** - * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. - * @param message ListFindingsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateBigQueryExportRequest parent */ + parent?: (string|null); - /** - * Converts this ListFindingsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** CreateBigQueryExportRequest bigQueryExport */ + bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); - /** - * Gets the default type url for ListFindingsResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** CreateBigQueryExportRequest bigQueryExportId */ + bigQueryExportId?: (string|null); + } - namespace ListFindingsResult { + /** Represents a CreateBigQueryExportRequest. */ + class CreateBigQueryExportRequest implements ICreateBigQueryExportRequest { - /** StateChange enum. */ - enum StateChange { - UNUSED = 0, - CHANGED = 1, - UNCHANGED = 2, - ADDED = 3, - REMOVED = 4 - } + /** + * Constructs a new CreateBigQueryExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest); - /** Properties of a Resource. */ - interface IResource { + /** CreateBigQueryExportRequest parent. */ + public parent: string; - /** Resource name */ - name?: (string|null); + /** CreateBigQueryExportRequest bigQueryExport. */ + public bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); - /** Resource displayName */ - displayName?: (string|null); + /** CreateBigQueryExportRequest bigQueryExportId. */ + public bigQueryExportId: string; - /** Resource type */ - type?: (string|null); + /** + * Creates a new CreateBigQueryExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBigQueryExportRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest): google.cloud.securitycenter.v1.CreateBigQueryExportRequest; - /** Resource projectName */ - projectName?: (string|null); + /** + * Encodes the specified CreateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. + * @param message CreateBigQueryExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Resource projectDisplayName */ - projectDisplayName?: (string|null); + /** + * Encodes the specified CreateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. + * @param message CreateBigQueryExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Resource parentName */ - parentName?: (string|null); + /** + * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBigQueryExportRequest + * @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.cloud.securitycenter.v1.CreateBigQueryExportRequest; - /** Resource parentDisplayName */ - parentDisplayName?: (string|null); + /** + * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBigQueryExportRequest + * @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.cloud.securitycenter.v1.CreateBigQueryExportRequest; - /** Resource folders */ - folders?: (google.cloud.securitycenter.v1.IFolder[]|null); - } + /** + * Verifies a CreateBigQueryExportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a Resource. */ - class Resource implements IResource { + /** + * Creates a CreateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBigQueryExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateBigQueryExportRequest; - /** - * Constructs a new Resource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource); + /** + * Creates a plain object from a CreateBigQueryExportRequest message. Also converts values to other types if specified. + * @param message CreateBigQueryExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CreateBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Resource name. */ - public name: string; + /** + * Converts this CreateBigQueryExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Resource displayName. */ - public displayName: string; + /** + * Gets the default type url for CreateBigQueryExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Resource type. */ - public type: string; + /** Properties of an UpdateBigQueryExportRequest. */ + interface IUpdateBigQueryExportRequest { - /** Resource projectName. */ - public projectName: string; + /** UpdateBigQueryExportRequest bigQueryExport */ + bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); - /** Resource projectDisplayName. */ - public projectDisplayName: string; + /** UpdateBigQueryExportRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** Resource parentName. */ - public parentName: string; + /** Represents an UpdateBigQueryExportRequest. */ + class UpdateBigQueryExportRequest implements IUpdateBigQueryExportRequest { - /** Resource parentDisplayName. */ - public parentDisplayName: string; + /** + * Constructs a new UpdateBigQueryExportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest); - /** Resource folders. */ - public folders: google.cloud.securitycenter.v1.IFolder[]; + /** UpdateBigQueryExportRequest bigQueryExport. */ + public bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); - /** - * Creates a new Resource instance using the specified properties. - * @param [properties] Properties to set - * @returns Resource instance - */ - public static create(properties?: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + /** UpdateBigQueryExportRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new UpdateBigQueryExportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBigQueryExportRequest instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest): google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. - * @param message Resource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified UpdateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. + * @param message UpdateBigQueryExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Resource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Resource - * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + /** + * Encodes the specified UpdateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. + * @param message UpdateBigQueryExportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Resource - * @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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + /** + * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBigQueryExportRequest + * @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.cloud.securitycenter.v1.UpdateBigQueryExportRequest; - /** - * Verifies a Resource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBigQueryExportRequest + * @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.cloud.securitycenter.v1.UpdateBigQueryExportRequest; - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Resource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource; + /** + * Verifies an UpdateBigQueryExportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @param message Resource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an UpdateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBigQueryExportRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; - /** - * Converts this Resource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an UpdateBigQueryExportRequest message. Also converts values to other types if specified. + * @param message UpdateBigQueryExportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.UpdateBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for Resource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Converts this UpdateBigQueryExportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBigQueryExportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetFindingStateRequest. */ - interface ISetFindingStateRequest { + /** Properties of a ListBigQueryExportsRequest. */ + interface IListBigQueryExportsRequest { - /** SetFindingStateRequest name */ - name?: (string|null); + /** ListBigQueryExportsRequest parent */ + parent?: (string|null); - /** SetFindingStateRequest state */ - state?: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State|null); + /** ListBigQueryExportsRequest pageSize */ + pageSize?: (number|null); - /** SetFindingStateRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** ListBigQueryExportsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a SetFindingStateRequest. */ - class SetFindingStateRequest implements ISetFindingStateRequest { + /** Represents a ListBigQueryExportsRequest. */ + class ListBigQueryExportsRequest implements IListBigQueryExportsRequest { /** - * Constructs a new SetFindingStateRequest. + * Constructs a new ListBigQueryExportsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsRequest); - /** SetFindingStateRequest name. */ - public name: string; + /** ListBigQueryExportsRequest parent. */ + public parent: string; - /** SetFindingStateRequest state. */ - public state: (google.cloud.securitycenter.v1.Finding.State|keyof typeof google.cloud.securitycenter.v1.Finding.State); + /** ListBigQueryExportsRequest pageSize. */ + public pageSize: number; - /** SetFindingStateRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ListBigQueryExportsRequest pageToken. */ + public pageToken: string; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * Creates a new ListBigQueryExportsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetFindingStateRequest instance + * @returns ListBigQueryExportsRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISetFindingStateRequest): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsRequest): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified ListBigQueryExportsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. + * @param message ListBigQueryExportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. - * @param message SetFindingStateRequest message or plain object to encode + * Encodes the specified ListBigQueryExportsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. + * @param message ListBigQueryExportsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetFindingStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetFindingStateRequest + * @returns ListBigQueryExportsRequest * @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.cloud.securitycenter.v1.SetFindingStateRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetFindingStateRequest + * @returns ListBigQueryExportsRequest * @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.cloud.securitycenter.v1.SetFindingStateRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; /** - * Verifies a SetFindingStateRequest message. + * Verifies a ListBigQueryExportsRequest 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 SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryExportsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetFindingStateRequest + * @returns ListBigQueryExportsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetFindingStateRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. - * @param message SetFindingStateRequest + * Creates a plain object from a ListBigQueryExportsRequest message. Also converts values to other types if specified. + * @param message ListBigQueryExportsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SetFindingStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListBigQueryExportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetFindingStateRequest to JSON. + * Converts this ListBigQueryExportsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetFindingStateRequest + * Gets the default type url for ListBigQueryExportsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetMuteRequest. */ - interface ISetMuteRequest { + /** Properties of a ListBigQueryExportsResponse. */ + interface IListBigQueryExportsResponse { - /** SetMuteRequest name */ - name?: (string|null); + /** ListBigQueryExportsResponse bigQueryExports */ + bigQueryExports?: (google.cloud.securitycenter.v1.IBigQueryExport[]|null); - /** SetMuteRequest mute */ - mute?: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute|null); + /** ListBigQueryExportsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a SetMuteRequest. */ - class SetMuteRequest implements ISetMuteRequest { + /** Represents a ListBigQueryExportsResponse. */ + class ListBigQueryExportsResponse implements IListBigQueryExportsResponse { /** - * Constructs a new SetMuteRequest. + * Constructs a new ListBigQueryExportsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISetMuteRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsResponse); - /** SetMuteRequest name. */ - public name: string; + /** ListBigQueryExportsResponse bigQueryExports. */ + public bigQueryExports: google.cloud.securitycenter.v1.IBigQueryExport[]; - /** SetMuteRequest mute. */ - public mute: (google.cloud.securitycenter.v1.Finding.Mute|keyof typeof google.cloud.securitycenter.v1.Finding.Mute); + /** ListBigQueryExportsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new SetMuteRequest instance using the specified properties. + * Creates a new ListBigQueryExportsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetMuteRequest instance + * @returns ListBigQueryExportsResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISetMuteRequest): google.cloud.securitycenter.v1.SetMuteRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsResponse): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; /** - * Encodes the specified SetMuteRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. - * @param message SetMuteRequest message or plain object to encode + * Encodes the specified ListBigQueryExportsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. + * @param message ListBigQueryExportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISetMuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListBigQueryExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetMuteRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. - * @param message SetMuteRequest message or plain object to encode + * Encodes the specified ListBigQueryExportsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. + * @param message ListBigQueryExportsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISetMuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListBigQueryExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetMuteRequest message from the specified reader or buffer. + * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetMuteRequest + * @returns ListBigQueryExportsResponse * @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.cloud.securitycenter.v1.SetMuteRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; /** - * Decodes a SetMuteRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetMuteRequest + * @returns ListBigQueryExportsResponse * @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.cloud.securitycenter.v1.SetMuteRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; /** - * Verifies a SetMuteRequest message. + * Verifies a ListBigQueryExportsResponse 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 SetMuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryExportsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetMuteRequest + * @returns ListBigQueryExportsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SetMuteRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; /** - * Creates a plain object from a SetMuteRequest message. Also converts values to other types if specified. - * @param message SetMuteRequest + * Creates a plain object from a ListBigQueryExportsResponse message. Also converts values to other types if specified. + * @param message ListBigQueryExportsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SetMuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListBigQueryExportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetMuteRequest to JSON. + * Converts this ListBigQueryExportsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetMuteRequest + * Gets the default type url for ListBigQueryExportsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RunAssetDiscoveryRequest. */ - interface IRunAssetDiscoveryRequest { + /** Properties of a DeleteBigQueryExportRequest. */ + interface IDeleteBigQueryExportRequest { - /** RunAssetDiscoveryRequest parent */ - parent?: (string|null); + /** DeleteBigQueryExportRequest name */ + name?: (string|null); } - /** Represents a RunAssetDiscoveryRequest. */ - class RunAssetDiscoveryRequest implements IRunAssetDiscoveryRequest { + /** Represents a DeleteBigQueryExportRequest. */ + class DeleteBigQueryExportRequest implements IDeleteBigQueryExportRequest { /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new DeleteBigQueryExportRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest); - /** RunAssetDiscoveryRequest parent. */ - public parent: string; + /** DeleteBigQueryExportRequest name. */ + public name: string; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * Creates a new DeleteBigQueryExportRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RunAssetDiscoveryRequest instance + * @returns DeleteBigQueryExportRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified DeleteBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * @param message DeleteBigQueryExportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. - * @param message RunAssetDiscoveryRequest message or plain object to encode + * Encodes the specified DeleteBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * @param message DeleteBigQueryExportRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RunAssetDiscoveryRequest + * @returns DeleteBigQueryExportRequest * @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.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RunAssetDiscoveryRequest + * @returns DeleteBigQueryExportRequest * @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.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a DeleteBigQueryExportRequest 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 RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RunAssetDiscoveryRequest + * @returns DeleteBigQueryExportRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.RunAssetDiscoveryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. - * @param message RunAssetDiscoveryRequest + * Creates a plain object from a DeleteBigQueryExportRequest message. Also converts values to other types if specified. + * @param message DeleteBigQueryExportRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.DeleteBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this DeleteBigQueryExportRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RunAssetDiscoveryRequest + * Gets the default type url for DeleteBigQueryExportRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ - interface ISimulateSecurityHealthAnalyticsCustomModuleRequest { + /** Properties of a CreateEventThreatDetectionCustomModuleRequest. */ + interface ICreateEventThreatDetectionCustomModuleRequest { - /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent */ + /** CreateEventThreatDetectionCustomModuleRequest parent */ parent?: (string|null); - /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig */ - customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource */ - resource?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); + /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ + eventThreatDetectionCustomModule?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null); } - /** Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ - class SimulateSecurityHealthAnalyticsCustomModuleRequest implements ISimulateSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a CreateEventThreatDetectionCustomModuleRequest. */ + class CreateEventThreatDetectionCustomModuleRequest implements ICreateEventThreatDetectionCustomModuleRequest { /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new CreateEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest); + constructor(properties?: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest); - /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent. */ + /** CreateEventThreatDetectionCustomModuleRequest parent. */ public parent: string; - /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. */ - public customConfig?: (google.cloud.securitycenter.v1.ICustomConfig|null); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource. */ - public resource?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); + /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ + public eventThreatDetectionCustomModule?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null); /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest instance + * @returns CreateEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns CreateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns CreateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest; /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a CreateEventThreatDetectionCustomModuleRequest 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 SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns CreateEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message CreateEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SimulateSecurityHealthAnalyticsCustomModuleRequest { - - /** Properties of a SimulatedResource. */ - interface ISimulatedResource { - - /** SimulatedResource resourceType */ - resourceType?: (string|null); - - /** SimulatedResource resourceData */ - resourceData?: (google.protobuf.IStruct|null); - - /** SimulatedResource iamPolicyData */ - iamPolicyData?: (google.iam.v1.IPolicy|null); - } - - /** Represents a SimulatedResource. */ - class SimulatedResource implements ISimulatedResource { - - /** - * Constructs a new SimulatedResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource); - - /** SimulatedResource resourceType. */ - public resourceType: string; - - /** SimulatedResource resourceData. */ - public resourceData?: (google.protobuf.IStruct|null); - - /** SimulatedResource iamPolicyData. */ - public iamPolicyData?: (google.iam.v1.IPolicy|null); - - /** - * Creates a new SimulatedResource instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulatedResource instance - */ - public static create(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @param message SimulatedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @param message SimulatedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulatedResource - * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulatedResource - * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Verifies a SimulatedResource 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 SimulatedResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulatedResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. - * @param message SimulatedResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulatedResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ValidateEventThreatDetectionCustomModuleRequest. */ + interface IValidateEventThreatDetectionCustomModuleRequest { - /** - * Gets the default type url for SimulatedResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** ValidateEventThreatDetectionCustomModuleRequest parent */ + parent?: (string|null); - /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ - interface ISimulateSecurityHealthAnalyticsCustomModuleResponse { + /** ValidateEventThreatDetectionCustomModuleRequest rawText */ + rawText?: (string|null); - /** SimulateSecurityHealthAnalyticsCustomModuleResponse result */ - result?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); + /** ValidateEventThreatDetectionCustomModuleRequest type */ + type?: (string|null); } - /** Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ - class SimulateSecurityHealthAnalyticsCustomModuleResponse implements ISimulateSecurityHealthAnalyticsCustomModuleResponse { + /** Represents a ValidateEventThreatDetectionCustomModuleRequest. */ + class ValidateEventThreatDetectionCustomModuleRequest implements IValidateEventThreatDetectionCustomModuleRequest { /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. + * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse); + constructor(properties?: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest); - /** SimulateSecurityHealthAnalyticsCustomModuleResponse result. */ - public result?: (google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); + /** ValidateEventThreatDetectionCustomModuleRequest parent. */ + public parent: string; + + /** ValidateEventThreatDetectionCustomModuleRequest rawText. */ + public rawText: string; + + /** ValidateEventThreatDetectionCustomModuleRequest type. */ + public type: string; /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. + * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse instance + * @returns ValidateEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + public static create(properties?: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns ValidateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns ValidateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest; /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. + * Verifies a ValidateEventThreatDetectionCustomModuleRequest 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 SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns ValidateEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message ValidateEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. + * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse + * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SimulateSecurityHealthAnalyticsCustomModuleResponse { - - /** Properties of a SimulatedResult. */ - interface ISimulatedResult { - - /** SimulatedResult finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); - - /** SimulatedResult noViolation */ - noViolation?: (google.protobuf.IEmpty|null); - - /** SimulatedResult error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents a SimulatedResult. */ - class SimulatedResult implements ISimulatedResult { - - /** - * Constructs a new SimulatedResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult); + /** Properties of a ValidateEventThreatDetectionCustomModuleResponse. */ + interface IValidateEventThreatDetectionCustomModuleResponse { - /** SimulatedResult finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** ValidateEventThreatDetectionCustomModuleResponse errors */ + errors?: (google.cloud.securitycenter.v1.ICustomModuleValidationErrors|null); + } - /** SimulatedResult noViolation. */ - public noViolation?: (google.protobuf.IEmpty|null); + /** Represents a ValidateEventThreatDetectionCustomModuleResponse. */ + class ValidateEventThreatDetectionCustomModuleResponse implements IValidateEventThreatDetectionCustomModuleResponse { - /** SimulatedResult error. */ - public error?: (google.rpc.IStatus|null); + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse); - /** SimulatedResult result. */ - public result?: ("finding"|"noViolation"|"error"); + /** ValidateEventThreatDetectionCustomModuleResponse errors. */ + public errors?: (google.cloud.securitycenter.v1.ICustomModuleValidationErrors|null); - /** - * Creates a new SimulatedResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulatedResult instance - */ - public static create(properties?: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + /** + * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateEventThreatDetectionCustomModuleResponse instance + */ + public static create(properties?: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse; - /** - * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @param message SimulatedResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @param message SimulatedResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SimulatedResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulatedResult - * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateEventThreatDetectionCustomModuleResponse + * @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.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse; - /** - * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulatedResult - * @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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateEventThreatDetectionCustomModuleResponse + * @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.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse; - /** - * Verifies a SimulatedResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ValidateEventThreatDetectionCustomModuleResponse 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 SimulatedResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulatedResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + /** + * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateEventThreatDetectionCustomModuleResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse; - /** - * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. - * @param message SimulatedResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. + * @param message ValidateEventThreatDetectionCustomModuleResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this SimulatedResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for SimulatedResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateExternalSystemRequest. */ - interface IUpdateExternalSystemRequest { - - /** UpdateExternalSystemRequest externalSystem */ - externalSystem?: (google.cloud.securitycenter.v1.IExternalSystem|null); + /** Properties of a DeleteEventThreatDetectionCustomModuleRequest. */ + interface IDeleteEventThreatDetectionCustomModuleRequest { - /** UpdateExternalSystemRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); } - /** Represents an UpdateExternalSystemRequest. */ - class UpdateExternalSystemRequest implements IUpdateExternalSystemRequest { + /** Represents a DeleteEventThreatDetectionCustomModuleRequest. */ + class DeleteEventThreatDetectionCustomModuleRequest implements IDeleteEventThreatDetectionCustomModuleRequest { /** - * Constructs a new UpdateExternalSystemRequest. + * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest); - - /** UpdateExternalSystemRequest externalSystem. */ - public externalSystem?: (google.cloud.securitycenter.v1.IExternalSystem|null); + constructor(properties?: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest); - /** UpdateExternalSystemRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** DeleteEventThreatDetectionCustomModuleRequest name. */ + public name: string; /** - * Creates a new UpdateExternalSystemRequest instance using the specified properties. + * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateExternalSystemRequest instance + * @returns DeleteEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; + public static create(properties?: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified UpdateExternalSystemRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. - * @param message UpdateExternalSystemRequest message or plain object to encode + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateExternalSystemRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. - * @param message UpdateExternalSystemRequest message or plain object to encode + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateExternalSystemRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer. + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateExternalSystemRequest + * @returns DeleteEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateExternalSystemRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest; /** - * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateExternalSystemRequest + * @returns DeleteEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateExternalSystemRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest; /** - * Verifies an UpdateExternalSystemRequest message. + * Verifies a DeleteEventThreatDetectionCustomModuleRequest 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 UpdateExternalSystemRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateExternalSystemRequest + * @returns DeleteEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateExternalSystemRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from an UpdateExternalSystemRequest message. Also converts values to other types if specified. - * @param message UpdateExternalSystemRequest + * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message DeleteEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateExternalSystemRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateExternalSystemRequest to JSON. + * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateExternalSystemRequest + * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateFindingRequest. */ - interface IUpdateFindingRequest { - - /** UpdateFindingRequest finding */ - finding?: (google.cloud.securitycenter.v1.IFinding|null); + /** Properties of a GetEventThreatDetectionCustomModuleRequest. */ + interface IGetEventThreatDetectionCustomModuleRequest { - /** UpdateFindingRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); } - /** Represents an UpdateFindingRequest. */ - class UpdateFindingRequest implements IUpdateFindingRequest { + /** Represents a GetEventThreatDetectionCustomModuleRequest. */ + class GetEventThreatDetectionCustomModuleRequest implements IGetEventThreatDetectionCustomModuleRequest { /** - * Constructs a new UpdateFindingRequest. + * Constructs a new GetEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest); - - /** UpdateFindingRequest finding. */ - public finding?: (google.cloud.securitycenter.v1.IFinding|null); + constructor(properties?: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest); - /** UpdateFindingRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetEventThreatDetectionCustomModuleRequest name. */ + public name: string; /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFindingRequest instance + * @returns GetEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateFindingRequest): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. - * @param message UpdateFindingRequest message or plain object to encode + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateFindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFindingRequest + * @returns GetEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateFindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFindingRequest + * @returns GetEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateFindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GetEventThreatDetectionCustomModuleRequest 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 UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFindingRequest + * @returns GetEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateFindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. - * @param message UpdateFindingRequest + * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateFindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFindingRequest to JSON. + * Converts this GetEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateFindingRequest + * Gets the default type url for GetEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateMuteConfigRequest. */ - interface IUpdateMuteConfigRequest { + /** Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. */ + interface IListDescendantEventThreatDetectionCustomModulesRequest { - /** UpdateMuteConfigRequest muteConfig */ - muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); + /** ListDescendantEventThreatDetectionCustomModulesRequest parent */ + parent?: (string|null); - /** UpdateMuteConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); } - /** Represents an UpdateMuteConfigRequest. */ - class UpdateMuteConfigRequest implements IUpdateMuteConfigRequest { + /** Represents a ListDescendantEventThreatDetectionCustomModulesRequest. */ + class ListDescendantEventThreatDetectionCustomModulesRequest implements IListDescendantEventThreatDetectionCustomModulesRequest { /** - * Constructs a new UpdateMuteConfigRequest. + * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest); - /** UpdateMuteConfigRequest muteConfig. */ - public muteConfig?: (google.cloud.securitycenter.v1.IMuteConfig|null); + /** ListDescendantEventThreatDetectionCustomModulesRequest parent. */ + public parent: string; - /** UpdateMuteConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; /** - * Creates a new UpdateMuteConfigRequest instance using the specified properties. + * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateMuteConfigRequest instance + * @returns ListDescendantEventThreatDetectionCustomModulesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest; /** - * Encodes the specified UpdateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. - * @param message UpdateMuteConfigRequest message or plain object to encode + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. - * @param message UpdateMuteConfigRequest message or plain object to encode + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateMuteConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateMuteConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.UpdateMuteConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest; /** - * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateMuteConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.UpdateMuteConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest; /** - * Verifies an UpdateMuteConfigRequest message. + * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest 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 UpdateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateMuteConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateMuteConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest; /** - * Creates a plain object from an UpdateMuteConfigRequest message. Also converts values to other types if specified. - * @param message UpdateMuteConfigRequest + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateMuteConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateMuteConfigRequest to JSON. + * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateMuteConfigRequest + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateNotificationConfigRequest. */ - interface IUpdateNotificationConfigRequest { + /** Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. */ + interface IListDescendantEventThreatDetectionCustomModulesResponse { - /** UpdateNotificationConfigRequest notificationConfig */ - notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); + /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ + eventThreatDetectionCustomModules?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[]|null); - /** UpdateNotificationConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateNotificationConfigRequest. */ - class UpdateNotificationConfigRequest implements IUpdateNotificationConfigRequest { + /** Represents a ListDescendantEventThreatDetectionCustomModulesResponse. */ + class ListDescendantEventThreatDetectionCustomModulesResponse implements IListDescendantEventThreatDetectionCustomModulesResponse { /** - * Constructs a new UpdateNotificationConfigRequest. + * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse); - /** UpdateNotificationConfigRequest notificationConfig. */ - public notificationConfig?: (google.cloud.securitycenter.v1.INotificationConfig|null); + /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ + public eventThreatDetectionCustomModules: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[]; - /** UpdateNotificationConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateNotificationConfigRequest instance using the specified properties. + * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateNotificationConfigRequest instance + * @returns ListDescendantEventThreatDetectionCustomModulesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse; /** - * Encodes the specified UpdateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. - * @param message UpdateNotificationConfigRequest message or plain object to encode + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. - * @param message UpdateNotificationConfigRequest message or plain object to encode + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateNotificationConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateNotificationConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse; /** - * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateNotificationConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateNotificationConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse; /** - * Verifies an UpdateNotificationConfigRequest message. + * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse 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 UpdateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateNotificationConfigRequest + * @returns ListDescendantEventThreatDetectionCustomModulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateNotificationConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse; /** - * Creates a plain object from an UpdateNotificationConfigRequest message. Also converts values to other types if specified. - * @param message UpdateNotificationConfigRequest + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateNotificationConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateNotificationConfigRequest to JSON. + * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateNotificationConfigRequest + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateOrganizationSettingsRequest. */ - interface IUpdateOrganizationSettingsRequest { + /** Properties of a ListEventThreatDetectionCustomModulesRequest. */ + interface IListEventThreatDetectionCustomModulesRequest { - /** UpdateOrganizationSettingsRequest organizationSettings */ - organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + /** ListEventThreatDetectionCustomModulesRequest parent */ + parent?: (string|null); - /** UpdateOrganizationSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); + + /** ListEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); } - /** Represents an UpdateOrganizationSettingsRequest. */ - class UpdateOrganizationSettingsRequest implements IUpdateOrganizationSettingsRequest { + /** Represents a ListEventThreatDetectionCustomModulesRequest. */ + class ListEventThreatDetectionCustomModulesRequest implements IListEventThreatDetectionCustomModulesRequest { /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new ListEventThreatDetectionCustomModulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest); - /** UpdateOrganizationSettingsRequest organizationSettings. */ - public organizationSettings?: (google.cloud.securitycenter.v1.IOrganizationSettings|null); + /** ListEventThreatDetectionCustomModulesRequest parent. */ + public parent: string; - /** UpdateOrganizationSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; + + /** ListEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateOrganizationSettingsRequest instance + * @returns ListEventThreatDetectionCustomModulesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. - * @param message UpdateOrganizationSettingsRequest message or plain object to encode + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateOrganizationSettingsRequest + * @returns ListEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateOrganizationSettingsRequest + * @returns ListEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a ListEventThreatDetectionCustomModulesRequest 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 UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateOrganizationSettingsRequest + * @returns ListEventThreatDetectionCustomModulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateOrganizationSettingsRequest + * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEventThreatDetectionCustomModulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateOrganizationSettingsRequest + * Gets the default type url for ListEventThreatDetectionCustomModulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ - interface IUpdateSecurityHealthAnalyticsCustomModuleRequest { + /** Properties of a ListEventThreatDetectionCustomModulesResponse. */ + interface IListEventThreatDetectionCustomModulesResponse { - /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ - securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); + /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ + eventThreatDetectionCustomModules?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[]|null); - /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ - class UpdateSecurityHealthAnalyticsCustomModuleRequest implements IUpdateSecurityHealthAnalyticsCustomModuleRequest { + /** Represents a ListEventThreatDetectionCustomModulesResponse. */ + class ListEventThreatDetectionCustomModulesResponse implements IListEventThreatDetectionCustomModulesResponse { /** - * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListEventThreatDetectionCustomModulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse); - /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ - public securityHealthAnalyticsCustomModule?: (google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null); + /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ + public eventThreatDetectionCustomModules: google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[]; - /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest instance + * @returns ListEventThreatDetectionCustomModulesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse; /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns ListEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse; /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns ListEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse; /** - * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListEventThreatDetectionCustomModulesResponse 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 UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns ListEventThreatDetectionCustomModulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse; /** - * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest + * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEventThreatDetectionCustomModulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListEventThreatDetectionCustomModulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateSourceRequest. */ - interface IUpdateSourceRequest { + /** Properties of an UpdateEventThreatDetectionCustomModuleRequest. */ + interface IUpdateEventThreatDetectionCustomModuleRequest { - /** UpdateSourceRequest source */ - source?: (google.cloud.securitycenter.v1.ISource|null); + /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ + eventThreatDetectionCustomModule?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null); - /** UpdateSourceRequest updateMask */ + /** UpdateEventThreatDetectionCustomModuleRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an UpdateSourceRequest. */ - class UpdateSourceRequest implements IUpdateSourceRequest { + /** Represents an UpdateEventThreatDetectionCustomModuleRequest. */ + class UpdateEventThreatDetectionCustomModuleRequest implements IUpdateEventThreatDetectionCustomModuleRequest { /** - * Constructs a new UpdateSourceRequest. + * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest); + constructor(properties?: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest); - /** UpdateSourceRequest source. */ - public source?: (google.cloud.securitycenter.v1.ISource|null); + /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ + public eventThreatDetectionCustomModule?: (google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null); - /** UpdateSourceRequest updateMask. */ + /** UpdateEventThreatDetectionCustomModuleRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSourceRequest instance + * @returns UpdateEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateSourceRequest): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static create(properties?: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. - * @param message UpdateSourceRequest message or plain object to encode + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSourceRequest + * @returns UpdateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSourceRequest + * @returns UpdateEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest; /** - * Verifies an UpdateSourceRequest message. + * Verifies an UpdateEventThreatDetectionCustomModuleRequest 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 UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSourceRequest + * @returns UpdateEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. - * @param message UpdateSourceRequest + * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message UpdateEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSourceRequest + * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateSecurityMarksRequest. */ - interface IUpdateSecurityMarksRequest { - - /** UpdateSecurityMarksRequest securityMarks */ - securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - - /** UpdateSecurityMarksRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. */ + interface IGetEffectiveEventThreatDetectionCustomModuleRequest { - /** UpdateSecurityMarksRequest startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** GetEffectiveEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); } - /** Represents an UpdateSecurityMarksRequest. */ - class UpdateSecurityMarksRequest implements IUpdateSecurityMarksRequest { + /** Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. */ + class GetEffectiveEventThreatDetectionCustomModuleRequest implements IGetEffectiveEventThreatDetectionCustomModuleRequest { /** - * Constructs a new UpdateSecurityMarksRequest. + * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest); - - /** UpdateSecurityMarksRequest securityMarks. */ - public securityMarks?: (google.cloud.securitycenter.v1.ISecurityMarks|null); - - /** UpdateSecurityMarksRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest); - /** UpdateSecurityMarksRequest startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** GetEffectiveEventThreatDetectionCustomModuleRequest name. */ + public name: string; /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSecurityMarksRequest instance + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static create(properties?: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. - * @param message UpdateSecurityMarksRequest message or plain object to encode + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSecurityMarksRequest + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSecurityMarksRequest + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest * @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.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest 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 UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSecurityMarksRequest + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityMarksRequest + * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSecurityMarksRequest + * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateBigQueryExportRequest. */ - interface ICreateBigQueryExportRequest { + /** Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. */ + interface IListEffectiveEventThreatDetectionCustomModulesRequest { - /** CreateBigQueryExportRequest parent */ + /** ListEffectiveEventThreatDetectionCustomModulesRequest parent */ parent?: (string|null); - /** CreateBigQueryExportRequest bigQueryExport */ - bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); - /** CreateBigQueryExportRequest bigQueryExportId */ - bigQueryExportId?: (string|null); + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); } - /** Represents a CreateBigQueryExportRequest. */ - class CreateBigQueryExportRequest implements ICreateBigQueryExportRequest { + /** Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. */ + class ListEffectiveEventThreatDetectionCustomModulesRequest implements IListEffectiveEventThreatDetectionCustomModulesRequest { /** - * Constructs a new CreateBigQueryExportRequest. + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest); - /** CreateBigQueryExportRequest parent. */ + /** ListEffectiveEventThreatDetectionCustomModulesRequest parent. */ public parent: string; - /** CreateBigQueryExportRequest bigQueryExport. */ - public bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; - /** CreateBigQueryExportRequest bigQueryExportId. */ - public bigQueryExportId: string; + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; /** - * Creates a new CreateBigQueryExportRequest instance using the specified properties. + * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateBigQueryExportRequest instance + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest instance */ - public static create(properties?: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest): google.cloud.securitycenter.v1.CreateBigQueryExportRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; /** - * Encodes the specified CreateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. - * @param message CreateBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. - * @param message CreateBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.ICreateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.CreateBigQueryExportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; /** - * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest * @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.cloud.securitycenter.v1.CreateBigQueryExportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; /** - * Verifies a CreateBigQueryExportRequest message. + * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest 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 CreateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CreateBigQueryExportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; /** - * Creates a plain object from a CreateBigQueryExportRequest message. Also converts values to other types if specified. - * @param message CreateBigQueryExportRequest + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.CreateBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateBigQueryExportRequest to JSON. + * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateBigQueryExportRequest + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateBigQueryExportRequest. */ - interface IUpdateBigQueryExportRequest { + /** Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. */ + interface IListEffectiveEventThreatDetectionCustomModulesResponse { - /** UpdateBigQueryExportRequest bigQueryExport */ - bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); + /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules */ + effectiveEventThreatDetectionCustomModules?: (google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[]|null); - /** UpdateBigQueryExportRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateBigQueryExportRequest. */ - class UpdateBigQueryExportRequest implements IUpdateBigQueryExportRequest { + /** Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. */ + class ListEffectiveEventThreatDetectionCustomModulesResponse implements IListEffectiveEventThreatDetectionCustomModulesResponse { /** - * Constructs a new UpdateBigQueryExportRequest. + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest); + constructor(properties?: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse); - /** UpdateBigQueryExportRequest bigQueryExport. */ - public bigQueryExport?: (google.cloud.securitycenter.v1.IBigQueryExport|null); + /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. */ + public effectiveEventThreatDetectionCustomModules: google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[]; - /** UpdateBigQueryExportRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateBigQueryExportRequest instance using the specified properties. + * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateBigQueryExportRequest instance + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse instance */ - public static create(properties?: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest): google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; + public static create(properties?: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; /** - * Encodes the specified UpdateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. - * @param message UpdateBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. - * @param message UpdateBigQueryExportRequest message or plain object to encode + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateBigQueryExportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; /** - * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse * @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.cloud.securitycenter.v1.UpdateBigQueryExportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; /** - * Verifies an UpdateBigQueryExportRequest message. + * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse 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 UpdateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateBigQueryExportRequest + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; /** - * Creates a plain object from an UpdateBigQueryExportRequest message. Also converts values to other types if specified. - * @param message UpdateBigQueryExportRequest + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.UpdateBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateBigQueryExportRequest to JSON. + * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateBigQueryExportRequest + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryExportsRequest. */ - interface IListBigQueryExportsRequest { + /** Properties of a Simulation. */ + interface ISimulation { - /** ListBigQueryExportsRequest parent */ - parent?: (string|null); + /** Simulation name */ + name?: (string|null); - /** ListBigQueryExportsRequest pageSize */ - pageSize?: (number|null); + /** Simulation createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ListBigQueryExportsRequest pageToken */ - pageToken?: (string|null); + /** Simulation resourceValueConfigsMetadata */ + resourceValueConfigsMetadata?: (google.cloud.securitycenter.v1.IResourceValueConfigMetadata[]|null); + + /** Simulation cloudProvider */ + cloudProvider?: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider|null); } - /** Represents a ListBigQueryExportsRequest. */ - class ListBigQueryExportsRequest implements IListBigQueryExportsRequest { + /** Represents a Simulation. */ + class Simulation implements ISimulation { /** - * Constructs a new ListBigQueryExportsRequest. + * Constructs a new Simulation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsRequest); + constructor(properties?: google.cloud.securitycenter.v1.ISimulation); - /** ListBigQueryExportsRequest parent. */ - public parent: string; + /** Simulation name. */ + public name: string; - /** ListBigQueryExportsRequest pageSize. */ - public pageSize: number; + /** Simulation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ListBigQueryExportsRequest pageToken. */ - public pageToken: string; + /** Simulation resourceValueConfigsMetadata. */ + public resourceValueConfigsMetadata: google.cloud.securitycenter.v1.IResourceValueConfigMetadata[]; + + /** Simulation cloudProvider. */ + public cloudProvider: (google.cloud.securitycenter.v1.CloudProvider|keyof typeof google.cloud.securitycenter.v1.CloudProvider); /** - * Creates a new ListBigQueryExportsRequest instance using the specified properties. + * Creates a new Simulation instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryExportsRequest instance + * @returns Simulation instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsRequest): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; + public static create(properties?: google.cloud.securitycenter.v1.ISimulation): google.cloud.securitycenter.v1.Simulation; /** - * Encodes the specified ListBigQueryExportsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. - * @param message ListBigQueryExportsRequest message or plain object to encode + * Encodes the specified Simulation message. Does not implicitly {@link google.cloud.securitycenter.v1.Simulation.verify|verify} messages. + * @param message Simulation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.ISimulation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryExportsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. - * @param message ListBigQueryExportsRequest message or plain object to encode + * Encodes the specified Simulation message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Simulation.verify|verify} messages. + * @param message Simulation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListBigQueryExportsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.ISimulation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer. + * Decodes a Simulation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryExportsRequest + * @returns Simulation * @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.cloud.securitycenter.v1.ListBigQueryExportsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.Simulation; /** - * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer, length delimited. + * Decodes a Simulation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryExportsRequest + * @returns Simulation * @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.cloud.securitycenter.v1.ListBigQueryExportsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.Simulation; /** - * Verifies a ListBigQueryExportsRequest message. + * Verifies a Simulation 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 ListBigQueryExportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Simulation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryExportsRequest + * @returns Simulation */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListBigQueryExportsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.Simulation; /** - * Creates a plain object from a ListBigQueryExportsRequest message. Also converts values to other types if specified. - * @param message ListBigQueryExportsRequest + * Creates a plain object from a Simulation message. Also converts values to other types if specified. + * @param message Simulation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListBigQueryExportsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.Simulation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryExportsRequest to JSON. + * Converts this Simulation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryExportsRequest + * Gets the default type url for Simulation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryExportsResponse. */ - interface IListBigQueryExportsResponse { + /** Properties of a ValuedResource. */ + interface IValuedResource { - /** ListBigQueryExportsResponse bigQueryExports */ - bigQueryExports?: (google.cloud.securitycenter.v1.IBigQueryExport[]|null); + /** ValuedResource name */ + name?: (string|null); - /** ListBigQueryExportsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ValuedResource resource */ + resource?: (string|null); + + /** ValuedResource resourceType */ + resourceType?: (string|null); + + /** ValuedResource displayName */ + displayName?: (string|null); + + /** ValuedResource resourceValue */ + resourceValue?: (google.cloud.securitycenter.v1.ValuedResource.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ValuedResource.ResourceValue|null); + + /** ValuedResource exposedScore */ + exposedScore?: (number|null); + + /** ValuedResource resourceValueConfigsUsed */ + resourceValueConfigsUsed?: (google.cloud.securitycenter.v1.IResourceValueConfigMetadata[]|null); } - /** Represents a ListBigQueryExportsResponse. */ - class ListBigQueryExportsResponse implements IListBigQueryExportsResponse { + /** Represents a ValuedResource. */ + class ValuedResource implements IValuedResource { /** - * Constructs a new ListBigQueryExportsResponse. + * Constructs a new ValuedResource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsResponse); + constructor(properties?: google.cloud.securitycenter.v1.IValuedResource); - /** ListBigQueryExportsResponse bigQueryExports. */ - public bigQueryExports: google.cloud.securitycenter.v1.IBigQueryExport[]; + /** ValuedResource name. */ + public name: string; - /** ListBigQueryExportsResponse nextPageToken. */ - public nextPageToken: string; + /** ValuedResource resource. */ + public resource: string; + + /** ValuedResource resourceType. */ + public resourceType: string; + + /** ValuedResource displayName. */ + public displayName: string; + + /** ValuedResource resourceValue. */ + public resourceValue: (google.cloud.securitycenter.v1.ValuedResource.ResourceValue|keyof typeof google.cloud.securitycenter.v1.ValuedResource.ResourceValue); + + /** ValuedResource exposedScore. */ + public exposedScore: number; + + /** ValuedResource resourceValueConfigsUsed. */ + public resourceValueConfigsUsed: google.cloud.securitycenter.v1.IResourceValueConfigMetadata[]; /** - * Creates a new ListBigQueryExportsResponse instance using the specified properties. + * Creates a new ValuedResource instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryExportsResponse instance + * @returns ValuedResource instance */ - public static create(properties?: google.cloud.securitycenter.v1.IListBigQueryExportsResponse): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; + public static create(properties?: google.cloud.securitycenter.v1.IValuedResource): google.cloud.securitycenter.v1.ValuedResource; /** - * Encodes the specified ListBigQueryExportsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. - * @param message ListBigQueryExportsResponse message or plain object to encode + * Encodes the specified ValuedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ValuedResource.verify|verify} messages. + * @param message ValuedResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IListBigQueryExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IValuedResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryExportsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. - * @param message ListBigQueryExportsResponse message or plain object to encode + * Encodes the specified ValuedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValuedResource.verify|verify} messages. + * @param message ValuedResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IListBigQueryExportsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IValuedResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer. + * Decodes a ValuedResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryExportsResponse + * @returns ValuedResource * @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.cloud.securitycenter.v1.ListBigQueryExportsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ValuedResource; /** - * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer, length delimited. + * Decodes a ValuedResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryExportsResponse + * @returns ValuedResource * @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.cloud.securitycenter.v1.ListBigQueryExportsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ValuedResource; /** - * Verifies a ListBigQueryExportsResponse message. + * Verifies a ValuedResource 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 ListBigQueryExportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValuedResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryExportsResponse + * @returns ValuedResource */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ListBigQueryExportsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ValuedResource; /** - * Creates a plain object from a ListBigQueryExportsResponse message. Also converts values to other types if specified. - * @param message ListBigQueryExportsResponse + * Creates a plain object from a ValuedResource message. Also converts values to other types if specified. + * @param message ValuedResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.ListBigQueryExportsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ValuedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryExportsResponse to JSON. + * Converts this ValuedResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryExportsResponse + * Gets the default type url for ValuedResource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteBigQueryExportRequest. */ - interface IDeleteBigQueryExportRequest { + namespace ValuedResource { - /** DeleteBigQueryExportRequest name */ + /** ResourceValue enum. */ + enum ResourceValue { + RESOURCE_VALUE_UNSPECIFIED = 0, + RESOURCE_VALUE_LOW = 1, + RESOURCE_VALUE_MEDIUM = 2, + RESOURCE_VALUE_HIGH = 3 + } + } + + /** Properties of a ResourceValueConfigMetadata. */ + interface IResourceValueConfigMetadata { + + /** ResourceValueConfigMetadata name */ name?: (string|null); } - /** Represents a DeleteBigQueryExportRequest. */ - class DeleteBigQueryExportRequest implements IDeleteBigQueryExportRequest { + /** Represents a ResourceValueConfigMetadata. */ + class ResourceValueConfigMetadata implements IResourceValueConfigMetadata { /** - * Constructs a new DeleteBigQueryExportRequest. + * Constructs a new ResourceValueConfigMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest); + constructor(properties?: google.cloud.securitycenter.v1.IResourceValueConfigMetadata); - /** DeleteBigQueryExportRequest name. */ + /** ResourceValueConfigMetadata name. */ public name: string; /** - * Creates a new DeleteBigQueryExportRequest instance using the specified properties. + * Creates a new ResourceValueConfigMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteBigQueryExportRequest instance + * @returns ResourceValueConfigMetadata instance */ - public static create(properties?: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; + public static create(properties?: google.cloud.securitycenter.v1.IResourceValueConfigMetadata): google.cloud.securitycenter.v1.ResourceValueConfigMetadata; /** - * Encodes the specified DeleteBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. - * @param message DeleteBigQueryExportRequest message or plain object to encode + * Encodes the specified ResourceValueConfigMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify|verify} messages. + * @param message ResourceValueConfigMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.securitycenter.v1.IResourceValueConfigMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. - * @param message DeleteBigQueryExportRequest message or plain object to encode + * Encodes the specified ResourceValueConfigMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify|verify} messages. + * @param message ResourceValueConfigMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.securitycenter.v1.IResourceValueConfigMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ResourceValueConfigMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBigQueryExportRequest + * @returns ResourceValueConfigMetadata * @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.cloud.securitycenter.v1.DeleteBigQueryExportRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycenter.v1.ResourceValueConfigMetadata; /** - * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ResourceValueConfigMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBigQueryExportRequest + * @returns ResourceValueConfigMetadata * @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.cloud.securitycenter.v1.DeleteBigQueryExportRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycenter.v1.ResourceValueConfigMetadata; /** - * Verifies a DeleteBigQueryExportRequest message. + * Verifies a ResourceValueConfigMetadata 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 DeleteBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceValueConfigMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBigQueryExportRequest + * @returns ResourceValueConfigMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.DeleteBigQueryExportRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.ResourceValueConfigMetadata; /** - * Creates a plain object from a DeleteBigQueryExportRequest message. Also converts values to other types if specified. - * @param message DeleteBigQueryExportRequest + * Creates a plain object from a ResourceValueConfigMetadata message. Also converts values to other types if specified. + * @param message ResourceValueConfigMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.securitycenter.v1.DeleteBigQueryExportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.securitycenter.v1.ResourceValueConfigMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBigQueryExportRequest to JSON. + * Converts this ResourceValueConfigMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteBigQueryExportRequest + * Gets the default type url for ResourceValueConfigMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-securitycenter/protos/protos.js b/packages/google-cloud-securitycenter/protos/protos.js index b5d968e78f1e..3238918a83b6 100644 --- a/packages/google-cloud-securitycenter/protos/protos.js +++ b/packages/google-cloud-securitycenter/protos/protos.js @@ -2760,36 +2760,30 @@ return SecurityMarks; })(); - v1.BackupDisasterRecovery = (function() { + v1.AttackExposure = (function() { /** - * Properties of a BackupDisasterRecovery. + * Properties of an AttackExposure. * @memberof google.cloud.securitycenter.v1 - * @interface IBackupDisasterRecovery - * @property {string|null} [backupTemplate] BackupDisasterRecovery backupTemplate - * @property {Array.|null} [policies] BackupDisasterRecovery policies - * @property {string|null} [host] BackupDisasterRecovery host - * @property {Array.|null} [applications] BackupDisasterRecovery applications - * @property {string|null} [storagePool] BackupDisasterRecovery storagePool - * @property {Array.|null} [policyOptions] BackupDisasterRecovery policyOptions - * @property {string|null} [profile] BackupDisasterRecovery profile - * @property {string|null} [appliance] BackupDisasterRecovery appliance - * @property {string|null} [backupType] BackupDisasterRecovery backupType - * @property {google.protobuf.ITimestamp|null} [backupCreateTime] BackupDisasterRecovery backupCreateTime + * @interface IAttackExposure + * @property {number|null} [score] AttackExposure score + * @property {google.protobuf.ITimestamp|null} [latestCalculationTime] AttackExposure latestCalculationTime + * @property {string|null} [attackExposureResult] AttackExposure attackExposureResult + * @property {google.cloud.securitycenter.v1.AttackExposure.State|null} [state] AttackExposure state + * @property {number|null} [exposedHighValueResourcesCount] AttackExposure exposedHighValueResourcesCount + * @property {number|null} [exposedMediumValueResourcesCount] AttackExposure exposedMediumValueResourcesCount + * @property {number|null} [exposedLowValueResourcesCount] AttackExposure exposedLowValueResourcesCount */ /** - * Constructs a new BackupDisasterRecovery. + * Constructs a new AttackExposure. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a BackupDisasterRecovery. - * @implements IBackupDisasterRecovery + * @classdesc Represents an AttackExposure. + * @implements IAttackExposure * @constructor - * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IAttackExposure=} [properties] Properties to set */ - function BackupDisasterRecovery(properties) { - this.policies = []; - this.applications = []; - this.policyOptions = []; + function AttackExposure(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2797,210 +2791,159 @@ } /** - * BackupDisasterRecovery backupTemplate. - * @member {string} backupTemplate - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery - * @instance - */ - BackupDisasterRecovery.prototype.backupTemplate = ""; - - /** - * BackupDisasterRecovery policies. - * @member {Array.} policies - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery - * @instance - */ - BackupDisasterRecovery.prototype.policies = $util.emptyArray; - - /** - * BackupDisasterRecovery host. - * @member {string} host - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery - * @instance - */ - BackupDisasterRecovery.prototype.host = ""; - - /** - * BackupDisasterRecovery applications. - * @member {Array.} applications - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure score. + * @member {number} score + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.applications = $util.emptyArray; + AttackExposure.prototype.score = 0; /** - * BackupDisasterRecovery storagePool. - * @member {string} storagePool - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure latestCalculationTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestCalculationTime + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.storagePool = ""; + AttackExposure.prototype.latestCalculationTime = null; /** - * BackupDisasterRecovery policyOptions. - * @member {Array.} policyOptions - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure attackExposureResult. + * @member {string} attackExposureResult + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.policyOptions = $util.emptyArray; + AttackExposure.prototype.attackExposureResult = ""; /** - * BackupDisasterRecovery profile. - * @member {string} profile - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure state. + * @member {google.cloud.securitycenter.v1.AttackExposure.State} state + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.profile = ""; + AttackExposure.prototype.state = 0; /** - * BackupDisasterRecovery appliance. - * @member {string} appliance - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure exposedHighValueResourcesCount. + * @member {number} exposedHighValueResourcesCount + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.appliance = ""; + AttackExposure.prototype.exposedHighValueResourcesCount = 0; /** - * BackupDisasterRecovery backupType. - * @member {string} backupType - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure exposedMediumValueResourcesCount. + * @member {number} exposedMediumValueResourcesCount + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.backupType = ""; + AttackExposure.prototype.exposedMediumValueResourcesCount = 0; /** - * BackupDisasterRecovery backupCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} backupCreateTime - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * AttackExposure exposedLowValueResourcesCount. + * @member {number} exposedLowValueResourcesCount + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance */ - BackupDisasterRecovery.prototype.backupCreateTime = null; + AttackExposure.prototype.exposedLowValueResourcesCount = 0; /** - * Creates a new BackupDisasterRecovery instance using the specified properties. + * Creates a new AttackExposure instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static - * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery instance + * @param {google.cloud.securitycenter.v1.IAttackExposure=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackExposure} AttackExposure instance */ - BackupDisasterRecovery.create = function create(properties) { - return new BackupDisasterRecovery(properties); + AttackExposure.create = function create(properties) { + return new AttackExposure(properties); }; /** - * Encodes the specified BackupDisasterRecovery message. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. + * Encodes the specified AttackExposure message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackExposure.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static - * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery} message BackupDisasterRecovery message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAttackExposure} message AttackExposure message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupDisasterRecovery.encode = function encode(message, writer) { + AttackExposure.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backupTemplate != null && Object.hasOwnProperty.call(message, "backupTemplate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupTemplate); - if (message.policies != null && message.policies.length) - for (var i = 0; i < message.policies.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.policies[i]); - if (message.host != null && Object.hasOwnProperty.call(message, "host")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.host); - if (message.applications != null && message.applications.length) - for (var i = 0; i < message.applications.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.applications[i]); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.storagePool); - if (message.policyOptions != null && message.policyOptions.length) - for (var i = 0; i < message.policyOptions.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.policyOptions[i]); - if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.profile); - if (message.appliance != null && Object.hasOwnProperty.call(message, "appliance")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.appliance); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.backupType); - if (message.backupCreateTime != null && Object.hasOwnProperty.call(message, "backupCreateTime")) - $root.google.protobuf.Timestamp.encode(message.backupCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.score); + if (message.latestCalculationTime != null && Object.hasOwnProperty.call(message, "latestCalculationTime")) + $root.google.protobuf.Timestamp.encode(message.latestCalculationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attackExposureResult != null && Object.hasOwnProperty.call(message, "attackExposureResult")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.attackExposureResult); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.exposedHighValueResourcesCount != null && Object.hasOwnProperty.call(message, "exposedHighValueResourcesCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.exposedHighValueResourcesCount); + if (message.exposedMediumValueResourcesCount != null && Object.hasOwnProperty.call(message, "exposedMediumValueResourcesCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.exposedMediumValueResourcesCount); + if (message.exposedLowValueResourcesCount != null && Object.hasOwnProperty.call(message, "exposedLowValueResourcesCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exposedLowValueResourcesCount); return writer; }; /** - * Encodes the specified BackupDisasterRecovery message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. + * Encodes the specified AttackExposure message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackExposure.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static - * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery} message BackupDisasterRecovery message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAttackExposure} message AttackExposure message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupDisasterRecovery.encodeDelimited = function encodeDelimited(message, writer) { + AttackExposure.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupDisasterRecovery message from the specified reader or buffer. + * Decodes an AttackExposure message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery + * @returns {google.cloud.securitycenter.v1.AttackExposure} AttackExposure * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupDisasterRecovery.decode = function decode(reader, length) { + AttackExposure.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.cloud.securitycenter.v1.BackupDisasterRecovery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.AttackExposure(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.backupTemplate = reader.string(); + message.score = reader.double(); break; } case 2: { - if (!(message.policies && message.policies.length)) - message.policies = []; - message.policies.push(reader.string()); + message.latestCalculationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.host = reader.string(); + message.attackExposureResult = reader.string(); break; } case 4: { - if (!(message.applications && message.applications.length)) - message.applications = []; - message.applications.push(reader.string()); + message.state = reader.int32(); break; } case 5: { - message.storagePool = reader.string(); + message.exposedHighValueResourcesCount = reader.int32(); break; } case 6: { - if (!(message.policyOptions && message.policyOptions.length)) - message.policyOptions = []; - message.policyOptions.push(reader.string()); + message.exposedMediumValueResourcesCount = reader.int32(); break; } case 7: { - message.profile = reader.string(); - break; - } - case 8: { - message.appliance = reader.string(); - break; - } - case 9: { - message.backupType = reader.string(); - break; - } - case 10: { - message.backupCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.exposedLowValueResourcesCount = reader.int32(); break; } default: @@ -3012,245 +2955,220 @@ }; /** - * Decodes a BackupDisasterRecovery message from the specified reader or buffer, length delimited. + * Decodes an AttackExposure message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery + * @returns {google.cloud.securitycenter.v1.AttackExposure} AttackExposure * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupDisasterRecovery.decodeDelimited = function decodeDelimited(reader) { + AttackExposure.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupDisasterRecovery message. + * Verifies an AttackExposure message. * @function verify - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupDisasterRecovery.verify = function verify(message) { + AttackExposure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backupTemplate != null && message.hasOwnProperty("backupTemplate")) - if (!$util.isString(message.backupTemplate)) - return "backupTemplate: string expected"; - if (message.policies != null && message.hasOwnProperty("policies")) { - if (!Array.isArray(message.policies)) - return "policies: array expected"; - for (var i = 0; i < message.policies.length; ++i) - if (!$util.isString(message.policies[i])) - return "policies: string[] expected"; - } - if (message.host != null && message.hasOwnProperty("host")) - if (!$util.isString(message.host)) - return "host: string expected"; - if (message.applications != null && message.hasOwnProperty("applications")) { - if (!Array.isArray(message.applications)) - return "applications: array expected"; - for (var i = 0; i < message.applications.length; ++i) - if (!$util.isString(message.applications[i])) - return "applications: string[] expected"; - } - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - if (!$util.isString(message.storagePool)) - return "storagePool: string expected"; - if (message.policyOptions != null && message.hasOwnProperty("policyOptions")) { - if (!Array.isArray(message.policyOptions)) - return "policyOptions: array expected"; - for (var i = 0; i < message.policyOptions.length; ++i) - if (!$util.isString(message.policyOptions[i])) - return "policyOptions: string[] expected"; - } - if (message.profile != null && message.hasOwnProperty("profile")) - if (!$util.isString(message.profile)) - return "profile: string expected"; - if (message.appliance != null && message.hasOwnProperty("appliance")) - if (!$util.isString(message.appliance)) - return "appliance: string expected"; - if (message.backupType != null && message.hasOwnProperty("backupType")) - if (!$util.isString(message.backupType)) - return "backupType: string expected"; - if (message.backupCreateTime != null && message.hasOwnProperty("backupCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.backupCreateTime); + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.latestCalculationTime != null && message.hasOwnProperty("latestCalculationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestCalculationTime); if (error) - return "backupCreateTime." + error; + return "latestCalculationTime." + error; } + if (message.attackExposureResult != null && message.hasOwnProperty("attackExposureResult")) + if (!$util.isString(message.attackExposureResult)) + return "attackExposureResult: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.exposedHighValueResourcesCount != null && message.hasOwnProperty("exposedHighValueResourcesCount")) + if (!$util.isInteger(message.exposedHighValueResourcesCount)) + return "exposedHighValueResourcesCount: integer expected"; + if (message.exposedMediumValueResourcesCount != null && message.hasOwnProperty("exposedMediumValueResourcesCount")) + if (!$util.isInteger(message.exposedMediumValueResourcesCount)) + return "exposedMediumValueResourcesCount: integer expected"; + if (message.exposedLowValueResourcesCount != null && message.hasOwnProperty("exposedLowValueResourcesCount")) + if (!$util.isInteger(message.exposedLowValueResourcesCount)) + return "exposedLowValueResourcesCount: integer expected"; return null; }; /** - * Creates a BackupDisasterRecovery message from a plain object. Also converts values to their respective internal types. + * Creates an AttackExposure message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery + * @returns {google.cloud.securitycenter.v1.AttackExposure} AttackExposure */ - BackupDisasterRecovery.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.BackupDisasterRecovery) + AttackExposure.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackExposure) return object; - var message = new $root.google.cloud.securitycenter.v1.BackupDisasterRecovery(); - if (object.backupTemplate != null) - message.backupTemplate = String(object.backupTemplate); - if (object.policies) { - if (!Array.isArray(object.policies)) - throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.policies: array expected"); - message.policies = []; - for (var i = 0; i < object.policies.length; ++i) - message.policies[i] = String(object.policies[i]); - } - if (object.host != null) - message.host = String(object.host); - if (object.applications) { - if (!Array.isArray(object.applications)) - throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.applications: array expected"); - message.applications = []; - for (var i = 0; i < object.applications.length; ++i) - message.applications[i] = String(object.applications[i]); - } - if (object.storagePool != null) - message.storagePool = String(object.storagePool); - if (object.policyOptions) { - if (!Array.isArray(object.policyOptions)) - throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.policyOptions: array expected"); - message.policyOptions = []; - for (var i = 0; i < object.policyOptions.length; ++i) - message.policyOptions[i] = String(object.policyOptions[i]); + var message = new $root.google.cloud.securitycenter.v1.AttackExposure(); + if (object.score != null) + message.score = Number(object.score); + if (object.latestCalculationTime != null) { + if (typeof object.latestCalculationTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackExposure.latestCalculationTime: object expected"); + message.latestCalculationTime = $root.google.protobuf.Timestamp.fromObject(object.latestCalculationTime); } - if (object.profile != null) - message.profile = String(object.profile); - if (object.appliance != null) - message.appliance = String(object.appliance); - if (object.backupType != null) - message.backupType = String(object.backupType); - if (object.backupCreateTime != null) { - if (typeof object.backupCreateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.backupCreateTime: object expected"); - message.backupCreateTime = $root.google.protobuf.Timestamp.fromObject(object.backupCreateTime); + if (object.attackExposureResult != null) + message.attackExposureResult = String(object.attackExposureResult); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CALCULATED": + case 1: + message.state = 1; + break; + case "NOT_CALCULATED": + case 2: + message.state = 2; + break; } + if (object.exposedHighValueResourcesCount != null) + message.exposedHighValueResourcesCount = object.exposedHighValueResourcesCount | 0; + if (object.exposedMediumValueResourcesCount != null) + message.exposedMediumValueResourcesCount = object.exposedMediumValueResourcesCount | 0; + if (object.exposedLowValueResourcesCount != null) + message.exposedLowValueResourcesCount = object.exposedLowValueResourcesCount | 0; return message; }; /** - * Creates a plain object from a BackupDisasterRecovery message. Also converts values to other types if specified. + * Creates a plain object from an AttackExposure message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static - * @param {google.cloud.securitycenter.v1.BackupDisasterRecovery} message BackupDisasterRecovery + * @param {google.cloud.securitycenter.v1.AttackExposure} message AttackExposure * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupDisasterRecovery.toObject = function toObject(message, options) { + AttackExposure.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.policies = []; - object.applications = []; - object.policyOptions = []; - } if (options.defaults) { - object.backupTemplate = ""; - object.host = ""; - object.storagePool = ""; - object.profile = ""; - object.appliance = ""; - object.backupType = ""; - object.backupCreateTime = null; - } - if (message.backupTemplate != null && message.hasOwnProperty("backupTemplate")) - object.backupTemplate = message.backupTemplate; - if (message.policies && message.policies.length) { - object.policies = []; - for (var j = 0; j < message.policies.length; ++j) - object.policies[j] = message.policies[j]; - } - if (message.host != null && message.hasOwnProperty("host")) - object.host = message.host; - if (message.applications && message.applications.length) { - object.applications = []; - for (var j = 0; j < message.applications.length; ++j) - object.applications[j] = message.applications[j]; - } - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = message.storagePool; - if (message.policyOptions && message.policyOptions.length) { - object.policyOptions = []; - for (var j = 0; j < message.policyOptions.length; ++j) - object.policyOptions[j] = message.policyOptions[j]; + object.score = 0; + object.latestCalculationTime = null; + object.attackExposureResult = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.exposedHighValueResourcesCount = 0; + object.exposedMediumValueResourcesCount = 0; + object.exposedLowValueResourcesCount = 0; } - if (message.profile != null && message.hasOwnProperty("profile")) - object.profile = message.profile; - if (message.appliance != null && message.hasOwnProperty("appliance")) - object.appliance = message.appliance; - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = message.backupType; - if (message.backupCreateTime != null && message.hasOwnProperty("backupCreateTime")) - object.backupCreateTime = $root.google.protobuf.Timestamp.toObject(message.backupCreateTime, options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.latestCalculationTime != null && message.hasOwnProperty("latestCalculationTime")) + object.latestCalculationTime = $root.google.protobuf.Timestamp.toObject(message.latestCalculationTime, options); + if (message.attackExposureResult != null && message.hasOwnProperty("attackExposureResult")) + object.attackExposureResult = message.attackExposureResult; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.AttackExposure.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.AttackExposure.State[message.state] : message.state; + if (message.exposedHighValueResourcesCount != null && message.hasOwnProperty("exposedHighValueResourcesCount")) + object.exposedHighValueResourcesCount = message.exposedHighValueResourcesCount; + if (message.exposedMediumValueResourcesCount != null && message.hasOwnProperty("exposedMediumValueResourcesCount")) + object.exposedMediumValueResourcesCount = message.exposedMediumValueResourcesCount; + if (message.exposedLowValueResourcesCount != null && message.hasOwnProperty("exposedLowValueResourcesCount")) + object.exposedLowValueResourcesCount = message.exposedLowValueResourcesCount; return object; }; /** - * Converts this BackupDisasterRecovery to JSON. + * Converts this AttackExposure to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @instance * @returns {Object.} JSON object */ - BackupDisasterRecovery.prototype.toJSON = function toJSON() { + AttackExposure.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupDisasterRecovery + * Gets the default type url for AttackExposure * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.AttackExposure * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackupDisasterRecovery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttackExposure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.BackupDisasterRecovery"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackExposure"; }; - return BackupDisasterRecovery; + /** + * State enum. + * @name google.cloud.securitycenter.v1.AttackExposure.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CALCULATED=1 CALCULATED value + * @property {number} NOT_CALCULATED=2 NOT_CALCULATED value + */ + AttackExposure.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CALCULATED"] = 1; + values[valuesById[2] = "NOT_CALCULATED"] = 2; + return values; + })(); + + return AttackExposure; })(); - v1.BigQueryExport = (function() { + v1.AttackPath = (function() { /** - * Properties of a BigQueryExport. + * Properties of an AttackPath. * @memberof google.cloud.securitycenter.v1 - * @interface IBigQueryExport - * @property {string|null} [name] BigQueryExport name - * @property {string|null} [description] BigQueryExport description - * @property {string|null} [filter] BigQueryExport filter - * @property {string|null} [dataset] BigQueryExport dataset - * @property {google.protobuf.ITimestamp|null} [createTime] BigQueryExport createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BigQueryExport updateTime - * @property {string|null} [mostRecentEditor] BigQueryExport mostRecentEditor - * @property {string|null} [principal] BigQueryExport principal + * @interface IAttackPath + * @property {string|null} [name] AttackPath name + * @property {Array.|null} [pathNodes] AttackPath pathNodes + * @property {Array.|null} [edges] AttackPath edges */ /** - * Constructs a new BigQueryExport. + * Constructs a new AttackPath. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a BigQueryExport. - * @implements IBigQueryExport + * @classdesc Represents an AttackPath. + * @implements IAttackPath * @constructor - * @param {google.cloud.securitycenter.v1.IBigQueryExport=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IAttackPath=} [properties] Properties to set */ - function BigQueryExport(properties) { + function AttackPath(properties) { + this.pathNodes = []; + this.edges = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3258,140 +3176,92 @@ } /** - * BigQueryExport name. + * AttackPath name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @instance */ - BigQueryExport.prototype.name = ""; + AttackPath.prototype.name = ""; /** - * BigQueryExport description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * AttackPath pathNodes. + * @member {Array.} pathNodes + * @memberof google.cloud.securitycenter.v1.AttackPath * @instance */ - BigQueryExport.prototype.description = ""; + AttackPath.prototype.pathNodes = $util.emptyArray; /** - * BigQueryExport filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * AttackPath edges. + * @member {Array.} edges + * @memberof google.cloud.securitycenter.v1.AttackPath * @instance */ - BigQueryExport.prototype.filter = ""; + AttackPath.prototype.edges = $util.emptyArray; /** - * BigQueryExport dataset. - * @member {string} dataset - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @instance + * Creates a new AttackPath instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AttackPath + * @static + * @param {google.cloud.securitycenter.v1.IAttackPath=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackPath} AttackPath instance */ - BigQueryExport.prototype.dataset = ""; + AttackPath.create = function create(properties) { + return new AttackPath(properties); + }; /** - * BigQueryExport createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @instance + * Encodes the specified AttackPath message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AttackPath + * @static + * @param {google.cloud.securitycenter.v1.IAttackPath} message AttackPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BigQueryExport.prototype.createTime = null; - - /** - * BigQueryExport updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @instance - */ - BigQueryExport.prototype.updateTime = null; - - /** - * BigQueryExport mostRecentEditor. - * @member {string} mostRecentEditor - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @instance - */ - BigQueryExport.prototype.mostRecentEditor = ""; - - /** - * BigQueryExport principal. - * @member {string} principal - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @instance - */ - BigQueryExport.prototype.principal = ""; - - /** - * Creates a new BigQueryExport instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @static - * @param {google.cloud.securitycenter.v1.IBigQueryExport=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport instance - */ - BigQueryExport.create = function create(properties) { - return new BigQueryExport(properties); - }; - - /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.BigQueryExport - * @static - * @param {google.cloud.securitycenter.v1.IBigQueryExport} message BigQueryExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExport.encode = function encode(message, writer) { + AttackPath.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataset); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.mostRecentEditor); - if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.principal); + if (message.pathNodes != null && message.pathNodes.length) + for (var i = 0; i < message.pathNodes.length; ++i) + $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.encode(message.pathNodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edges != null && message.edges.length) + for (var i = 0; i < message.edges.length; ++i) + $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.encode(message.edges[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. + * Encodes the specified AttackPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static - * @param {google.cloud.securitycenter.v1.IBigQueryExport} message BigQueryExport message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAttackPath} message AttackPath message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { + AttackPath.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryExport message from the specified reader or buffer. + * Decodes an AttackPath message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport + * @returns {google.cloud.securitycenter.v1.AttackPath} AttackPath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryExport.decode = function decode(reader, length) { + AttackPath.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.cloud.securitycenter.v1.BigQueryExport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.AttackPath(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3400,31 +3270,15 @@ break; } case 2: { - message.description = reader.string(); + if (!(message.pathNodes && message.pathNodes.length)) + message.pathNodes = []; + message.pathNodes.push($root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.decode(reader, reader.uint32())); break; } case 3: { - message.filter = reader.string(); - break; - } - case 4: { - message.dataset = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.mostRecentEditor = reader.string(); - break; - } - case 8: { - message.principal = reader.string(); + if (!(message.edges && message.edges.length)) + message.edges = []; + message.edges.push($root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.decode(reader, reader.uint32())); break; } default: @@ -3436,1261 +3290,1412 @@ }; /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * Decodes an AttackPath message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport + * @returns {google.cloud.securitycenter.v1.AttackPath} AttackPath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryExport.decodeDelimited = function decodeDelimited(reader) { + AttackPath.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryExport message. + * Verifies an AttackPath message. * @function verify - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryExport.verify = function verify(message) { + AttackPath.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + if (message.pathNodes != null && message.hasOwnProperty("pathNodes")) { + if (!Array.isArray(message.pathNodes)) + return "pathNodes: array expected"; + for (var i = 0; i < message.pathNodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.verify(message.pathNodes[i]); + if (error) + return "pathNodes." + error; + } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + if (message.edges != null && message.hasOwnProperty("edges")) { + if (!Array.isArray(message.edges)) + return "edges: array expected"; + for (var i = 0; i < message.edges.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.verify(message.edges[i]); + if (error) + return "edges." + error; + } } - if (message.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - if (!$util.isString(message.mostRecentEditor)) - return "mostRecentEditor: string expected"; - if (message.principal != null && message.hasOwnProperty("principal")) - if (!$util.isString(message.principal)) - return "principal: string expected"; return null; }; /** - * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. + * Creates an AttackPath message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport + * @returns {google.cloud.securitycenter.v1.AttackPath} AttackPath */ - BigQueryExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.BigQueryExport) + AttackPath.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackPath) return object; - var message = new $root.google.cloud.securitycenter.v1.BigQueryExport(); + var message = new $root.google.cloud.securitycenter.v1.AttackPath(); if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.BigQueryExport.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.pathNodes) { + if (!Array.isArray(object.pathNodes)) + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.pathNodes: array expected"); + message.pathNodes = []; + for (var i = 0; i < object.pathNodes.length; ++i) { + if (typeof object.pathNodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.pathNodes: object expected"); + message.pathNodes[i] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.fromObject(object.pathNodes[i]); + } } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.BigQueryExport.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.edges) { + if (!Array.isArray(object.edges)) + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.edges: array expected"); + message.edges = []; + for (var i = 0; i < object.edges.length; ++i) { + if (typeof object.edges[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.edges: object expected"); + message.edges[i] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.fromObject(object.edges[i]); + } } - if (object.mostRecentEditor != null) - message.mostRecentEditor = String(object.mostRecentEditor); - if (object.principal != null) - message.principal = String(object.principal); return message; }; /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * Creates a plain object from an AttackPath message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static - * @param {google.cloud.securitycenter.v1.BigQueryExport} message BigQueryExport + * @param {google.cloud.securitycenter.v1.AttackPath} message AttackPath * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryExport.toObject = function toObject(message, options) { + AttackPath.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.filter = ""; - object.dataset = ""; - object.createTime = null; - object.updateTime = null; - object.mostRecentEditor = ""; - object.principal = ""; + if (options.arrays || options.defaults) { + object.pathNodes = []; + object.edges = []; } + if (options.defaults) + object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - object.mostRecentEditor = message.mostRecentEditor; - if (message.principal != null && message.hasOwnProperty("principal")) - object.principal = message.principal; + if (message.pathNodes && message.pathNodes.length) { + object.pathNodes = []; + for (var j = 0; j < message.pathNodes.length; ++j) + object.pathNodes[j] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.toObject(message.pathNodes[j], options); + } + if (message.edges && message.edges.length) { + object.edges = []; + for (var j = 0; j < message.edges.length; ++j) + object.edges[j] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.toObject(message.edges[j], options); + } return object; }; /** - * Converts this BigQueryExport to JSON. + * Converts this AttackPath to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @instance * @returns {Object.} JSON object */ - BigQueryExport.prototype.toJSON = function toJSON() { + AttackPath.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryExport + * Gets the default type url for AttackPath * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @memberof google.cloud.securitycenter.v1.AttackPath * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttackPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.BigQueryExport"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackPath"; }; - return BigQueryExport; - })(); + AttackPath.AttackPathNode = (function() { - v1.CloudArmor = (function() { + /** + * Properties of an AttackPathNode. + * @memberof google.cloud.securitycenter.v1.AttackPath + * @interface IAttackPathNode + * @property {string|null} [resource] AttackPathNode resource + * @property {string|null} [resourceType] AttackPathNode resourceType + * @property {string|null} [displayName] AttackPathNode displayName + * @property {Array.|null} [associatedFindings] AttackPathNode associatedFindings + * @property {string|null} [uuid] AttackPathNode uuid + * @property {Array.|null} [attackSteps] AttackPathNode attackSteps + */ - /** - * Properties of a CloudArmor. - * @memberof google.cloud.securitycenter.v1 - * @interface ICloudArmor - * @property {google.cloud.securitycenter.v1.ISecurityPolicy|null} [securityPolicy] CloudArmor securityPolicy - * @property {google.cloud.securitycenter.v1.IRequests|null} [requests] CloudArmor requests - * @property {google.cloud.securitycenter.v1.IAdaptiveProtection|null} [adaptiveProtection] CloudArmor adaptiveProtection - * @property {google.cloud.securitycenter.v1.IAttack|null} [attack] CloudArmor attack - * @property {string|null} [threatVector] CloudArmor threatVector - * @property {google.protobuf.IDuration|null} [duration] CloudArmor duration - */ + /** + * Constructs a new AttackPathNode. + * @memberof google.cloud.securitycenter.v1.AttackPath + * @classdesc Represents an AttackPathNode. + * @implements IAttackPathNode + * @constructor + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathNode=} [properties] Properties to set + */ + function AttackPathNode(properties) { + this.associatedFindings = []; + this.attackSteps = []; + 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 CloudArmor. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CloudArmor. - * @implements ICloudArmor - * @constructor - * @param {google.cloud.securitycenter.v1.ICloudArmor=} [properties] Properties to set - */ - function CloudArmor(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]]; - } + /** + * AttackPathNode resource. + * @member {string} resource + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.resource = ""; - /** - * CloudArmor securityPolicy. - * @member {google.cloud.securitycenter.v1.ISecurityPolicy|null|undefined} securityPolicy - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.securityPolicy = null; + /** + * AttackPathNode resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.resourceType = ""; - /** - * CloudArmor requests. - * @member {google.cloud.securitycenter.v1.IRequests|null|undefined} requests - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.requests = null; + /** + * AttackPathNode displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.displayName = ""; - /** - * CloudArmor adaptiveProtection. - * @member {google.cloud.securitycenter.v1.IAdaptiveProtection|null|undefined} adaptiveProtection - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.adaptiveProtection = null; + /** + * AttackPathNode associatedFindings. + * @member {Array.} associatedFindings + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.associatedFindings = $util.emptyArray; - /** - * CloudArmor attack. - * @member {google.cloud.securitycenter.v1.IAttack|null|undefined} attack - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.attack = null; + /** + * AttackPathNode uuid. + * @member {string} uuid + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.uuid = ""; - /** - * CloudArmor threatVector. - * @member {string} threatVector - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.threatVector = ""; + /** + * AttackPathNode attackSteps. + * @member {Array.} attackSteps + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + */ + AttackPathNode.prototype.attackSteps = $util.emptyArray; - /** - * CloudArmor duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - */ - CloudArmor.prototype.duration = null; + /** + * Creates a new AttackPathNode instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathNode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode} AttackPathNode instance + */ + AttackPathNode.create = function create(properties) { + return new AttackPathNode(properties); + }; - /** - * Creates a new CloudArmor instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {google.cloud.securitycenter.v1.ICloudArmor=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor instance - */ - CloudArmor.create = function create(properties) { - return new CloudArmor(properties); - }; + /** + * Encodes the specified AttackPathNode message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathNode} message AttackPathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackPathNode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.associatedFindings != null && message.associatedFindings.length) + for (var i = 0; i < message.associatedFindings.length; ++i) + $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.encode(message.associatedFindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.uuid); + if (message.attackSteps != null && message.attackSteps.length) + for (var i = 0; i < message.attackSteps.length; ++i) + $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.encode(message.attackSteps[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {google.cloud.securitycenter.v1.ICloudArmor} message CloudArmor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudArmor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityPolicy != null && Object.hasOwnProperty.call(message, "securityPolicy")) - $root.google.cloud.securitycenter.v1.SecurityPolicy.encode(message.securityPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.requests != null && Object.hasOwnProperty.call(message, "requests")) - $root.google.cloud.securitycenter.v1.Requests.encode(message.requests, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.adaptiveProtection != null && Object.hasOwnProperty.call(message, "adaptiveProtection")) - $root.google.cloud.securitycenter.v1.AdaptiveProtection.encode(message.adaptiveProtection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.attack != null && Object.hasOwnProperty.call(message, "attack")) - $root.google.cloud.securitycenter.v1.Attack.encode(message.attack, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.threatVector != null && Object.hasOwnProperty.call(message, "threatVector")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.threatVector); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified AttackPathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathNode} message AttackPathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackPathNode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {google.cloud.securitycenter.v1.ICloudArmor} message CloudArmor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudArmor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an AttackPathNode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode} AttackPathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackPathNode.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.cloud.securitycenter.v1.AttackPath.AttackPathNode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + if (!(message.associatedFindings && message.associatedFindings.length)) + message.associatedFindings = []; + message.associatedFindings.push($root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.decode(reader, reader.uint32())); + break; + } + case 5: { + message.uuid = reader.string(); + break; + } + case 6: { + if (!(message.attackSteps && message.attackSteps.length)) + message.attackSteps = []; + message.attackSteps.push($root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a CloudArmor message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudArmor.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.cloud.securitycenter.v1.CloudArmor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.requests = $root.google.cloud.securitycenter.v1.Requests.decode(reader, reader.uint32()); - break; - } - case 3: { - message.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.decode(reader, reader.uint32()); - break; + /** + * Decodes an AttackPathNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode} AttackPathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackPathNode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttackPathNode message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttackPathNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.associatedFindings != null && message.hasOwnProperty("associatedFindings")) { + if (!Array.isArray(message.associatedFindings)) + return "associatedFindings: array expected"; + for (var i = 0; i < message.associatedFindings.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.verify(message.associatedFindings[i]); + if (error) + return "associatedFindings." + error; } - case 4: { - message.attack = $root.google.cloud.securitycenter.v1.Attack.decode(reader, reader.uint32()); - break; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.attackSteps != null && message.hasOwnProperty("attackSteps")) { + if (!Array.isArray(message.attackSteps)) + return "attackSteps: array expected"; + for (var i = 0; i < message.attackSteps.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.verify(message.attackSteps[i]); + if (error) + return "attackSteps." + error; } - case 5: { - message.threatVector = reader.string(); - break; + } + return null; + }; + + /** + * Creates an AttackPathNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode} AttackPathNode + */ + AttackPathNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode) + return object; + var message = new $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.associatedFindings) { + if (!Array.isArray(object.associatedFindings)) + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.AttackPathNode.associatedFindings: array expected"); + message.associatedFindings = []; + for (var i = 0; i < object.associatedFindings.length; ++i) { + if (typeof object.associatedFindings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.AttackPathNode.associatedFindings: object expected"); + message.associatedFindings[i] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.fromObject(object.associatedFindings[i]); } - case 6: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + } + if (object.uuid != null) + message.uuid = String(object.uuid); + if (object.attackSteps) { + if (!Array.isArray(object.attackSteps)) + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.AttackPathNode.attackSteps: array expected"); + message.attackSteps = []; + for (var i = 0; i < object.attackSteps.length; ++i) { + if (typeof object.attackSteps[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.AttackPathNode.attackSteps: object expected"); + message.attackSteps[i] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.fromObject(object.attackSteps[i]); } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a CloudArmor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudArmor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudArmor message. - * @function verify - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudArmor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) { - var error = $root.google.cloud.securitycenter.v1.SecurityPolicy.verify(message.securityPolicy); - if (error) - return "securityPolicy." + error; - } - if (message.requests != null && message.hasOwnProperty("requests")) { - var error = $root.google.cloud.securitycenter.v1.Requests.verify(message.requests); - if (error) - return "requests." + error; - } - if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) { - var error = $root.google.cloud.securitycenter.v1.AdaptiveProtection.verify(message.adaptiveProtection); - if (error) - return "adaptiveProtection." + error; - } - if (message.attack != null && message.hasOwnProperty("attack")) { - var error = $root.google.cloud.securitycenter.v1.Attack.verify(message.attack); - if (error) - return "attack." + error; - } - if (message.threatVector != null && message.hasOwnProperty("threatVector")) - if (!$util.isString(message.threatVector)) - return "threatVector: string expected"; - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - return null; - }; + return message; + }; - /** - * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor - */ - CloudArmor.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CloudArmor) + /** + * Creates a plain object from an AttackPathNode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode} message AttackPathNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttackPathNode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.associatedFindings = []; + object.attackSteps = []; + } + if (options.defaults) { + object.resource = ""; + object.resourceType = ""; + object.displayName = ""; + object.uuid = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.associatedFindings && message.associatedFindings.length) { + object.associatedFindings = []; + for (var j = 0; j < message.associatedFindings.length; ++j) + object.associatedFindings[j] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.toObject(message.associatedFindings[j], options); + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.attackSteps && message.attackSteps.length) { + object.attackSteps = []; + for (var j = 0; j < message.attackSteps.length; ++j) + object.attackSteps[j] = $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.toObject(message.attackSteps[j], options); + } return object; - var message = new $root.google.cloud.securitycenter.v1.CloudArmor(); - if (object.securityPolicy != null) { - if (typeof object.securityPolicy !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.securityPolicy: object expected"); - message.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.fromObject(object.securityPolicy); - } - if (object.requests != null) { - if (typeof object.requests !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.requests: object expected"); - message.requests = $root.google.cloud.securitycenter.v1.Requests.fromObject(object.requests); - } - if (object.adaptiveProtection != null) { - if (typeof object.adaptiveProtection !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.adaptiveProtection: object expected"); - message.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.fromObject(object.adaptiveProtection); - } - if (object.attack != null) { - if (typeof object.attack !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.attack: object expected"); - message.attack = $root.google.cloud.securitycenter.v1.Attack.fromObject(object.attack); - } - if (object.threatVector != null) - message.threatVector = String(object.threatVector); - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - return message; - }; - - /** - * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {google.cloud.securitycenter.v1.CloudArmor} message CloudArmor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudArmor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.securityPolicy = null; - object.requests = null; - object.adaptiveProtection = null; - object.attack = null; - object.threatVector = ""; - object.duration = null; - } - if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) - object.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.toObject(message.securityPolicy, options); - if (message.requests != null && message.hasOwnProperty("requests")) - object.requests = $root.google.cloud.securitycenter.v1.Requests.toObject(message.requests, options); - if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) - object.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.toObject(message.adaptiveProtection, options); - if (message.attack != null && message.hasOwnProperty("attack")) - object.attack = $root.google.cloud.securitycenter.v1.Attack.toObject(message.attack, options); - if (message.threatVector != null && message.hasOwnProperty("threatVector")) - object.threatVector = message.threatVector; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - return object; - }; - - /** - * Converts this CloudArmor to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @instance - * @returns {Object.} JSON object - */ - CloudArmor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + }; - /** - * Gets the default type url for CloudArmor - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CloudArmor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudArmor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudArmor"; - }; + /** + * Converts this AttackPathNode to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @instance + * @returns {Object.} JSON object + */ + AttackPathNode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return CloudArmor; - })(); + /** + * Gets the default type url for AttackPathNode + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttackPathNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackPath.AttackPathNode"; + }; - v1.SecurityPolicy = (function() { + AttackPathNode.PathNodeAssociatedFinding = (function() { - /** - * Properties of a SecurityPolicy. - * @memberof google.cloud.securitycenter.v1 - * @interface ISecurityPolicy - * @property {string|null} [name] SecurityPolicy name - * @property {string|null} [type] SecurityPolicy type - * @property {boolean|null} [preview] SecurityPolicy preview - */ + /** + * Properties of a PathNodeAssociatedFinding. + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @interface IPathNodeAssociatedFinding + * @property {string|null} [canonicalFinding] PathNodeAssociatedFinding canonicalFinding + * @property {string|null} [findingCategory] PathNodeAssociatedFinding findingCategory + * @property {string|null} [name] PathNodeAssociatedFinding name + */ - /** - * Constructs a new SecurityPolicy. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityPolicy. - * @implements ISecurityPolicy - * @constructor - * @param {google.cloud.securitycenter.v1.ISecurityPolicy=} [properties] Properties to set - */ - function SecurityPolicy(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 PathNodeAssociatedFinding. + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @classdesc Represents a PathNodeAssociatedFinding. + * @implements IPathNodeAssociatedFinding + * @constructor + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding=} [properties] Properties to set + */ + function PathNodeAssociatedFinding(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]]; + } - /** - * SecurityPolicy name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @instance - */ - SecurityPolicy.prototype.name = ""; + /** + * PathNodeAssociatedFinding canonicalFinding. + * @member {string} canonicalFinding + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @instance + */ + PathNodeAssociatedFinding.prototype.canonicalFinding = ""; - /** - * SecurityPolicy type. - * @member {string} type - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @instance - */ - SecurityPolicy.prototype.type = ""; + /** + * PathNodeAssociatedFinding findingCategory. + * @member {string} findingCategory + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @instance + */ + PathNodeAssociatedFinding.prototype.findingCategory = ""; - /** - * SecurityPolicy preview. - * @member {boolean} preview - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @instance - */ - SecurityPolicy.prototype.preview = false; + /** + * PathNodeAssociatedFinding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @instance + */ + PathNodeAssociatedFinding.prototype.name = ""; - /** - * Creates a new SecurityPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {google.cloud.securitycenter.v1.ISecurityPolicy=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy instance - */ - SecurityPolicy.create = function create(properties) { - return new SecurityPolicy(properties); - }; + /** + * Creates a new PathNodeAssociatedFinding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding} PathNodeAssociatedFinding instance + */ + PathNodeAssociatedFinding.create = function create(properties) { + return new PathNodeAssociatedFinding(properties); + }; - /** - * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {google.cloud.securitycenter.v1.ISecurityPolicy} message SecurityPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPolicy.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.preview != null && Object.hasOwnProperty.call(message, "preview")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preview); - return writer; - }; + /** + * Encodes the specified PathNodeAssociatedFinding message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding} message PathNodeAssociatedFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PathNodeAssociatedFinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.canonicalFinding != null && Object.hasOwnProperty.call(message, "canonicalFinding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.canonicalFinding); + if (message.findingCategory != null && Object.hasOwnProperty.call(message, "findingCategory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingCategory); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; - /** - * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {google.cloud.securitycenter.v1.ISecurityPolicy} message SecurityPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PathNodeAssociatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IPathNodeAssociatedFinding} message PathNodeAssociatedFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PathNodeAssociatedFinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SecurityPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPolicy.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.cloud.securitycenter.v1.SecurityPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.preview = reader.bool(); - break; + /** + * Decodes a PathNodeAssociatedFinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding} PathNodeAssociatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PathNodeAssociatedFinding.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.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.canonicalFinding = reader.string(); + break; + } + case 2: { + message.findingCategory = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PathNodeAssociatedFinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding} PathNodeAssociatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PathNodeAssociatedFinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SecurityPolicy message. - * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityPolicy.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.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.preview != null && message.hasOwnProperty("preview")) - if (typeof message.preview !== "boolean") - return "preview: boolean expected"; - return null; - }; + /** + * Verifies a PathNodeAssociatedFinding message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PathNodeAssociatedFinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.canonicalFinding != null && message.hasOwnProperty("canonicalFinding")) + if (!$util.isString(message.canonicalFinding)) + return "canonicalFinding: string expected"; + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + if (!$util.isString(message.findingCategory)) + return "findingCategory: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy - */ - SecurityPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPolicy) - return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityPolicy(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.preview != null) - message.preview = Boolean(object.preview); - return message; - }; + /** + * Creates a PathNodeAssociatedFinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding} PathNodeAssociatedFinding + */ + PathNodeAssociatedFinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding) + return object; + var message = new $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding(); + if (object.canonicalFinding != null) + message.canonicalFinding = String(object.canonicalFinding); + if (object.findingCategory != null) + message.findingCategory = String(object.findingCategory); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {google.cloud.securitycenter.v1.SecurityPolicy} message SecurityPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = ""; - object.preview = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.preview != null && message.hasOwnProperty("preview")) - object.preview = message.preview; - return object; - }; + /** + * Creates a plain object from a PathNodeAssociatedFinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding} message PathNodeAssociatedFinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PathNodeAssociatedFinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.canonicalFinding = ""; + object.findingCategory = ""; + object.name = ""; + } + if (message.canonicalFinding != null && message.hasOwnProperty("canonicalFinding")) + object.canonicalFinding = message.canonicalFinding; + if (message.findingCategory != null && message.hasOwnProperty("findingCategory")) + object.findingCategory = message.findingCategory; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Converts this SecurityPolicy to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @instance - * @returns {Object.} JSON object - */ - SecurityPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this PathNodeAssociatedFinding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @instance + * @returns {Object.} JSON object + */ + PathNodeAssociatedFinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for SecurityPolicy - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SecurityPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPolicy"; - }; + /** + * Gets the default type url for PathNodeAssociatedFinding + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PathNodeAssociatedFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding"; + }; - return SecurityPolicy; - })(); + return PathNodeAssociatedFinding; + })(); - v1.Requests = (function() { + /** + * NodeType enum. + * @name google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType + * @enum {number} + * @property {number} NODE_TYPE_UNSPECIFIED=0 NODE_TYPE_UNSPECIFIED value + * @property {number} NODE_TYPE_AND=1 NODE_TYPE_AND value + * @property {number} NODE_TYPE_OR=2 NODE_TYPE_OR value + * @property {number} NODE_TYPE_DEFENSE=3 NODE_TYPE_DEFENSE value + * @property {number} NODE_TYPE_ATTACKER=4 NODE_TYPE_ATTACKER value + */ + AttackPathNode.NodeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NODE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NODE_TYPE_AND"] = 1; + values[valuesById[2] = "NODE_TYPE_OR"] = 2; + values[valuesById[3] = "NODE_TYPE_DEFENSE"] = 3; + values[valuesById[4] = "NODE_TYPE_ATTACKER"] = 4; + return values; + })(); - /** - * Properties of a Requests. - * @memberof google.cloud.securitycenter.v1 - * @interface IRequests - * @property {number|null} [ratio] Requests ratio - * @property {number|null} [shortTermAllowed] Requests shortTermAllowed - * @property {number|null} [longTermAllowed] Requests longTermAllowed - * @property {number|null} [longTermDenied] Requests longTermDenied - */ + AttackPathNode.AttackStepNode = (function() { - /** - * Constructs a new Requests. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Requests. - * @implements IRequests - * @constructor - * @param {google.cloud.securitycenter.v1.IRequests=} [properties] Properties to set - */ - function Requests(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 an AttackStepNode. + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @interface IAttackStepNode + * @property {string|null} [uuid] AttackStepNode uuid + * @property {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType|null} [type] AttackStepNode type + * @property {string|null} [displayName] AttackStepNode displayName + * @property {Object.|null} [labels] AttackStepNode labels + * @property {string|null} [description] AttackStepNode description + */ - /** - * Requests ratio. - * @member {number} ratio - * @memberof google.cloud.securitycenter.v1.Requests - * @instance - */ - Requests.prototype.ratio = 0; + /** + * Constructs a new AttackStepNode. + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode + * @classdesc Represents an AttackStepNode. + * @implements IAttackStepNode + * @constructor + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode=} [properties] Properties to set + */ + function AttackStepNode(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Requests shortTermAllowed. - * @member {number} shortTermAllowed - * @memberof google.cloud.securitycenter.v1.Requests - * @instance - */ - Requests.prototype.shortTermAllowed = 0; + /** + * AttackStepNode uuid. + * @member {string} uuid + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + */ + AttackStepNode.prototype.uuid = ""; - /** - * Requests longTermAllowed. - * @member {number} longTermAllowed - * @memberof google.cloud.securitycenter.v1.Requests - * @instance - */ - Requests.prototype.longTermAllowed = 0; + /** + * AttackStepNode type. + * @member {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType} type + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + */ + AttackStepNode.prototype.type = 0; - /** - * Requests longTermDenied. - * @member {number} longTermDenied - * @memberof google.cloud.securitycenter.v1.Requests - * @instance - */ - Requests.prototype.longTermDenied = 0; + /** + * AttackStepNode displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + */ + AttackStepNode.prototype.displayName = ""; - /** - * Creates a new Requests instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {google.cloud.securitycenter.v1.IRequests=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Requests} Requests instance - */ - Requests.create = function create(properties) { - return new Requests(properties); - }; + /** + * AttackStepNode labels. + * @member {Object.} labels + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + */ + AttackStepNode.prototype.labels = $util.emptyObject; - /** - * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {google.cloud.securitycenter.v1.IRequests} message Requests message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Requests.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.ratio); - if (message.shortTermAllowed != null && Object.hasOwnProperty.call(message, "shortTermAllowed")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.shortTermAllowed); - if (message.longTermAllowed != null && Object.hasOwnProperty.call(message, "longTermAllowed")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.longTermAllowed); - if (message.longTermDenied != null && Object.hasOwnProperty.call(message, "longTermDenied")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.longTermDenied); - return writer; - }; + /** + * AttackStepNode description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + */ + AttackStepNode.prototype.description = ""; - /** - * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {google.cloud.securitycenter.v1.IRequests} message Requests message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Requests.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new AttackStepNode instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode} AttackStepNode instance + */ + AttackStepNode.create = function create(properties) { + return new AttackStepNode(properties); + }; - /** - * Decodes a Requests message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Requests} Requests - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Requests.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.cloud.securitycenter.v1.Requests(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ratio = reader.double(); - break; - } - case 2: { - message.shortTermAllowed = reader.int32(); - break; - } - case 3: { - message.longTermAllowed = reader.int32(); - break; - } - case 4: { - message.longTermDenied = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified AttackStepNode message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode} message AttackStepNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackStepNode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uuid); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + return writer; + }; - /** - * Decodes a Requests message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Requests} Requests - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Requests.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Requests message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Requests.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ratio != null && message.hasOwnProperty("ratio")) - if (typeof message.ratio !== "number") - return "ratio: number expected"; - if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) - if (!$util.isInteger(message.shortTermAllowed)) - return "shortTermAllowed: integer expected"; - if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) - if (!$util.isInteger(message.longTermAllowed)) - return "longTermAllowed: integer expected"; - if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) - if (!$util.isInteger(message.longTermDenied)) - return "longTermDenied: integer expected"; - return null; - }; - - /** - * Creates a Requests message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Requests} Requests - */ - Requests.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Requests) - return object; - var message = new $root.google.cloud.securitycenter.v1.Requests(); - if (object.ratio != null) - message.ratio = Number(object.ratio); - if (object.shortTermAllowed != null) - message.shortTermAllowed = object.shortTermAllowed | 0; - if (object.longTermAllowed != null) - message.longTermAllowed = object.longTermAllowed | 0; - if (object.longTermDenied != null) - message.longTermDenied = object.longTermDenied | 0; - return message; - }; + /** + * Encodes the specified AttackStepNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.IAttackStepNode} message AttackStepNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackStepNode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Requests message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {google.cloud.securitycenter.v1.Requests} message Requests - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Requests.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ratio = 0; - object.shortTermAllowed = 0; - object.longTermAllowed = 0; - object.longTermDenied = 0; - } - if (message.ratio != null && message.hasOwnProperty("ratio")) - object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; - if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) - object.shortTermAllowed = message.shortTermAllowed; - if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) - object.longTermAllowed = message.longTermAllowed; - if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) - object.longTermDenied = message.longTermDenied; - return object; - }; + /** + * Decodes an AttackStepNode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode} AttackStepNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackStepNode.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.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uuid = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 5: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this Requests to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Requests - * @instance - * @returns {Object.} JSON object - */ - Requests.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an AttackStepNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode} AttackStepNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackStepNode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Requests - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Requests - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Requests.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Requests"; - }; + /** + * Verifies an AttackStepNode message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttackStepNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; - return Requests; - })(); + /** + * Creates an AttackStepNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode} AttackStepNode + */ + AttackStepNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode) + return object; + var message = new $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode(); + if (object.uuid != null) + message.uuid = String(object.uuid); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "NODE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "NODE_TYPE_AND": + case 1: + message.type = 1; + break; + case "NODE_TYPE_OR": + case 2: + message.type = 2; + break; + case "NODE_TYPE_DEFENSE": + case 3: + message.type = 3; + break; + case "NODE_TYPE_ATTACKER": + case 4: + message.type = 4; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + return message; + }; - v1.AdaptiveProtection = (function() { + /** + * Creates a plain object from an AttackStepNode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode} message AttackStepNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttackStepNode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.uuid = ""; + object.type = options.enums === String ? "NODE_TYPE_UNSPECIFIED" : 0; + object.displayName = ""; + object.description = ""; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType[message.type] === undefined ? message.type : $root.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType[message.type] : message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; - /** - * Properties of an AdaptiveProtection. - * @memberof google.cloud.securitycenter.v1 - * @interface IAdaptiveProtection - * @property {number|null} [confidence] AdaptiveProtection confidence - */ + /** + * Converts this AttackStepNode to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @instance + * @returns {Object.} JSON object + */ + AttackStepNode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new AdaptiveProtection. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an AdaptiveProtection. - * @implements IAdaptiveProtection - * @constructor - * @param {google.cloud.securitycenter.v1.IAdaptiveProtection=} [properties] Properties to set - */ - function AdaptiveProtection(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]]; - } + /** + * Gets the default type url for AttackStepNode + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttackStepNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode"; + }; - /** - * AdaptiveProtection confidence. - * @member {number} confidence - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @instance - */ - AdaptiveProtection.prototype.confidence = 0; + return AttackStepNode; + })(); - /** - * Creates a new AdaptiveProtection instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {google.cloud.securitycenter.v1.IAdaptiveProtection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection instance - */ - AdaptiveProtection.create = function create(properties) { - return new AdaptiveProtection(properties); - }; + return AttackPathNode; + })(); - /** - * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {google.cloud.securitycenter.v1.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdaptiveProtection.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidence); - return writer; - }; + AttackPath.AttackPathEdge = (function() { - /** - * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {google.cloud.securitycenter.v1.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdaptiveProtection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an AttackPathEdge. + * @memberof google.cloud.securitycenter.v1.AttackPath + * @interface IAttackPathEdge + * @property {string|null} [source] AttackPathEdge source + * @property {string|null} [destination] AttackPathEdge destination + */ - /** - * Decodes an AdaptiveProtection message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdaptiveProtection.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.cloud.securitycenter.v1.AdaptiveProtection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.confidence = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Constructs a new AttackPathEdge. + * @memberof google.cloud.securitycenter.v1.AttackPath + * @classdesc Represents an AttackPathEdge. + * @implements IAttackPathEdge + * @constructor + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge=} [properties] Properties to set + */ + function AttackPathEdge(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdaptiveProtection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * AttackPathEdge source. + * @member {string} source + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @instance + */ + AttackPathEdge.prototype.source = ""; - /** - * Verifies an AdaptiveProtection message. - * @function verify - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdaptiveProtection.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; + /** + * AttackPathEdge destination. + * @member {string} destination + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @instance + */ + AttackPathEdge.prototype.destination = ""; - /** - * Creates an AdaptiveProtection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection - */ - AdaptiveProtection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.AdaptiveProtection) - return object; - var message = new $root.google.cloud.securitycenter.v1.AdaptiveProtection(); - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; + /** + * Creates a new AttackPathEdge instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathEdge} AttackPathEdge instance + */ + AttackPathEdge.create = function create(properties) { + return new AttackPathEdge(properties); + }; - /** - * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {google.cloud.securitycenter.v1.AdaptiveProtection} message AdaptiveProtection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdaptiveProtection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.confidence = 0; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - return object; - }; + /** + * Encodes the specified AttackPathEdge message. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge} message AttackPathEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackPathEdge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destination); + return writer; + }; - /** - * Converts this AdaptiveProtection to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @instance - * @returns {Object.} JSON object - */ - AdaptiveProtection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified AttackPathEdge message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AttackPath.AttackPathEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.IAttackPathEdge} message AttackPathEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttackPathEdge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for AdaptiveProtection - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.AdaptiveProtection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdaptiveProtection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.AdaptiveProtection"; - }; + /** + * Decodes an AttackPathEdge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathEdge} AttackPathEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackPathEdge.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.cloud.securitycenter.v1.AttackPath.AttackPathEdge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.source = reader.string(); + break; + } + case 2: { + message.destination = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return AdaptiveProtection; + /** + * Decodes an AttackPathEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathEdge} AttackPathEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttackPathEdge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttackPathEdge message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttackPathEdge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + return null; + }; + + /** + * Creates an AttackPathEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AttackPath.AttackPathEdge} AttackPathEdge + */ + AttackPathEdge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge) + return object; + var message = new $root.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge(); + if (object.source != null) + message.source = String(object.source); + if (object.destination != null) + message.destination = String(object.destination); + return message; + }; + + /** + * Creates a plain object from an AttackPathEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {google.cloud.securitycenter.v1.AttackPath.AttackPathEdge} message AttackPathEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttackPathEdge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = ""; + object.destination = ""; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + return object; + }; + + /** + * Converts this AttackPathEdge to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @instance + * @returns {Object.} JSON object + */ + AttackPathEdge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttackPathEdge + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AttackPath.AttackPathEdge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttackPathEdge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AttackPath.AttackPathEdge"; + }; + + return AttackPathEdge; + })(); + + return AttackPath; })(); - v1.Attack = (function() { + v1.BackupDisasterRecovery = (function() { /** - * Properties of an Attack. + * Properties of a BackupDisasterRecovery. * @memberof google.cloud.securitycenter.v1 - * @interface IAttack - * @property {number|null} [volumePps] Attack volumePps - * @property {number|null} [volumeBps] Attack volumeBps - * @property {string|null} [classification] Attack classification + * @interface IBackupDisasterRecovery + * @property {string|null} [backupTemplate] BackupDisasterRecovery backupTemplate + * @property {Array.|null} [policies] BackupDisasterRecovery policies + * @property {string|null} [host] BackupDisasterRecovery host + * @property {Array.|null} [applications] BackupDisasterRecovery applications + * @property {string|null} [storagePool] BackupDisasterRecovery storagePool + * @property {Array.|null} [policyOptions] BackupDisasterRecovery policyOptions + * @property {string|null} [profile] BackupDisasterRecovery profile + * @property {string|null} [appliance] BackupDisasterRecovery appliance + * @property {string|null} [backupType] BackupDisasterRecovery backupType + * @property {google.protobuf.ITimestamp|null} [backupCreateTime] BackupDisasterRecovery backupCreateTime */ /** - * Constructs a new Attack. + * Constructs a new BackupDisasterRecovery. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an Attack. - * @implements IAttack + * @classdesc Represents a BackupDisasterRecovery. + * @implements IBackupDisasterRecovery * @constructor - * @param {google.cloud.securitycenter.v1.IAttack=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery=} [properties] Properties to set */ - function Attack(properties) { + function BackupDisasterRecovery(properties) { + this.policies = []; + this.applications = []; + this.policyOptions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4698,103 +4703,210 @@ } /** - * Attack volumePps. - * @member {number} volumePps - * @memberof google.cloud.securitycenter.v1.Attack + * BackupDisasterRecovery backupTemplate. + * @member {string} backupTemplate + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @instance */ - Attack.prototype.volumePps = 0; + BackupDisasterRecovery.prototype.backupTemplate = ""; /** - * Attack volumeBps. - * @member {number} volumeBps - * @memberof google.cloud.securitycenter.v1.Attack + * BackupDisasterRecovery policies. + * @member {Array.} policies + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @instance */ - Attack.prototype.volumeBps = 0; + BackupDisasterRecovery.prototype.policies = $util.emptyArray; /** - * Attack classification. - * @member {string} classification - * @memberof google.cloud.securitycenter.v1.Attack + * BackupDisasterRecovery host. + * @member {string} host + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @instance */ - Attack.prototype.classification = ""; + BackupDisasterRecovery.prototype.host = ""; /** - * Creates a new Attack instance using the specified properties. + * BackupDisasterRecovery applications. + * @member {Array.} applications + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.applications = $util.emptyArray; + + /** + * BackupDisasterRecovery storagePool. + * @member {string} storagePool + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.storagePool = ""; + + /** + * BackupDisasterRecovery policyOptions. + * @member {Array.} policyOptions + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.policyOptions = $util.emptyArray; + + /** + * BackupDisasterRecovery profile. + * @member {string} profile + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.profile = ""; + + /** + * BackupDisasterRecovery appliance. + * @member {string} appliance + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.appliance = ""; + + /** + * BackupDisasterRecovery backupType. + * @member {string} backupType + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.backupType = ""; + + /** + * BackupDisasterRecovery backupCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} backupCreateTime + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery + * @instance + */ + BackupDisasterRecovery.prototype.backupCreateTime = null; + + /** + * Creates a new BackupDisasterRecovery instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static - * @param {google.cloud.securitycenter.v1.IAttack=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Attack} Attack instance + * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery instance */ - Attack.create = function create(properties) { - return new Attack(properties); + BackupDisasterRecovery.create = function create(properties) { + return new BackupDisasterRecovery(properties); }; /** - * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. + * Encodes the specified BackupDisasterRecovery message. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static - * @param {google.cloud.securitycenter.v1.IAttack} message Attack message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery} message BackupDisasterRecovery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Attack.encode = function encode(message, writer) { + BackupDisasterRecovery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.volumePps != null && Object.hasOwnProperty.call(message, "volumePps")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.volumePps); - if (message.volumeBps != null && Object.hasOwnProperty.call(message, "volumeBps")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.volumeBps); - if (message.classification != null && Object.hasOwnProperty.call(message, "classification")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.classification); + if (message.backupTemplate != null && Object.hasOwnProperty.call(message, "backupTemplate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupTemplate); + if (message.policies != null && message.policies.length) + for (var i = 0; i < message.policies.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.policies[i]); + if (message.host != null && Object.hasOwnProperty.call(message, "host")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.host); + if (message.applications != null && message.applications.length) + for (var i = 0; i < message.applications.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applications[i]); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.storagePool); + if (message.policyOptions != null && message.policyOptions.length) + for (var i = 0; i < message.policyOptions.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.policyOptions[i]); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.profile); + if (message.appliance != null && Object.hasOwnProperty.call(message, "appliance")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.appliance); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.backupType); + if (message.backupCreateTime != null && Object.hasOwnProperty.call(message, "backupCreateTime")) + $root.google.protobuf.Timestamp.encode(message.backupCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. + * Encodes the specified BackupDisasterRecovery message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BackupDisasterRecovery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static - * @param {google.cloud.securitycenter.v1.IAttack} message Attack message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBackupDisasterRecovery} message BackupDisasterRecovery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Attack.encodeDelimited = function encodeDelimited(message, writer) { + BackupDisasterRecovery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Attack message from the specified reader or buffer. + * Decodes a BackupDisasterRecovery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Attack} Attack + * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Attack.decode = function decode(reader, length) { + BackupDisasterRecovery.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.cloud.securitycenter.v1.Attack(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.BackupDisasterRecovery(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.volumePps = reader.int32(); + message.backupTemplate = reader.string(); break; } case 2: { - message.volumeBps = reader.int32(); + if (!(message.policies && message.policies.length)) + message.policies = []; + message.policies.push(reader.string()); break; } case 3: { - message.classification = reader.string(); + message.host = reader.string(); + break; + } + case 4: { + if (!(message.applications && message.applications.length)) + message.applications = []; + message.applications.push(reader.string()); + break; + } + case 5: { + message.storagePool = reader.string(); + break; + } + case 6: { + if (!(message.policyOptions && message.policyOptions.length)) + message.policyOptions = []; + message.policyOptions.push(reader.string()); + break; + } + case 7: { + message.profile = reader.string(); + break; + } + case 8: { + message.appliance = reader.string(); + break; + } + case 9: { + message.backupType = reader.string(); + break; + } + case 10: { + message.backupCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -4806,140 +4918,245 @@ }; /** - * Decodes an Attack message from the specified reader or buffer, length delimited. + * Decodes a BackupDisasterRecovery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Attack} Attack + * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Attack.decodeDelimited = function decodeDelimited(reader) { + BackupDisasterRecovery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Attack message. + * Verifies a BackupDisasterRecovery message. * @function verify - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Attack.verify = function verify(message) { + BackupDisasterRecovery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.volumePps != null && message.hasOwnProperty("volumePps")) - if (!$util.isInteger(message.volumePps)) - return "volumePps: integer expected"; - if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) - if (!$util.isInteger(message.volumeBps)) - return "volumeBps: integer expected"; - if (message.classification != null && message.hasOwnProperty("classification")) - if (!$util.isString(message.classification)) - return "classification: string expected"; + if (message.backupTemplate != null && message.hasOwnProperty("backupTemplate")) + if (!$util.isString(message.backupTemplate)) + return "backupTemplate: string expected"; + if (message.policies != null && message.hasOwnProperty("policies")) { + if (!Array.isArray(message.policies)) + return "policies: array expected"; + for (var i = 0; i < message.policies.length; ++i) + if (!$util.isString(message.policies[i])) + return "policies: string[] expected"; + } + if (message.host != null && message.hasOwnProperty("host")) + if (!$util.isString(message.host)) + return "host: string expected"; + if (message.applications != null && message.hasOwnProperty("applications")) { + if (!Array.isArray(message.applications)) + return "applications: array expected"; + for (var i = 0; i < message.applications.length; ++i) + if (!$util.isString(message.applications[i])) + return "applications: string[] expected"; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.policyOptions != null && message.hasOwnProperty("policyOptions")) { + if (!Array.isArray(message.policyOptions)) + return "policyOptions: array expected"; + for (var i = 0; i < message.policyOptions.length; ++i) + if (!$util.isString(message.policyOptions[i])) + return "policyOptions: string[] expected"; + } + if (message.profile != null && message.hasOwnProperty("profile")) + if (!$util.isString(message.profile)) + return "profile: string expected"; + if (message.appliance != null && message.hasOwnProperty("appliance")) + if (!$util.isString(message.appliance)) + return "appliance: string expected"; + if (message.backupType != null && message.hasOwnProperty("backupType")) + if (!$util.isString(message.backupType)) + return "backupType: string expected"; + if (message.backupCreateTime != null && message.hasOwnProperty("backupCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.backupCreateTime); + if (error) + return "backupCreateTime." + error; + } return null; }; /** - * Creates an Attack message from a plain object. Also converts values to their respective internal types. + * Creates a BackupDisasterRecovery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Attack} Attack + * @returns {google.cloud.securitycenter.v1.BackupDisasterRecovery} BackupDisasterRecovery */ - Attack.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Attack) + BackupDisasterRecovery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BackupDisasterRecovery) return object; - var message = new $root.google.cloud.securitycenter.v1.Attack(); - if (object.volumePps != null) - message.volumePps = object.volumePps | 0; - if (object.volumeBps != null) - message.volumeBps = object.volumeBps | 0; - if (object.classification != null) - message.classification = String(object.classification); - return message; - }; - - /** - * Creates a plain object from an Attack message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Attack + var message = new $root.google.cloud.securitycenter.v1.BackupDisasterRecovery(); + if (object.backupTemplate != null) + message.backupTemplate = String(object.backupTemplate); + if (object.policies) { + if (!Array.isArray(object.policies)) + throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.policies: array expected"); + message.policies = []; + for (var i = 0; i < object.policies.length; ++i) + message.policies[i] = String(object.policies[i]); + } + if (object.host != null) + message.host = String(object.host); + if (object.applications) { + if (!Array.isArray(object.applications)) + throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.applications: array expected"); + message.applications = []; + for (var i = 0; i < object.applications.length; ++i) + message.applications[i] = String(object.applications[i]); + } + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.policyOptions) { + if (!Array.isArray(object.policyOptions)) + throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.policyOptions: array expected"); + message.policyOptions = []; + for (var i = 0; i < object.policyOptions.length; ++i) + message.policyOptions[i] = String(object.policyOptions[i]); + } + if (object.profile != null) + message.profile = String(object.profile); + if (object.appliance != null) + message.appliance = String(object.appliance); + if (object.backupType != null) + message.backupType = String(object.backupType); + if (object.backupCreateTime != null) { + if (typeof object.backupCreateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.BackupDisasterRecovery.backupCreateTime: object expected"); + message.backupCreateTime = $root.google.protobuf.Timestamp.fromObject(object.backupCreateTime); + } + return message; + }; + + /** + * Creates a plain object from a BackupDisasterRecovery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static - * @param {google.cloud.securitycenter.v1.Attack} message Attack + * @param {google.cloud.securitycenter.v1.BackupDisasterRecovery} message BackupDisasterRecovery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Attack.toObject = function toObject(message, options) { + BackupDisasterRecovery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.policies = []; + object.applications = []; + object.policyOptions = []; + } if (options.defaults) { - object.volumePps = 0; - object.volumeBps = 0; - object.classification = ""; + object.backupTemplate = ""; + object.host = ""; + object.storagePool = ""; + object.profile = ""; + object.appliance = ""; + object.backupType = ""; + object.backupCreateTime = null; } - if (message.volumePps != null && message.hasOwnProperty("volumePps")) - object.volumePps = message.volumePps; - if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) - object.volumeBps = message.volumeBps; - if (message.classification != null && message.hasOwnProperty("classification")) - object.classification = message.classification; + if (message.backupTemplate != null && message.hasOwnProperty("backupTemplate")) + object.backupTemplate = message.backupTemplate; + if (message.policies && message.policies.length) { + object.policies = []; + for (var j = 0; j < message.policies.length; ++j) + object.policies[j] = message.policies[j]; + } + if (message.host != null && message.hasOwnProperty("host")) + object.host = message.host; + if (message.applications && message.applications.length) { + object.applications = []; + for (var j = 0; j < message.applications.length; ++j) + object.applications[j] = message.applications[j]; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.policyOptions && message.policyOptions.length) { + object.policyOptions = []; + for (var j = 0; j < message.policyOptions.length; ++j) + object.policyOptions[j] = message.policyOptions[j]; + } + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = message.profile; + if (message.appliance != null && message.hasOwnProperty("appliance")) + object.appliance = message.appliance; + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = message.backupType; + if (message.backupCreateTime != null && message.hasOwnProperty("backupCreateTime")) + object.backupCreateTime = $root.google.protobuf.Timestamp.toObject(message.backupCreateTime, options); return object; }; /** - * Converts this Attack to JSON. + * Converts this BackupDisasterRecovery to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @instance * @returns {Object.} JSON object */ - Attack.prototype.toJSON = function toJSON() { + BackupDisasterRecovery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Attack + * Gets the default type url for BackupDisasterRecovery * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Attack + * @memberof google.cloud.securitycenter.v1.BackupDisasterRecovery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Attack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupDisasterRecovery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Attack"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BackupDisasterRecovery"; }; - return Attack; + return BackupDisasterRecovery; })(); - v1.CloudDlpDataProfile = (function() { + v1.BigQueryExport = (function() { /** - * Properties of a CloudDlpDataProfile. + * Properties of a BigQueryExport. * @memberof google.cloud.securitycenter.v1 - * @interface ICloudDlpDataProfile - * @property {string|null} [dataProfile] CloudDlpDataProfile dataProfile - * @property {google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|null} [parentType] CloudDlpDataProfile parentType + * @interface IBigQueryExport + * @property {string|null} [name] BigQueryExport name + * @property {string|null} [description] BigQueryExport description + * @property {string|null} [filter] BigQueryExport filter + * @property {string|null} [dataset] BigQueryExport dataset + * @property {google.protobuf.ITimestamp|null} [createTime] BigQueryExport createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BigQueryExport updateTime + * @property {string|null} [mostRecentEditor] BigQueryExport mostRecentEditor + * @property {string|null} [principal] BigQueryExport principal */ /** - * Constructs a new CloudDlpDataProfile. + * Constructs a new BigQueryExport. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CloudDlpDataProfile. - * @implements ICloudDlpDataProfile + * @classdesc Represents a BigQueryExport. + * @implements IBigQueryExport * @constructor - * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IBigQueryExport=} [properties] Properties to set */ - function CloudDlpDataProfile(properties) { + function BigQueryExport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4947,89 +5164,173 @@ } /** - * CloudDlpDataProfile dataProfile. - * @member {string} dataProfile - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * BigQueryExport name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @instance */ - CloudDlpDataProfile.prototype.dataProfile = ""; + BigQueryExport.prototype.name = ""; /** - * CloudDlpDataProfile parentType. - * @member {google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType} parentType - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * BigQueryExport description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @instance */ - CloudDlpDataProfile.prototype.parentType = 0; + BigQueryExport.prototype.description = ""; /** - * Creates a new CloudDlpDataProfile instance using the specified properties. + * BigQueryExport filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.filter = ""; + + /** + * BigQueryExport dataset. + * @member {string} dataset + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.dataset = ""; + + /** + * BigQueryExport createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.createTime = null; + + /** + * BigQueryExport updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.updateTime = null; + + /** + * BigQueryExport mostRecentEditor. + * @member {string} mostRecentEditor + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.mostRecentEditor = ""; + + /** + * BigQueryExport principal. + * @member {string} principal + * @memberof google.cloud.securitycenter.v1.BigQueryExport + * @instance + */ + BigQueryExport.prototype.principal = ""; + + /** + * Creates a new BigQueryExport instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile instance + * @param {google.cloud.securitycenter.v1.IBigQueryExport=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport instance */ - CloudDlpDataProfile.create = function create(properties) { - return new CloudDlpDataProfile(properties); + BigQueryExport.create = function create(properties) { + return new BigQueryExport(properties); }; /** - * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBigQueryExport} message BigQueryExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpDataProfile.encode = function encode(message, writer) { + BigQueryExport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataProfile); - if (message.parentType != null && Object.hasOwnProperty.call(message, "parentType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.parentType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataset); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.mostRecentEditor); + if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.principal); return writer; }; /** - * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BigQueryExport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBigQueryExport} message BigQueryExport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * Decodes a BigQueryExport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpDataProfile.decode = function decode(reader, length) { + BigQueryExport.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.cloud.securitycenter.v1.CloudDlpDataProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.BigQueryExport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataProfile = reader.string(); + message.name = reader.string(); break; } case 2: { - message.parentType = reader.int32(); + message.description = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.dataset = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.mostRecentEditor = reader.string(); + break; + } + case 8: { + message.principal = reader.string(); break; } default: @@ -5041,174 +5342,194 @@ }; /** - * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpDataProfile.decodeDelimited = function decodeDelimited(reader) { + BigQueryExport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudDlpDataProfile message. + * Verifies a BigQueryExport message. * @function verify - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudDlpDataProfile.verify = function verify(message) { + BigQueryExport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) - if (!$util.isString(message.dataProfile)) - return "dataProfile: string expected"; - if (message.parentType != null && message.hasOwnProperty("parentType")) - switch (message.parentType) { - default: - return "parentType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + if (!$util.isString(message.mostRecentEditor)) + return "mostRecentEditor: string expected"; + if (message.principal != null && message.hasOwnProperty("principal")) + if (!$util.isString(message.principal)) + return "principal: string expected"; return null; }; /** - * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + * @returns {google.cloud.securitycenter.v1.BigQueryExport} BigQueryExport */ - CloudDlpDataProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpDataProfile) + BigQueryExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BigQueryExport) return object; - var message = new $root.google.cloud.securitycenter.v1.CloudDlpDataProfile(); - if (object.dataProfile != null) - message.dataProfile = String(object.dataProfile); - switch (object.parentType) { - default: - if (typeof object.parentType === "number") { - message.parentType = object.parentType; - break; - } - break; - case "PARENT_TYPE_UNSPECIFIED": - case 0: - message.parentType = 0; - break; - case "ORGANIZATION": - case 1: - message.parentType = 1; - break; - case "PROJECT": - case 2: - message.parentType = 2; - break; + var message = new $root.google.cloud.securitycenter.v1.BigQueryExport(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.BigQueryExport.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.BigQueryExport.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.mostRecentEditor != null) + message.mostRecentEditor = String(object.mostRecentEditor); + if (object.principal != null) + message.principal = String(object.principal); return message; }; /** - * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static - * @param {google.cloud.securitycenter.v1.CloudDlpDataProfile} message CloudDlpDataProfile + * @param {google.cloud.securitycenter.v1.BigQueryExport} message BigQueryExport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudDlpDataProfile.toObject = function toObject(message, options) { + BigQueryExport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataProfile = ""; - object.parentType = options.enums === String ? "PARENT_TYPE_UNSPECIFIED" : 0; + object.name = ""; + object.description = ""; + object.filter = ""; + object.dataset = ""; + object.createTime = null; + object.updateTime = null; + object.mostRecentEditor = ""; + object.principal = ""; } - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) - object.dataProfile = message.dataProfile; - if (message.parentType != null && message.hasOwnProperty("parentType")) - object.parentType = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType[message.parentType] === undefined ? message.parentType : $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType[message.parentType] : message.parentType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + object.mostRecentEditor = message.mostRecentEditor; + if (message.principal != null && message.hasOwnProperty("principal")) + object.principal = message.principal; return object; }; /** - * Converts this CloudDlpDataProfile to JSON. + * Converts this BigQueryExport to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @instance * @returns {Object.} JSON object */ - CloudDlpDataProfile.prototype.toJSON = function toJSON() { + BigQueryExport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudDlpDataProfile + * Gets the default type url for BigQueryExport * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.BigQueryExport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudDlpDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpDataProfile"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BigQueryExport"; }; - /** - * ParentType enum. - * @name google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType - * @enum {number} - * @property {number} PARENT_TYPE_UNSPECIFIED=0 PARENT_TYPE_UNSPECIFIED value - * @property {number} ORGANIZATION=1 ORGANIZATION value - * @property {number} PROJECT=2 PROJECT value - */ - CloudDlpDataProfile.ParentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORGANIZATION"] = 1; - values[valuesById[2] = "PROJECT"] = 2; - return values; - })(); - - return CloudDlpDataProfile; + return BigQueryExport; })(); - v1.CloudDlpInspection = (function() { + v1.CloudArmor = (function() { /** - * Properties of a CloudDlpInspection. + * Properties of a CloudArmor. * @memberof google.cloud.securitycenter.v1 - * @interface ICloudDlpInspection - * @property {string|null} [inspectJob] CloudDlpInspection inspectJob - * @property {string|null} [infoType] CloudDlpInspection infoType - * @property {number|Long|null} [infoTypeCount] CloudDlpInspection infoTypeCount - * @property {boolean|null} [fullScan] CloudDlpInspection fullScan + * @interface ICloudArmor + * @property {google.cloud.securitycenter.v1.ISecurityPolicy|null} [securityPolicy] CloudArmor securityPolicy + * @property {google.cloud.securitycenter.v1.IRequests|null} [requests] CloudArmor requests + * @property {google.cloud.securitycenter.v1.IAdaptiveProtection|null} [adaptiveProtection] CloudArmor adaptiveProtection + * @property {google.cloud.securitycenter.v1.IAttack|null} [attack] CloudArmor attack + * @property {string|null} [threatVector] CloudArmor threatVector + * @property {google.protobuf.IDuration|null} [duration] CloudArmor duration */ /** - * Constructs a new CloudDlpInspection. + * Constructs a new CloudArmor. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CloudDlpInspection. - * @implements ICloudDlpInspection + * @classdesc Represents a CloudArmor. + * @implements ICloudArmor * @constructor - * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICloudArmor=} [properties] Properties to set */ - function CloudDlpInspection(properties) { + function CloudArmor(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5216,117 +5537,145 @@ } /** - * CloudDlpInspection inspectJob. - * @member {string} inspectJob - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * CloudArmor securityPolicy. + * @member {google.cloud.securitycenter.v1.ISecurityPolicy|null|undefined} securityPolicy + * @memberof google.cloud.securitycenter.v1.CloudArmor * @instance */ - CloudDlpInspection.prototype.inspectJob = ""; + CloudArmor.prototype.securityPolicy = null; /** - * CloudDlpInspection infoType. - * @member {string} infoType - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * CloudArmor requests. + * @member {google.cloud.securitycenter.v1.IRequests|null|undefined} requests + * @memberof google.cloud.securitycenter.v1.CloudArmor * @instance */ - CloudDlpInspection.prototype.infoType = ""; + CloudArmor.prototype.requests = null; /** - * CloudDlpInspection infoTypeCount. - * @member {number|Long} infoTypeCount - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * CloudArmor adaptiveProtection. + * @member {google.cloud.securitycenter.v1.IAdaptiveProtection|null|undefined} adaptiveProtection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @instance */ - CloudDlpInspection.prototype.infoTypeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CloudArmor.prototype.adaptiveProtection = null; /** - * CloudDlpInspection fullScan. - * @member {boolean} fullScan - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * CloudArmor attack. + * @member {google.cloud.securitycenter.v1.IAttack|null|undefined} attack + * @memberof google.cloud.securitycenter.v1.CloudArmor * @instance */ - CloudDlpInspection.prototype.fullScan = false; + CloudArmor.prototype.attack = null; /** - * Creates a new CloudDlpInspection instance using the specified properties. + * CloudArmor threatVector. + * @member {string} threatVector + * @memberof google.cloud.securitycenter.v1.CloudArmor + * @instance + */ + CloudArmor.prototype.threatVector = ""; + + /** + * CloudArmor duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.securitycenter.v1.CloudArmor + * @instance + */ + CloudArmor.prototype.duration = null; + + /** + * Creates a new CloudArmor instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection instance + * @param {google.cloud.securitycenter.v1.ICloudArmor=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor instance */ - CloudDlpInspection.create = function create(properties) { - return new CloudDlpInspection(properties); + CloudArmor.create = function create(properties) { + return new CloudArmor(properties); }; /** - * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * Encodes the specified CloudArmor message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudArmor} message CloudArmor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpInspection.encode = function encode(message, writer) { + CloudArmor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inspectJob); - if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.infoType); - if (message.infoTypeCount != null && Object.hasOwnProperty.call(message, "infoTypeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.infoTypeCount); - if (message.fullScan != null && Object.hasOwnProperty.call(message, "fullScan")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.fullScan); + if (message.securityPolicy != null && Object.hasOwnProperty.call(message, "securityPolicy")) + $root.google.cloud.securitycenter.v1.SecurityPolicy.encode(message.securityPolicy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requests != null && Object.hasOwnProperty.call(message, "requests")) + $root.google.cloud.securitycenter.v1.Requests.encode(message.requests, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.adaptiveProtection != null && Object.hasOwnProperty.call(message, "adaptiveProtection")) + $root.google.cloud.securitycenter.v1.AdaptiveProtection.encode(message.adaptiveProtection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.attack != null && Object.hasOwnProperty.call(message, "attack")) + $root.google.cloud.securitycenter.v1.Attack.encode(message.attack, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.threatVector != null && Object.hasOwnProperty.call(message, "threatVector")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.threatVector); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * Encodes the specified CloudArmor message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudArmor.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static - * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudArmor} message CloudArmor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudDlpInspection.encodeDelimited = function encodeDelimited(message, writer) { + CloudArmor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer. + * Decodes a CloudArmor message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpInspection.decode = function decode(reader, length) { + CloudArmor.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.cloud.securitycenter.v1.CloudDlpInspection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CloudArmor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.inspectJob = reader.string(); + message.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.decode(reader, reader.uint32()); break; } case 2: { - message.infoType = reader.string(); + message.requests = $root.google.cloud.securitycenter.v1.Requests.decode(reader, reader.uint32()); break; } case 3: { - message.infoTypeCount = reader.int64(); + message.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.decode(reader, reader.uint32()); break; } case 4: { - message.fullScan = reader.bool(); + message.attack = $root.google.cloud.securitycenter.v1.Attack.decode(reader, reader.uint32()); + break; + } + case 5: { + message.threatVector = reader.string(); + break; + } + case 6: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -5338,164 +5687,190 @@ }; /** - * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * Decodes a CloudArmor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudDlpInspection.decodeDelimited = function decodeDelimited(reader) { + CloudArmor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudDlpInspection message. + * Verifies a CloudArmor message. * @function verify - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudDlpInspection.verify = function verify(message) { + CloudArmor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) - if (!$util.isString(message.inspectJob)) - return "inspectJob: string expected"; - if (message.infoType != null && message.hasOwnProperty("infoType")) - if (!$util.isString(message.infoType)) - return "infoType: string expected"; - if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) - if (!$util.isInteger(message.infoTypeCount) && !(message.infoTypeCount && $util.isInteger(message.infoTypeCount.low) && $util.isInteger(message.infoTypeCount.high))) - return "infoTypeCount: integer|Long expected"; - if (message.fullScan != null && message.hasOwnProperty("fullScan")) - if (typeof message.fullScan !== "boolean") - return "fullScan: boolean expected"; + if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) { + var error = $root.google.cloud.securitycenter.v1.SecurityPolicy.verify(message.securityPolicy); + if (error) + return "securityPolicy." + error; + } + if (message.requests != null && message.hasOwnProperty("requests")) { + var error = $root.google.cloud.securitycenter.v1.Requests.verify(message.requests); + if (error) + return "requests." + error; + } + if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) { + var error = $root.google.cloud.securitycenter.v1.AdaptiveProtection.verify(message.adaptiveProtection); + if (error) + return "adaptiveProtection." + error; + } + if (message.attack != null && message.hasOwnProperty("attack")) { + var error = $root.google.cloud.securitycenter.v1.Attack.verify(message.attack); + if (error) + return "attack." + error; + } + if (message.threatVector != null && message.hasOwnProperty("threatVector")) + if (!$util.isString(message.threatVector)) + return "threatVector: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } return null; }; /** - * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * Creates a CloudArmor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + * @returns {google.cloud.securitycenter.v1.CloudArmor} CloudArmor */ - CloudDlpInspection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpInspection) + CloudArmor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudArmor) return object; - var message = new $root.google.cloud.securitycenter.v1.CloudDlpInspection(); - if (object.inspectJob != null) - message.inspectJob = String(object.inspectJob); - if (object.infoType != null) - message.infoType = String(object.infoType); - if (object.infoTypeCount != null) - if ($util.Long) - (message.infoTypeCount = $util.Long.fromValue(object.infoTypeCount)).unsigned = false; - else if (typeof object.infoTypeCount === "string") - message.infoTypeCount = parseInt(object.infoTypeCount, 10); - else if (typeof object.infoTypeCount === "number") - message.infoTypeCount = object.infoTypeCount; - else if (typeof object.infoTypeCount === "object") - message.infoTypeCount = new $util.LongBits(object.infoTypeCount.low >>> 0, object.infoTypeCount.high >>> 0).toNumber(); - if (object.fullScan != null) - message.fullScan = Boolean(object.fullScan); + var message = new $root.google.cloud.securitycenter.v1.CloudArmor(); + if (object.securityPolicy != null) { + if (typeof object.securityPolicy !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.securityPolicy: object expected"); + message.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.fromObject(object.securityPolicy); + } + if (object.requests != null) { + if (typeof object.requests !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.requests: object expected"); + message.requests = $root.google.cloud.securitycenter.v1.Requests.fromObject(object.requests); + } + if (object.adaptiveProtection != null) { + if (typeof object.adaptiveProtection !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.adaptiveProtection: object expected"); + message.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.fromObject(object.adaptiveProtection); + } + if (object.attack != null) { + if (typeof object.attack !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.attack: object expected"); + message.attack = $root.google.cloud.securitycenter.v1.Attack.fromObject(object.attack); + } + if (object.threatVector != null) + message.threatVector = String(object.threatVector); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudArmor.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } return message; }; /** - * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * Creates a plain object from a CloudArmor message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static - * @param {google.cloud.securitycenter.v1.CloudDlpInspection} message CloudDlpInspection + * @param {google.cloud.securitycenter.v1.CloudArmor} message CloudArmor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudDlpInspection.toObject = function toObject(message, options) { + CloudArmor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.inspectJob = ""; - object.infoType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.infoTypeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.infoTypeCount = options.longs === String ? "0" : 0; - object.fullScan = false; + object.securityPolicy = null; + object.requests = null; + object.adaptiveProtection = null; + object.attack = null; + object.threatVector = ""; + object.duration = null; } - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) - object.inspectJob = message.inspectJob; - if (message.infoType != null && message.hasOwnProperty("infoType")) - object.infoType = message.infoType; - if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) - if (typeof message.infoTypeCount === "number") - object.infoTypeCount = options.longs === String ? String(message.infoTypeCount) : message.infoTypeCount; - else - object.infoTypeCount = options.longs === String ? $util.Long.prototype.toString.call(message.infoTypeCount) : options.longs === Number ? new $util.LongBits(message.infoTypeCount.low >>> 0, message.infoTypeCount.high >>> 0).toNumber() : message.infoTypeCount; - if (message.fullScan != null && message.hasOwnProperty("fullScan")) - object.fullScan = message.fullScan; + if (message.securityPolicy != null && message.hasOwnProperty("securityPolicy")) + object.securityPolicy = $root.google.cloud.securitycenter.v1.SecurityPolicy.toObject(message.securityPolicy, options); + if (message.requests != null && message.hasOwnProperty("requests")) + object.requests = $root.google.cloud.securitycenter.v1.Requests.toObject(message.requests, options); + if (message.adaptiveProtection != null && message.hasOwnProperty("adaptiveProtection")) + object.adaptiveProtection = $root.google.cloud.securitycenter.v1.AdaptiveProtection.toObject(message.adaptiveProtection, options); + if (message.attack != null && message.hasOwnProperty("attack")) + object.attack = $root.google.cloud.securitycenter.v1.Attack.toObject(message.attack, options); + if (message.threatVector != null && message.hasOwnProperty("threatVector")) + object.threatVector = message.threatVector; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); return object; }; /** - * Converts this CloudDlpInspection to JSON. + * Converts this CloudArmor to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @instance * @returns {Object.} JSON object */ - CloudDlpInspection.prototype.toJSON = function toJSON() { + CloudArmor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudDlpInspection + * Gets the default type url for CloudArmor * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @memberof google.cloud.securitycenter.v1.CloudArmor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudDlpInspection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudArmor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpInspection"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudArmor"; }; - return CloudDlpInspection; + return CloudArmor; })(); - v1.Compliance = (function() { + v1.SecurityPolicy = (function() { /** - * Properties of a Compliance. + * Properties of a SecurityPolicy. * @memberof google.cloud.securitycenter.v1 - * @interface ICompliance - * @property {string|null} [standard] Compliance standard - * @property {string|null} [version] Compliance version - * @property {Array.|null} [ids] Compliance ids + * @interface ISecurityPolicy + * @property {string|null} [name] SecurityPolicy name + * @property {string|null} [type] SecurityPolicy type + * @property {boolean|null} [preview] SecurityPolicy preview */ /** - * Constructs a new Compliance. + * Constructs a new SecurityPolicy. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Compliance. - * @implements ICompliance + * @classdesc Represents a SecurityPolicy. + * @implements ISecurityPolicy * @constructor - * @param {google.cloud.securitycenter.v1.ICompliance=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISecurityPolicy=} [properties] Properties to set */ - function Compliance(properties) { - this.ids = []; + function SecurityPolicy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5503,106 +5878,103 @@ } /** - * Compliance standard. - * @member {string} standard - * @memberof google.cloud.securitycenter.v1.Compliance + * SecurityPolicy name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @instance */ - Compliance.prototype.standard = ""; + SecurityPolicy.prototype.name = ""; /** - * Compliance version. - * @member {string} version - * @memberof google.cloud.securitycenter.v1.Compliance + * SecurityPolicy type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @instance */ - Compliance.prototype.version = ""; + SecurityPolicy.prototype.type = ""; /** - * Compliance ids. - * @member {Array.} ids - * @memberof google.cloud.securitycenter.v1.Compliance + * SecurityPolicy preview. + * @member {boolean} preview + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @instance */ - Compliance.prototype.ids = $util.emptyArray; + SecurityPolicy.prototype.preview = false; /** - * Creates a new Compliance instance using the specified properties. + * Creates a new SecurityPolicy instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v1.ICompliance=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Compliance} Compliance instance + * @param {google.cloud.securitycenter.v1.ISecurityPolicy=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy instance */ - Compliance.create = function create(properties) { - return new Compliance(properties); + SecurityPolicy.create = function create(properties) { + return new SecurityPolicy(properties); }; /** - * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. + * Encodes the specified SecurityPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v1.ICompliance} message Compliance message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISecurityPolicy} message SecurityPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Compliance.encode = function encode(message, writer) { + SecurityPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.ids != null && message.ids.length) - for (var i = 0; i < message.ids.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.preview != null && Object.hasOwnProperty.call(message, "preview")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preview); return writer; }; /** - * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. + * Encodes the specified SecurityPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v1.ICompliance} message Compliance message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISecurityPolicy} message SecurityPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Compliance.encodeDelimited = function encodeDelimited(message, writer) { + SecurityPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Compliance message from the specified reader or buffer. + * Decodes a SecurityPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Compliance} Compliance + * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Compliance.decode = function decode(reader, length) { + SecurityPolicy.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.cloud.securitycenter.v1.Compliance(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SecurityPolicy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.standard = reader.string(); + message.name = reader.string(); break; } case 2: { - message.version = reader.string(); + message.type = reader.string(); break; } case 3: { - if (!(message.ids && message.ids.length)) - message.ids = []; - message.ids.push(reader.string()); + message.preview = reader.bool(); break; } default: @@ -5614,156 +5986,142 @@ }; /** - * Decodes a Compliance message from the specified reader or buffer, length delimited. + * Decodes a SecurityPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Compliance} Compliance + * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Compliance.decodeDelimited = function decodeDelimited(reader) { + SecurityPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Compliance message. + * Verifies a SecurityPolicy message. * @function verify - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Compliance.verify = function verify(message) { + SecurityPolicy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.standard != null && message.hasOwnProperty("standard")) - if (!$util.isString(message.standard)) - return "standard: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.ids != null && message.hasOwnProperty("ids")) { - if (!Array.isArray(message.ids)) - return "ids: array expected"; - for (var i = 0; i < message.ids.length; ++i) - if (!$util.isString(message.ids[i])) - return "ids: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.preview != null && message.hasOwnProperty("preview")) + if (typeof message.preview !== "boolean") + return "preview: boolean expected"; return null; }; /** - * Creates a Compliance message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Compliance} Compliance + * @returns {google.cloud.securitycenter.v1.SecurityPolicy} SecurityPolicy */ - Compliance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Compliance) + SecurityPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPolicy) return object; - var message = new $root.google.cloud.securitycenter.v1.Compliance(); - if (object.standard != null) - message.standard = String(object.standard); - if (object.version != null) - message.version = String(object.version); - if (object.ids) { - if (!Array.isArray(object.ids)) - throw TypeError(".google.cloud.securitycenter.v1.Compliance.ids: array expected"); - message.ids = []; - for (var i = 0; i < object.ids.length; ++i) - message.ids[i] = String(object.ids[i]); - } + var message = new $root.google.cloud.securitycenter.v1.SecurityPolicy(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.preview != null) + message.preview = Boolean(object.preview); return message; }; /** - * Creates a plain object from a Compliance message. Also converts values to other types if specified. + * Creates a plain object from a SecurityPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static - * @param {google.cloud.securitycenter.v1.Compliance} message Compliance + * @param {google.cloud.securitycenter.v1.SecurityPolicy} message SecurityPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Compliance.toObject = function toObject(message, options) { + SecurityPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.ids = []; if (options.defaults) { - object.standard = ""; - object.version = ""; - } - if (message.standard != null && message.hasOwnProperty("standard")) - object.standard = message.standard; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.ids && message.ids.length) { - object.ids = []; - for (var j = 0; j < message.ids.length; ++j) - object.ids[j] = message.ids[j]; + object.name = ""; + object.type = ""; + object.preview = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.preview != null && message.hasOwnProperty("preview")) + object.preview = message.preview; return object; }; /** - * Converts this Compliance to JSON. + * Converts this SecurityPolicy to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @instance * @returns {Object.} JSON object */ - Compliance.prototype.toJSON = function toJSON() { + SecurityPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Compliance + * Gets the default type url for SecurityPolicy * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Compliance + * @memberof google.cloud.securitycenter.v1.SecurityPolicy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Compliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecurityPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Compliance"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPolicy"; }; - return Compliance; + return SecurityPolicy; })(); - v1.Connection = (function() { + v1.Requests = (function() { /** - * Properties of a Connection. + * Properties of a Requests. * @memberof google.cloud.securitycenter.v1 - * @interface IConnection - * @property {string|null} [destinationIp] Connection destinationIp - * @property {number|null} [destinationPort] Connection destinationPort - * @property {string|null} [sourceIp] Connection sourceIp - * @property {number|null} [sourcePort] Connection sourcePort - * @property {google.cloud.securitycenter.v1.Connection.Protocol|null} [protocol] Connection protocol + * @interface IRequests + * @property {number|null} [ratio] Requests ratio + * @property {number|null} [shortTermAllowed] Requests shortTermAllowed + * @property {number|null} [longTermAllowed] Requests longTermAllowed + * @property {number|null} [longTermDenied] Requests longTermDenied */ /** - * Constructs a new Connection. + * Constructs a new Requests. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Connection. - * @implements IConnection + * @classdesc Represents a Requests. + * @implements IRequests * @constructor - * @param {google.cloud.securitycenter.v1.IConnection=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IRequests=} [properties] Properties to set */ - function Connection(properties) { + function Requests(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5771,131 +6129,117 @@ } /** - * Connection destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.securitycenter.v1.Connection - * @instance - */ - Connection.prototype.destinationIp = ""; - - /** - * Connection destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.securitycenter.v1.Connection + * Requests ratio. + * @member {number} ratio + * @memberof google.cloud.securitycenter.v1.Requests * @instance */ - Connection.prototype.destinationPort = 0; + Requests.prototype.ratio = 0; /** - * Connection sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.securitycenter.v1.Connection + * Requests shortTermAllowed. + * @member {number} shortTermAllowed + * @memberof google.cloud.securitycenter.v1.Requests * @instance */ - Connection.prototype.sourceIp = ""; + Requests.prototype.shortTermAllowed = 0; /** - * Connection sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.securitycenter.v1.Connection + * Requests longTermAllowed. + * @member {number} longTermAllowed + * @memberof google.cloud.securitycenter.v1.Requests * @instance */ - Connection.prototype.sourcePort = 0; + Requests.prototype.longTermAllowed = 0; /** - * Connection protocol. - * @member {google.cloud.securitycenter.v1.Connection.Protocol} protocol - * @memberof google.cloud.securitycenter.v1.Connection + * Requests longTermDenied. + * @member {number} longTermDenied + * @memberof google.cloud.securitycenter.v1.Requests * @instance */ - Connection.prototype.protocol = 0; + Requests.prototype.longTermDenied = 0; /** - * Creates a new Connection instance using the specified properties. + * Creates a new Requests instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static - * @param {google.cloud.securitycenter.v1.IConnection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Connection} Connection instance + * @param {google.cloud.securitycenter.v1.IRequests=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Requests} Requests instance */ - Connection.create = function create(properties) { - return new Connection(properties); + Requests.create = function create(properties) { + return new Requests(properties); }; /** - * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. + * Encodes the specified Requests message. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static - * @param {google.cloud.securitycenter.v1.IConnection} message Connection message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRequests} message Requests message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Connection.encode = function encode(message, writer) { + Requests.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationIp); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationPort); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protocol); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.ratio); + if (message.shortTermAllowed != null && Object.hasOwnProperty.call(message, "shortTermAllowed")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.shortTermAllowed); + if (message.longTermAllowed != null && Object.hasOwnProperty.call(message, "longTermAllowed")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.longTermAllowed); + if (message.longTermDenied != null && Object.hasOwnProperty.call(message, "longTermDenied")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.longTermDenied); return writer; }; /** - * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. + * Encodes the specified Requests message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Requests.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static - * @param {google.cloud.securitycenter.v1.IConnection} message Connection message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRequests} message Requests message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Connection.encodeDelimited = function encodeDelimited(message, writer) { + Requests.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Connection message from the specified reader or buffer. + * Decodes a Requests message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Connection} Connection + * @returns {google.cloud.securitycenter.v1.Requests} Requests * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Connection.decode = function decode(reader, length) { + Requests.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.cloud.securitycenter.v1.Connection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Requests(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.destinationIp = reader.string(); + message.ratio = reader.double(); break; } case 2: { - message.destinationPort = reader.int32(); + message.shortTermAllowed = reader.int32(); break; } case 3: { - message.sourceIp = reader.string(); + message.longTermAllowed = reader.int32(); break; } case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.protocol = reader.int32(); + message.longTermDenied = reader.int32(); break; } default: @@ -5907,217 +6251,147 @@ }; /** - * Decodes a Connection message from the specified reader or buffer, length delimited. + * Decodes a Requests message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Connection} Connection + * @returns {google.cloud.securitycenter.v1.Requests} Requests * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Connection.decodeDelimited = function decodeDelimited(reader) { + Requests.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Connection message. + * Verifies a Requests message. * @function verify - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Connection.verify = function verify(message) { + Requests.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - switch (message.protocol) { - default: - return "protocol: enum value expected"; - case 0: - case 1: - case 6: - case 17: - case 47: - case 50: - break; - } + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) + if (!$util.isInteger(message.shortTermAllowed)) + return "shortTermAllowed: integer expected"; + if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) + if (!$util.isInteger(message.longTermAllowed)) + return "longTermAllowed: integer expected"; + if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) + if (!$util.isInteger(message.longTermDenied)) + return "longTermDenied: integer expected"; return null; }; /** - * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * Creates a Requests message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Connection} Connection + * @returns {google.cloud.securitycenter.v1.Requests} Requests */ - Connection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Connection) + Requests.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Requests) return object; - var message = new $root.google.cloud.securitycenter.v1.Connection(); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - switch (object.protocol) { - default: - if (typeof object.protocol === "number") { - message.protocol = object.protocol; - break; - } - break; - case "PROTOCOL_UNSPECIFIED": - case 0: - message.protocol = 0; - break; - case "ICMP": - case 1: - message.protocol = 1; - break; - case "TCP": - case 6: - message.protocol = 6; - break; - case "UDP": - case 17: - message.protocol = 17; - break; - case "GRE": - case 47: - message.protocol = 47; - break; - case "ESP": - case 50: - message.protocol = 50; - break; - } + var message = new $root.google.cloud.securitycenter.v1.Requests(); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.shortTermAllowed != null) + message.shortTermAllowed = object.shortTermAllowed | 0; + if (object.longTermAllowed != null) + message.longTermAllowed = object.longTermAllowed | 0; + if (object.longTermDenied != null) + message.longTermDenied = object.longTermDenied | 0; return message; }; /** - * Creates a plain object from a Connection message. Also converts values to other types if specified. + * Creates a plain object from a Requests message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static - * @param {google.cloud.securitycenter.v1.Connection} message Connection + * @param {google.cloud.securitycenter.v1.Requests} message Requests * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Connection.toObject = function toObject(message, options) { + Requests.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.destinationIp = ""; - object.destinationPort = 0; - object.sourceIp = ""; - object.sourcePort = 0; - object.protocol = options.enums === String ? "PROTOCOL_UNSPECIFIED" : 0; + object.ratio = 0; + object.shortTermAllowed = 0; + object.longTermAllowed = 0; + object.longTermDenied = 0; } - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = options.enums === String ? $root.google.cloud.securitycenter.v1.Connection.Protocol[message.protocol] === undefined ? message.protocol : $root.google.cloud.securitycenter.v1.Connection.Protocol[message.protocol] : message.protocol; + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.shortTermAllowed != null && message.hasOwnProperty("shortTermAllowed")) + object.shortTermAllowed = message.shortTermAllowed; + if (message.longTermAllowed != null && message.hasOwnProperty("longTermAllowed")) + object.longTermAllowed = message.longTermAllowed; + if (message.longTermDenied != null && message.hasOwnProperty("longTermDenied")) + object.longTermDenied = message.longTermDenied; return object; }; /** - * Converts this Connection to JSON. + * Converts this Requests to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @instance * @returns {Object.} JSON object */ - Connection.prototype.toJSON = function toJSON() { + Requests.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Connection + * Gets the default type url for Requests * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Connection + * @memberof google.cloud.securitycenter.v1.Requests * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Requests.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Connection"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Requests"; }; - /** - * Protocol enum. - * @name google.cloud.securitycenter.v1.Connection.Protocol - * @enum {number} - * @property {number} PROTOCOL_UNSPECIFIED=0 PROTOCOL_UNSPECIFIED value - * @property {number} ICMP=1 ICMP value - * @property {number} TCP=6 TCP value - * @property {number} UDP=17 UDP value - * @property {number} GRE=47 GRE value - * @property {number} ESP=50 ESP value - */ - Connection.Protocol = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROTOCOL_UNSPECIFIED"] = 0; - values[valuesById[1] = "ICMP"] = 1; - values[valuesById[6] = "TCP"] = 6; - values[valuesById[17] = "UDP"] = 17; - values[valuesById[47] = "GRE"] = 47; - values[valuesById[50] = "ESP"] = 50; - return values; - })(); - - return Connection; + return Requests; })(); - v1.ContactDetails = (function() { + v1.AdaptiveProtection = (function() { /** - * Properties of a ContactDetails. + * Properties of an AdaptiveProtection. * @memberof google.cloud.securitycenter.v1 - * @interface IContactDetails - * @property {Array.|null} [contacts] ContactDetails contacts + * @interface IAdaptiveProtection + * @property {number|null} [confidence] AdaptiveProtection confidence */ /** - * Constructs a new ContactDetails. + * Constructs a new AdaptiveProtection. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ContactDetails. - * @implements IContactDetails + * @classdesc Represents an AdaptiveProtection. + * @implements IAdaptiveProtection * @constructor - * @param {google.cloud.securitycenter.v1.IContactDetails=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IAdaptiveProtection=} [properties] Properties to set */ - function ContactDetails(properties) { - this.contacts = []; + function AdaptiveProtection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6125,78 +6399,75 @@ } /** - * ContactDetails contacts. - * @member {Array.} contacts - * @memberof google.cloud.securitycenter.v1.ContactDetails + * AdaptiveProtection confidence. + * @member {number} confidence + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @instance */ - ContactDetails.prototype.contacts = $util.emptyArray; + AdaptiveProtection.prototype.confidence = 0; /** - * Creates a new ContactDetails instance using the specified properties. + * Creates a new AdaptiveProtection instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v1.IContactDetails=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails instance + * @param {google.cloud.securitycenter.v1.IAdaptiveProtection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection instance */ - ContactDetails.create = function create(properties) { - return new ContactDetails(properties); + AdaptiveProtection.create = function create(properties) { + return new AdaptiveProtection(properties); }; /** - * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. + * Encodes the specified AdaptiveProtection message. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v1.IContactDetails} message ContactDetails message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactDetails.encode = function encode(message, writer) { + AdaptiveProtection.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.contacts != null && message.contacts.length) - for (var i = 0; i < message.contacts.length; ++i) - $root.google.cloud.securitycenter.v1.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.confidence); return writer; }; /** - * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. + * Encodes the specified AdaptiveProtection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AdaptiveProtection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v1.IContactDetails} message ContactDetails message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAdaptiveProtection} message AdaptiveProtection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContactDetails.encodeDelimited = function encodeDelimited(message, writer) { + AdaptiveProtection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContactDetails message from the specified reader or buffer. + * Decodes an AdaptiveProtection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactDetails.decode = function decode(reader, length) { + AdaptiveProtection.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.cloud.securitycenter.v1.ContactDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.AdaptiveProtection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.contacts && message.contacts.length)) - message.contacts = []; - message.contacts.push($root.google.cloud.securitycenter.v1.Contact.decode(reader, reader.uint32())); + message.confidence = reader.double(); break; } default: @@ -6208,139 +6479,124 @@ }; /** - * Decodes a ContactDetails message from the specified reader or buffer, length delimited. + * Decodes an AdaptiveProtection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContactDetails.decodeDelimited = function decodeDelimited(reader) { + AdaptiveProtection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContactDetails message. + * Verifies an AdaptiveProtection message. * @function verify - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContactDetails.verify = function verify(message) { + AdaptiveProtection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!Array.isArray(message.contacts)) - return "contacts: array expected"; - for (var i = 0; i < message.contacts.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Contact.verify(message.contacts[i]); - if (error) - return "contacts." + error; - } - } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. + * Creates an AdaptiveProtection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails + * @returns {google.cloud.securitycenter.v1.AdaptiveProtection} AdaptiveProtection */ - ContactDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ContactDetails) + AdaptiveProtection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AdaptiveProtection) return object; - var message = new $root.google.cloud.securitycenter.v1.ContactDetails(); - if (object.contacts) { - if (!Array.isArray(object.contacts)) - throw TypeError(".google.cloud.securitycenter.v1.ContactDetails.contacts: array expected"); - message.contacts = []; - for (var i = 0; i < object.contacts.length; ++i) { - if (typeof object.contacts[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ContactDetails.contacts: object expected"); - message.contacts[i] = $root.google.cloud.securitycenter.v1.Contact.fromObject(object.contacts[i]); - } - } + var message = new $root.google.cloud.securitycenter.v1.AdaptiveProtection(); + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. + * Creates a plain object from an AdaptiveProtection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static - * @param {google.cloud.securitycenter.v1.ContactDetails} message ContactDetails + * @param {google.cloud.securitycenter.v1.AdaptiveProtection} message AdaptiveProtection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContactDetails.toObject = function toObject(message, options) { + AdaptiveProtection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.contacts = []; - if (message.contacts && message.contacts.length) { - object.contacts = []; - for (var j = 0; j < message.contacts.length; ++j) - object.contacts[j] = $root.google.cloud.securitycenter.v1.Contact.toObject(message.contacts[j], options); - } + if (options.defaults) + object.confidence = 0; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this ContactDetails to JSON. + * Converts this AdaptiveProtection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @instance * @returns {Object.} JSON object */ - ContactDetails.prototype.toJSON = function toJSON() { + AdaptiveProtection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ContactDetails + * Gets the default type url for AdaptiveProtection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ContactDetails + * @memberof google.cloud.securitycenter.v1.AdaptiveProtection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ContactDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdaptiveProtection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ContactDetails"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AdaptiveProtection"; }; - return ContactDetails; + return AdaptiveProtection; })(); - v1.Contact = (function() { + v1.Attack = (function() { /** - * Properties of a Contact. + * Properties of an Attack. * @memberof google.cloud.securitycenter.v1 - * @interface IContact - * @property {string|null} [email] Contact email + * @interface IAttack + * @property {number|null} [volumePps] Attack volumePps + * @property {number|null} [volumeBps] Attack volumeBps + * @property {string|null} [classification] Attack classification */ /** - * Constructs a new Contact. + * Constructs a new Attack. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Contact. - * @implements IContact + * @classdesc Represents an Attack. + * @implements IAttack * @constructor - * @param {google.cloud.securitycenter.v1.IContact=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IAttack=} [properties] Properties to set */ - function Contact(properties) { + function Attack(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6348,75 +6604,103 @@ } /** - * Contact email. - * @member {string} email - * @memberof google.cloud.securitycenter.v1.Contact + * Attack volumePps. + * @member {number} volumePps + * @memberof google.cloud.securitycenter.v1.Attack * @instance */ - Contact.prototype.email = ""; + Attack.prototype.volumePps = 0; /** - * Creates a new Contact instance using the specified properties. + * Attack volumeBps. + * @member {number} volumeBps + * @memberof google.cloud.securitycenter.v1.Attack + * @instance + */ + Attack.prototype.volumeBps = 0; + + /** + * Attack classification. + * @member {string} classification + * @memberof google.cloud.securitycenter.v1.Attack + * @instance + */ + Attack.prototype.classification = ""; + + /** + * Creates a new Attack instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static - * @param {google.cloud.securitycenter.v1.IContact=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Contact} Contact instance + * @param {google.cloud.securitycenter.v1.IAttack=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Attack} Attack instance */ - Contact.create = function create(properties) { - return new Contact(properties); + Attack.create = function create(properties) { + return new Attack(properties); }; /** - * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * Encodes the specified Attack message. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static - * @param {google.cloud.securitycenter.v1.IContact} message Contact message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAttack} message Attack message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encode = function encode(message, writer) { + Attack.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.volumePps != null && Object.hasOwnProperty.call(message, "volumePps")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.volumePps); + if (message.volumeBps != null && Object.hasOwnProperty.call(message, "volumeBps")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.volumeBps); + if (message.classification != null && Object.hasOwnProperty.call(message, "classification")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.classification); return writer; }; /** - * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * Encodes the specified Attack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Attack.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static - * @param {google.cloud.securitycenter.v1.IContact} message Contact message or plain object to encode + * @param {google.cloud.securitycenter.v1.IAttack} message Attack message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Contact.encodeDelimited = function encodeDelimited(message, writer) { + Attack.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Contact message from the specified reader or buffer. + * Decodes an Attack message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Contact} Contact + * @returns {google.cloud.securitycenter.v1.Attack} Attack * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decode = function decode(reader, length) { + Attack.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.cloud.securitycenter.v1.Contact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Attack(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.email = reader.string(); + message.volumePps = reader.int32(); + break; + } + case 2: { + message.volumeBps = reader.int32(); + break; + } + case 3: { + message.classification = reader.string(); break; } default: @@ -6428,127 +6712,140 @@ }; /** - * Decodes a Contact message from the specified reader or buffer, length delimited. + * Decodes an Attack message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Contact} Contact + * @returns {google.cloud.securitycenter.v1.Attack} Attack * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Contact.decodeDelimited = function decodeDelimited(reader) { + Attack.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Contact message. + * Verifies an Attack message. * @function verify - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Contact.verify = function verify(message) { + Attack.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.email != null && message.hasOwnProperty("email")) - if (!$util.isString(message.email)) - return "email: string expected"; + if (message.volumePps != null && message.hasOwnProperty("volumePps")) + if (!$util.isInteger(message.volumePps)) + return "volumePps: integer expected"; + if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) + if (!$util.isInteger(message.volumeBps)) + return "volumeBps: integer expected"; + if (message.classification != null && message.hasOwnProperty("classification")) + if (!$util.isString(message.classification)) + return "classification: string expected"; return null; }; /** - * Creates a Contact message from a plain object. Also converts values to their respective internal types. + * Creates an Attack message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Contact} Contact + * @returns {google.cloud.securitycenter.v1.Attack} Attack */ - Contact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Contact) + Attack.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Attack) return object; - var message = new $root.google.cloud.securitycenter.v1.Contact(); - if (object.email != null) - message.email = String(object.email); + var message = new $root.google.cloud.securitycenter.v1.Attack(); + if (object.volumePps != null) + message.volumePps = object.volumePps | 0; + if (object.volumeBps != null) + message.volumeBps = object.volumeBps | 0; + if (object.classification != null) + message.classification = String(object.classification); return message; }; /** - * Creates a plain object from a Contact message. Also converts values to other types if specified. + * Creates a plain object from an Attack message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static - * @param {google.cloud.securitycenter.v1.Contact} message Contact + * @param {google.cloud.securitycenter.v1.Attack} message Attack * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Contact.toObject = function toObject(message, options) { + Attack.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.email = ""; - if (message.email != null && message.hasOwnProperty("email")) - object.email = message.email; + if (options.defaults) { + object.volumePps = 0; + object.volumeBps = 0; + object.classification = ""; + } + if (message.volumePps != null && message.hasOwnProperty("volumePps")) + object.volumePps = message.volumePps; + if (message.volumeBps != null && message.hasOwnProperty("volumeBps")) + object.volumeBps = message.volumeBps; + if (message.classification != null && message.hasOwnProperty("classification")) + object.classification = message.classification; return object; }; /** - * Converts this Contact to JSON. + * Converts this Attack to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @instance * @returns {Object.} JSON object */ - Contact.prototype.toJSON = function toJSON() { + Attack.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Contact + * Gets the default type url for Attack * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Contact + * @memberof google.cloud.securitycenter.v1.Attack * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Attack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Contact"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Attack"; }; - return Contact; + return Attack; })(); - v1.Container = (function() { + v1.CloudDlpDataProfile = (function() { /** - * Properties of a Container. + * Properties of a CloudDlpDataProfile. * @memberof google.cloud.securitycenter.v1 - * @interface IContainer - * @property {string|null} [name] Container name - * @property {string|null} [uri] Container uri - * @property {string|null} [imageId] Container imageId - * @property {Array.|null} [labels] Container labels - * @property {google.protobuf.ITimestamp|null} [createTime] Container createTime + * @interface ICloudDlpDataProfile + * @property {string|null} [dataProfile] CloudDlpDataProfile dataProfile + * @property {google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType|null} [parentType] CloudDlpDataProfile parentType */ /** - * Constructs a new Container. + * Constructs a new CloudDlpDataProfile. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Container. - * @implements IContainer + * @classdesc Represents a CloudDlpDataProfile. + * @implements ICloudDlpDataProfile * @constructor - * @param {google.cloud.securitycenter.v1.IContainer=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set */ - function Container(properties) { - this.labels = []; + function CloudDlpDataProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6556,134 +6853,89 @@ } /** - * Container name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Container - * @instance - */ - Container.prototype.name = ""; - - /** - * Container uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v1.Container - * @instance - */ - Container.prototype.uri = ""; - - /** - * Container imageId. - * @member {string} imageId - * @memberof google.cloud.securitycenter.v1.Container - * @instance - */ - Container.prototype.imageId = ""; - - /** - * Container labels. - * @member {Array.} labels - * @memberof google.cloud.securitycenter.v1.Container + * CloudDlpDataProfile dataProfile. + * @member {string} dataProfile + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @instance */ - Container.prototype.labels = $util.emptyArray; + CloudDlpDataProfile.prototype.dataProfile = ""; /** - * Container createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.Container + * CloudDlpDataProfile parentType. + * @member {google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType} parentType + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @instance */ - Container.prototype.createTime = null; + CloudDlpDataProfile.prototype.parentType = 0; /** - * Creates a new Container instance using the specified properties. + * Creates a new CloudDlpDataProfile instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v1.IContainer=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Container} Container instance + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile instance */ - Container.create = function create(properties) { - return new Container(properties); + CloudDlpDataProfile.create = function create(properties) { + return new CloudDlpDataProfile(properties); }; /** - * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v1.IContainer} message Container message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Container.encode = function encode(message, writer) { + CloudDlpDataProfile.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.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.imageId != null && Object.hasOwnProperty.call(message, "imageId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageId); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.cloud.securitycenter.v1.Label.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataProfile); + if (message.parentType != null && Object.hasOwnProperty.call(message, "parentType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.parentType); return writer; }; /** - * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v1.IContainer} message Container message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Container.encodeDelimited = function encodeDelimited(message, writer) { + CloudDlpDataProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Container message from the specified reader or buffer. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Container} Container + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Container.decode = function decode(reader, length) { + CloudDlpDataProfile.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.cloud.securitycenter.v1.Container(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CloudDlpDataProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.dataProfile = reader.string(); break; } case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.imageId = reader.string(); - break; - } - case 4: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.cloud.securitycenter.v1.Label.decode(reader, reader.uint32())); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parentType = reader.int32(); break; } default: @@ -6695,179 +6947,174 @@ }; /** - * Decodes a Container message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Container} Container + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Container.decodeDelimited = function decodeDelimited(reader) { + CloudDlpDataProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Container message. + * Verifies a CloudDlpDataProfile message. * @function verify - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Container.verify = function verify(message) { + CloudDlpDataProfile.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.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.imageId != null && message.hasOwnProperty("imageId")) - if (!$util.isString(message.imageId)) - return "imageId: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Label.verify(message.labels[i]); - if (error) - return "labels." + error; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + if (!$util.isString(message.dataProfile)) + return "dataProfile: string expected"; + if (message.parentType != null && message.hasOwnProperty("parentType")) + switch (message.parentType) { + default: + return "parentType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } return null; }; /** - * Creates a Container message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Container} Container + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile */ - Container.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Container) + CloudDlpDataProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpDataProfile) return object; - var message = new $root.google.cloud.securitycenter.v1.Container(); - if (object.name != null) - message.name = String(object.name); - if (object.uri != null) - message.uri = String(object.uri); - if (object.imageId != null) - message.imageId = String(object.imageId); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.cloud.securitycenter.v1.Container.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Container.labels: object expected"); - message.labels[i] = $root.google.cloud.securitycenter.v1.Label.fromObject(object.labels[i]); + var message = new $root.google.cloud.securitycenter.v1.CloudDlpDataProfile(); + if (object.dataProfile != null) + message.dataProfile = String(object.dataProfile); + switch (object.parentType) { + default: + if (typeof object.parentType === "number") { + message.parentType = object.parentType; + break; } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Container.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + break; + case "PARENT_TYPE_UNSPECIFIED": + case 0: + message.parentType = 0; + break; + case "ORGANIZATION": + case 1: + message.parentType = 1; + break; + case "PROJECT": + case 2: + message.parentType = 2; + break; } return message; }; /** - * Creates a plain object from a Container message. Also converts values to other types if specified. + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static - * @param {google.cloud.securitycenter.v1.Container} message Container + * @param {google.cloud.securitycenter.v1.CloudDlpDataProfile} message CloudDlpDataProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Container.toObject = function toObject(message, options) { + CloudDlpDataProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.labels = []; if (options.defaults) { - object.name = ""; - object.uri = ""; - object.imageId = ""; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.imageId != null && message.hasOwnProperty("imageId")) - object.imageId = message.imageId; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.cloud.securitycenter.v1.Label.toObject(message.labels[j], options); + object.dataProfile = ""; + object.parentType = options.enums === String ? "PARENT_TYPE_UNSPECIFIED" : 0; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + object.dataProfile = message.dataProfile; + if (message.parentType != null && message.hasOwnProperty("parentType")) + object.parentType = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType[message.parentType] === undefined ? message.parentType : $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType[message.parentType] : message.parentType; return object; }; /** - * Converts this Container to JSON. + * Converts this CloudDlpDataProfile to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @instance * @returns {Object.} JSON object */ - Container.prototype.toJSON = function toJSON() { + CloudDlpDataProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Container + * Gets the default type url for CloudDlpDataProfile * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Container + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Container.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudDlpDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Container"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpDataProfile"; }; - return Container; + /** + * ParentType enum. + * @name google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType + * @enum {number} + * @property {number} PARENT_TYPE_UNSPECIFIED=0 PARENT_TYPE_UNSPECIFIED value + * @property {number} ORGANIZATION=1 ORGANIZATION value + * @property {number} PROJECT=2 PROJECT value + */ + CloudDlpDataProfile.ParentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORGANIZATION"] = 1; + values[valuesById[2] = "PROJECT"] = 2; + return values; + })(); + + return CloudDlpDataProfile; })(); - v1.Label = (function() { + v1.CloudDlpInspection = (function() { /** - * Properties of a Label. + * Properties of a CloudDlpInspection. * @memberof google.cloud.securitycenter.v1 - * @interface ILabel - * @property {string|null} [name] Label name - * @property {string|null} [value] Label value + * @interface ICloudDlpInspection + * @property {string|null} [inspectJob] CloudDlpInspection inspectJob + * @property {string|null} [infoType] CloudDlpInspection infoType + * @property {number|Long|null} [infoTypeCount] CloudDlpInspection infoTypeCount + * @property {boolean|null} [fullScan] CloudDlpInspection fullScan */ /** - * Constructs a new Label. + * Constructs a new CloudDlpInspection. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Label. - * @implements ILabel + * @classdesc Represents a CloudDlpInspection. + * @implements ICloudDlpInspection * @constructor - * @param {google.cloud.securitycenter.v1.ILabel=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set */ - function Label(properties) { + function CloudDlpInspection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6875,89 +7122,117 @@ } /** - * Label name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Label + * CloudDlpInspection inspectJob. + * @member {string} inspectJob + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @instance */ - Label.prototype.name = ""; + CloudDlpInspection.prototype.inspectJob = ""; /** - * Label value. - * @member {string} value - * @memberof google.cloud.securitycenter.v1.Label + * CloudDlpInspection infoType. + * @member {string} infoType + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @instance */ - Label.prototype.value = ""; + CloudDlpInspection.prototype.infoType = ""; /** - * Creates a new Label instance using the specified properties. + * CloudDlpInspection infoTypeCount. + * @member {number|Long} infoTypeCount + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.infoTypeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudDlpInspection fullScan. + * @member {boolean} fullScan + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.fullScan = false; + + /** + * Creates a new CloudDlpInspection instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v1.ILabel=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Label} Label instance + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection instance */ - Label.create = function create(properties) { - return new Label(properties); + CloudDlpInspection.create = function create(properties) { + return new CloudDlpInspection(properties); }; /** - * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v1.ILabel} message Label message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encode = function encode(message, writer) { + CloudDlpInspection.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.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Label + if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inspectJob); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.infoType); + if (message.infoTypeCount != null && Object.hasOwnProperty.call(message, "infoTypeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.infoTypeCount); + if (message.fullScan != null && Object.hasOwnProperty.call(message, "fullScan")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.fullScan); + return writer; + }; + + /** + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v1.ILabel} message Label message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Label.encodeDelimited = function encodeDelimited(message, writer) { + CloudDlpInspection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Label message from the specified reader or buffer. + * Decodes a CloudDlpInspection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Label} Label + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decode = function decode(reader, length) { + CloudDlpInspection.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.cloud.securitycenter.v1.Label(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CloudDlpInspection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.inspectJob = reader.string(); break; } case 2: { - message.value = reader.string(); + message.infoType = reader.string(); + break; + } + case 3: { + message.infoTypeCount = reader.int64(); + break; + } + case 4: { + message.fullScan = reader.bool(); break; } default: @@ -6969,137 +7244,164 @@ }; /** - * Decodes a Label message from the specified reader or buffer, length delimited. + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Label} Label + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Label.decodeDelimited = function decodeDelimited(reader) { + CloudDlpInspection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Label message. + * Verifies a CloudDlpInspection message. * @function verify - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Label.verify = function verify(message) { + CloudDlpInspection.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.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + if (!$util.isString(message.inspectJob)) + return "inspectJob: string expected"; + if (message.infoType != null && message.hasOwnProperty("infoType")) + if (!$util.isString(message.infoType)) + return "infoType: string expected"; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (!$util.isInteger(message.infoTypeCount) && !(message.infoTypeCount && $util.isInteger(message.infoTypeCount.low) && $util.isInteger(message.infoTypeCount.high))) + return "infoTypeCount: integer|Long expected"; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + if (typeof message.fullScan !== "boolean") + return "fullScan: boolean expected"; return null; }; /** - * Creates a Label message from a plain object. Also converts values to their respective internal types. + * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Label} Label + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection */ - Label.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Label) + CloudDlpInspection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpInspection) return object; - var message = new $root.google.cloud.securitycenter.v1.Label(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.cloud.securitycenter.v1.CloudDlpInspection(); + if (object.inspectJob != null) + message.inspectJob = String(object.inspectJob); + if (object.infoType != null) + message.infoType = String(object.infoType); + if (object.infoTypeCount != null) + if ($util.Long) + (message.infoTypeCount = $util.Long.fromValue(object.infoTypeCount)).unsigned = false; + else if (typeof object.infoTypeCount === "string") + message.infoTypeCount = parseInt(object.infoTypeCount, 10); + else if (typeof object.infoTypeCount === "number") + message.infoTypeCount = object.infoTypeCount; + else if (typeof object.infoTypeCount === "object") + message.infoTypeCount = new $util.LongBits(object.infoTypeCount.low >>> 0, object.infoTypeCount.high >>> 0).toNumber(); + if (object.fullScan != null) + message.fullScan = Boolean(object.fullScan); return message; }; /** - * Creates a plain object from a Label message. Also converts values to other types if specified. + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static - * @param {google.cloud.securitycenter.v1.Label} message Label + * @param {google.cloud.securitycenter.v1.CloudDlpInspection} message CloudDlpInspection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Label.toObject = function toObject(message, options) { + CloudDlpInspection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.value = ""; + object.inspectJob = ""; + object.infoType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.infoTypeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.infoTypeCount = options.longs === String ? "0" : 0; + object.fullScan = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + object.inspectJob = message.inspectJob; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = message.infoType; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (typeof message.infoTypeCount === "number") + object.infoTypeCount = options.longs === String ? String(message.infoTypeCount) : message.infoTypeCount; + else + object.infoTypeCount = options.longs === String ? $util.Long.prototype.toString.call(message.infoTypeCount) : options.longs === Number ? new $util.LongBits(message.infoTypeCount.low >>> 0, message.infoTypeCount.high >>> 0).toNumber() : message.infoTypeCount; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + object.fullScan = message.fullScan; return object; }; /** - * Converts this Label to JSON. + * Converts this CloudDlpInspection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @instance * @returns {Object.} JSON object */ - Label.prototype.toJSON = function toJSON() { + CloudDlpInspection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Label + * Gets the default type url for CloudDlpInspection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Label + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudDlpInspection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Label"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpInspection"; }; - return Label; + return CloudDlpInspection; })(); - v1.Database = (function() { + v1.Compliance = (function() { /** - * Properties of a Database. + * Properties of a Compliance. * @memberof google.cloud.securitycenter.v1 - * @interface IDatabase - * @property {string|null} [name] Database name - * @property {string|null} [displayName] Database displayName - * @property {string|null} [userName] Database userName - * @property {string|null} [query] Database query - * @property {Array.|null} [grantees] Database grantees - * @property {string|null} [version] Database version + * @interface ICompliance + * @property {string|null} [standard] Compliance standard + * @property {string|null} [version] Compliance version + * @property {Array.|null} [ids] Compliance ids */ /** - * Constructs a new Database. + * Constructs a new Compliance. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Database. - * @implements IDatabase + * @classdesc Represents a Compliance. + * @implements ICompliance * @constructor - * @param {google.cloud.securitycenter.v1.IDatabase=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICompliance=} [properties] Properties to set */ - function Database(properties) { - this.grantees = []; + function Compliance(properties) { + this.ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7107,148 +7409,106 @@ } /** - * Database name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Database - * @instance - */ - Database.prototype.name = ""; - - /** - * Database displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.Database - * @instance - */ - Database.prototype.displayName = ""; - - /** - * Database userName. - * @member {string} userName - * @memberof google.cloud.securitycenter.v1.Database - * @instance - */ - Database.prototype.userName = ""; - - /** - * Database query. - * @member {string} query - * @memberof google.cloud.securitycenter.v1.Database + * Compliance standard. + * @member {string} standard + * @memberof google.cloud.securitycenter.v1.Compliance * @instance */ - Database.prototype.query = ""; + Compliance.prototype.standard = ""; /** - * Database grantees. - * @member {Array.} grantees - * @memberof google.cloud.securitycenter.v1.Database + * Compliance version. + * @member {string} version + * @memberof google.cloud.securitycenter.v1.Compliance * @instance */ - Database.prototype.grantees = $util.emptyArray; + Compliance.prototype.version = ""; /** - * Database version. - * @member {string} version - * @memberof google.cloud.securitycenter.v1.Database + * Compliance ids. + * @member {Array.} ids + * @memberof google.cloud.securitycenter.v1.Compliance * @instance */ - Database.prototype.version = ""; + Compliance.prototype.ids = $util.emptyArray; /** - * Creates a new Database instance using the specified properties. + * Creates a new Compliance instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static - * @param {google.cloud.securitycenter.v1.IDatabase=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Database} Database instance + * @param {google.cloud.securitycenter.v1.ICompliance=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Compliance} Compliance instance */ - Database.create = function create(properties) { - return new Database(properties); + Compliance.create = function create(properties) { + return new Compliance(properties); }; /** - * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. + * Encodes the specified Compliance message. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static - * @param {google.cloud.securitycenter.v1.IDatabase} message Database message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICompliance} message Compliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Database.encode = function encode(message, writer) { + Compliance.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.userName); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); - if (message.grantees != null && message.grantees.length) - for (var i = 0; i < message.grantees.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.grantees[i]); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.ids != null && message.ids.length) + for (var i = 0; i < message.ids.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ids[i]); return writer; }; /** - * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. + * Encodes the specified Compliance message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Compliance.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static - * @param {google.cloud.securitycenter.v1.IDatabase} message Database message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICompliance} message Compliance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Database.encodeDelimited = function encodeDelimited(message, writer) { + Compliance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Database message from the specified reader or buffer. + * Decodes a Compliance message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Database} Database + * @returns {google.cloud.securitycenter.v1.Compliance} Compliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Database.decode = function decode(reader, length) { + Compliance.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.cloud.securitycenter.v1.Database(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Compliance(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.standard = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.version = reader.string(); break; } case 3: { - message.userName = reader.string(); - break; - } - case 4: { - message.query = reader.string(); - break; - } - case 5: { - if (!(message.grantees && message.grantees.length)) - message.grantees = []; - message.grantees.push(reader.string()); - break; - } - case 6: { - message.version = reader.string(); + if (!(message.ids && message.ids.length)) + message.ids = []; + message.ids.push(reader.string()); break; } default: @@ -7260,179 +7520,156 @@ }; /** - * Decodes a Database message from the specified reader or buffer, length delimited. + * Decodes a Compliance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Database} Database + * @returns {google.cloud.securitycenter.v1.Compliance} Compliance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Database.decodeDelimited = function decodeDelimited(reader) { + Compliance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Database message. + * Verifies a Compliance message. * @function verify - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Database.verify = function verify(message) { + Compliance.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.userName != null && message.hasOwnProperty("userName")) - if (!$util.isString(message.userName)) - return "userName: string expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.grantees != null && message.hasOwnProperty("grantees")) { - if (!Array.isArray(message.grantees)) - return "grantees: array expected"; - for (var i = 0; i < message.grantees.length; ++i) - if (!$util.isString(message.grantees[i])) - return "grantees: string[] expected"; - } + if (message.standard != null && message.hasOwnProperty("standard")) + if (!$util.isString(message.standard)) + return "standard: string expected"; if (message.version != null && message.hasOwnProperty("version")) if (!$util.isString(message.version)) return "version: string expected"; + if (message.ids != null && message.hasOwnProperty("ids")) { + if (!Array.isArray(message.ids)) + return "ids: array expected"; + for (var i = 0; i < message.ids.length; ++i) + if (!$util.isString(message.ids[i])) + return "ids: string[] expected"; + } return null; }; /** - * Creates a Database message from a plain object. Also converts values to their respective internal types. + * Creates a Compliance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Database} Database + * @returns {google.cloud.securitycenter.v1.Compliance} Compliance */ - Database.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Database) + Compliance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Compliance) return object; - var message = new $root.google.cloud.securitycenter.v1.Database(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.userName != null) - message.userName = String(object.userName); - if (object.query != null) - message.query = String(object.query); - if (object.grantees) { - if (!Array.isArray(object.grantees)) - throw TypeError(".google.cloud.securitycenter.v1.Database.grantees: array expected"); - message.grantees = []; - for (var i = 0; i < object.grantees.length; ++i) - message.grantees[i] = String(object.grantees[i]); - } + var message = new $root.google.cloud.securitycenter.v1.Compliance(); + if (object.standard != null) + message.standard = String(object.standard); if (object.version != null) message.version = String(object.version); + if (object.ids) { + if (!Array.isArray(object.ids)) + throw TypeError(".google.cloud.securitycenter.v1.Compliance.ids: array expected"); + message.ids = []; + for (var i = 0; i < object.ids.length; ++i) + message.ids[i] = String(object.ids[i]); + } return message; }; /** - * Creates a plain object from a Database message. Also converts values to other types if specified. + * Creates a plain object from a Compliance message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static - * @param {google.cloud.securitycenter.v1.Database} message Database + * @param {google.cloud.securitycenter.v1.Compliance} message Compliance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Database.toObject = function toObject(message, options) { + Compliance.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.grantees = []; + object.ids = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.userName = ""; - object.query = ""; + object.standard = ""; object.version = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.userName != null && message.hasOwnProperty("userName")) - object.userName = message.userName; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.grantees && message.grantees.length) { - object.grantees = []; - for (var j = 0; j < message.grantees.length; ++j) - object.grantees[j] = message.grantees[j]; - } + if (message.standard != null && message.hasOwnProperty("standard")) + object.standard = message.standard; if (message.version != null && message.hasOwnProperty("version")) object.version = message.version; + if (message.ids && message.ids.length) { + object.ids = []; + for (var j = 0; j < message.ids.length; ++j) + object.ids[j] = message.ids[j]; + } return object; }; /** - * Converts this Database to JSON. + * Converts this Compliance to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @instance * @returns {Object.} JSON object */ - Database.prototype.toJSON = function toJSON() { + Compliance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Database + * Gets the default type url for Compliance * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Database + * @memberof google.cloud.securitycenter.v1.Compliance * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Compliance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Database"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Compliance"; }; - return Database; + return Compliance; })(); - v1.EffectiveSecurityHealthAnalyticsCustomModule = (function() { + v1.Connection = (function() { /** - * Properties of an EffectiveSecurityHealthAnalyticsCustomModule. + * Properties of a Connection. * @memberof google.cloud.securitycenter.v1 - * @interface IEffectiveSecurityHealthAnalyticsCustomModule - * @property {string|null} [name] EffectiveSecurityHealthAnalyticsCustomModule name - * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] EffectiveSecurityHealthAnalyticsCustomModule customConfig - * @property {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] EffectiveSecurityHealthAnalyticsCustomModule enablementState - * @property {string|null} [displayName] EffectiveSecurityHealthAnalyticsCustomModule displayName + * @interface IConnection + * @property {string|null} [destinationIp] Connection destinationIp + * @property {number|null} [destinationPort] Connection destinationPort + * @property {string|null} [sourceIp] Connection sourceIp + * @property {number|null} [sourcePort] Connection sourcePort + * @property {google.cloud.securitycenter.v1.Connection.Protocol|null} [protocol] Connection protocol */ /** - * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. + * Constructs a new Connection. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an EffectiveSecurityHealthAnalyticsCustomModule. - * @implements IEffectiveSecurityHealthAnalyticsCustomModule + * @classdesc Represents a Connection. + * @implements IConnection * @constructor - * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IConnection=} [properties] Properties to set */ - function EffectiveSecurityHealthAnalyticsCustomModule(properties) { + function Connection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7440,117 +7677,131 @@ } /** - * EffectiveSecurityHealthAnalyticsCustomModule name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * Connection destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.securitycenter.v1.Connection * @instance */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.name = ""; + Connection.prototype.destinationIp = ""; /** - * EffectiveSecurityHealthAnalyticsCustomModule customConfig. - * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * Connection destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.securitycenter.v1.Connection * @instance */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.customConfig = null; + Connection.prototype.destinationPort = 0; /** - * EffectiveSecurityHealthAnalyticsCustomModule enablementState. - * @member {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * Connection sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.securitycenter.v1.Connection * @instance */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; + Connection.prototype.sourceIp = ""; /** - * EffectiveSecurityHealthAnalyticsCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * Connection sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.securitycenter.v1.Connection * @instance */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.displayName = ""; + Connection.prototype.sourcePort = 0; /** - * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule instance + * Connection protocol. + * @member {google.cloud.securitycenter.v1.Connection.Protocol} protocol + * @memberof google.cloud.securitycenter.v1.Connection + * @instance */ - EffectiveSecurityHealthAnalyticsCustomModule.create = function create(properties) { - return new EffectiveSecurityHealthAnalyticsCustomModule(properties); - }; + Connection.prototype.protocol = 0; /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * Creates a new Connection instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Connection + * @static + * @param {google.cloud.securitycenter.v1.IConnection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Connection} Connection instance + */ + Connection.create = function create(properties) { + return new Connection(properties); + }; + + /** + * Encodes the specified Connection message. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Connection + * @static + * @param {google.cloud.securitycenter.v1.IConnection} message Connection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EffectiveSecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { + Connection.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.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationIp); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationPort); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.protocol); return writer; }; /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Connection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static - * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {google.cloud.securitycenter.v1.IConnection} message Connection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EffectiveSecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + Connection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * Decodes a Connection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.Connection} Connection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EffectiveSecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { + Connection.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.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Connection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.destinationIp = reader.string(); break; } case 2: { - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); + message.destinationPort = reader.int32(); break; } case 3: { - message.enablementState = reader.int32(); + message.sourceIp = reader.string(); break; } case 4: { - message.displayName = reader.string(); + message.sourcePort = reader.int32(); + break; + } + case 5: { + message.protocol = reader.int32(); break; } default: @@ -7562,197 +7813,217 @@ }; /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * Decodes a Connection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.Connection} Connection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EffectiveSecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { + Connection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. + * Verifies a Connection message. * @function verify - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EffectiveSecurityHealthAnalyticsCustomModule.verify = function verify(message) { + Connection.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.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + switch (message.protocol) { default: - return "enablementState: enum value expected"; + return "protocol: enum value expected"; case 0: case 1: - case 2: + case 6: + case 17: + case 47: + case 50: break; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; return null; }; /** - * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * Creates a Connection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.Connection} Connection */ - EffectiveSecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule) + Connection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Connection) return object; - var message = new $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule(); - if (object.name != null) - message.name = String(object.name); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); - } - switch (object.enablementState) { + var message = new $root.google.cloud.securitycenter.v1.Connection(); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + switch (object.protocol) { default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; + if (typeof object.protocol === "number") { + message.protocol = object.protocol; break; } break; - case "ENABLEMENT_STATE_UNSPECIFIED": + case "PROTOCOL_UNSPECIFIED": case 0: - message.enablementState = 0; + message.protocol = 0; break; - case "ENABLED": + case "ICMP": case 1: - message.enablementState = 1; + message.protocol = 1; break; - case "DISABLED": - case 2: - message.enablementState = 2; + case "TCP": + case 6: + message.protocol = 6; + break; + case "UDP": + case 17: + message.protocol = 17; + break; + case "GRE": + case 47: + message.protocol = 47; + break; + case "ESP": + case 50: + message.protocol = 50; break; } - if (object.displayName != null) - message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * Creates a plain object from a Connection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static - * @param {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule + * @param {google.cloud.securitycenter.v1.Connection} message Connection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EffectiveSecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { + Connection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.customConfig = null; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.displayName = ""; + object.destinationIp = ""; + object.destinationPort = 0; + object.sourceIp = ""; + object.sourcePort = 0; + object.protocol = options.enums === String ? "PROTOCOL_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = options.enums === String ? $root.google.cloud.securitycenter.v1.Connection.Protocol[message.protocol] === undefined ? message.protocol : $root.google.cloud.securitycenter.v1.Connection.Protocol[message.protocol] : message.protocol; return object; }; /** - * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. + * Converts this Connection to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @instance * @returns {Object.} JSON object */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { + Connection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule + * Gets the default type url for Connection * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.Connection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EffectiveSecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Connection"; }; /** - * EnablementState enum. - * @name google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState + * Protocol enum. + * @name google.cloud.securitycenter.v1.Connection.Protocol * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value + * @property {number} PROTOCOL_UNSPECIFIED=0 PROTOCOL_UNSPECIFIED value + * @property {number} ICMP=1 ICMP value + * @property {number} TCP=6 TCP value + * @property {number} UDP=17 UDP value + * @property {number} GRE=47 GRE value + * @property {number} ESP=50 ESP value */ - EffectiveSecurityHealthAnalyticsCustomModule.EnablementState = (function() { + Connection.Protocol = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[0] = "PROTOCOL_UNSPECIFIED"] = 0; + values[valuesById[1] = "ICMP"] = 1; + values[valuesById[6] = "TCP"] = 6; + values[valuesById[17] = "UDP"] = 17; + values[valuesById[47] = "GRE"] = 47; + values[valuesById[50] = "ESP"] = 50; return values; })(); - return EffectiveSecurityHealthAnalyticsCustomModule; + return Connection; })(); - v1.CustomConfig = (function() { + v1.ContactDetails = (function() { /** - * Properties of a CustomConfig. + * Properties of a ContactDetails. * @memberof google.cloud.securitycenter.v1 - * @interface ICustomConfig - * @property {google.type.IExpr|null} [predicate] CustomConfig predicate - * @property {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null} [customOutput] CustomConfig customOutput - * @property {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null} [resourceSelector] CustomConfig resourceSelector - * @property {google.cloud.securitycenter.v1.CustomConfig.Severity|null} [severity] CustomConfig severity - * @property {string|null} [description] CustomConfig description - * @property {string|null} [recommendation] CustomConfig recommendation + * @interface IContactDetails + * @property {Array.|null} [contacts] ContactDetails contacts */ /** - * Constructs a new CustomConfig. + * Constructs a new ContactDetails. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CustomConfig. - * @implements ICustomConfig + * @classdesc Represents a ContactDetails. + * @implements IContactDetails * @constructor - * @param {google.cloud.securitycenter.v1.ICustomConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IContactDetails=} [properties] Properties to set */ - function CustomConfig(properties) { + function ContactDetails(properties) { + this.contacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7760,145 +8031,78 @@ } /** - * CustomConfig predicate. - * @member {google.type.IExpr|null|undefined} predicate - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.predicate = null; - - /** - * CustomConfig customOutput. - * @member {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null|undefined} customOutput - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.customOutput = null; - - /** - * CustomConfig resourceSelector. - * @member {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null|undefined} resourceSelector - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.resourceSelector = null; - - /** - * CustomConfig severity. - * @member {google.cloud.securitycenter.v1.CustomConfig.Severity} severity - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.severity = 0; - - /** - * CustomConfig description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.description = ""; - - /** - * CustomConfig recommendation. - * @member {string} recommendation - * @memberof google.cloud.securitycenter.v1.CustomConfig + * ContactDetails contacts. + * @member {Array.} contacts + * @memberof google.cloud.securitycenter.v1.ContactDetails * @instance */ - CustomConfig.prototype.recommendation = ""; + ContactDetails.prototype.contacts = $util.emptyArray; /** - * Creates a new CustomConfig instance using the specified properties. + * Creates a new ContactDetails instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static - * @param {google.cloud.securitycenter.v1.ICustomConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig instance + * @param {google.cloud.securitycenter.v1.IContactDetails=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails instance */ - CustomConfig.create = function create(properties) { - return new CustomConfig(properties); + ContactDetails.create = function create(properties) { + return new ContactDetails(properties); }; /** - * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * Encodes the specified ContactDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static - * @param {google.cloud.securitycenter.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IContactDetails} message ContactDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomConfig.encode = function encode(message, writer) { + ContactDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.predicate != null && Object.hasOwnProperty.call(message, "predicate")) - $root.google.type.Expr.encode(message.predicate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.customOutput != null && Object.hasOwnProperty.call(message, "customOutput")) - $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.encode(message.customOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resourceSelector != null && Object.hasOwnProperty.call(message, "resourceSelector")) - $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.encode(message.resourceSelector, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.severity); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.recommendation != null && Object.hasOwnProperty.call(message, "recommendation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.recommendation); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.google.cloud.securitycenter.v1.Contact.encode(message.contacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * Encodes the specified ContactDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ContactDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static - * @param {google.cloud.securitycenter.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IContactDetails} message ContactDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomConfig.encodeDelimited = function encodeDelimited(message, writer) { + ContactDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomConfig message from the specified reader or buffer. + * Decodes a ContactDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomConfig.decode = function decode(reader, length) { + ContactDetails.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.cloud.securitycenter.v1.CustomConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ContactDetails(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.predicate = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - case 2: { - message.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.decode(reader, reader.uint32()); - break; - } - case 4: { - message.severity = reader.int32(); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.recommendation = reader.string(); + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.google.cloud.securitycenter.v1.Contact.decode(reader, reader.uint32())); break; } default: @@ -7910,1021 +8114,756 @@ }; /** - * Decodes a CustomConfig message from the specified reader or buffer, length delimited. + * Decodes a ContactDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomConfig.decodeDelimited = function decodeDelimited(reader) { + ContactDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomConfig message. + * Verifies a ContactDetails message. * @function verify - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomConfig.verify = function verify(message) { + ContactDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.predicate != null && message.hasOwnProperty("predicate")) { - var error = $root.google.type.Expr.verify(message.predicate); - if (error) - return "predicate." + error; - } - if (message.customOutput != null && message.hasOwnProperty("customOutput")) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify(message.customOutput); - if (error) - return "customOutput." + error; - } - if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify(message.resourceSelector); - if (error) - return "resourceSelector." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Contact.verify(message.contacts[i]); + if (error) + return "contacts." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.recommendation != null && message.hasOwnProperty("recommendation")) - if (!$util.isString(message.recommendation)) - return "recommendation: string expected"; + } return null; }; /** - * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ContactDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.ContactDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + * @returns {google.cloud.securitycenter.v1.ContactDetails} ContactDetails */ - CustomConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig) + ContactDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ContactDetails) return object; - var message = new $root.google.cloud.securitycenter.v1.CustomConfig(); - if (object.predicate != null) { - if (typeof object.predicate !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.predicate: object expected"); - message.predicate = $root.google.type.Expr.fromObject(object.predicate); - } - if (object.customOutput != null) { - if (typeof object.customOutput !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.customOutput: object expected"); - message.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.fromObject(object.customOutput); + var message = new $root.google.cloud.securitycenter.v1.ContactDetails(); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".google.cloud.securitycenter.v1.ContactDetails.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ContactDetails.contacts: object expected"); + message.contacts[i] = $root.google.cloud.securitycenter.v1.Contact.fromObject(object.contacts[i]); + } } - if (object.resourceSelector != null) { - if (typeof object.resourceSelector !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.resourceSelector: object expected"); - message.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.fromObject(object.resourceSelector); + return message; + }; + + /** + * Creates a plain object from a ContactDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ContactDetails + * @static + * @param {google.cloud.securitycenter.v1.ContactDetails} message ContactDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contacts = []; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.google.cloud.securitycenter.v1.Contact.toObject(message.contacts[j], options); } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; + return object; + }; + + /** + * Converts this ContactDetails to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ContactDetails + * @instance + * @returns {Object.} JSON object + */ + ContactDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContactDetails + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ContactDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ContactDetails"; + }; + + return ContactDetails; + })(); + + v1.Contact = (function() { + + /** + * Properties of a Contact. + * @memberof google.cloud.securitycenter.v1 + * @interface IContact + * @property {string|null} [email] Contact email + */ + + /** + * Constructs a new Contact. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Contact. + * @implements IContact + * @constructor + * @param {google.cloud.securitycenter.v1.IContact=} [properties] Properties to set + */ + function Contact(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]]; + } + + /** + * Contact email. + * @member {string} email + * @memberof google.cloud.securitycenter.v1.Contact + * @instance + */ + Contact.prototype.email = ""; + + /** + * Creates a new Contact instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {google.cloud.securitycenter.v1.IContact=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Contact} Contact instance + */ + Contact.create = function create(properties) { + return new Contact(properties); + }; + + /** + * Encodes the specified Contact message. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {google.cloud.securitycenter.v1.IContact} message Contact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Contact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + return writer; + }; + + /** + * Encodes the specified Contact message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Contact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {google.cloud.securitycenter.v1.IContact} message Contact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Contact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Contact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Contact} Contact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Contact.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.cloud.securitycenter.v1.Contact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.email = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; } - if (object.description != null) - message.description = String(object.description); - if (object.recommendation != null) - message.recommendation = String(object.recommendation); return message; }; /** - * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. + * Decodes a Contact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Contact} Contact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Contact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Contact message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Contact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.email != null && message.hasOwnProperty("email")) + if (!$util.isString(message.email)) + return "email: string expected"; + return null; + }; + + /** + * Creates a Contact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Contact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Contact} Contact + */ + Contact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Contact) + return object; + var message = new $root.google.cloud.securitycenter.v1.Contact(); + if (object.email != null) + message.email = String(object.email); + return message; + }; + + /** + * Creates a plain object from a Contact message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.Contact * @static - * @param {google.cloud.securitycenter.v1.CustomConfig} message CustomConfig + * @param {google.cloud.securitycenter.v1.Contact} message Contact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomConfig.toObject = function toObject(message, options) { + Contact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.predicate = null; - object.customOutput = null; - object.resourceSelector = null; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.description = ""; - object.recommendation = ""; - } - if (message.predicate != null && message.hasOwnProperty("predicate")) - object.predicate = $root.google.type.Expr.toObject(message.predicate, options); - if (message.customOutput != null && message.hasOwnProperty("customOutput")) - object.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.toObject(message.customOutput, options); - if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) - object.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.toObject(message.resourceSelector, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.securitycenter.v1.CustomConfig.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v1.CustomConfig.Severity[message.severity] : message.severity; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.recommendation != null && message.hasOwnProperty("recommendation")) - object.recommendation = message.recommendation; + if (options.defaults) + object.email = ""; + if (message.email != null && message.hasOwnProperty("email")) + object.email = message.email; return object; }; /** - * Converts this CustomConfig to JSON. + * Converts this Contact to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.Contact * @instance * @returns {Object.} JSON object */ - CustomConfig.prototype.toJSON = function toJSON() { + Contact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomConfig + * Gets the default type url for Contact * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CustomConfig + * @memberof google.cloud.securitycenter.v1.Contact * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Contact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Contact"; }; - CustomConfig.CustomOutputSpec = (function() { + return Contact; + })(); - /** - * Properties of a CustomOutputSpec. - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @interface ICustomOutputSpec - * @property {Array.|null} [properties] CustomOutputSpec properties - */ + v1.Container = (function() { - /** - * Constructs a new CustomOutputSpec. - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @classdesc Represents a CustomOutputSpec. - * @implements ICustomOutputSpec - * @constructor - * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set - */ - function CustomOutputSpec(properties) { - this.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 Container. + * @memberof google.cloud.securitycenter.v1 + * @interface IContainer + * @property {string|null} [name] Container name + * @property {string|null} [uri] Container uri + * @property {string|null} [imageId] Container imageId + * @property {Array.|null} [labels] Container labels + * @property {google.protobuf.ITimestamp|null} [createTime] Container createTime + */ - /** - * CustomOutputSpec properties. - * @member {Array.} properties - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @instance - */ - CustomOutputSpec.prototype.properties = $util.emptyArray; + /** + * Constructs a new Container. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Container. + * @implements IContainer + * @constructor + * @param {google.cloud.securitycenter.v1.IContainer=} [properties] Properties to set + */ + function Container(properties) { + this.labels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new CustomOutputSpec instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec instance - */ - CustomOutputSpec.create = function create(properties) { - return new CustomOutputSpec(properties); - }; + /** + * Container name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Container + * @instance + */ + Container.prototype.name = ""; - /** - * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomOutputSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.properties != null && message.properties.length) - for (var i = 0; i < message.properties.length; ++i) - $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.encode(message.properties[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Container uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v1.Container + * @instance + */ + Container.prototype.uri = ""; - /** - * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomOutputSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Container imageId. + * @member {string} imageId + * @memberof google.cloud.securitycenter.v1.Container + * @instance + */ + Container.prototype.imageId = ""; - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomOutputSpec.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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push($root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Container labels. + * @member {Array.} labels + * @memberof google.cloud.securitycenter.v1.Container + * @instance + */ + Container.prototype.labels = $util.emptyArray; - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomOutputSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Container createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.Container + * @instance + */ + Container.prototype.createTime = null; - /** - * Verifies a CustomOutputSpec message. - * @function verify - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomOutputSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!Array.isArray(message.properties)) - return "properties: array expected"; - for (var i = 0; i < message.properties.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify(message.properties[i]); - if (error) - return "properties." + error; - } - } - return null; - }; + /** + * Creates a new Container instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {google.cloud.securitycenter.v1.IContainer=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Container} Container instance + */ + Container.create = function create(properties) { + return new Container(properties); + }; - /** - * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - */ - CustomOutputSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec) - return object; - var message = new $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec(); - if (object.properties) { - if (!Array.isArray(object.properties)) - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.properties: array expected"); - message.properties = []; - for (var i = 0; i < object.properties.length; ++i) { - if (typeof object.properties[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.properties: object expected"); - message.properties[i] = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.fromObject(object.properties[i]); - } - } - return message; - }; + /** + * Encodes the specified Container message. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {google.cloud.securitycenter.v1.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.imageId != null && Object.hasOwnProperty.call(message, "imageId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageId); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.cloud.securitycenter.v1.Label.encode(message.labels[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} message CustomOutputSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomOutputSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.properties = []; - if (message.properties && message.properties.length) { - object.properties = []; - for (var j = 0; j < message.properties.length; ++j) - object.properties[j] = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.toObject(message.properties[j], options); - } - return object; - }; - - /** - * Converts this CustomOutputSpec to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @instance - * @returns {Object.} JSON object - */ - CustomOutputSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Container.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {google.cloud.securitycenter.v1.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for CustomOutputSpec - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomOutputSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a Container message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Container(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.imageId = reader.string(); + break; + } + case 4: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.cloud.securitycenter.v1.Label.decode(reader, reader.uint32())); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec"; - }; - - CustomOutputSpec.Property = (function() { + } + return message; + }; - /** - * Properties of a Property. - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @interface IProperty - * @property {string|null} [name] Property name - * @property {google.type.IExpr|null} [valueExpression] Property valueExpression - */ + /** + * Decodes a Container message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new Property. - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec - * @classdesc Represents a Property. - * @implements IProperty - * @constructor - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set - */ - function Property(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]]; + /** + * Verifies a Container message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Container.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.imageId != null && message.hasOwnProperty("imageId")) + if (!$util.isString(message.imageId)) + return "imageId: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Label.verify(message.labels[i]); + if (error) + return "labels." + error; } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; - /** - * Property name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @instance - */ - Property.prototype.name = ""; + /** + * Creates a Container message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Container} Container + */ + Container.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Container) + return object; + var message = new $root.google.cloud.securitycenter.v1.Container(); + if (object.name != null) + message.name = String(object.name); + if (object.uri != null) + message.uri = String(object.uri); + if (object.imageId != null) + message.imageId = String(object.imageId); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.securitycenter.v1.Container.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Container.labels: object expected"); + message.labels[i] = $root.google.cloud.securitycenter.v1.Label.fromObject(object.labels[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Container.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; - /** - * Property valueExpression. - * @member {google.type.IExpr|null|undefined} valueExpression - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @instance - */ - Property.prototype.valueExpression = null; + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {google.cloud.securitycenter.v1.Container} message Container + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Container.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.labels = []; + if (options.defaults) { + object.name = ""; + object.uri = ""; + object.imageId = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.imageId != null && message.hasOwnProperty("imageId")) + object.imageId = message.imageId; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.cloud.securitycenter.v1.Label.toObject(message.labels[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; - /** - * Creates a new Property instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property instance - */ - Property.create = function create(properties) { - return new Property(properties); - }; + /** + * Converts this Container to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Container + * @instance + * @returns {Object.} JSON object + */ + Container.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.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.valueExpression != null && Object.hasOwnProperty.call(message, "valueExpression")) - $root.google.type.Expr.encode(message.valueExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Gets the default type url for Container + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Container + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Container.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Container"; + }; - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Container; + })(); - /** - * Decodes a Property message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.valueExpression = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.Label = (function() { - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a Label. + * @memberof google.cloud.securitycenter.v1 + * @interface ILabel + * @property {string|null} [name] Label name + * @property {string|null} [value] Label value + */ - /** - * Verifies a Property message. - * @function verify - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Property.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.valueExpression != null && message.hasOwnProperty("valueExpression")) { - var error = $root.google.type.Expr.verify(message.valueExpression); - if (error) - return "valueExpression." + error; - } - return null; - }; + /** + * Constructs a new Label. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Label. + * @implements ILabel + * @constructor + * @param {google.cloud.securitycenter.v1.ILabel=} [properties] Properties to set + */ + function Label(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 Property message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property - */ - Property.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property) - return object; - var message = new $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property(); - if (object.name != null) - message.name = String(object.name); - if (object.valueExpression != null) { - if (typeof object.valueExpression !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.valueExpression: object expected"); - message.valueExpression = $root.google.type.Expr.fromObject(object.valueExpression); - } - return message; - }; + /** + * Label name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Label + * @instance + */ + Label.prototype.name = ""; - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} message Property - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Property.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.valueExpression = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) - object.valueExpression = $root.google.type.Expr.toObject(message.valueExpression, options); - return object; - }; + /** + * Label value. + * @member {string} value + * @memberof google.cloud.securitycenter.v1.Label + * @instance + */ + Label.prototype.value = ""; - /** - * Converts this Property to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @instance - * @returns {Object.} JSON object - */ - Property.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Property - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property"; - }; - - return Property; - })(); - - return CustomOutputSpec; - })(); - - CustomConfig.ResourceSelector = (function() { - - /** - * Properties of a ResourceSelector. - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @interface IResourceSelector - * @property {Array.|null} [resourceTypes] ResourceSelector resourceTypes - */ - - /** - * Constructs a new ResourceSelector. - * @memberof google.cloud.securitycenter.v1.CustomConfig - * @classdesc Represents a ResourceSelector. - * @implements IResourceSelector - * @constructor - * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector=} [properties] Properties to set - */ - function ResourceSelector(properties) { - this.resourceTypes = []; - 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]]; - } - - /** - * ResourceSelector resourceTypes. - * @member {Array.} resourceTypes - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @instance - */ - ResourceSelector.prototype.resourceTypes = $util.emptyArray; - - /** - * Creates a new ResourceSelector instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector instance - */ - ResourceSelector.create = function create(properties) { - return new ResourceSelector(properties); - }; - - /** - * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSelector.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceTypes != null && message.resourceTypes.length) - for (var i = 0; i < message.resourceTypes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypes[i]); - return writer; - }; - - /** - * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSelector.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSelector.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.cloud.securitycenter.v1.CustomConfig.ResourceSelector(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceTypes && message.resourceTypes.length)) - message.resourceTypes = []; - message.resourceTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSelector.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceSelector message. - * @function verify - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSelector.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceTypes != null && message.hasOwnProperty("resourceTypes")) { - if (!Array.isArray(message.resourceTypes)) - return "resourceTypes: array expected"; - for (var i = 0; i < message.resourceTypes.length; ++i) - if (!$util.isString(message.resourceTypes[i])) - return "resourceTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector - */ - ResourceSelector.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector) - return object; - var message = new $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector(); - if (object.resourceTypes) { - if (!Array.isArray(object.resourceTypes)) - throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.resourceTypes: array expected"); - message.resourceTypes = []; - for (var i = 0; i < object.resourceTypes.length; ++i) - message.resourceTypes[i] = String(object.resourceTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} message ResourceSelector - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSelector.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceTypes = []; - if (message.resourceTypes && message.resourceTypes.length) { - object.resourceTypes = []; - for (var j = 0; j < message.resourceTypes.length; ++j) - object.resourceTypes[j] = message.resourceTypes[j]; - } - return object; - }; - - /** - * Converts this ResourceSelector to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @instance - * @returns {Object.} JSON object - */ - ResourceSelector.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceSelector - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.ResourceSelector"; - }; - - return ResourceSelector; - })(); - - /** - * Severity enum. - * @name google.cloud.securitycenter.v1.CustomConfig.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - CustomConfig.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); - - return CustomConfig; - })(); - - v1.Exfiltration = (function() { - - /** - * Properties of an Exfiltration. - * @memberof google.cloud.securitycenter.v1 - * @interface IExfiltration - * @property {Array.|null} [sources] Exfiltration sources - * @property {Array.|null} [targets] Exfiltration targets - * @property {number|Long|null} [totalExfiltratedBytes] Exfiltration totalExfiltratedBytes - */ - - /** - * Constructs a new Exfiltration. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an Exfiltration. - * @implements IExfiltration - * @constructor - * @param {google.cloud.securitycenter.v1.IExfiltration=} [properties] Properties to set - */ - function Exfiltration(properties) { - this.sources = []; - this.targets = []; - 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]]; - } - - /** - * Exfiltration sources. - * @member {Array.} sources - * @memberof google.cloud.securitycenter.v1.Exfiltration - * @instance - */ - Exfiltration.prototype.sources = $util.emptyArray; - - /** - * Exfiltration targets. - * @member {Array.} targets - * @memberof google.cloud.securitycenter.v1.Exfiltration - * @instance - */ - Exfiltration.prototype.targets = $util.emptyArray; - - /** - * Exfiltration totalExfiltratedBytes. - * @member {number|Long} totalExfiltratedBytes - * @memberof google.cloud.securitycenter.v1.Exfiltration - * @instance - */ - Exfiltration.prototype.totalExfiltratedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Exfiltration instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Exfiltration - * @static - * @param {google.cloud.securitycenter.v1.IExfiltration=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration instance - */ - Exfiltration.create = function create(properties) { - return new Exfiltration(properties); - }; + /** + * Creates a new Label instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Label + * @static + * @param {google.cloud.securitycenter.v1.ILabel=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Label} Label instance + */ + Label.create = function create(properties) { + return new Label(properties); + }; /** - * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * Encodes the specified Label message. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static - * @param {google.cloud.securitycenter.v1.IExfiltration} message Exfiltration message or plain object to encode + * @param {google.cloud.securitycenter.v1.ILabel} message Label message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exfiltration.encode = function encode(message, writer) { + Label.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.securitycenter.v1.ExfilResource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - $root.google.cloud.securitycenter.v1.ExfilResource.encode(message.targets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.totalExfiltratedBytes != null && Object.hasOwnProperty.call(message, "totalExfiltratedBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalExfiltratedBytes); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); return writer; }; /** - * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * Encodes the specified Label message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Label.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static - * @param {google.cloud.securitycenter.v1.IExfiltration} message Exfiltration message or plain object to encode + * @param {google.cloud.securitycenter.v1.ILabel} message Label message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Exfiltration.encodeDelimited = function encodeDelimited(message, writer) { + Label.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Exfiltration message from the specified reader or buffer. + * Decodes a Label message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v1.Label} Label * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exfiltration.decode = function decode(reader, length) { + Label.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.cloud.securitycenter.v1.Exfiltration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Label(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.securitycenter.v1.ExfilResource.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.cloud.securitycenter.v1.ExfilResource.decode(reader, reader.uint32())); - break; - } - case 3: { - message.totalExfiltratedBytes = reader.int64(); + message.value = reader.string(); break; } default: @@ -8936,190 +8875,137 @@ }; /** - * Decodes an Exfiltration message from the specified reader or buffer, length delimited. + * Decodes a Label message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v1.Label} Label * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Exfiltration.decodeDelimited = function decodeDelimited(reader) { + Label.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Exfiltration message. + * Verifies a Label message. * @function verify - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Exfiltration.verify = function verify(message) { + Label.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ExfilResource.verify(message.sources[i]); - if (error) - return "sources." + 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.cloud.securitycenter.v1.ExfilResource.verify(message.targets[i]); - if (error) - return "targets." + error; - } - } - if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) - if (!$util.isInteger(message.totalExfiltratedBytes) && !(message.totalExfiltratedBytes && $util.isInteger(message.totalExfiltratedBytes.low) && $util.isInteger(message.totalExfiltratedBytes.high))) - return "totalExfiltratedBytes: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates an Exfiltration message from a plain object. Also converts values to their respective internal types. + * Creates a Label message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration + * @returns {google.cloud.securitycenter.v1.Label} Label */ - Exfiltration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Exfiltration) + Label.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Label) return object; - var message = new $root.google.cloud.securitycenter.v1.Exfiltration(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.sources: object expected"); - message.sources[i] = $root.google.cloud.securitycenter.v1.ExfilResource.fromObject(object.sources[i]); - } - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) { - if (typeof object.targets[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.targets: object expected"); - message.targets[i] = $root.google.cloud.securitycenter.v1.ExfilResource.fromObject(object.targets[i]); - } - } - if (object.totalExfiltratedBytes != null) - if ($util.Long) - (message.totalExfiltratedBytes = $util.Long.fromValue(object.totalExfiltratedBytes)).unsigned = false; - else if (typeof object.totalExfiltratedBytes === "string") - message.totalExfiltratedBytes = parseInt(object.totalExfiltratedBytes, 10); - else if (typeof object.totalExfiltratedBytes === "number") - message.totalExfiltratedBytes = object.totalExfiltratedBytes; - else if (typeof object.totalExfiltratedBytes === "object") - message.totalExfiltratedBytes = new $util.LongBits(object.totalExfiltratedBytes.low >>> 0, object.totalExfiltratedBytes.high >>> 0).toNumber(); + var message = new $root.google.cloud.securitycenter.v1.Label(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. + * Creates a plain object from a Label message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static - * @param {google.cloud.securitycenter.v1.Exfiltration} message Exfiltration + * @param {google.cloud.securitycenter.v1.Label} message Label * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Exfiltration.toObject = function toObject(message, options) { + Label.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sources = []; - object.targets = []; - } - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalExfiltratedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalExfiltratedBytes = options.longs === String ? "0" : 0; - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.securitycenter.v1.ExfilResource.toObject(message.sources[j], options); - } - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = $root.google.cloud.securitycenter.v1.ExfilResource.toObject(message.targets[j], options); + if (options.defaults) { + object.name = ""; + object.value = ""; } - if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) - if (typeof message.totalExfiltratedBytes === "number") - object.totalExfiltratedBytes = options.longs === String ? String(message.totalExfiltratedBytes) : message.totalExfiltratedBytes; - else - object.totalExfiltratedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalExfiltratedBytes) : options.longs === Number ? new $util.LongBits(message.totalExfiltratedBytes.low >>> 0, message.totalExfiltratedBytes.high >>> 0).toNumber() : message.totalExfiltratedBytes; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this Exfiltration to JSON. + * Converts this Label to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @instance * @returns {Object.} JSON object */ - Exfiltration.prototype.toJSON = function toJSON() { + Label.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Exfiltration + * Gets the default type url for Label * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Exfiltration + * @memberof google.cloud.securitycenter.v1.Label * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Exfiltration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Label.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Exfiltration"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Label"; }; - return Exfiltration; + return Label; })(); - v1.ExfilResource = (function() { + v1.Database = (function() { /** - * Properties of an ExfilResource. + * Properties of a Database. * @memberof google.cloud.securitycenter.v1 - * @interface IExfilResource - * @property {string|null} [name] ExfilResource name - * @property {Array.|null} [components] ExfilResource components - */ + * @interface IDatabase + * @property {string|null} [name] Database name + * @property {string|null} [displayName] Database displayName + * @property {string|null} [userName] Database userName + * @property {string|null} [query] Database query + * @property {Array.|null} [grantees] Database grantees + * @property {string|null} [version] Database version + */ /** - * Constructs a new ExfilResource. + * Constructs a new Database. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an ExfilResource. - * @implements IExfilResource + * @classdesc Represents a Database. + * @implements IDatabase * @constructor - * @param {google.cloud.securitycenter.v1.IExfilResource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IDatabase=} [properties] Properties to set */ - function ExfilResource(properties) { - this.components = []; + function Database(properties) { + this.grantees = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9127,81 +9013,121 @@ } /** - * ExfilResource name. + * Database name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @instance */ - ExfilResource.prototype.name = ""; + Database.prototype.name = ""; /** - * ExfilResource components. - * @member {Array.} components - * @memberof google.cloud.securitycenter.v1.ExfilResource + * Database displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.Database * @instance */ - ExfilResource.prototype.components = $util.emptyArray; + Database.prototype.displayName = ""; /** - * Creates a new ExfilResource instance using the specified properties. + * Database userName. + * @member {string} userName + * @memberof google.cloud.securitycenter.v1.Database + * @instance + */ + Database.prototype.userName = ""; + + /** + * Database query. + * @member {string} query + * @memberof google.cloud.securitycenter.v1.Database + * @instance + */ + Database.prototype.query = ""; + + /** + * Database grantees. + * @member {Array.} grantees + * @memberof google.cloud.securitycenter.v1.Database + * @instance + */ + Database.prototype.grantees = $util.emptyArray; + + /** + * Database version. + * @member {string} version + * @memberof google.cloud.securitycenter.v1.Database + * @instance + */ + Database.prototype.version = ""; + + /** + * Creates a new Database instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static - * @param {google.cloud.securitycenter.v1.IExfilResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource instance + * @param {google.cloud.securitycenter.v1.IDatabase=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Database} Database instance */ - ExfilResource.create = function create(properties) { - return new ExfilResource(properties); + Database.create = function create(properties) { + return new Database(properties); }; /** - * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * Encodes the specified Database message. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static - * @param {google.cloud.securitycenter.v1.IExfilResource} message ExfilResource message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDatabase} message Database message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExfilResource.encode = function encode(message, writer) { + Database.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.components != null && message.components.length) - for (var i = 0; i < message.components.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.components[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.userName != null && Object.hasOwnProperty.call(message, "userName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.userName); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); + if (message.grantees != null && message.grantees.length) + for (var i = 0; i < message.grantees.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.grantees[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.version); return writer; }; /** - * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * Encodes the specified Database message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Database.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static - * @param {google.cloud.securitycenter.v1.IExfilResource} message ExfilResource message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDatabase} message Database message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExfilResource.encodeDelimited = function encodeDelimited(message, writer) { + Database.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExfilResource message from the specified reader or buffer. + * Decodes a Database message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v1.Database} Database * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExfilResource.decode = function decode(reader, length) { + Database.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.cloud.securitycenter.v1.ExfilResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Database(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9210,9 +9136,25 @@ break; } case 2: { - if (!(message.components && message.components.length)) - message.components = []; - message.components.push(reader.string()); + message.displayName = reader.string(); + break; + } + case 3: { + message.userName = reader.string(); + break; + } + case 4: { + message.query = reader.string(); + break; + } + case 5: { + if (!(message.grantees && message.grantees.length)) + message.grantees = []; + message.grantees.push(reader.string()); + break; + } + case 6: { + message.version = reader.string(); break; } default: @@ -9224,154 +9166,181 @@ }; /** - * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * Decodes a Database message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v1.Database} Database * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExfilResource.decodeDelimited = function decodeDelimited(reader) { + Database.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExfilResource message. + * Verifies a Database message. * @function verify - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExfilResource.verify = function verify(message) { + Database.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.components != null && message.hasOwnProperty("components")) { - if (!Array.isArray(message.components)) - return "components: array expected"; - for (var i = 0; i < message.components.length; ++i) - if (!$util.isString(message.components[i])) - return "components: string[] expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.userName != null && message.hasOwnProperty("userName")) + if (!$util.isString(message.userName)) + return "userName: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.grantees != null && message.hasOwnProperty("grantees")) { + if (!Array.isArray(message.grantees)) + return "grantees: array expected"; + for (var i = 0; i < message.grantees.length; ++i) + if (!$util.isString(message.grantees[i])) + return "grantees: string[] expected"; } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * Creates a Database message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + * @returns {google.cloud.securitycenter.v1.Database} Database */ - ExfilResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ExfilResource) + Database.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Database) return object; - var message = new $root.google.cloud.securitycenter.v1.ExfilResource(); + var message = new $root.google.cloud.securitycenter.v1.Database(); if (object.name != null) message.name = String(object.name); - if (object.components) { - if (!Array.isArray(object.components)) - throw TypeError(".google.cloud.securitycenter.v1.ExfilResource.components: array expected"); - message.components = []; - for (var i = 0; i < object.components.length; ++i) - message.components[i] = String(object.components[i]); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.userName != null) + message.userName = String(object.userName); + if (object.query != null) + message.query = String(object.query); + if (object.grantees) { + if (!Array.isArray(object.grantees)) + throw TypeError(".google.cloud.securitycenter.v1.Database.grantees: array expected"); + message.grantees = []; + for (var i = 0; i < object.grantees.length; ++i) + message.grantees[i] = String(object.grantees[i]); } + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * Creates a plain object from a Database message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static - * @param {google.cloud.securitycenter.v1.ExfilResource} message ExfilResource + * @param {google.cloud.securitycenter.v1.Database} message Database * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExfilResource.toObject = function toObject(message, options) { + Database.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.components = []; - if (options.defaults) + object.grantees = []; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.userName = ""; + object.query = ""; + object.version = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.components && message.components.length) { - object.components = []; - for (var j = 0; j < message.components.length; ++j) - object.components[j] = message.components[j]; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.userName != null && message.hasOwnProperty("userName")) + object.userName = message.userName; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.grantees && message.grantees.length) { + object.grantees = []; + for (var j = 0; j < message.grantees.length; ++j) + object.grantees[j] = message.grantees[j]; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this ExfilResource to JSON. + * Converts this Database to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @instance * @returns {Object.} JSON object */ - ExfilResource.prototype.toJSON = function toJSON() { + Database.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExfilResource + * Gets the default type url for Database * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ExfilResource + * @memberof google.cloud.securitycenter.v1.Database * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExfilResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExfilResource"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Database"; }; - return ExfilResource; + return Database; })(); - v1.ExternalSystem = (function() { + v1.EffectiveEventThreatDetectionCustomModule = (function() { /** - * Properties of an ExternalSystem. + * Properties of an EffectiveEventThreatDetectionCustomModule. * @memberof google.cloud.securitycenter.v1 - * @interface IExternalSystem - * @property {string|null} [name] ExternalSystem name - * @property {Array.|null} [assignees] ExternalSystem assignees - * @property {string|null} [externalUid] ExternalSystem externalUid - * @property {string|null} [status] ExternalSystem status - * @property {google.protobuf.ITimestamp|null} [externalSystemUpdateTime] ExternalSystem externalSystemUpdateTime - * @property {string|null} [caseUri] ExternalSystem caseUri - * @property {string|null} [casePriority] ExternalSystem casePriority - * @property {google.protobuf.ITimestamp|null} [caseSla] ExternalSystem caseSla - * @property {google.protobuf.ITimestamp|null} [caseCreateTime] ExternalSystem caseCreateTime - * @property {google.protobuf.ITimestamp|null} [caseCloseTime] ExternalSystem caseCloseTime - * @property {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null} [ticketInfo] ExternalSystem ticketInfo + * @interface IEffectiveEventThreatDetectionCustomModule + * @property {string|null} [name] EffectiveEventThreatDetectionCustomModule name + * @property {google.protobuf.IStruct|null} [config] EffectiveEventThreatDetectionCustomModule config + * @property {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null} [enablementState] EffectiveEventThreatDetectionCustomModule enablementState + * @property {string|null} [type] EffectiveEventThreatDetectionCustomModule type + * @property {string|null} [displayName] EffectiveEventThreatDetectionCustomModule displayName + * @property {string|null} [description] EffectiveEventThreatDetectionCustomModule description */ /** - * Constructs a new ExternalSystem. + * Constructs a new EffectiveEventThreatDetectionCustomModule. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an ExternalSystem. - * @implements IExternalSystem + * @classdesc Represents an EffectiveEventThreatDetectionCustomModule. + * @implements IEffectiveEventThreatDetectionCustomModule * @constructor - * @param {google.cloud.securitycenter.v1.IExternalSystem=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set */ - function ExternalSystem(properties) { - this.assignees = []; + function EffectiveEventThreatDetectionCustomModule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9379,171 +9348,120 @@ } /** - * ExternalSystem name. + * EffectiveEventThreatDetectionCustomModule name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @instance - */ - ExternalSystem.prototype.name = ""; - - /** - * ExternalSystem assignees. - * @member {Array.} assignees - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @instance - */ - ExternalSystem.prototype.assignees = $util.emptyArray; - - /** - * ExternalSystem externalUid. - * @member {string} externalUid - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @instance - */ - ExternalSystem.prototype.externalUid = ""; - - /** - * ExternalSystem status. - * @member {string} status - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @instance - */ - ExternalSystem.prototype.status = ""; - - /** - * ExternalSystem externalSystemUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} externalSystemUpdateTime - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @instance - */ - ExternalSystem.prototype.externalSystemUpdateTime = null; - - /** - * ExternalSystem caseUri. - * @member {string} caseUri - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.caseUri = ""; + EffectiveEventThreatDetectionCustomModule.prototype.name = ""; /** - * ExternalSystem casePriority. - * @member {string} casePriority - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * EffectiveEventThreatDetectionCustomModule config. + * @member {google.protobuf.IStruct|null|undefined} config + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.casePriority = ""; + EffectiveEventThreatDetectionCustomModule.prototype.config = null; /** - * ExternalSystem caseSla. - * @member {google.protobuf.ITimestamp|null|undefined} caseSla - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * EffectiveEventThreatDetectionCustomModule enablementState. + * @member {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.caseSla = null; + EffectiveEventThreatDetectionCustomModule.prototype.enablementState = 0; /** - * ExternalSystem caseCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} caseCreateTime - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * EffectiveEventThreatDetectionCustomModule type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.caseCreateTime = null; + EffectiveEventThreatDetectionCustomModule.prototype.type = ""; /** - * ExternalSystem caseCloseTime. - * @member {google.protobuf.ITimestamp|null|undefined} caseCloseTime - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * EffectiveEventThreatDetectionCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.caseCloseTime = null; + EffectiveEventThreatDetectionCustomModule.prototype.displayName = ""; /** - * ExternalSystem ticketInfo. - * @member {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null|undefined} ticketInfo - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * EffectiveEventThreatDetectionCustomModule description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance */ - ExternalSystem.prototype.ticketInfo = null; + EffectiveEventThreatDetectionCustomModule.prototype.description = ""; /** - * Creates a new ExternalSystem instance using the specified properties. + * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IExternalSystem=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem instance + * @param {google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule instance */ - ExternalSystem.create = function create(properties) { - return new ExternalSystem(properties); + EffectiveEventThreatDetectionCustomModule.create = function create(properties) { + return new EffectiveEventThreatDetectionCustomModule(properties); }; /** - * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalSystem.encode = function encode(message, writer) { + EffectiveEventThreatDetectionCustomModule.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.assignees != null && message.assignees.length) - for (var i = 0; i < message.assignees.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignees[i]); - if (message.externalUid != null && Object.hasOwnProperty.call(message, "externalUid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalUid); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.status); - if (message.externalSystemUpdateTime != null && Object.hasOwnProperty.call(message, "externalSystemUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.externalSystemUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.caseUri != null && Object.hasOwnProperty.call(message, "caseUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.caseUri); - if (message.casePriority != null && Object.hasOwnProperty.call(message, "casePriority")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.casePriority); - if (message.ticketInfo != null && Object.hasOwnProperty.call(message, "ticketInfo")) - $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.encode(message.ticketInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.caseSla != null && Object.hasOwnProperty.call(message, "caseSla")) - $root.google.protobuf.Timestamp.encode(message.caseSla, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.caseCreateTime != null && Object.hasOwnProperty.call(message, "caseCreateTime")) - $root.google.protobuf.Timestamp.encode(message.caseCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.caseCloseTime != null && Object.hasOwnProperty.call(message, "caseCloseTime")) - $root.google.protobuf.Timestamp.encode(message.caseCloseTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); return writer; }; /** - * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalSystem.encodeDelimited = function encodeDelimited(message, writer) { + EffectiveEventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExternalSystem message from the specified reader or buffer. + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalSystem.decode = function decode(reader, length) { + EffectiveEventThreatDetectionCustomModule.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.cloud.securitycenter.v1.ExternalSystem(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9552,45 +9470,23 @@ break; } case 2: { - if (!(message.assignees && message.assignees.length)) - message.assignees = []; - message.assignees.push(reader.string()); + message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 3: { - message.externalUid = reader.string(); + message.enablementState = reader.int32(); break; } case 4: { - message.status = reader.string(); + message.type = reader.string(); break; } case 5: { - message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 6: { - message.caseUri = reader.string(); - break; - } - case 7: { - message.casePriority = reader.string(); - break; - } - case 9: { - message.caseSla = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.caseCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.caseCloseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.decode(reader, reader.uint32()); + message.description = reader.string(); break; } default: @@ -9602,571 +9498,211 @@ }; /** - * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalSystem.decodeDelimited = function decodeDelimited(reader) { + EffectiveEventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExternalSystem message. + * Verifies an EffectiveEventThreatDetectionCustomModule message. * @function verify - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExternalSystem.verify = function verify(message) { + EffectiveEventThreatDetectionCustomModule.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.assignees != null && message.hasOwnProperty("assignees")) { - if (!Array.isArray(message.assignees)) - return "assignees: array expected"; - for (var i = 0; i < message.assignees.length; ++i) - if (!$util.isString(message.assignees[i])) - return "assignees: string[] expected"; - } - if (message.externalUid != null && message.hasOwnProperty("externalUid")) - if (!$util.isString(message.externalUid)) - return "externalUid: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.externalSystemUpdateTime); - if (error) - return "externalSystemUpdateTime." + error; - } - if (message.caseUri != null && message.hasOwnProperty("caseUri")) - if (!$util.isString(message.caseUri)) - return "caseUri: string expected"; - if (message.casePriority != null && message.hasOwnProperty("casePriority")) - if (!$util.isString(message.casePriority)) - return "casePriority: string expected"; - if (message.caseSla != null && message.hasOwnProperty("caseSla")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseSla); - if (error) - return "caseSla." + error; - } - if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseCreateTime); - if (error) - return "caseCreateTime." + error; - } - if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.caseCloseTime); + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.protobuf.Struct.verify(message.config); if (error) - return "caseCloseTime." + error; - } - if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) { - var error = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify(message.ticketInfo); - if (error) - return "ticketInfo." + error; + return "config." + error; } + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + * @returns {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule */ - ExternalSystem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ExternalSystem) + EffectiveEventThreatDetectionCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule) return object; - var message = new $root.google.cloud.securitycenter.v1.ExternalSystem(); + var message = new $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule(); if (object.name != null) message.name = String(object.name); - if (object.assignees) { - if (!Array.isArray(object.assignees)) - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.assignees: array expected"); - message.assignees = []; - for (var i = 0; i < object.assignees.length; ++i) - message.assignees[i] = String(object.assignees[i]); - } - if (object.externalUid != null) - message.externalUid = String(object.externalUid); - if (object.status != null) - message.status = String(object.status); - if (object.externalSystemUpdateTime != null) { - if (typeof object.externalSystemUpdateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.externalSystemUpdateTime: object expected"); - message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.externalSystemUpdateTime); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.config: object expected"); + message.config = $root.google.protobuf.Struct.fromObject(object.config); } - if (object.caseUri != null) - message.caseUri = String(object.caseUri); - if (object.casePriority != null) - message.casePriority = String(object.casePriority); - if (object.caseSla != null) { - if (typeof object.caseSla !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseSla: object expected"); - message.caseSla = $root.google.protobuf.Timestamp.fromObject(object.caseSla); - } - if (object.caseCreateTime != null) { - if (typeof object.caseCreateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseCreateTime: object expected"); - message.caseCreateTime = $root.google.protobuf.Timestamp.fromObject(object.caseCreateTime); - } - if (object.caseCloseTime != null) { - if (typeof object.caseCloseTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseCloseTime: object expected"); - message.caseCloseTime = $root.google.protobuf.Timestamp.fromObject(object.caseCloseTime); - } - if (object.ticketInfo != null) { - if (typeof object.ticketInfo !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.ticketInfo: object expected"); - message.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.fromObject(object.ticketInfo); + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; } + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.ExternalSystem} message ExternalSystem + * @param {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExternalSystem.toObject = function toObject(message, options) { + EffectiveEventThreatDetectionCustomModule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assignees = []; if (options.defaults) { object.name = ""; - object.externalUid = ""; - object.status = ""; - object.externalSystemUpdateTime = null; - object.caseUri = ""; - object.casePriority = ""; - object.ticketInfo = null; - object.caseSla = null; - object.caseCreateTime = null; - object.caseCloseTime = null; + object.config = null; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.type = ""; + object.displayName = ""; + object.description = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.assignees && message.assignees.length) { - object.assignees = []; - for (var j = 0; j < message.assignees.length; ++j) - object.assignees[j] = message.assignees[j]; - } - if (message.externalUid != null && message.hasOwnProperty("externalUid")) - object.externalUid = message.externalUid; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) - object.externalSystemUpdateTime = $root.google.protobuf.Timestamp.toObject(message.externalSystemUpdateTime, options); - if (message.caseUri != null && message.hasOwnProperty("caseUri")) - object.caseUri = message.caseUri; - if (message.casePriority != null && message.hasOwnProperty("casePriority")) - object.casePriority = message.casePriority; - if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) - object.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.toObject(message.ticketInfo, options); - if (message.caseSla != null && message.hasOwnProperty("caseSla")) - object.caseSla = $root.google.protobuf.Timestamp.toObject(message.caseSla, options); - if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) - object.caseCreateTime = $root.google.protobuf.Timestamp.toObject(message.caseCreateTime, options); - if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) - object.caseCloseTime = $root.google.protobuf.Timestamp.toObject(message.caseCloseTime, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.protobuf.Struct.toObject(message.config, options); + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this ExternalSystem to JSON. + * Converts this EffectiveEventThreatDetectionCustomModule to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @instance * @returns {Object.} JSON object */ - ExternalSystem.prototype.toJSON = function toJSON() { + EffectiveEventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExternalSystem + * Gets the default type url for EffectiveEventThreatDetectionCustomModule * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @memberof google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExternalSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EffectiveEventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExternalSystem"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule"; }; - ExternalSystem.TicketInfo = (function() { - - /** - * Properties of a TicketInfo. - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @interface ITicketInfo - * @property {string|null} [id] TicketInfo id - * @property {string|null} [assignee] TicketInfo assignee - * @property {string|null} [description] TicketInfo description - * @property {string|null} [uri] TicketInfo uri - * @property {string|null} [status] TicketInfo status - * @property {google.protobuf.ITimestamp|null} [updateTime] TicketInfo updateTime - */ - - /** - * Constructs a new TicketInfo. - * @memberof google.cloud.securitycenter.v1.ExternalSystem - * @classdesc Represents a TicketInfo. - * @implements ITicketInfo - * @constructor - * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo=} [properties] Properties to set - */ - function TicketInfo(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]]; - } - - /** - * TicketInfo id. - * @member {string} id - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.id = ""; - - /** - * TicketInfo assignee. - * @member {string} assignee - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.assignee = ""; - - /** - * TicketInfo description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.description = ""; - - /** - * TicketInfo uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.uri = ""; - - /** - * TicketInfo status. - * @member {string} status - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.status = ""; - - /** - * TicketInfo updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - */ - TicketInfo.prototype.updateTime = null; - - /** - * Creates a new TicketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo instance - */ - TicketInfo.create = function create(properties) { - return new TicketInfo(properties); - }; - - /** - * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TicketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.assignee != null && Object.hasOwnProperty.call(message, "assignee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignee); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.status); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TicketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TicketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TicketInfo.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.cloud.securitycenter.v1.ExternalSystem.TicketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.assignee = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.uri = reader.string(); - break; - } - case 5: { - message.status = reader.string(); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TicketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TicketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TicketInfo message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TicketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.assignee != null && message.hasOwnProperty("assignee")) - if (!$util.isString(message.assignee)) - return "assignee: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a TicketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo - */ - TicketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo) - return object; - var message = new $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.assignee != null) - message.assignee = String(object.assignee); - if (object.description != null) - message.description = String(object.description); - if (object.uri != null) - message.uri = String(object.uri); - if (object.status != null) - message.status = String(object.status); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} message TicketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TicketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.assignee = ""; - object.description = ""; - object.uri = ""; - object.status = ""; - object.updateTime = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.assignee != null && message.hasOwnProperty("assignee")) - object.assignee = message.assignee; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this TicketInfo to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @instance - * @returns {Object.} JSON object - */ - TicketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TicketInfo - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TicketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExternalSystem.TicketInfo"; - }; - - return TicketInfo; + /** + * EnablementState enum. + * @name google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + EffectiveEventThreatDetectionCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; })(); - return ExternalSystem; + return EffectiveEventThreatDetectionCustomModule; })(); - v1.File = (function() { + v1.EffectiveSecurityHealthAnalyticsCustomModule = (function() { /** - * Properties of a File. + * Properties of an EffectiveSecurityHealthAnalyticsCustomModule. * @memberof google.cloud.securitycenter.v1 - * @interface IFile - * @property {string|null} [path] File path - * @property {number|Long|null} [size] File size - * @property {string|null} [sha256] File sha256 - * @property {number|Long|null} [hashedSize] File hashedSize - * @property {boolean|null} [partiallyHashed] File partiallyHashed - * @property {string|null} [contents] File contents - * @property {google.cloud.securitycenter.v1.File.IDiskPath|null} [diskPath] File diskPath + * @interface IEffectiveSecurityHealthAnalyticsCustomModule + * @property {string|null} [name] EffectiveSecurityHealthAnalyticsCustomModule name + * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] EffectiveSecurityHealthAnalyticsCustomModule customConfig + * @property {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] EffectiveSecurityHealthAnalyticsCustomModule enablementState + * @property {string|null} [displayName] EffectiveSecurityHealthAnalyticsCustomModule displayName */ /** - * Constructs a new File. + * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a File. - * @implements IFile + * @classdesc Represents an EffectiveSecurityHealthAnalyticsCustomModule. + * @implements IEffectiveSecurityHealthAnalyticsCustomModule * @constructor - * @param {google.cloud.securitycenter.v1.IFile=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set */ - function File(properties) { + function EffectiveSecurityHealthAnalyticsCustomModule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10174,159 +9710,117 @@ } /** - * File path. - * @member {string} path - * @memberof google.cloud.securitycenter.v1.File + * EffectiveSecurityHealthAnalyticsCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @instance */ - File.prototype.path = ""; + EffectiveSecurityHealthAnalyticsCustomModule.prototype.name = ""; /** - * File size. - * @member {number|Long} size - * @memberof google.cloud.securitycenter.v1.File + * EffectiveSecurityHealthAnalyticsCustomModule customConfig. + * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @instance */ - File.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EffectiveSecurityHealthAnalyticsCustomModule.prototype.customConfig = null; /** - * File sha256. - * @member {string} sha256 - * @memberof google.cloud.securitycenter.v1.File + * EffectiveSecurityHealthAnalyticsCustomModule enablementState. + * @member {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @instance */ - File.prototype.sha256 = ""; + EffectiveSecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; /** - * File hashedSize. - * @member {number|Long} hashedSize - * @memberof google.cloud.securitycenter.v1.File + * EffectiveSecurityHealthAnalyticsCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @instance */ - File.prototype.hashedSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EffectiveSecurityHealthAnalyticsCustomModule.prototype.displayName = ""; /** - * File partiallyHashed. - * @member {boolean} partiallyHashed - * @memberof google.cloud.securitycenter.v1.File - * @instance + * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule instance */ - File.prototype.partiallyHashed = false; + EffectiveSecurityHealthAnalyticsCustomModule.create = function create(properties) { + return new EffectiveSecurityHealthAnalyticsCustomModule(properties); + }; /** - * File contents. - * @member {string} contents - * @memberof google.cloud.securitycenter.v1.File - * @instance - */ - File.prototype.contents = ""; - - /** - * File diskPath. - * @member {google.cloud.securitycenter.v1.File.IDiskPath|null|undefined} diskPath - * @memberof google.cloud.securitycenter.v1.File - * @instance - */ - File.prototype.diskPath = null; - - /** - * Creates a new File instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.File - * @static - * @param {google.cloud.securitycenter.v1.IFile=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.File} File instance - */ - File.create = function create(properties) { - return new File(properties); - }; - - /** - * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static - * @param {google.cloud.securitycenter.v1.IFile} message File message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encode = function encode(message, writer) { + EffectiveSecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.size != null && Object.hasOwnProperty.call(message, "size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.size); - if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sha256); - if (message.hashedSize != null && Object.hasOwnProperty.call(message, "hashedSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.hashedSize); - if (message.partiallyHashed != null && Object.hasOwnProperty.call(message, "partiallyHashed")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partiallyHashed); - if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.contents); - if (message.diskPath != null && Object.hasOwnProperty.call(message, "diskPath")) - $root.google.cloud.securitycenter.v1.File.DiskPath.encode(message.diskPath, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); return writer; }; /** - * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static - * @param {google.cloud.securitycenter.v1.IFile} message File message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - File.encodeDelimited = function encodeDelimited(message, writer) { + EffectiveSecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a File message from the specified reader or buffer. + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.File} File + * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - File.decode = function decode(reader, length) { + EffectiveSecurityHealthAnalyticsCustomModule.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.cloud.securitycenter.v1.File(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.path = reader.string(); + message.name = reader.string(); break; } case 2: { - message.size = reader.int64(); + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); break; } case 3: { - message.sha256 = reader.string(); + message.enablementState = reader.int32(); break; } case 4: { - message.hashedSize = reader.int64(); - break; - } - case 5: { - message.partiallyHashed = reader.bool(); - break; - } - case 6: { - message.contents = reader.string(); - break; - } - case 7: { - message.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } default: @@ -10338,1051 +9832,1414 @@ }; /** - * Decodes a File message from the specified reader or buffer, length delimited. + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.File} File + * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - File.decodeDelimited = function decodeDelimited(reader) { + EffectiveSecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a File message. + * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. * @function verify - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - File.verify = function verify(message) { + EffectiveSecurityHealthAnalyticsCustomModule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.size != null && message.hasOwnProperty("size")) - if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high))) - return "size: integer|Long expected"; - if (message.sha256 != null && message.hasOwnProperty("sha256")) - if (!$util.isString(message.sha256)) - return "sha256: string expected"; - if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) - if (!$util.isInteger(message.hashedSize) && !(message.hashedSize && $util.isInteger(message.hashedSize.low) && $util.isInteger(message.hashedSize.high))) - return "hashedSize: integer|Long expected"; - if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) - if (typeof message.partiallyHashed !== "boolean") - return "partiallyHashed: boolean expected"; - if (message.contents != null && message.hasOwnProperty("contents")) - if (!$util.isString(message.contents)) - return "contents: string expected"; - if (message.diskPath != null && message.hasOwnProperty("diskPath")) { - var error = $root.google.cloud.securitycenter.v1.File.DiskPath.verify(message.diskPath); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); if (error) - return "diskPath." + error; + return "customConfig." + error; } + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a File message from a plain object. Also converts values to their respective internal types. + * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.File} File + * @returns {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule */ - File.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.File) + EffectiveSecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule) return object; - var message = new $root.google.cloud.securitycenter.v1.File(); - if (object.path != null) - message.path = String(object.path); - if (object.size != null) - if ($util.Long) - (message.size = $util.Long.fromValue(object.size)).unsigned = false; - else if (typeof object.size === "string") - message.size = parseInt(object.size, 10); - else if (typeof object.size === "number") - message.size = object.size; - else if (typeof object.size === "object") - message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(); - if (object.sha256 != null) - message.sha256 = String(object.sha256); - if (object.hashedSize != null) - if ($util.Long) - (message.hashedSize = $util.Long.fromValue(object.hashedSize)).unsigned = false; - else if (typeof object.hashedSize === "string") - message.hashedSize = parseInt(object.hashedSize, 10); - else if (typeof object.hashedSize === "number") - message.hashedSize = object.hashedSize; - else if (typeof object.hashedSize === "object") - message.hashedSize = new $util.LongBits(object.hashedSize.low >>> 0, object.hashedSize.high >>> 0).toNumber(); - if (object.partiallyHashed != null) - message.partiallyHashed = Boolean(object.partiallyHashed); - if (object.contents != null) - message.contents = String(object.contents); - if (object.diskPath != null) { - if (typeof object.diskPath !== "object") - throw TypeError(".google.cloud.securitycenter.v1.File.diskPath: object expected"); - message.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.fromObject(object.diskPath); + var message = new $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); + } + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; } + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a File message. Also converts values to other types if specified. + * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static - * @param {google.cloud.securitycenter.v1.File} message File + * @param {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - File.toObject = function toObject(message, options) { + EffectiveSecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.path = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.size = options.longs === String ? "0" : 0; - object.sha256 = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hashedSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hashedSize = options.longs === String ? "0" : 0; - object.partiallyHashed = false; - object.contents = ""; - object.diskPath = null; + object.name = ""; + object.customConfig = null; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.displayName = ""; } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.size != null && message.hasOwnProperty("size")) - if (typeof message.size === "number") - object.size = options.longs === String ? String(message.size) : message.size; - else - object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber() : message.size; - if (message.sha256 != null && message.hasOwnProperty("sha256")) - object.sha256 = message.sha256; - if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) - if (typeof message.hashedSize === "number") - object.hashedSize = options.longs === String ? String(message.hashedSize) : message.hashedSize; - else - object.hashedSize = options.longs === String ? $util.Long.prototype.toString.call(message.hashedSize) : options.longs === Number ? new $util.LongBits(message.hashedSize.low >>> 0, message.hashedSize.high >>> 0).toNumber() : message.hashedSize; - if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) - object.partiallyHashed = message.partiallyHashed; - if (message.contents != null && message.hasOwnProperty("contents")) - object.contents = message.contents; - if (message.diskPath != null && message.hasOwnProperty("diskPath")) - object.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.toObject(message.diskPath, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this File to JSON. + * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @instance * @returns {Object.} JSON object */ - File.prototype.toJSON = function toJSON() { + EffectiveSecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for File + * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.File + * @memberof google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EffectiveSecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.File"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule"; }; - File.DiskPath = (function() { - - /** - * Properties of a DiskPath. - * @memberof google.cloud.securitycenter.v1.File - * @interface IDiskPath - * @property {string|null} [partitionUuid] DiskPath partitionUuid - * @property {string|null} [relativePath] DiskPath relativePath - */ + /** + * EnablementState enum. + * @name google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + EffectiveSecurityHealthAnalyticsCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); - /** - * Constructs a new DiskPath. - * @memberof google.cloud.securitycenter.v1.File - * @classdesc Represents a DiskPath. - * @implements IDiskPath - * @constructor - * @param {google.cloud.securitycenter.v1.File.IDiskPath=} [properties] Properties to set - */ - function DiskPath(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return EffectiveSecurityHealthAnalyticsCustomModule; + })(); - /** - * DiskPath partitionUuid. - * @member {string} partitionUuid - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @instance - */ - DiskPath.prototype.partitionUuid = ""; + v1.CustomConfig = (function() { - /** - * DiskPath relativePath. - * @member {string} relativePath - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @instance - */ - DiskPath.prototype.relativePath = ""; + /** + * Properties of a CustomConfig. + * @memberof google.cloud.securitycenter.v1 + * @interface ICustomConfig + * @property {google.type.IExpr|null} [predicate] CustomConfig predicate + * @property {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null} [customOutput] CustomConfig customOutput + * @property {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null} [resourceSelector] CustomConfig resourceSelector + * @property {google.cloud.securitycenter.v1.CustomConfig.Severity|null} [severity] CustomConfig severity + * @property {string|null} [description] CustomConfig description + * @property {string|null} [recommendation] CustomConfig recommendation + */ - /** - * Creates a new DiskPath instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v1.File.IDiskPath=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath instance - */ - DiskPath.create = function create(properties) { - return new DiskPath(properties); - }; + /** + * Constructs a new CustomConfig. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a CustomConfig. + * @implements ICustomConfig + * @constructor + * @param {google.cloud.securitycenter.v1.ICustomConfig=} [properties] Properties to set + */ + function CustomConfig(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 DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v1.File.IDiskPath} message DiskPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiskPath.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partitionUuid != null && Object.hasOwnProperty.call(message, "partitionUuid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partitionUuid); - if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePath); - return writer; - }; + /** + * CustomConfig predicate. + * @member {google.type.IExpr|null|undefined} predicate + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.predicate = null; - /** - * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {google.cloud.securitycenter.v1.File.IDiskPath} message DiskPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiskPath.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * CustomConfig customOutput. + * @member {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec|null|undefined} customOutput + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.customOutput = null; - /** - * Decodes a DiskPath message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiskPath.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.cloud.securitycenter.v1.File.DiskPath(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partitionUuid = reader.string(); - break; - } - case 2: { - message.relativePath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CustomConfig resourceSelector. + * @member {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector|null|undefined} resourceSelector + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.resourceSelector = null; - /** - * Decodes a DiskPath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiskPath.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CustomConfig severity. + * @member {google.cloud.securitycenter.v1.CustomConfig.Severity} severity + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.severity = 0; - /** - * Verifies a DiskPath message. - * @function verify - * @memberof google.cloud.securitycenter.v1.File.DiskPath - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiskPath.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) - if (!$util.isString(message.partitionUuid)) - return "partitionUuid: string expected"; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - if (!$util.isString(message.relativePath)) - return "relativePath: string expected"; - return null; - }; + /** + * CustomConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.description = ""; - /** - * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.File.DiskPath + /** + * CustomConfig recommendation. + * @member {string} recommendation + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.recommendation = ""; + + /** + * Creates a new CustomConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {google.cloud.securitycenter.v1.ICustomConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig instance + */ + CustomConfig.create = function create(properties) { + return new CustomConfig(properties); + }; + + /** + * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {google.cloud.securitycenter.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.predicate != null && Object.hasOwnProperty.call(message, "predicate")) + $root.google.type.Expr.encode(message.predicate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customOutput != null && Object.hasOwnProperty.call(message, "customOutput")) + $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.encode(message.customOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceSelector != null && Object.hasOwnProperty.call(message, "resourceSelector")) + $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.encode(message.resourceSelector, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.severity); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.recommendation != null && Object.hasOwnProperty.call(message, "recommendation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.recommendation); + return writer; + }; + + /** + * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {google.cloud.securitycenter.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomConfig.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.cloud.securitycenter.v1.CustomConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.predicate = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + case 2: { + message.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.decode(reader, reader.uint32()); + break; + } + case 4: { + message.severity = reader.int32(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.recommendation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predicate != null && message.hasOwnProperty("predicate")) { + var error = $root.google.type.Expr.verify(message.predicate); + if (error) + return "predicate." + error; + } + if (message.customOutput != null && message.hasOwnProperty("customOutput")) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify(message.customOutput); + if (error) + return "customOutput." + error; + } + if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify(message.resourceSelector); + if (error) + return "resourceSelector." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.recommendation != null && message.hasOwnProperty("recommendation")) + if (!$util.isString(message.recommendation)) + return "recommendation: string expected"; + return null; + }; + + /** + * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CustomConfig} CustomConfig + */ + CustomConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.CustomConfig(); + if (object.predicate != null) { + if (typeof object.predicate !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.predicate: object expected"); + message.predicate = $root.google.type.Expr.fromObject(object.predicate); + } + if (object.customOutput != null) { + if (typeof object.customOutput !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.customOutput: object expected"); + message.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.fromObject(object.customOutput); + } + if (object.resourceSelector != null) { + if (typeof object.resourceSelector !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.resourceSelector: object expected"); + message.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.fromObject(object.resourceSelector); + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.recommendation != null) + message.recommendation = String(object.recommendation); + return message; + }; + + /** + * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig} message CustomConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.predicate = null; + object.customOutput = null; + object.resourceSelector = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.description = ""; + object.recommendation = ""; + } + if (message.predicate != null && message.hasOwnProperty("predicate")) + object.predicate = $root.google.type.Expr.toObject(message.predicate, options); + if (message.customOutput != null && message.hasOwnProperty("customOutput")) + object.customOutput = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.toObject(message.customOutput, options); + if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) + object.resourceSelector = $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.toObject(message.resourceSelector, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.securitycenter.v1.CustomConfig.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v1.CustomConfig.Severity[message.severity] : message.severity; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.recommendation != null && message.hasOwnProperty("recommendation")) + object.recommendation = message.recommendation; + return object; + }; + + /** + * Converts this CustomConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @instance + * @returns {Object.} JSON object + */ + CustomConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig"; + }; + + CustomConfig.CustomOutputSpec = (function() { + + /** + * Properties of a CustomOutputSpec. + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @interface ICustomOutputSpec + * @property {Array.|null} [properties] CustomOutputSpec properties + */ + + /** + * Constructs a new CustomOutputSpec. + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @classdesc Represents a CustomOutputSpec. + * @implements ICustomOutputSpec + * @constructor + * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set + */ + function CustomOutputSpec(properties) { + this.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]]; + } + + /** + * CustomOutputSpec properties. + * @member {Array.} properties + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @instance + */ + CustomOutputSpec.prototype.properties = $util.emptyArray; + + /** + * Creates a new CustomOutputSpec instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec instance + */ + CustomOutputSpec.create = function create(properties) { + return new CustomOutputSpec(properties); + }; + + /** + * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomOutputSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.encode(message.properties[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomOutputSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomOutputSpec.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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomOutputSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomOutputSpec message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomOutputSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify(message.properties[i]); + if (error) + return "properties." + error; + } + } + return null; + }; + + /** + * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec */ - DiskPath.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.File.DiskPath) + CustomOutputSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec) return object; - var message = new $root.google.cloud.securitycenter.v1.File.DiskPath(); - if (object.partitionUuid != null) - message.partitionUuid = String(object.partitionUuid); - if (object.relativePath != null) - message.relativePath = String(object.relativePath); + var message = new $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec(); + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.properties: object expected"); + message.properties[i] = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.fromObject(object.properties[i]); + } + } return message; }; /** - * Creates a plain object from a DiskPath message. Also converts values to other types if specified. + * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec * @static - * @param {google.cloud.securitycenter.v1.File.DiskPath} message DiskPath + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec} message CustomOutputSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiskPath.toObject = function toObject(message, options) { + CustomOutputSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.partitionUuid = ""; - object.relativePath = ""; + if (options.arrays || options.defaults) + object.properties = []; + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.toObject(message.properties[j], options); } - if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) - object.partitionUuid = message.partitionUuid; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - object.relativePath = message.relativePath; return object; }; /** - * Converts this DiskPath to JSON. + * Converts this CustomOutputSpec to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec * @instance * @returns {Object.} JSON object */ - DiskPath.prototype.toJSON = function toJSON() { + CustomOutputSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiskPath + * Gets the default type url for CustomOutputSpec * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiskPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomOutputSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.File.DiskPath"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec"; }; - return DiskPath; - })(); - - return File; - })(); - - v1.Finding = (function() { + CustomOutputSpec.Property = (function() { - /** - * Properties of a Finding. - * @memberof google.cloud.securitycenter.v1 - * @interface IFinding - * @property {string|null} [name] Finding name - * @property {string|null} [parent] Finding parent - * @property {string|null} [resourceName] Finding resourceName - * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] Finding state - * @property {string|null} [category] Finding category - * @property {string|null} [externalUri] Finding externalUri - * @property {Object.|null} [sourceProperties] Finding sourceProperties - * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Finding securityMarks - * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime - * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime - * @property {google.cloud.securitycenter.v1.Finding.Severity|null} [severity] Finding severity - * @property {string|null} [canonicalName] Finding canonicalName - * @property {google.cloud.securitycenter.v1.Finding.Mute|null} [mute] Finding mute - * @property {google.cloud.securitycenter.v1.Finding.FindingClass|null} [findingClass] Finding findingClass - * @property {google.cloud.securitycenter.v1.IIndicator|null} [indicator] Finding indicator - * @property {google.cloud.securitycenter.v1.IVulnerability|null} [vulnerability] Finding vulnerability - * @property {google.protobuf.ITimestamp|null} [muteUpdateTime] Finding muteUpdateTime - * @property {Object.|null} [externalSystems] Finding externalSystems - * @property {google.cloud.securitycenter.v1.IMitreAttack|null} [mitreAttack] Finding mitreAttack - * @property {google.cloud.securitycenter.v1.IAccess|null} [access] Finding access - * @property {Array.|null} [connections] Finding connections - * @property {string|null} [muteInitiator] Finding muteInitiator - * @property {Array.|null} [processes] Finding processes - * @property {Object.|null} [contacts] Finding contacts - * @property {Array.|null} [compliances] Finding compliances - * @property {string|null} [parentDisplayName] Finding parentDisplayName - * @property {string|null} [description] Finding description - * @property {google.cloud.securitycenter.v1.IExfiltration|null} [exfiltration] Finding exfiltration - * @property {Array.|null} [iamBindings] Finding iamBindings - * @property {string|null} [nextSteps] Finding nextSteps - * @property {string|null} [moduleName] Finding moduleName - * @property {Array.|null} [containers] Finding containers - * @property {google.cloud.securitycenter.v1.IKubernetes|null} [kubernetes] Finding kubernetes - * @property {google.cloud.securitycenter.v1.IDatabase|null} [database] Finding database - * @property {Array.|null} [files] Finding files - * @property {google.cloud.securitycenter.v1.ICloudDlpInspection|null} [cloudDlpInspection] Finding cloudDlpInspection - * @property {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null} [cloudDlpDataProfile] Finding cloudDlpDataProfile - * @property {google.cloud.securitycenter.v1.IKernelRootkit|null} [kernelRootkit] Finding kernelRootkit - * @property {Array.|null} [orgPolicies] Finding orgPolicies - * @property {google.cloud.securitycenter.v1.IApplication|null} [application] Finding application - * @property {google.cloud.securitycenter.v1.IBackupDisasterRecovery|null} [backupDisasterRecovery] Finding backupDisasterRecovery - * @property {google.cloud.securitycenter.v1.ISecurityPosture|null} [securityPosture] Finding securityPosture - * @property {Array.|null} [logEntries] Finding logEntries - * @property {Array.|null} [loadBalancers] Finding loadBalancers - * @property {google.cloud.securitycenter.v1.ICloudArmor|null} [cloudArmor] Finding cloudArmor - * @property {google.cloud.securitycenter.v1.INotebook|null} [notebook] Finding notebook - * @property {google.cloud.securitycenter.v1.IToxicCombination|null} [toxicCombination] Finding toxicCombination - * @property {Array.|null} [groupMemberships] Finding groupMemberships - */ - - /** - * Constructs a new Finding. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Finding. - * @implements IFinding - * @constructor - * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set - */ - function Finding(properties) { - this.sourceProperties = {}; - this.externalSystems = {}; - this.connections = []; - this.processes = []; - this.contacts = {}; - this.compliances = []; - this.iamBindings = []; - this.containers = []; - this.files = []; - this.orgPolicies = []; - this.logEntries = []; - this.loadBalancers = []; - this.groupMemberships = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Finding name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.name = ""; + /** + * Properties of a Property. + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @interface IProperty + * @property {string|null} [name] Property name + * @property {google.type.IExpr|null} [valueExpression] Property valueExpression + */ - /** - * Finding parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.parent = ""; + /** + * Constructs a new Property. + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set + */ + function Property(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]]; + } - /** - * Finding resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.resourceName = ""; + /** + * Property name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @instance + */ + Property.prototype.name = ""; - /** - * Finding state. - * @member {google.cloud.securitycenter.v1.Finding.State} state - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.state = 0; + /** + * Property valueExpression. + * @member {google.type.IExpr|null|undefined} valueExpression + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @instance + */ + Property.prototype.valueExpression = null; - /** - * Finding category. - * @member {string} category - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.category = ""; + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; - /** - * Finding externalUri. - * @member {string} externalUri - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.externalUri = ""; + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.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.valueExpression != null && Object.hasOwnProperty.call(message, "valueExpression")) + $root.google.type.Expr.encode(message.valueExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Finding sourceProperties. - * @member {Object.} sourceProperties - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.sourceProperties = $util.emptyObject; + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Finding securityMarks. - * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.securityMarks = null; + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.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.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.valueExpression = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Finding eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.eventTime = null; + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Finding createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.createTime = null; + /** + * Verifies a Property message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.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.valueExpression != null && message.hasOwnProperty("valueExpression")) { + var error = $root.google.type.Expr.verify(message.valueExpression); + if (error) + return "valueExpression." + error; + } + return null; + }; - /** - * Finding severity. - * @member {google.cloud.securitycenter.v1.Finding.Severity} severity - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.severity = 0; + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property) + return object; + var message = new $root.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property(); + if (object.name != null) + message.name = String(object.name); + if (object.valueExpression != null) { + if (typeof object.valueExpression !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property.valueExpression: object expected"); + message.valueExpression = $root.google.type.Expr.fromObject(object.valueExpression); + } + return message; + }; - /** - * Finding canonicalName. - * @member {string} canonicalName - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.canonicalName = ""; + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.valueExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) + object.valueExpression = $root.google.type.Expr.toObject(message.valueExpression, options); + return object; + }; - /** - * Finding mute. - * @member {google.cloud.securitycenter.v1.Finding.Mute} mute - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.mute = 0; + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Finding findingClass. - * @member {google.cloud.securitycenter.v1.Finding.FindingClass} findingClass - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.findingClass = 0; + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec.Property"; + }; - /** - * Finding indicator. - * @member {google.cloud.securitycenter.v1.IIndicator|null|undefined} indicator - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.indicator = null; + return Property; + })(); - /** - * Finding vulnerability. - * @member {google.cloud.securitycenter.v1.IVulnerability|null|undefined} vulnerability - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.vulnerability = null; + return CustomOutputSpec; + })(); - /** - * Finding muteUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} muteUpdateTime - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.muteUpdateTime = null; + CustomConfig.ResourceSelector = (function() { - /** - * Finding externalSystems. - * @member {Object.} externalSystems - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.externalSystems = $util.emptyObject; + /** + * Properties of a ResourceSelector. + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @interface IResourceSelector + * @property {Array.|null} [resourceTypes] ResourceSelector resourceTypes + */ - /** - * Finding mitreAttack. - * @member {google.cloud.securitycenter.v1.IMitreAttack|null|undefined} mitreAttack - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.mitreAttack = null; + /** + * Constructs a new ResourceSelector. + * @memberof google.cloud.securitycenter.v1.CustomConfig + * @classdesc Represents a ResourceSelector. + * @implements IResourceSelector + * @constructor + * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector=} [properties] Properties to set + */ + function ResourceSelector(properties) { + this.resourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Finding access. - * @member {google.cloud.securitycenter.v1.IAccess|null|undefined} access - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.access = null; + /** + * ResourceSelector resourceTypes. + * @member {Array.} resourceTypes + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @instance + */ + ResourceSelector.prototype.resourceTypes = $util.emptyArray; - /** - * Finding connections. - * @member {Array.} connections - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.connections = $util.emptyArray; + /** + * Creates a new ResourceSelector instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector instance + */ + ResourceSelector.create = function create(properties) { + return new ResourceSelector(properties); + }; - /** - * Finding muteInitiator. - * @member {string} muteInitiator - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.muteInitiator = ""; + /** + * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSelector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceTypes != null && message.resourceTypes.length) + for (var i = 0; i < message.resourceTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypes[i]); + return writer; + }; - /** - * Finding processes. - * @member {Array.} processes - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.processes = $util.emptyArray; - - /** - * Finding contacts. - * @member {Object.} contacts - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.contacts = $util.emptyObject; - - /** - * Finding compliances. - * @member {Array.} compliances - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.compliances = $util.emptyArray; - - /** - * Finding parentDisplayName. - * @member {string} parentDisplayName - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.parentDisplayName = ""; + /** + * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSelector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Finding description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.description = ""; + /** + * Decodes a ResourceSelector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSelector.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.cloud.securitycenter.v1.CustomConfig.ResourceSelector(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceTypes && message.resourceTypes.length)) + message.resourceTypes = []; + message.resourceTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Finding exfiltration. - * @member {google.cloud.securitycenter.v1.IExfiltration|null|undefined} exfiltration - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.exfiltration = null; + /** + * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSelector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Finding iamBindings. - * @member {Array.} iamBindings - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.iamBindings = $util.emptyArray; + /** + * Verifies a ResourceSelector message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSelector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceTypes != null && message.hasOwnProperty("resourceTypes")) { + if (!Array.isArray(message.resourceTypes)) + return "resourceTypes: array expected"; + for (var i = 0; i < message.resourceTypes.length; ++i) + if (!$util.isString(message.resourceTypes[i])) + return "resourceTypes: string[] expected"; + } + return null; + }; - /** - * Finding nextSteps. - * @member {string} nextSteps - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.nextSteps = ""; + /** + * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} ResourceSelector + */ + ResourceSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector) + return object; + var message = new $root.google.cloud.securitycenter.v1.CustomConfig.ResourceSelector(); + if (object.resourceTypes) { + if (!Array.isArray(object.resourceTypes)) + throw TypeError(".google.cloud.securitycenter.v1.CustomConfig.ResourceSelector.resourceTypes: array expected"); + message.resourceTypes = []; + for (var i = 0; i < object.resourceTypes.length; ++i) + message.resourceTypes[i] = String(object.resourceTypes[i]); + } + return message; + }; - /** - * Finding moduleName. - * @member {string} moduleName - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.moduleName = ""; + /** + * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycenter.v1.CustomConfig.ResourceSelector} message ResourceSelector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSelector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceTypes = []; + if (message.resourceTypes && message.resourceTypes.length) { + object.resourceTypes = []; + for (var j = 0; j < message.resourceTypes.length; ++j) + object.resourceTypes[j] = message.resourceTypes[j]; + } + return object; + }; - /** - * Finding containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.containers = $util.emptyArray; + /** + * Converts this ResourceSelector to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @instance + * @returns {Object.} JSON object + */ + ResourceSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Finding kubernetes. - * @member {google.cloud.securitycenter.v1.IKubernetes|null|undefined} kubernetes - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.kubernetes = null; + /** + * Gets the default type url for ResourceSelector + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CustomConfig.ResourceSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomConfig.ResourceSelector"; + }; - /** - * Finding database. - * @member {google.cloud.securitycenter.v1.IDatabase|null|undefined} database - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.database = null; + return ResourceSelector; + })(); /** - * Finding files. - * @member {Array.} files - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Severity enum. + * @name google.cloud.securitycenter.v1.CustomConfig.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value */ - Finding.prototype.files = $util.emptyArray; + CustomConfig.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); - /** - * Finding cloudDlpInspection. - * @member {google.cloud.securitycenter.v1.ICloudDlpInspection|null|undefined} cloudDlpInspection - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.cloudDlpInspection = null; + return CustomConfig; + })(); - /** - * Finding cloudDlpDataProfile. - * @member {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null|undefined} cloudDlpDataProfile - * @memberof google.cloud.securitycenter.v1.Finding - * @instance - */ - Finding.prototype.cloudDlpDataProfile = null; + v1.EventThreatDetectionCustomModule = (function() { /** - * Finding kernelRootkit. - * @member {google.cloud.securitycenter.v1.IKernelRootkit|null|undefined} kernelRootkit - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Properties of an EventThreatDetectionCustomModule. + * @memberof google.cloud.securitycenter.v1 + * @interface IEventThreatDetectionCustomModule + * @property {string|null} [name] EventThreatDetectionCustomModule name + * @property {google.protobuf.IStruct|null} [config] EventThreatDetectionCustomModule config + * @property {string|null} [ancestorModule] EventThreatDetectionCustomModule ancestorModule + * @property {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState|null} [enablementState] EventThreatDetectionCustomModule enablementState + * @property {string|null} [type] EventThreatDetectionCustomModule type + * @property {string|null} [displayName] EventThreatDetectionCustomModule displayName + * @property {string|null} [description] EventThreatDetectionCustomModule description + * @property {google.protobuf.ITimestamp|null} [updateTime] EventThreatDetectionCustomModule updateTime + * @property {string|null} [lastEditor] EventThreatDetectionCustomModule lastEditor */ - Finding.prototype.kernelRootkit = null; /** - * Finding orgPolicies. - * @member {Array.} orgPolicies - * @memberof google.cloud.securitycenter.v1.Finding - * @instance + * Constructs a new EventThreatDetectionCustomModule. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an EventThreatDetectionCustomModule. + * @implements IEventThreatDetectionCustomModule + * @constructor + * @param {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set */ - Finding.prototype.orgPolicies = $util.emptyArray; + function EventThreatDetectionCustomModule(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]]; + } /** - * Finding application. - * @member {google.cloud.securitycenter.v1.IApplication|null|undefined} application - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.application = null; + EventThreatDetectionCustomModule.prototype.name = ""; /** - * Finding backupDisasterRecovery. - * @member {google.cloud.securitycenter.v1.IBackupDisasterRecovery|null|undefined} backupDisasterRecovery - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule config. + * @member {google.protobuf.IStruct|null|undefined} config + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.backupDisasterRecovery = null; + EventThreatDetectionCustomModule.prototype.config = null; /** - * Finding securityPosture. - * @member {google.cloud.securitycenter.v1.ISecurityPosture|null|undefined} securityPosture - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule ancestorModule. + * @member {string} ancestorModule + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.securityPosture = null; + EventThreatDetectionCustomModule.prototype.ancestorModule = ""; /** - * Finding logEntries. - * @member {Array.} logEntries - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule enablementState. + * @member {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.logEntries = $util.emptyArray; + EventThreatDetectionCustomModule.prototype.enablementState = 0; /** - * Finding loadBalancers. - * @member {Array.} loadBalancers - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.loadBalancers = $util.emptyArray; + EventThreatDetectionCustomModule.prototype.type = ""; /** - * Finding cloudArmor. - * @member {google.cloud.securitycenter.v1.ICloudArmor|null|undefined} cloudArmor - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.cloudArmor = null; + EventThreatDetectionCustomModule.prototype.displayName = ""; /** - * Finding notebook. - * @member {google.cloud.securitycenter.v1.INotebook|null|undefined} notebook - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.notebook = null; + EventThreatDetectionCustomModule.prototype.description = ""; /** - * Finding toxicCombination. - * @member {google.cloud.securitycenter.v1.IToxicCombination|null|undefined} toxicCombination - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.toxicCombination = null; + EventThreatDetectionCustomModule.prototype.updateTime = null; /** - * Finding groupMemberships. - * @member {Array.} groupMemberships - * @memberof google.cloud.securitycenter.v1.Finding + * EventThreatDetectionCustomModule lastEditor. + * @member {string} lastEditor + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance */ - Finding.prototype.groupMemberships = $util.emptyArray; + EventThreatDetectionCustomModule.prototype.lastEditor = ""; /** - * Creates a new Finding instance using the specified properties. + * Creates a new EventThreatDetectionCustomModule instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Finding} Finding instance + * @param {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule instance */ - Finding.create = function create(properties) { - return new Finding(properties); + EventThreatDetectionCustomModule.create = function create(properties) { + return new EventThreatDetectionCustomModule(properties); }; /** - * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encode = function encode(message, writer) { + EventThreatDetectionCustomModule.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.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); - if (message.externalUri != null && Object.hasOwnProperty.call(message, "externalUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); - if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) - for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) - $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.severity); - if (message.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.canonicalName); - if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mute); - if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.findingClass); - if (message.indicator != null && Object.hasOwnProperty.call(message, "indicator")) - $root.google.cloud.securitycenter.v1.Indicator.encode(message.indicator, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) - $root.google.cloud.securitycenter.v1.Vulnerability.encode(message.vulnerability, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.muteUpdateTime != null && Object.hasOwnProperty.call(message, "muteUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.muteUpdateTime, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.externalSystems != null && Object.hasOwnProperty.call(message, "externalSystems")) - for (var keys = Object.keys(message.externalSystems), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.securitycenter.v1.ExternalSystem.encode(message.externalSystems[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mitreAttack != null && Object.hasOwnProperty.call(message, "mitreAttack")) - $root.google.cloud.securitycenter.v1.MitreAttack.encode(message.mitreAttack, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.access != null && Object.hasOwnProperty.call(message, "access")) - $root.google.cloud.securitycenter.v1.Access.encode(message.access, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.muteInitiator != null && Object.hasOwnProperty.call(message, "muteInitiator")) - writer.uint32(/* id 28, wireType 2 =*/226).string(message.muteInitiator); - if (message.processes != null && message.processes.length) - for (var i = 0; i < message.processes.length; ++i) - $root.google.cloud.securitycenter.v1.Process.encode(message.processes[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.connections != null && message.connections.length) - for (var i = 0; i < message.connections.length; ++i) - $root.google.cloud.securitycenter.v1.Connection.encode(message.connections[i], writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.contacts != null && Object.hasOwnProperty.call(message, "contacts")) - for (var keys = Object.keys(message.contacts), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.securitycenter.v1.ContactDetails.encode(message.contacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.compliances != null && message.compliances.length) - for (var i = 0; i < message.compliances.length; ++i) - $root.google.cloud.securitycenter.v1.Compliance.encode(message.compliances[i], writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.parentDisplayName); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorModule); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.enablementState); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.description); - if (message.exfiltration != null && Object.hasOwnProperty.call(message, "exfiltration")) - $root.google.cloud.securitycenter.v1.Exfiltration.encode(message.exfiltration, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); - if (message.iamBindings != null && message.iamBindings.length) - for (var i = 0; i < message.iamBindings.length; ++i) - $root.google.cloud.securitycenter.v1.IamBinding.encode(message.iamBindings[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); - if (message.nextSteps != null && Object.hasOwnProperty.call(message, "nextSteps")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.nextSteps); - if (message.moduleName != null && Object.hasOwnProperty.call(message, "moduleName")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.moduleName); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.kubernetes != null && Object.hasOwnProperty.call(message, "kubernetes")) - $root.google.cloud.securitycenter.v1.Kubernetes.encode(message.kubernetes, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - $root.google.cloud.securitycenter.v1.Database.encode(message.database, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); - if (message.files != null && message.files.length) - for (var i = 0; i < message.files.length; ++i) - $root.google.cloud.securitycenter.v1.File.encode(message.files[i], writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.cloudDlpInspection != null && Object.hasOwnProperty.call(message, "cloudDlpInspection")) - $root.google.cloud.securitycenter.v1.CloudDlpInspection.encode(message.cloudDlpInspection, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); - if (message.cloudDlpDataProfile != null && Object.hasOwnProperty.call(message, "cloudDlpDataProfile")) - $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.encode(message.cloudDlpDataProfile, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.kernelRootkit != null && Object.hasOwnProperty.call(message, "kernelRootkit")) - $root.google.cloud.securitycenter.v1.KernelRootkit.encode(message.kernelRootkit, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.orgPolicies != null && message.orgPolicies.length) - for (var i = 0; i < message.orgPolicies.length; ++i) - $root.google.cloud.securitycenter.v1.OrgPolicy.encode(message.orgPolicies[i], writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); - if (message.application != null && Object.hasOwnProperty.call(message, "application")) - $root.google.cloud.securitycenter.v1.Application.encode(message.application, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.backupDisasterRecovery != null && Object.hasOwnProperty.call(message, "backupDisasterRecovery")) - $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.encode(message.backupDisasterRecovery, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); - if (message.securityPosture != null && Object.hasOwnProperty.call(message, "securityPosture")) - $root.google.cloud.securitycenter.v1.SecurityPosture.encode(message.securityPosture, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); - if (message.logEntries != null && message.logEntries.length) - for (var i = 0; i < message.logEntries.length; ++i) - $root.google.cloud.securitycenter.v1.LogEntry.encode(message.logEntries[i], writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); - if (message.loadBalancers != null && message.loadBalancers.length) - for (var i = 0; i < message.loadBalancers.length; ++i) - $root.google.cloud.securitycenter.v1.LoadBalancer.encode(message.loadBalancers[i], writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); - if (message.cloudArmor != null && Object.hasOwnProperty.call(message, "cloudArmor")) - $root.google.cloud.securitycenter.v1.CloudArmor.encode(message.cloudArmor, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - $root.google.cloud.securitycenter.v1.Notebook.encode(message.notebook, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); - if (message.toxicCombination != null && Object.hasOwnProperty.call(message, "toxicCombination")) - $root.google.cloud.securitycenter.v1.ToxicCombination.encode(message.toxicCombination, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); - if (message.groupMemberships != null && message.groupMemberships.length) - for (var i = 0; i < message.groupMemberships.length; ++i) - $root.google.cloud.securitycenter.v1.GroupMembership.encode(message.groupMemberships[i], writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + 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.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.lastEditor); return writer; }; /** - * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Finding.encodeDelimited = function encodeDelimited(message, writer) { + EventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Finding message from the specified reader or buffer. + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decode = function decode(reader, length) { + EventThreatDetectionCustomModule.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.cloud.securitycenter.v1.Finding(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11391,268 +11248,35 @@ break; } case 2: { - message.parent = reader.string(); + message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 3: { - message.resourceName = reader.string(); + message.ancestorModule = reader.string(); break; } case 4: { - message.state = reader.int32(); + message.enablementState = reader.int32(); break; } case 5: { - message.category = reader.string(); + message.type = reader.string(); break; } case 6: { - message.externalUri = reader.string(); + message.displayName = reader.string(); break; } case 7: { - if (message.sourceProperties === $util.emptyObject) - message.sourceProperties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.sourceProperties[key] = value; + message.description = reader.string(); break; } case 8: { - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 9: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.severity = reader.int32(); - break; - } - case 14: { - message.canonicalName = reader.string(); - break; - } - case 15: { - message.mute = reader.int32(); - break; - } - case 17: { - message.findingClass = reader.int32(); - break; - } - case 18: { - message.indicator = $root.google.cloud.securitycenter.v1.Indicator.decode(reader, reader.uint32()); - break; - } - case 20: { - message.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.decode(reader, reader.uint32()); - break; - } - case 21: { - message.muteUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 22: { - if (message.externalSystems === $util.emptyObject) - message.externalSystems = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.securitycenter.v1.ExternalSystem.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.externalSystems[key] = value; - break; - } - case 25: { - message.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.decode(reader, reader.uint32()); - break; - } - case 26: { - message.access = $root.google.cloud.securitycenter.v1.Access.decode(reader, reader.uint32()); - break; - } - case 31: { - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.google.cloud.securitycenter.v1.Connection.decode(reader, reader.uint32())); - break; - } - case 28: { - message.muteInitiator = reader.string(); - break; - } - case 30: { - if (!(message.processes && message.processes.length)) - message.processes = []; - message.processes.push($root.google.cloud.securitycenter.v1.Process.decode(reader, reader.uint32())); - break; - } - case 33: { - if (message.contacts === $util.emptyObject) - message.contacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.securitycenter.v1.ContactDetails.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.contacts[key] = value; - break; - } - case 34: { - if (!(message.compliances && message.compliances.length)) - message.compliances = []; - message.compliances.push($root.google.cloud.securitycenter.v1.Compliance.decode(reader, reader.uint32())); - break; - } - case 36: { - message.parentDisplayName = reader.string(); - break; - } - case 37: { - message.description = reader.string(); - break; - } - case 38: { - message.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.decode(reader, reader.uint32()); - break; - } - case 39: { - if (!(message.iamBindings && message.iamBindings.length)) - message.iamBindings = []; - message.iamBindings.push($root.google.cloud.securitycenter.v1.IamBinding.decode(reader, reader.uint32())); - break; - } - case 40: { - message.nextSteps = reader.string(); - break; - } - case 41: { - message.moduleName = reader.string(); - break; - } - case 42: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); - break; - } - case 43: { - message.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.decode(reader, reader.uint32()); - break; - } - case 44: { - message.database = $root.google.cloud.securitycenter.v1.Database.decode(reader, reader.uint32()); - break; - } - case 46: { - if (!(message.files && message.files.length)) - message.files = []; - message.files.push($root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32())); - break; - } - case 48: { - message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.decode(reader, reader.uint32()); - break; - } - case 49: { - message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.decode(reader, reader.uint32()); - break; - } - case 50: { - message.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.decode(reader, reader.uint32()); - break; - } - case 51: { - if (!(message.orgPolicies && message.orgPolicies.length)) - message.orgPolicies = []; - message.orgPolicies.push($root.google.cloud.securitycenter.v1.OrgPolicy.decode(reader, reader.uint32())); - break; - } - case 53: { - message.application = $root.google.cloud.securitycenter.v1.Application.decode(reader, reader.uint32()); - break; - } - case 55: { - message.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.decode(reader, reader.uint32()); - break; - } - case 56: { - message.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.decode(reader, reader.uint32()); - break; - } - case 57: { - if (!(message.logEntries && message.logEntries.length)) - message.logEntries = []; - message.logEntries.push($root.google.cloud.securitycenter.v1.LogEntry.decode(reader, reader.uint32())); - break; - } - case 58: { - if (!(message.loadBalancers && message.loadBalancers.length)) - message.loadBalancers = []; - message.loadBalancers.push($root.google.cloud.securitycenter.v1.LoadBalancer.decode(reader, reader.uint32())); - break; - } - case 59: { - message.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.decode(reader, reader.uint32()); - break; - } - case 63: { - message.notebook = $root.google.cloud.securitycenter.v1.Notebook.decode(reader, reader.uint32()); - break; - } - case 64: { - message.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.decode(reader, reader.uint32()); - break; - } - case 65: { - if (!(message.groupMemberships && message.groupMemberships.length)) - message.groupMemberships = []; - message.groupMemberships.push($root.google.cloud.securitycenter.v1.GroupMembership.decode(reader, reader.uint32())); + message.lastEditor = reader.string(); break; } default: @@ -11664,1045 +11288,245 @@ }; /** - * Decodes a Finding message from the specified reader or buffer, length delimited. + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Finding.decodeDelimited = function decodeDelimited(reader) { + EventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Finding message. + * Verifies an EventThreatDetectionCustomModule message. * @function verify - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Finding.verify = function verify(message) { + EventThreatDetectionCustomModule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - if (!$util.isString(message.externalUri)) - return "externalUri: string expected"; - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { - if (!$util.isObject(message.sourceProperties)) - return "sourceProperties: object expected"; - var key = Object.keys(message.sourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); - if (error) - return "sourceProperties." + error; - } - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.protobuf.Struct.verify(message.config); if (error) - return "createTime." + error; + return "config." + error; } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) - if (!$util.isString(message.canonicalName)) - return "canonicalName: string expected"; - if (message.mute != null && message.hasOwnProperty("mute")) - switch (message.mute) { - default: - return "mute: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - switch (message.findingClass) { + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + if (!$util.isString(message.ancestorModule)) + return "ancestorModule: string expected"; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { default: - return "findingClass: enum value expected"; + return "enablementState: enum value expected"; case 0: case 1: case 2: case 3: - case 4: - case 5: - case 6: - case 7: break; } - if (message.indicator != null && message.hasOwnProperty("indicator")) { - var error = $root.google.cloud.securitycenter.v1.Indicator.verify(message.indicator); - if (error) - return "indicator." + error; - } - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { - var error = $root.google.cloud.securitycenter.v1.Vulnerability.verify(message.vulnerability); - if (error) - return "vulnerability." + error; - } - if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.muteUpdateTime); - if (error) - return "muteUpdateTime." + error; - } - if (message.externalSystems != null && message.hasOwnProperty("externalSystems")) { - if (!$util.isObject(message.externalSystems)) - return "externalSystems: object expected"; - var key = Object.keys(message.externalSystems); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ExternalSystem.verify(message.externalSystems[key[i]]); - if (error) - return "externalSystems." + error; - } - } - if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) { - var error = $root.google.cloud.securitycenter.v1.MitreAttack.verify(message.mitreAttack); - if (error) - return "mitreAttack." + error; - } - if (message.access != null && message.hasOwnProperty("access")) { - var error = $root.google.cloud.securitycenter.v1.Access.verify(message.access); - if (error) - return "access." + error; - } - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (var i = 0; i < message.connections.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Connection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) - if (!$util.isString(message.muteInitiator)) - return "muteInitiator: string expected"; - if (message.processes != null && message.hasOwnProperty("processes")) { - if (!Array.isArray(message.processes)) - return "processes: array expected"; - for (var i = 0; i < message.processes.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Process.verify(message.processes[i]); - if (error) - return "processes." + error; - } - } - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!$util.isObject(message.contacts)) - return "contacts: object expected"; - var key = Object.keys(message.contacts); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ContactDetails.verify(message.contacts[key[i]]); - if (error) - return "contacts." + error; - } - } - if (message.compliances != null && message.hasOwnProperty("compliances")) { - if (!Array.isArray(message.compliances)) - return "compliances: array expected"; - for (var i = 0; i < message.compliances.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Compliance.verify(message.compliances[i]); - if (error) - return "compliances." + error; - } - } - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - if (!$util.isString(message.parentDisplayName)) - return "parentDisplayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) { - var error = $root.google.cloud.securitycenter.v1.Exfiltration.verify(message.exfiltration); - if (error) - return "exfiltration." + error; - } - if (message.iamBindings != null && message.hasOwnProperty("iamBindings")) { - if (!Array.isArray(message.iamBindings)) - return "iamBindings: array expected"; - for (var i = 0; i < message.iamBindings.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.IamBinding.verify(message.iamBindings[i]); - if (error) - return "iamBindings." + error; - } - } - if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) - if (!$util.isString(message.nextSteps)) - return "nextSteps: string expected"; - if (message.moduleName != null && message.hasOwnProperty("moduleName")) - if (!$util.isString(message.moduleName)) - return "moduleName: string expected"; - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } - } - if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.verify(message.kubernetes); - if (error) - return "kubernetes." + error; - } - if (message.database != null && message.hasOwnProperty("database")) { - var error = $root.google.cloud.securitycenter.v1.Database.verify(message.database); - if (error) - return "database." + error; - } - if (message.files != null && message.hasOwnProperty("files")) { - if (!Array.isArray(message.files)) - return "files: array expected"; - for (var i = 0; i < message.files.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.File.verify(message.files[i]); - if (error) - return "files." + error; - } - } - if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) { - var error = $root.google.cloud.securitycenter.v1.CloudDlpInspection.verify(message.cloudDlpInspection); - if (error) - return "cloudDlpInspection." + error; - } - if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) { - var error = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.verify(message.cloudDlpDataProfile); - if (error) - return "cloudDlpDataProfile." + error; - } - if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) { - var error = $root.google.cloud.securitycenter.v1.KernelRootkit.verify(message.kernelRootkit); - if (error) - return "kernelRootkit." + error; - } - if (message.orgPolicies != null && message.hasOwnProperty("orgPolicies")) { - if (!Array.isArray(message.orgPolicies)) - return "orgPolicies: array expected"; - for (var i = 0; i < message.orgPolicies.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.OrgPolicy.verify(message.orgPolicies[i]); - if (error) - return "orgPolicies." + error; - } - } - if (message.application != null && message.hasOwnProperty("application")) { - var error = $root.google.cloud.securitycenter.v1.Application.verify(message.application); - if (error) - return "application." + error; - } - if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) { - var error = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.verify(message.backupDisasterRecovery); - if (error) - return "backupDisasterRecovery." + error; - } - if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) { - var error = $root.google.cloud.securitycenter.v1.SecurityPosture.verify(message.securityPosture); - if (error) - return "securityPosture." + error; - } - if (message.logEntries != null && message.hasOwnProperty("logEntries")) { - if (!Array.isArray(message.logEntries)) - return "logEntries: array expected"; - for (var i = 0; i < message.logEntries.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.LogEntry.verify(message.logEntries[i]); - if (error) - return "logEntries." + error; - } - } - if (message.loadBalancers != null && message.hasOwnProperty("loadBalancers")) { - if (!Array.isArray(message.loadBalancers)) - return "loadBalancers: array expected"; - for (var i = 0; i < message.loadBalancers.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.LoadBalancer.verify(message.loadBalancers[i]); - if (error) - return "loadBalancers." + error; - } - } - if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) { - var error = $root.google.cloud.securitycenter.v1.CloudArmor.verify(message.cloudArmor); - if (error) - return "cloudArmor." + error; - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - var error = $root.google.cloud.securitycenter.v1.Notebook.verify(message.notebook); - if (error) - return "notebook." + error; - } - if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) { - var error = $root.google.cloud.securitycenter.v1.ToxicCombination.verify(message.toxicCombination); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "toxicCombination." + error; - } - if (message.groupMemberships != null && message.hasOwnProperty("groupMemberships")) { - if (!Array.isArray(message.groupMemberships)) - return "groupMemberships: array expected"; - for (var i = 0; i < message.groupMemberships.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.GroupMembership.verify(message.groupMemberships[i]); - if (error) - return "groupMemberships." + error; - } + return "updateTime." + error; } + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + if (!$util.isString(message.lastEditor)) + return "lastEditor: string expected"; return null; }; /** - * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @returns {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule */ - Finding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Finding) + EventThreatDetectionCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule) return object; - var message = new $root.google.cloud.securitycenter.v1.Finding(); + var message = new $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule(); if (object.name != null) message.name = String(object.name); - if (object.parent != null) - message.parent = String(object.parent); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.category != null) - message.category = String(object.category); - if (object.externalUri != null) - message.externalUri = String(object.externalUri); - if (object.sourceProperties) { - if (typeof object.sourceProperties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); - message.sourceProperties = {}; - for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.sourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); - message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); - } - } - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - if (object.canonicalName != null) - message.canonicalName = String(object.canonicalName); - switch (object.mute) { - default: - if (typeof object.mute === "number") { - message.mute = object.mute; - break; - } - break; - case "MUTE_UNSPECIFIED": - case 0: - message.mute = 0; - break; - case "MUTED": - case 1: - message.mute = 1; - break; - case "UNMUTED": - case 2: - message.mute = 2; - break; - case "UNDEFINED": - case 4: - message.mute = 4; - break; + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.config: object expected"); + message.config = $root.google.protobuf.Struct.fromObject(object.config); } - switch (object.findingClass) { + if (object.ancestorModule != null) + message.ancestorModule = String(object.ancestorModule); + switch (object.enablementState) { default: - if (typeof object.findingClass === "number") { - message.findingClass = object.findingClass; + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; break; } break; - case "FINDING_CLASS_UNSPECIFIED": + case "ENABLEMENT_STATE_UNSPECIFIED": case 0: - message.findingClass = 0; + message.enablementState = 0; break; - case "THREAT": + case "ENABLED": case 1: - message.findingClass = 1; + message.enablementState = 1; break; - case "VULNERABILITY": + case "DISABLED": case 2: - message.findingClass = 2; + message.enablementState = 2; break; - case "MISCONFIGURATION": + case "INHERITED": case 3: - message.findingClass = 3; - break; - case "OBSERVATION": - case 4: - message.findingClass = 4; - break; - case "SCC_ERROR": - case 5: - message.findingClass = 5; - break; - case "POSTURE_VIOLATION": - case 6: - message.findingClass = 6; - break; - case "TOXIC_COMBINATION": - case 7: - message.findingClass = 7; + message.enablementState = 3; break; } - if (object.indicator != null) { - if (typeof object.indicator !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.indicator: object expected"); - message.indicator = $root.google.cloud.securitycenter.v1.Indicator.fromObject(object.indicator); - } - if (object.vulnerability != null) { - if (typeof object.vulnerability !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.vulnerability: object expected"); - message.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.fromObject(object.vulnerability); - } - if (object.muteUpdateTime != null) { - if (typeof object.muteUpdateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.muteUpdateTime: object expected"); - message.muteUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.muteUpdateTime); - } - if (object.externalSystems) { - if (typeof object.externalSystems !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.externalSystems: object expected"); - message.externalSystems = {}; - for (var keys = Object.keys(object.externalSystems), i = 0; i < keys.length; ++i) { - if (typeof object.externalSystems[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.externalSystems: object expected"); - message.externalSystems[keys[i]] = $root.google.cloud.securitycenter.v1.ExternalSystem.fromObject(object.externalSystems[keys[i]]); - } - } - if (object.mitreAttack != null) { - if (typeof object.mitreAttack !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.mitreAttack: object expected"); - message.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.fromObject(object.mitreAttack); - } - if (object.access != null) { - if (typeof object.access !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.access: object expected"); - message.access = $root.google.cloud.securitycenter.v1.Access.fromObject(object.access); - } - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.connections: array expected"); - message.connections = []; - for (var i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.connections: object expected"); - message.connections[i] = $root.google.cloud.securitycenter.v1.Connection.fromObject(object.connections[i]); - } - } - if (object.muteInitiator != null) - message.muteInitiator = String(object.muteInitiator); - if (object.processes) { - if (!Array.isArray(object.processes)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.processes: array expected"); - message.processes = []; - for (var i = 0; i < object.processes.length; ++i) { - if (typeof object.processes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.processes: object expected"); - message.processes[i] = $root.google.cloud.securitycenter.v1.Process.fromObject(object.processes[i]); - } - } - if (object.contacts) { - if (typeof object.contacts !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.contacts: object expected"); - message.contacts = {}; - for (var keys = Object.keys(object.contacts), i = 0; i < keys.length; ++i) { - if (typeof object.contacts[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.contacts: object expected"); - message.contacts[keys[i]] = $root.google.cloud.securitycenter.v1.ContactDetails.fromObject(object.contacts[keys[i]]); - } - } - if (object.compliances) { - if (!Array.isArray(object.compliances)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.compliances: array expected"); - message.compliances = []; - for (var i = 0; i < object.compliances.length; ++i) { - if (typeof object.compliances[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.compliances: object expected"); - message.compliances[i] = $root.google.cloud.securitycenter.v1.Compliance.fromObject(object.compliances[i]); - } - } - if (object.parentDisplayName != null) - message.parentDisplayName = String(object.parentDisplayName); + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); if (object.description != null) message.description = String(object.description); - if (object.exfiltration != null) { - if (typeof object.exfiltration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.exfiltration: object expected"); - message.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.fromObject(object.exfiltration); - } - if (object.iamBindings) { - if (!Array.isArray(object.iamBindings)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.iamBindings: array expected"); - message.iamBindings = []; - for (var i = 0; i < object.iamBindings.length; ++i) { - if (typeof object.iamBindings[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.iamBindings: object expected"); - message.iamBindings[i] = $root.google.cloud.securitycenter.v1.IamBinding.fromObject(object.iamBindings[i]); - } - } - if (object.nextSteps != null) - message.nextSteps = String(object.nextSteps); - if (object.moduleName != null) - message.moduleName = String(object.moduleName); - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); - } - } - if (object.kubernetes != null) { - if (typeof object.kubernetes !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.kubernetes: object expected"); - message.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.fromObject(object.kubernetes); - } - if (object.database != null) { - if (typeof object.database !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.database: object expected"); - message.database = $root.google.cloud.securitycenter.v1.Database.fromObject(object.database); - } - if (object.files) { - if (!Array.isArray(object.files)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.files: array expected"); - message.files = []; - for (var i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.files: object expected"); - message.files[i] = $root.google.cloud.securitycenter.v1.File.fromObject(object.files[i]); - } - } - if (object.cloudDlpInspection != null) { - if (typeof object.cloudDlpInspection !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpInspection: object expected"); - message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.fromObject(object.cloudDlpInspection); - } - if (object.cloudDlpDataProfile != null) { - if (typeof object.cloudDlpDataProfile !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpDataProfile: object expected"); - message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.fromObject(object.cloudDlpDataProfile); - } - if (object.kernelRootkit != null) { - if (typeof object.kernelRootkit !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.kernelRootkit: object expected"); - message.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.fromObject(object.kernelRootkit); - } - if (object.orgPolicies) { - if (!Array.isArray(object.orgPolicies)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.orgPolicies: array expected"); - message.orgPolicies = []; - for (var i = 0; i < object.orgPolicies.length; ++i) { - if (typeof object.orgPolicies[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.orgPolicies: object expected"); - message.orgPolicies[i] = $root.google.cloud.securitycenter.v1.OrgPolicy.fromObject(object.orgPolicies[i]); - } - } - if (object.application != null) { - if (typeof object.application !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.application: object expected"); - message.application = $root.google.cloud.securitycenter.v1.Application.fromObject(object.application); - } - if (object.backupDisasterRecovery != null) { - if (typeof object.backupDisasterRecovery !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.backupDisasterRecovery: object expected"); - message.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.fromObject(object.backupDisasterRecovery); - } - if (object.securityPosture != null) { - if (typeof object.securityPosture !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.securityPosture: object expected"); - message.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.fromObject(object.securityPosture); - } - if (object.logEntries) { - if (!Array.isArray(object.logEntries)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.logEntries: array expected"); - message.logEntries = []; - for (var i = 0; i < object.logEntries.length; ++i) { - if (typeof object.logEntries[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.logEntries: object expected"); - message.logEntries[i] = $root.google.cloud.securitycenter.v1.LogEntry.fromObject(object.logEntries[i]); - } - } - if (object.loadBalancers) { - if (!Array.isArray(object.loadBalancers)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.loadBalancers: array expected"); - message.loadBalancers = []; - for (var i = 0; i < object.loadBalancers.length; ++i) { - if (typeof object.loadBalancers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.loadBalancers: object expected"); - message.loadBalancers[i] = $root.google.cloud.securitycenter.v1.LoadBalancer.fromObject(object.loadBalancers[i]); - } - } - if (object.cloudArmor != null) { - if (typeof object.cloudArmor !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudArmor: object expected"); - message.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.fromObject(object.cloudArmor); - } - if (object.notebook != null) { - if (typeof object.notebook !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.notebook: object expected"); - message.notebook = $root.google.cloud.securitycenter.v1.Notebook.fromObject(object.notebook); - } - if (object.toxicCombination != null) { - if (typeof object.toxicCombination !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.toxicCombination: object expected"); - message.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.fromObject(object.toxicCombination); - } - if (object.groupMemberships) { - if (!Array.isArray(object.groupMemberships)) - throw TypeError(".google.cloud.securitycenter.v1.Finding.groupMemberships: array expected"); - message.groupMemberships = []; - for (var i = 0; i < object.groupMemberships.length; ++i) { - if (typeof object.groupMemberships[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Finding.groupMemberships: object expected"); - message.groupMemberships[i] = $root.google.cloud.securitycenter.v1.GroupMembership.fromObject(object.groupMemberships[i]); - } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.lastEditor != null) + message.lastEditor = String(object.lastEditor); return message; }; /** - * Creates a plain object from a Finding message. Also converts values to other types if specified. + * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static - * @param {google.cloud.securitycenter.v1.Finding} message Finding + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} message EventThreatDetectionCustomModule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Finding.toObject = function toObject(message, options) { + EventThreatDetectionCustomModule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.processes = []; - object.connections = []; - object.compliances = []; - object.iamBindings = []; - object.containers = []; - object.files = []; - object.orgPolicies = []; - object.logEntries = []; - object.loadBalancers = []; - object.groupMemberships = []; - } - if (options.objects || options.defaults) { - object.sourceProperties = {}; - object.externalSystems = {}; - object.contacts = {}; - } if (options.defaults) { object.name = ""; - object.parent = ""; - object.resourceName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.category = ""; - object.externalUri = ""; - object.securityMarks = null; - object.eventTime = null; - object.createTime = null; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.canonicalName = ""; - object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; - object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; - object.indicator = null; - object.vulnerability = null; - object.muteUpdateTime = null; - object.mitreAttack = null; - object.access = null; - object.muteInitiator = ""; - object.parentDisplayName = ""; + object.config = null; + object.ancestorModule = ""; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.type = ""; + object.displayName = ""; object.description = ""; - object.exfiltration = null; - object.nextSteps = ""; - object.moduleName = ""; - object.kubernetes = null; - object.database = null; - object.cloudDlpInspection = null; - object.cloudDlpDataProfile = null; - object.kernelRootkit = null; - object.application = null; - object.backupDisasterRecovery = null; - object.securityPosture = null; - object.cloudArmor = null; - object.notebook = null; - object.toxicCombination = null; + object.updateTime = null; + object.lastEditor = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.externalUri != null && message.hasOwnProperty("externalUri")) - object.externalUri = message.externalUri; - var keys2; - if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { - object.sourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v1.Finding.Severity[message.severity] : message.severity; - if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) - object.canonicalName = message.canonicalName; - if (message.mute != null && message.hasOwnProperty("mute")) - object.mute = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] : message.mute; - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - object.findingClass = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycenter.v1.Finding.FindingClass[message.findingClass] : message.findingClass; - if (message.indicator != null && message.hasOwnProperty("indicator")) - object.indicator = $root.google.cloud.securitycenter.v1.Indicator.toObject(message.indicator, options); - if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) - object.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.toObject(message.vulnerability, options); - if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) - object.muteUpdateTime = $root.google.protobuf.Timestamp.toObject(message.muteUpdateTime, options); - if (message.externalSystems && (keys2 = Object.keys(message.externalSystems)).length) { - object.externalSystems = {}; - for (var j = 0; j < keys2.length; ++j) - object.externalSystems[keys2[j]] = $root.google.cloud.securitycenter.v1.ExternalSystem.toObject(message.externalSystems[keys2[j]], options); - } - if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) - object.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.toObject(message.mitreAttack, options); - if (message.access != null && message.hasOwnProperty("access")) - object.access = $root.google.cloud.securitycenter.v1.Access.toObject(message.access, options); - if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) - object.muteInitiator = message.muteInitiator; - if (message.processes && message.processes.length) { - object.processes = []; - for (var j = 0; j < message.processes.length; ++j) - object.processes[j] = $root.google.cloud.securitycenter.v1.Process.toObject(message.processes[j], options); - } - if (message.connections && message.connections.length) { - object.connections = []; - for (var j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.google.cloud.securitycenter.v1.Connection.toObject(message.connections[j], options); - } - if (message.contacts && (keys2 = Object.keys(message.contacts)).length) { - object.contacts = {}; - for (var j = 0; j < keys2.length; ++j) - object.contacts[keys2[j]] = $root.google.cloud.securitycenter.v1.ContactDetails.toObject(message.contacts[keys2[j]], options); - } - if (message.compliances && message.compliances.length) { - object.compliances = []; - for (var j = 0; j < message.compliances.length; ++j) - object.compliances[j] = $root.google.cloud.securitycenter.v1.Compliance.toObject(message.compliances[j], options); - } - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - object.parentDisplayName = message.parentDisplayName; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.protobuf.Struct.toObject(message.config, options); + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + object.ancestorModule = message.ancestorModule; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) - object.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.toObject(message.exfiltration, options); - if (message.iamBindings && message.iamBindings.length) { - object.iamBindings = []; - for (var j = 0; j < message.iamBindings.length; ++j) - object.iamBindings[j] = $root.google.cloud.securitycenter.v1.IamBinding.toObject(message.iamBindings[j], options); - } - if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) - object.nextSteps = message.nextSteps; - if (message.moduleName != null && message.hasOwnProperty("moduleName")) - object.moduleName = message.moduleName; - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); - } - if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) - object.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.toObject(message.kubernetes, options); - if (message.database != null && message.hasOwnProperty("database")) - object.database = $root.google.cloud.securitycenter.v1.Database.toObject(message.database, options); - if (message.files && message.files.length) { - object.files = []; - for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.cloud.securitycenter.v1.File.toObject(message.files[j], options); - } - if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) - object.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.toObject(message.cloudDlpInspection, options); - if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) - object.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.toObject(message.cloudDlpDataProfile, options); - if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) - object.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.toObject(message.kernelRootkit, options); - if (message.orgPolicies && message.orgPolicies.length) { - object.orgPolicies = []; - for (var j = 0; j < message.orgPolicies.length; ++j) - object.orgPolicies[j] = $root.google.cloud.securitycenter.v1.OrgPolicy.toObject(message.orgPolicies[j], options); - } - if (message.application != null && message.hasOwnProperty("application")) - object.application = $root.google.cloud.securitycenter.v1.Application.toObject(message.application, options); - if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) - object.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.toObject(message.backupDisasterRecovery, options); - if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) - object.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.toObject(message.securityPosture, options); - if (message.logEntries && message.logEntries.length) { - object.logEntries = []; - for (var j = 0; j < message.logEntries.length; ++j) - object.logEntries[j] = $root.google.cloud.securitycenter.v1.LogEntry.toObject(message.logEntries[j], options); - } - if (message.loadBalancers && message.loadBalancers.length) { - object.loadBalancers = []; - for (var j = 0; j < message.loadBalancers.length; ++j) - object.loadBalancers[j] = $root.google.cloud.securitycenter.v1.LoadBalancer.toObject(message.loadBalancers[j], options); - } - if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) - object.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.toObject(message.cloudArmor, options); - if (message.notebook != null && message.hasOwnProperty("notebook")) - object.notebook = $root.google.cloud.securitycenter.v1.Notebook.toObject(message.notebook, options); - if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) - object.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.toObject(message.toxicCombination, options); - if (message.groupMemberships && message.groupMemberships.length) { - object.groupMemberships = []; - for (var j = 0; j < message.groupMemberships.length; ++j) - object.groupMemberships[j] = $root.google.cloud.securitycenter.v1.GroupMembership.toObject(message.groupMemberships[j], options); - } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + object.lastEditor = message.lastEditor; return object; }; /** - * Converts this Finding to JSON. + * Converts this EventThreatDetectionCustomModule to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @instance * @returns {Object.} JSON object */ - Finding.prototype.toJSON = function toJSON() { + EventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Finding + * Gets the default type url for EventThreatDetectionCustomModule * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Finding + * @memberof google.cloud.securitycenter.v1.EventThreatDetectionCustomModule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Finding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Finding"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.EventThreatDetectionCustomModule"; }; /** - * State enum. - * @name google.cloud.securitycenter.v1.Finding.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - Finding.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - /** - * Severity enum. - * @name google.cloud.securitycenter.v1.Finding.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - Finding.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); - - /** - * Mute enum. - * @name google.cloud.securitycenter.v1.Finding.Mute - * @enum {number} - * @property {number} MUTE_UNSPECIFIED=0 MUTE_UNSPECIFIED value - * @property {number} MUTED=1 MUTED value - * @property {number} UNMUTED=2 UNMUTED value - * @property {number} UNDEFINED=4 UNDEFINED value - */ - Finding.Mute = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MUTE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MUTED"] = 1; - values[valuesById[2] = "UNMUTED"] = 2; - values[valuesById[4] = "UNDEFINED"] = 4; - return values; - })(); - - /** - * FindingClass enum. - * @name google.cloud.securitycenter.v1.Finding.FindingClass + * EnablementState enum. + * @name google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState * @enum {number} - * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value - * @property {number} THREAT=1 THREAT value - * @property {number} VULNERABILITY=2 VULNERABILITY value - * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value - * @property {number} OBSERVATION=4 OBSERVATION value - * @property {number} SCC_ERROR=5 SCC_ERROR value - * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value - * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} INHERITED=3 INHERITED value */ - Finding.FindingClass = (function() { + EventThreatDetectionCustomModule.EnablementState = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; - values[valuesById[1] = "THREAT"] = 1; - values[valuesById[2] = "VULNERABILITY"] = 2; - values[valuesById[3] = "MISCONFIGURATION"] = 3; - values[valuesById[4] = "OBSERVATION"] = 4; - values[valuesById[5] = "SCC_ERROR"] = 5; - values[valuesById[6] = "POSTURE_VIOLATION"] = 6; - values[valuesById[7] = "TOXIC_COMBINATION"] = 7; + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "INHERITED"] = 3; return values; })(); - return Finding; + return EventThreatDetectionCustomModule; })(); - v1.GroupMembership = (function() { + v1.CustomModuleValidationErrors = (function() { /** - * Properties of a GroupMembership. + * Properties of a CustomModuleValidationErrors. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupMembership - * @property {google.cloud.securitycenter.v1.GroupMembership.GroupType|null} [groupType] GroupMembership groupType - * @property {string|null} [groupId] GroupMembership groupId + * @interface ICustomModuleValidationErrors + * @property {Array.|null} [errors] CustomModuleValidationErrors errors */ /** - * Constructs a new GroupMembership. + * Constructs a new CustomModuleValidationErrors. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupMembership. - * @implements IGroupMembership + * @classdesc Represents a CustomModuleValidationErrors. + * @implements ICustomModuleValidationErrors * @constructor - * @param {google.cloud.securitycenter.v1.IGroupMembership=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationErrors=} [properties] Properties to set */ - function GroupMembership(properties) { + function CustomModuleValidationErrors(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12710,89 +11534,78 @@ } /** - * GroupMembership groupType. - * @member {google.cloud.securitycenter.v1.GroupMembership.GroupType} groupType - * @memberof google.cloud.securitycenter.v1.GroupMembership - * @instance - */ - GroupMembership.prototype.groupType = 0; - - /** - * GroupMembership groupId. - * @member {string} groupId - * @memberof google.cloud.securitycenter.v1.GroupMembership + * CustomModuleValidationErrors errors. + * @member {Array.} errors + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @instance */ - GroupMembership.prototype.groupId = ""; + CustomModuleValidationErrors.prototype.errors = $util.emptyArray; /** - * Creates a new GroupMembership instance using the specified properties. + * Creates a new CustomModuleValidationErrors instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static - * @param {google.cloud.securitycenter.v1.IGroupMembership=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership instance + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationErrors=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationErrors} CustomModuleValidationErrors instance */ - GroupMembership.create = function create(properties) { - return new GroupMembership(properties); + CustomModuleValidationErrors.create = function create(properties) { + return new CustomModuleValidationErrors(properties); }; /** - * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. + * Encodes the specified CustomModuleValidationErrors message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationErrors.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static - * @param {google.cloud.securitycenter.v1.IGroupMembership} message GroupMembership message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationErrors} message CustomModuleValidationErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupMembership.encode = function encode(message, writer) { + CustomModuleValidationErrors.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.groupType); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupId); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.securitycenter.v1.CustomModuleValidationError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. + * Encodes the specified CustomModuleValidationErrors message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationErrors.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static - * @param {google.cloud.securitycenter.v1.IGroupMembership} message GroupMembership message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationErrors} message CustomModuleValidationErrors message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupMembership.encodeDelimited = function encodeDelimited(message, writer) { + CustomModuleValidationErrors.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupMembership message from the specified reader or buffer. + * Decodes a CustomModuleValidationErrors message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationErrors} CustomModuleValidationErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupMembership.decode = function decode(reader, length) { + CustomModuleValidationErrors.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.cloud.securitycenter.v1.GroupMembership(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.groupType = reader.int32(); - break; - } - case 2: { - message.groupId = reader.string(); + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.securitycenter.v1.CustomModuleValidationError.decode(reader, reader.uint32())); break; } default: @@ -12804,166 +11617,142 @@ }; /** - * Decodes a GroupMembership message from the specified reader or buffer, length delimited. + * Decodes a CustomModuleValidationErrors message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationErrors} CustomModuleValidationErrors * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupMembership.decodeDelimited = function decodeDelimited(reader) { + CustomModuleValidationErrors.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupMembership message. + * Verifies a CustomModuleValidationErrors message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupMembership.verify = function verify(message) { + CustomModuleValidationErrors.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupType != null && message.hasOwnProperty("groupType")) - switch (message.groupType) { - default: - return "groupType: enum value expected"; - case 0: - case 1: - break; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.CustomModuleValidationError.verify(message.errors[i]); + if (error) + return "errors." + error; } - if (message.groupId != null && message.hasOwnProperty("groupId")) - if (!$util.isString(message.groupId)) - return "groupId: string expected"; + } return null; }; /** - * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. + * Creates a CustomModuleValidationErrors message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationErrors} CustomModuleValidationErrors */ - GroupMembership.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupMembership) + CustomModuleValidationErrors.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupMembership(); - switch (object.groupType) { - default: - if (typeof object.groupType === "number") { - message.groupType = object.groupType; - break; + var message = new $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.securitycenter.v1.CustomModuleValidationErrors.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomModuleValidationErrors.errors: object expected"); + message.errors[i] = $root.google.cloud.securitycenter.v1.CustomModuleValidationError.fromObject(object.errors[i]); } - break; - case "GROUP_TYPE_UNSPECIFIED": - case 0: - message.groupType = 0; - break; - case "GROUP_TYPE_TOXIC_COMBINATION": - case 1: - message.groupType = 1; - break; } - if (object.groupId != null) - message.groupId = String(object.groupId); return message; }; /** - * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. + * Creates a plain object from a CustomModuleValidationErrors message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static - * @param {google.cloud.securitycenter.v1.GroupMembership} message GroupMembership + * @param {google.cloud.securitycenter.v1.CustomModuleValidationErrors} message CustomModuleValidationErrors * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupMembership.toObject = function toObject(message, options) { + CustomModuleValidationErrors.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.groupType = options.enums === String ? "GROUP_TYPE_UNSPECIFIED" : 0; - object.groupId = ""; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.securitycenter.v1.CustomModuleValidationError.toObject(message.errors[j], options); } - if (message.groupType != null && message.hasOwnProperty("groupType")) - object.groupType = options.enums === String ? $root.google.cloud.securitycenter.v1.GroupMembership.GroupType[message.groupType] === undefined ? message.groupType : $root.google.cloud.securitycenter.v1.GroupMembership.GroupType[message.groupType] : message.groupType; - if (message.groupId != null && message.hasOwnProperty("groupId")) - object.groupId = message.groupId; return object; }; /** - * Converts this GroupMembership to JSON. + * Converts this CustomModuleValidationErrors to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @instance * @returns {Object.} JSON object */ - GroupMembership.prototype.toJSON = function toJSON() { + CustomModuleValidationErrors.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupMembership + * Gets the default type url for CustomModuleValidationErrors * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupMembership + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationErrors * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomModuleValidationErrors.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupMembership"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomModuleValidationErrors"; }; - /** - * GroupType enum. - * @name google.cloud.securitycenter.v1.GroupMembership.GroupType - * @enum {number} - * @property {number} GROUP_TYPE_UNSPECIFIED=0 GROUP_TYPE_UNSPECIFIED value - * @property {number} GROUP_TYPE_TOXIC_COMBINATION=1 GROUP_TYPE_TOXIC_COMBINATION value - */ - GroupMembership.GroupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GROUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GROUP_TYPE_TOXIC_COMBINATION"] = 1; - return values; - })(); - - return GroupMembership; + return CustomModuleValidationErrors; })(); - v1.IamBinding = (function() { + v1.CustomModuleValidationError = (function() { /** - * Properties of an IamBinding. + * Properties of a CustomModuleValidationError. * @memberof google.cloud.securitycenter.v1 - * @interface IIamBinding - * @property {google.cloud.securitycenter.v1.IamBinding.Action|null} [action] IamBinding action - * @property {string|null} [role] IamBinding role - * @property {string|null} [member] IamBinding member + * @interface ICustomModuleValidationError + * @property {string|null} [description] CustomModuleValidationError description + * @property {string|null} [fieldPath] CustomModuleValidationError fieldPath + * @property {google.cloud.securitycenter.v1.IPosition|null} [start] CustomModuleValidationError start + * @property {google.cloud.securitycenter.v1.IPosition|null} [end] CustomModuleValidationError end */ /** - * Constructs a new IamBinding. + * Constructs a new CustomModuleValidationError. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an IamBinding. - * @implements IIamBinding + * @classdesc Represents a CustomModuleValidationError. + * @implements ICustomModuleValidationError * @constructor - * @param {google.cloud.securitycenter.v1.IIamBinding=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationError=} [properties] Properties to set */ - function IamBinding(properties) { + function CustomModuleValidationError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12971,103 +11760,142 @@ } /** - * IamBinding action. - * @member {google.cloud.securitycenter.v1.IamBinding.Action} action - * @memberof google.cloud.securitycenter.v1.IamBinding + * CustomModuleValidationError description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @instance */ - IamBinding.prototype.action = 0; + CustomModuleValidationError.prototype.description = ""; /** - * IamBinding role. - * @member {string} role - * @memberof google.cloud.securitycenter.v1.IamBinding + * CustomModuleValidationError fieldPath. + * @member {string} fieldPath + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @instance */ - IamBinding.prototype.role = ""; + CustomModuleValidationError.prototype.fieldPath = ""; /** - * IamBinding member. - * @member {string} member - * @memberof google.cloud.securitycenter.v1.IamBinding + * CustomModuleValidationError start. + * @member {google.cloud.securitycenter.v1.IPosition|null|undefined} start + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @instance */ - IamBinding.prototype.member = ""; + CustomModuleValidationError.prototype.start = null; /** - * Creates a new IamBinding instance using the specified properties. + * CustomModuleValidationError end. + * @member {google.cloud.securitycenter.v1.IPosition|null|undefined} end + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError + * @instance + */ + CustomModuleValidationError.prototype.end = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomModuleValidationError _start. + * @member {"start"|undefined} _start + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError + * @instance + */ + Object.defineProperty(CustomModuleValidationError.prototype, "_start", { + get: $util.oneOfGetter($oneOfFields = ["start"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomModuleValidationError _end. + * @member {"end"|undefined} _end + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError + * @instance + */ + Object.defineProperty(CustomModuleValidationError.prototype, "_end", { + get: $util.oneOfGetter($oneOfFields = ["end"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomModuleValidationError instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static - * @param {google.cloud.securitycenter.v1.IIamBinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding instance + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationError=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationError} CustomModuleValidationError instance */ - IamBinding.create = function create(properties) { - return new IamBinding(properties); + CustomModuleValidationError.create = function create(properties) { + return new CustomModuleValidationError(properties); }; /** - * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. + * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationError.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static - * @param {google.cloud.securitycenter.v1.IIamBinding} message IamBinding message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IamBinding.encode = function encode(message, writer) { + CustomModuleValidationError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldPath); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + $root.google.cloud.securitycenter.v1.Position.encode(message.start, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + $root.google.cloud.securitycenter.v1.Position.encode(message.end, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. + * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CustomModuleValidationError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static - * @param {google.cloud.securitycenter.v1.IIamBinding} message IamBinding message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IamBinding.encodeDelimited = function encodeDelimited(message, writer) { + CustomModuleValidationError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IamBinding message from the specified reader or buffer. + * Decodes a CustomModuleValidationError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationError} CustomModuleValidationError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IamBinding.decode = function decode(reader, length) { + CustomModuleValidationError.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.cloud.securitycenter.v1.IamBinding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CustomModuleValidationError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.action = reader.int32(); + message.description = reader.string(); break; } case 2: { - message.role = reader.string(); + message.fieldPath = reader.string(); break; } case 3: { - message.member = reader.string(); + message.start = $root.google.cloud.securitycenter.v1.Position.decode(reader, reader.uint32()); + break; + } + case 4: { + message.end = $root.google.cloud.securitycenter.v1.Position.decode(reader, reader.uint32()); break; } default: @@ -13079,186 +11907,169 @@ }; /** - * Decodes an IamBinding message from the specified reader or buffer, length delimited. + * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationError} CustomModuleValidationError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IamBinding.decodeDelimited = function decodeDelimited(reader) { + CustomModuleValidationError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IamBinding message. + * Verifies a CustomModuleValidationError message. * @function verify - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IamBinding.verify = function verify(message) { + CustomModuleValidationError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + if (!$util.isString(message.fieldPath)) + return "fieldPath: string expected"; + if (message.start != null && message.hasOwnProperty("start")) { + properties._start = 1; + { + var error = $root.google.cloud.securitycenter.v1.Position.verify(message.start); + if (error) + return "start." + error; } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; + } + if (message.end != null && message.hasOwnProperty("end")) { + properties._end = 1; + { + var error = $root.google.cloud.securitycenter.v1.Position.verify(message.end); + if (error) + return "end." + error; + } + } return null; }; /** - * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. + * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding + * @returns {google.cloud.securitycenter.v1.CustomModuleValidationError} CustomModuleValidationError */ - IamBinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.IamBinding) + CustomModuleValidationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CustomModuleValidationError) return object; - var message = new $root.google.cloud.securitycenter.v1.IamBinding(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; + var message = new $root.google.cloud.securitycenter.v1.CustomModuleValidationError(); + if (object.description != null) + message.description = String(object.description); + if (object.fieldPath != null) + message.fieldPath = String(object.fieldPath); + if (object.start != null) { + if (typeof object.start !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomModuleValidationError.start: object expected"); + message.start = $root.google.cloud.securitycenter.v1.Position.fromObject(object.start); + } + if (object.end != null) { + if (typeof object.end !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CustomModuleValidationError.end: object expected"); + message.end = $root.google.cloud.securitycenter.v1.Position.fromObject(object.end); } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); return message; }; /** - * Creates a plain object from an IamBinding message. Also converts values to other types if specified. + * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static - * @param {google.cloud.securitycenter.v1.IamBinding} message IamBinding + * @param {google.cloud.securitycenter.v1.CustomModuleValidationError} message CustomModuleValidationError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IamBinding.toObject = function toObject(message, options) { + CustomModuleValidationError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; + object.description = ""; + object.fieldPath = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + object.fieldPath = message.fieldPath; + if (message.start != null && message.hasOwnProperty("start")) { + object.start = $root.google.cloud.securitycenter.v1.Position.toObject(message.start, options); + if (options.oneofs) + object._start = "start"; + } + if (message.end != null && message.hasOwnProperty("end")) { + object.end = $root.google.cloud.securitycenter.v1.Position.toObject(message.end, options); + if (options.oneofs) + object._end = "end"; } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.cloud.securitycenter.v1.IamBinding.Action[message.action] === undefined ? message.action : $root.google.cloud.securitycenter.v1.IamBinding.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; return object; }; /** - * Converts this IamBinding to JSON. + * Converts this CustomModuleValidationError to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @instance * @returns {Object.} JSON object */ - IamBinding.prototype.toJSON = function toJSON() { + CustomModuleValidationError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IamBinding + * Gets the default type url for CustomModuleValidationError * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.IamBinding + * @memberof google.cloud.securitycenter.v1.CustomModuleValidationError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IamBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomModuleValidationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.IamBinding"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CustomModuleValidationError"; }; - /** - * Action enum. - * @name google.cloud.securitycenter.v1.IamBinding.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - IamBinding.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return IamBinding; + return CustomModuleValidationError; })(); - v1.Indicator = (function() { + v1.Position = (function() { /** - * Properties of an Indicator. + * Properties of a Position. * @memberof google.cloud.securitycenter.v1 - * @interface IIndicator - * @property {Array.|null} [ipAddresses] Indicator ipAddresses - * @property {Array.|null} [domains] Indicator domains - * @property {Array.|null} [signatures] Indicator signatures - * @property {Array.|null} [uris] Indicator uris + * @interface IPosition + * @property {number|null} [lineNumber] Position lineNumber + * @property {number|null} [columnNumber] Position columnNumber */ /** - * Constructs a new Indicator. + * Constructs a new Position. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an Indicator. - * @implements IIndicator + * @classdesc Represents a Position. + * @implements IPosition * @constructor - * @param {google.cloud.securitycenter.v1.IIndicator=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IPosition=} [properties] Properties to set */ - function Indicator(properties) { - this.ipAddresses = []; - this.domains = []; - this.signatures = []; - this.uris = []; + function Position(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13266,129 +12077,339 @@ } /** - * Indicator ipAddresses. - * @member {Array.} ipAddresses - * @memberof google.cloud.securitycenter.v1.Indicator - * @instance - */ - Indicator.prototype.ipAddresses = $util.emptyArray; - - /** - * Indicator domains. - * @member {Array.} domains - * @memberof google.cloud.securitycenter.v1.Indicator - * @instance - */ - Indicator.prototype.domains = $util.emptyArray; - - /** - * Indicator signatures. - * @member {Array.} signatures - * @memberof google.cloud.securitycenter.v1.Indicator + * Position lineNumber. + * @member {number} lineNumber + * @memberof google.cloud.securitycenter.v1.Position * @instance */ - Indicator.prototype.signatures = $util.emptyArray; + Position.prototype.lineNumber = 0; /** - * Indicator uris. - * @member {Array.} uris - * @memberof google.cloud.securitycenter.v1.Indicator + * Position columnNumber. + * @member {number} columnNumber + * @memberof google.cloud.securitycenter.v1.Position * @instance */ - Indicator.prototype.uris = $util.emptyArray; + Position.prototype.columnNumber = 0; /** - * Creates a new Indicator instance using the specified properties. + * Creates a new Position instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Position * @static - * @param {google.cloud.securitycenter.v1.IIndicator=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Indicator} Indicator instance + * @param {google.cloud.securitycenter.v1.IPosition=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Position} Position instance */ - Indicator.create = function create(properties) { - return new Indicator(properties); + Position.create = function create(properties) { + return new Position(properties); }; /** - * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. + * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycenter.v1.Position.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Position * @static - * @param {google.cloud.securitycenter.v1.IIndicator} message Indicator message or plain object to encode + * @param {google.cloud.securitycenter.v1.IPosition} message Position message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Indicator.encode = function encode(message, writer) { + Position.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ipAddresses != null && message.ipAddresses.length) - for (var i = 0; i < message.ipAddresses.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddresses[i]); - if (message.domains != null && message.domains.length) - for (var i = 0; i < message.domains.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.domains[i]); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.uris != null && message.uris.length) - for (var i = 0; i < message.uris.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.uris[i]); + if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); + if (message.columnNumber != null && Object.hasOwnProperty.call(message, "columnNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.columnNumber); return writer; }; /** - * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Position.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Position * @static - * @param {google.cloud.securitycenter.v1.IIndicator} message Indicator message or plain object to encode + * @param {google.cloud.securitycenter.v1.IPosition} message Position message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Indicator.encodeDelimited = function encodeDelimited(message, writer) { + Position.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Indicator message from the specified reader or buffer. + * Decodes a Position message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Position * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Indicator} Indicator + * @returns {google.cloud.securitycenter.v1.Position} Position * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Indicator.decode = function decode(reader, length) { + Position.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.cloud.securitycenter.v1.Indicator(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Position(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.ipAddresses && message.ipAddresses.length)) - message.ipAddresses = []; - message.ipAddresses.push(reader.string()); + message.lineNumber = reader.int32(); break; } case 2: { - if (!(message.domains && message.domains.length)) - message.domains = []; - message.domains.push(reader.string()); + message.columnNumber = reader.int32(); break; } - case 3: { - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.decode(reader, reader.uint32())); + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Position message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Position + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Position} Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Position.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Position message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Position + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Position.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + if (!$util.isInteger(message.lineNumber)) + return "lineNumber: integer expected"; + if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) + if (!$util.isInteger(message.columnNumber)) + return "columnNumber: integer expected"; + return null; + }; + + /** + * Creates a Position message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Position + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Position} Position + */ + Position.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Position) + return object; + var message = new $root.google.cloud.securitycenter.v1.Position(); + if (object.lineNumber != null) + message.lineNumber = object.lineNumber | 0; + if (object.columnNumber != null) + message.columnNumber = object.columnNumber | 0; + return message; + }; + + /** + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Position + * @static + * @param {google.cloud.securitycenter.v1.Position} message Position + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Position.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lineNumber = 0; + object.columnNumber = 0; + } + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + object.lineNumber = message.lineNumber; + if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) + object.columnNumber = message.columnNumber; + return object; + }; + + /** + * Converts this Position to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Position + * @instance + * @returns {Object.} JSON object + */ + Position.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Position + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Position + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Position"; + }; + + return Position; + })(); + + v1.Exfiltration = (function() { + + /** + * Properties of an Exfiltration. + * @memberof google.cloud.securitycenter.v1 + * @interface IExfiltration + * @property {Array.|null} [sources] Exfiltration sources + * @property {Array.|null} [targets] Exfiltration targets + * @property {number|Long|null} [totalExfiltratedBytes] Exfiltration totalExfiltratedBytes + */ + + /** + * Constructs a new Exfiltration. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an Exfiltration. + * @implements IExfiltration + * @constructor + * @param {google.cloud.securitycenter.v1.IExfiltration=} [properties] Properties to set + */ + function Exfiltration(properties) { + this.sources = []; + this.targets = []; + 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]]; + } + + /** + * Exfiltration sources. + * @member {Array.} sources + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @instance + */ + Exfiltration.prototype.sources = $util.emptyArray; + + /** + * Exfiltration targets. + * @member {Array.} targets + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @instance + */ + Exfiltration.prototype.targets = $util.emptyArray; + + /** + * Exfiltration totalExfiltratedBytes. + * @member {number|Long} totalExfiltratedBytes + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @instance + */ + Exfiltration.prototype.totalExfiltratedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Exfiltration instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @static + * @param {google.cloud.securitycenter.v1.IExfiltration=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration instance + */ + Exfiltration.create = function create(properties) { + return new Exfiltration(properties); + }; + + /** + * Encodes the specified Exfiltration message. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @static + * @param {google.cloud.securitycenter.v1.IExfiltration} message Exfiltration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exfiltration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.securitycenter.v1.ExfilResource.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.securitycenter.v1.ExfilResource.encode(message.targets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalExfiltratedBytes != null && Object.hasOwnProperty.call(message, "totalExfiltratedBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalExfiltratedBytes); + return writer; + }; + + /** + * Encodes the specified Exfiltration message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Exfiltration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @static + * @param {google.cloud.securitycenter.v1.IExfiltration} message Exfiltration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exfiltration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exfiltration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Exfiltration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exfiltration.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.cloud.securitycenter.v1.Exfiltration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.securitycenter.v1.ExfilResource.decode(reader, reader.uint32())); break; } - case 4: { - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); + case 2: { + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.securitycenter.v1.ExfilResource.decode(reader, reader.uint32())); + break; + } + case 3: { + message.totalExfiltratedBytes = reader.int64(); break; } default: @@ -13400,1212 +12421,1237 @@ }; /** - * Decodes an Indicator message from the specified reader or buffer, length delimited. + * Decodes an Exfiltration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Indicator} Indicator + * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Indicator.decodeDelimited = function decodeDelimited(reader) { + Exfiltration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Indicator message. + * Verifies an Exfiltration message. * @function verify - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Indicator.verify = function verify(message) { + Exfiltration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { - if (!Array.isArray(message.ipAddresses)) - return "ipAddresses: array expected"; - for (var i = 0; i < message.ipAddresses.length; ++i) - if (!$util.isString(message.ipAddresses[i])) - return "ipAddresses: string[] expected"; - } - if (message.domains != null && message.hasOwnProperty("domains")) { - if (!Array.isArray(message.domains)) - return "domains: array expected"; - for (var i = 0; i < message.domains.length; ++i) - if (!$util.isString(message.domains[i])) - return "domains: string[] expected"; - } - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (var i = 0; i < message.signatures.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify(message.signatures[i]); + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ExfilResource.verify(message.sources[i]); if (error) - return "signatures." + error; + return "sources." + error; } } - if (message.uris != null && message.hasOwnProperty("uris")) { - if (!Array.isArray(message.uris)) - return "uris: array expected"; - for (var i = 0; i < message.uris.length; ++i) - if (!$util.isString(message.uris[i])) - return "uris: string[] expected"; + 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.cloud.securitycenter.v1.ExfilResource.verify(message.targets[i]); + if (error) + return "targets." + error; + } } + if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) + if (!$util.isInteger(message.totalExfiltratedBytes) && !(message.totalExfiltratedBytes && $util.isInteger(message.totalExfiltratedBytes.low) && $util.isInteger(message.totalExfiltratedBytes.high))) + return "totalExfiltratedBytes: integer|Long expected"; return null; }; /** - * Creates an Indicator message from a plain object. Also converts values to their respective internal types. + * Creates an Exfiltration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Indicator} Indicator + * @returns {google.cloud.securitycenter.v1.Exfiltration} Exfiltration */ - Indicator.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Indicator) + Exfiltration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Exfiltration) return object; - var message = new $root.google.cloud.securitycenter.v1.Indicator(); - if (object.ipAddresses) { - if (!Array.isArray(object.ipAddresses)) - throw TypeError(".google.cloud.securitycenter.v1.Indicator.ipAddresses: array expected"); - message.ipAddresses = []; - for (var i = 0; i < object.ipAddresses.length; ++i) - message.ipAddresses[i] = String(object.ipAddresses[i]); - } - if (object.domains) { - if (!Array.isArray(object.domains)) - throw TypeError(".google.cloud.securitycenter.v1.Indicator.domains: array expected"); - message.domains = []; - for (var i = 0; i < object.domains.length; ++i) - message.domains[i] = String(object.domains[i]); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".google.cloud.securitycenter.v1.Indicator.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Indicator.signatures: object expected"); - message.signatures[i] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.fromObject(object.signatures[i]); + var message = new $root.google.cloud.securitycenter.v1.Exfiltration(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.sources: object expected"); + message.sources[i] = $root.google.cloud.securitycenter.v1.ExfilResource.fromObject(object.sources[i]); } } - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.cloud.securitycenter.v1.Indicator.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Exfiltration.targets: object expected"); + message.targets[i] = $root.google.cloud.securitycenter.v1.ExfilResource.fromObject(object.targets[i]); + } } + if (object.totalExfiltratedBytes != null) + if ($util.Long) + (message.totalExfiltratedBytes = $util.Long.fromValue(object.totalExfiltratedBytes)).unsigned = false; + else if (typeof object.totalExfiltratedBytes === "string") + message.totalExfiltratedBytes = parseInt(object.totalExfiltratedBytes, 10); + else if (typeof object.totalExfiltratedBytes === "number") + message.totalExfiltratedBytes = object.totalExfiltratedBytes; + else if (typeof object.totalExfiltratedBytes === "object") + message.totalExfiltratedBytes = new $util.LongBits(object.totalExfiltratedBytes.low >>> 0, object.totalExfiltratedBytes.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an Indicator message. Also converts values to other types if specified. + * Creates a plain object from an Exfiltration message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @static - * @param {google.cloud.securitycenter.v1.Indicator} message Indicator + * @param {google.cloud.securitycenter.v1.Exfiltration} message Exfiltration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Indicator.toObject = function toObject(message, options) { + Exfiltration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.ipAddresses = []; - object.domains = []; - object.signatures = []; - object.uris = []; - } - if (message.ipAddresses && message.ipAddresses.length) { - object.ipAddresses = []; - for (var j = 0; j < message.ipAddresses.length; ++j) - object.ipAddresses[j] = message.ipAddresses[j]; - } - if (message.domains && message.domains.length) { - object.domains = []; - for (var j = 0; j < message.domains.length; ++j) - object.domains[j] = message.domains[j]; + object.sources = []; + object.targets = []; } - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.toObject(message.signatures[j], options); + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalExfiltratedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalExfiltratedBytes = options.longs === String ? "0" : 0; + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.securitycenter.v1.ExfilResource.toObject(message.sources[j], options); } - if (message.uris && message.uris.length) { - object.uris = []; - for (var j = 0; j < message.uris.length; ++j) - object.uris[j] = message.uris[j]; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.securitycenter.v1.ExfilResource.toObject(message.targets[j], options); } + if (message.totalExfiltratedBytes != null && message.hasOwnProperty("totalExfiltratedBytes")) + if (typeof message.totalExfiltratedBytes === "number") + object.totalExfiltratedBytes = options.longs === String ? String(message.totalExfiltratedBytes) : message.totalExfiltratedBytes; + else + object.totalExfiltratedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalExfiltratedBytes) : options.longs === Number ? new $util.LongBits(message.totalExfiltratedBytes.low >>> 0, message.totalExfiltratedBytes.high >>> 0).toNumber() : message.totalExfiltratedBytes; return object; }; /** - * Converts this Indicator to JSON. + * Converts this Exfiltration to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @instance * @returns {Object.} JSON object */ - Indicator.prototype.toJSON = function toJSON() { + Exfiltration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Indicator + * Gets the default type url for Exfiltration * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Indicator + * @memberof google.cloud.securitycenter.v1.Exfiltration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Indicator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Exfiltration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Exfiltration"; }; - Indicator.ProcessSignature = (function() { + return Exfiltration; + })(); - /** - * Properties of a ProcessSignature. - * @memberof google.cloud.securitycenter.v1.Indicator - * @interface IProcessSignature - * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null} [memoryHashSignature] ProcessSignature memoryHashSignature - * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null} [yaraRuleSignature] ProcessSignature yaraRuleSignature - * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|null} [signatureType] ProcessSignature signatureType - */ + v1.ExfilResource = (function() { - /** - * Constructs a new ProcessSignature. - * @memberof google.cloud.securitycenter.v1.Indicator - * @classdesc Represents a ProcessSignature. - * @implements IProcessSignature - * @constructor - * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature=} [properties] Properties to set - */ - function ProcessSignature(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 an ExfilResource. + * @memberof google.cloud.securitycenter.v1 + * @interface IExfilResource + * @property {string|null} [name] ExfilResource name + * @property {Array.|null} [components] ExfilResource components + */ - /** - * ProcessSignature memoryHashSignature. - * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null|undefined} memoryHashSignature - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.memoryHashSignature = null; + /** + * Constructs a new ExfilResource. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an ExfilResource. + * @implements IExfilResource + * @constructor + * @param {google.cloud.securitycenter.v1.IExfilResource=} [properties] Properties to set + */ + function ExfilResource(properties) { + this.components = []; + 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]]; + } - /** - * ProcessSignature yaraRuleSignature. - * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null|undefined} yaraRuleSignature - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.yaraRuleSignature = null; + /** + * ExfilResource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @instance + */ + ExfilResource.prototype.name = ""; - /** - * ProcessSignature signatureType. - * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType} signatureType - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @instance - */ - ProcessSignature.prototype.signatureType = 0; + /** + * ExfilResource components. + * @member {Array.} components + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @instance + */ + ExfilResource.prototype.components = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ProcessSignature signature. - * @member {"memoryHashSignature"|"yaraRuleSignature"|undefined} signature - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @instance - */ - Object.defineProperty(ProcessSignature.prototype, "signature", { - get: $util.oneOfGetter($oneOfFields = ["memoryHashSignature", "yaraRuleSignature"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ProcessSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature instance - */ - ProcessSignature.create = function create(properties) { - return new ProcessSignature(properties); - }; + /** + * Creates a new ExfilResource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {google.cloud.securitycenter.v1.IExfilResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource instance + */ + ExfilResource.create = function create(properties) { + return new ExfilResource(properties); + }; - /** - * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProcessSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.memoryHashSignature != null && Object.hasOwnProperty.call(message, "memoryHashSignature")) - $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.encode(message.memoryHashSignature, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.yaraRuleSignature != null && Object.hasOwnProperty.call(message, "yaraRuleSignature")) - $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.encode(message.yaraRuleSignature, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signatureType); - return writer; - }; + /** + * Encodes the specified ExfilResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {google.cloud.securitycenter.v1.IExfilResource} message ExfilResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExfilResource.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.components != null && message.components.length) + for (var i = 0; i < message.components.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.components[i]); + return writer; + }; - /** - * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProcessSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ExfilResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExfilResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {google.cloud.securitycenter.v1.IExfilResource} message ExfilResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExfilResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ProcessSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProcessSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.decode(reader, reader.uint32()); - break; - } - case 7: { - message.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.decode(reader, reader.uint32()); - break; - } - case 8: { - message.signatureType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes an ExfilResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExfilResource.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.cloud.securitycenter.v1.ExfilResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProcessSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProcessSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProcessSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { - properties.signature = 1; - { - var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify(message.memoryHashSignature); - if (error) - return "memoryHashSignature." + error; - } - } - if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { - if (properties.signature === 1) - return "signature: multiple values"; - properties.signature = 1; - { - var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify(message.yaraRuleSignature); - if (error) - return "yaraRuleSignature." + error; - } - } - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - switch (message.signatureType) { - default: - return "signatureType: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + if (!(message.components && message.components.length)) + message.components = []; + message.components.push(reader.string()); break; } - return null; - }; - - /** - * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature - */ - ProcessSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature) - return object; - var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature(); - if (object.memoryHashSignature != null) { - if (typeof object.memoryHashSignature !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.memoryHashSignature: object expected"); - message.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.fromObject(object.memoryHashSignature); - } - if (object.yaraRuleSignature != null) { - if (typeof object.yaraRuleSignature !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.yaraRuleSignature: object expected"); - message.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.fromObject(object.yaraRuleSignature); - } - switch (object.signatureType) { default: - if (typeof object.signatureType === "number") { - message.signatureType = object.signatureType; - break; - } - break; - case "SIGNATURE_TYPE_UNSPECIFIED": - case 0: - message.signatureType = 0; - break; - case "SIGNATURE_TYPE_PROCESS": - case 1: - message.signatureType = 1; - break; - case "SIGNATURE_TYPE_FILE": - case 2: - message.signatureType = 2; + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature} message ProcessSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProcessSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.signatureType = options.enums === String ? "SIGNATURE_TYPE_UNSPECIFIED" : 0; - if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { - object.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.toObject(message.memoryHashSignature, options); - if (options.oneofs) - object.signature = "memoryHashSignature"; - } - if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { - object.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.toObject(message.yaraRuleSignature, options); - if (options.oneofs) - object.signature = "yaraRuleSignature"; - } - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - object.signatureType = options.enums === String ? $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType[message.signatureType] : message.signatureType; + /** + * Decodes an ExfilResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExfilResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExfilResource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExfilResource.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.components != null && message.hasOwnProperty("components")) { + if (!Array.isArray(message.components)) + return "components: array expected"; + for (var i = 0; i < message.components.length; ++i) + if (!$util.isString(message.components[i])) + return "components: string[] expected"; + } + return null; + }; + + /** + * Creates an ExfilResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ExfilResource} ExfilResource + */ + ExfilResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ExfilResource) return object; - }; + var message = new $root.google.cloud.securitycenter.v1.ExfilResource(); + if (object.name != null) + message.name = String(object.name); + if (object.components) { + if (!Array.isArray(object.components)) + throw TypeError(".google.cloud.securitycenter.v1.ExfilResource.components: array expected"); + message.components = []; + for (var i = 0; i < object.components.length; ++i) + message.components[i] = String(object.components[i]); + } + return message; + }; - /** - * Converts this ProcessSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @instance - * @returns {Object.} JSON object - */ - ProcessSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ExfilResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {google.cloud.securitycenter.v1.ExfilResource} message ExfilResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExfilResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.components = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.components && message.components.length) { + object.components = []; + for (var j = 0; j < message.components.length; ++j) + object.components[j] = message.components[j]; + } + return object; + }; - /** - * Gets the default type url for ProcessSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProcessSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature"; - }; + /** + * Converts this ExfilResource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @instance + * @returns {Object.} JSON object + */ + ExfilResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - ProcessSignature.MemoryHashSignature = (function() { + /** + * Gets the default type url for ExfilResource + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ExfilResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExfilResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExfilResource"; + }; - /** - * Properties of a MemoryHashSignature. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @interface IMemoryHashSignature - * @property {string|null} [binaryFamily] MemoryHashSignature binaryFamily - * @property {Array.|null} [detections] MemoryHashSignature detections - */ + return ExfilResource; + })(); - /** - * Constructs a new MemoryHashSignature. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @classdesc Represents a MemoryHashSignature. - * @implements IMemoryHashSignature - * @constructor - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set - */ - function MemoryHashSignature(properties) { - this.detections = []; - 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]]; - } + v1.ExternalSystem = (function() { - /** - * MemoryHashSignature binaryFamily. - * @member {string} binaryFamily - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @instance - */ - MemoryHashSignature.prototype.binaryFamily = ""; + /** + * Properties of an ExternalSystem. + * @memberof google.cloud.securitycenter.v1 + * @interface IExternalSystem + * @property {string|null} [name] ExternalSystem name + * @property {Array.|null} [assignees] ExternalSystem assignees + * @property {string|null} [externalUid] ExternalSystem externalUid + * @property {string|null} [status] ExternalSystem status + * @property {google.protobuf.ITimestamp|null} [externalSystemUpdateTime] ExternalSystem externalSystemUpdateTime + * @property {string|null} [caseUri] ExternalSystem caseUri + * @property {string|null} [casePriority] ExternalSystem casePriority + * @property {google.protobuf.ITimestamp|null} [caseSla] ExternalSystem caseSla + * @property {google.protobuf.ITimestamp|null} [caseCreateTime] ExternalSystem caseCreateTime + * @property {google.protobuf.ITimestamp|null} [caseCloseTime] ExternalSystem caseCloseTime + * @property {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null} [ticketInfo] ExternalSystem ticketInfo + */ - /** - * MemoryHashSignature detections. - * @member {Array.} detections - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @instance - */ - MemoryHashSignature.prototype.detections = $util.emptyArray; + /** + * Constructs a new ExternalSystem. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an ExternalSystem. + * @implements IExternalSystem + * @constructor + * @param {google.cloud.securitycenter.v1.IExternalSystem=} [properties] Properties to set + */ + function ExternalSystem(properties) { + this.assignees = []; + 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 MemoryHashSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature instance - */ - MemoryHashSignature.create = function create(properties) { - return new MemoryHashSignature(properties); - }; + /** + * ExternalSystem name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.name = ""; - /** - * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryHashSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binaryFamily != null && Object.hasOwnProperty.call(message, "binaryFamily")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.binaryFamily); - if (message.detections != null && message.detections.length) - for (var i = 0; i < message.detections.length; ++i) - $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.encode(message.detections[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryHashSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryHashSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.binaryFamily = reader.string(); - break; - } - case 4: { - if (!(message.detections && message.detections.length)) - message.detections = []; - message.detections.push($root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryHashSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ExternalSystem assignees. + * @member {Array.} assignees + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.assignees = $util.emptyArray; - /** - * Verifies a MemoryHashSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MemoryHashSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) - if (!$util.isString(message.binaryFamily)) - return "binaryFamily: string expected"; - if (message.detections != null && message.hasOwnProperty("detections")) { - if (!Array.isArray(message.detections)) - return "detections: array expected"; - for (var i = 0; i < message.detections.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify(message.detections[i]); - if (error) - return "detections." + error; - } - } - return null; - }; + /** + * ExternalSystem externalUid. + * @member {string} externalUid + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.externalUid = ""; - /** - * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature - */ - MemoryHashSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) - return object; - var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); - if (object.binaryFamily != null) - message.binaryFamily = String(object.binaryFamily); - if (object.detections) { - if (!Array.isArray(object.detections)) - throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.detections: array expected"); - message.detections = []; - for (var i = 0; i < object.detections.length; ++i) { - if (typeof object.detections[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.detections: object expected"); - message.detections[i] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.fromObject(object.detections[i]); - } - } - return message; - }; + /** + * ExternalSystem status. + * @member {string} status + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.status = ""; - /** - * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} message MemoryHashSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MemoryHashSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.detections = []; - if (options.defaults) - object.binaryFamily = ""; - if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) - object.binaryFamily = message.binaryFamily; - if (message.detections && message.detections.length) { - object.detections = []; - for (var j = 0; j < message.detections.length; ++j) - object.detections[j] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.toObject(message.detections[j], options); - } - return object; - }; + /** + * ExternalSystem externalSystemUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} externalSystemUpdateTime + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.externalSystemUpdateTime = null; - /** - * Converts this MemoryHashSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @instance - * @returns {Object.} JSON object - */ - MemoryHashSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ExternalSystem caseUri. + * @member {string} caseUri + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.caseUri = ""; - /** - * Gets the default type url for MemoryHashSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MemoryHashSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature"; - }; + /** + * ExternalSystem casePriority. + * @member {string} casePriority + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.casePriority = ""; - MemoryHashSignature.Detection = (function() { + /** + * ExternalSystem caseSla. + * @member {google.protobuf.ITimestamp|null|undefined} caseSla + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.caseSla = null; - /** - * Properties of a Detection. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @interface IDetection - * @property {string|null} [binary] Detection binary - * @property {number|null} [percentPagesMatched] Detection percentPagesMatched - */ + /** + * ExternalSystem caseCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} caseCreateTime + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.caseCreateTime = null; - /** - * Constructs a new Detection. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - * @classdesc Represents a Detection. - * @implements IDetection - * @constructor - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set - */ - function Detection(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]]; - } + /** + * ExternalSystem caseCloseTime. + * @member {google.protobuf.ITimestamp|null|undefined} caseCloseTime + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.caseCloseTime = null; - /** - * Detection binary. - * @member {string} binary - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - */ - Detection.prototype.binary = ""; + /** + * ExternalSystem ticketInfo. + * @member {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo|null|undefined} ticketInfo + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + */ + ExternalSystem.prototype.ticketInfo = null; - /** - * Detection percentPagesMatched. - * @member {number} percentPagesMatched - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - */ - Detection.prototype.percentPagesMatched = 0; + /** + * Creates a new ExternalSystem instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {google.cloud.securitycenter.v1.IExternalSystem=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem instance + */ + ExternalSystem.create = function create(properties) { + return new ExternalSystem(properties); + }; - /** - * Creates a new Detection instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection instance - */ - Detection.create = function create(properties) { - return new Detection(properties); - }; + /** + * Encodes the specified ExternalSystem message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {google.cloud.securitycenter.v1.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalSystem.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.assignees != null && message.assignees.length) + for (var i = 0; i < message.assignees.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignees[i]); + if (message.externalUid != null && Object.hasOwnProperty.call(message, "externalUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalUid); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.status); + if (message.externalSystemUpdateTime != null && Object.hasOwnProperty.call(message, "externalSystemUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.externalSystemUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.caseUri != null && Object.hasOwnProperty.call(message, "caseUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.caseUri); + if (message.casePriority != null && Object.hasOwnProperty.call(message, "casePriority")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.casePriority); + if (message.ticketInfo != null && Object.hasOwnProperty.call(message, "ticketInfo")) + $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.encode(message.ticketInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.caseSla != null && Object.hasOwnProperty.call(message, "caseSla")) + $root.google.protobuf.Timestamp.encode(message.caseSla, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.caseCreateTime != null && Object.hasOwnProperty.call(message, "caseCreateTime")) + $root.google.protobuf.Timestamp.encode(message.caseCreateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.caseCloseTime != null && Object.hasOwnProperty.call(message, "caseCloseTime")) + $root.google.protobuf.Timestamp.encode(message.caseCloseTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detection.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.binary); - if (message.percentPagesMatched != null && Object.hasOwnProperty.call(message, "percentPagesMatched")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.percentPagesMatched); - return writer; - }; + /** + * Encodes the specified ExternalSystem message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {google.cloud.securitycenter.v1.IExternalSystem} message ExternalSystem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalSystem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Detection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an ExternalSystem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalSystem.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.cloud.securitycenter.v1.ExternalSystem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.assignees && message.assignees.length)) + message.assignees = []; + message.assignees.push(reader.string()); + break; + } + case 3: { + message.externalUid = reader.string(); + break; + } + case 4: { + message.status = reader.string(); + break; + } + case 5: { + message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.caseUri = reader.string(); + break; + } + case 7: { + message.casePriority = reader.string(); + break; + } + case 9: { + message.caseSla = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.caseCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.caseCloseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Detection message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detection.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.binary = reader.string(); - break; - } - case 3: { - message.percentPagesMatched = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes an ExternalSystem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalSystem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Detection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Detection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies an ExternalSystem message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExternalSystem.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.assignees != null && message.hasOwnProperty("assignees")) { + if (!Array.isArray(message.assignees)) + return "assignees: array expected"; + for (var i = 0; i < message.assignees.length; ++i) + if (!$util.isString(message.assignees[i])) + return "assignees: string[] expected"; + } + if (message.externalUid != null && message.hasOwnProperty("externalUid")) + if (!$util.isString(message.externalUid)) + return "externalUid: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.externalSystemUpdateTime); + if (error) + return "externalSystemUpdateTime." + error; + } + if (message.caseUri != null && message.hasOwnProperty("caseUri")) + if (!$util.isString(message.caseUri)) + return "caseUri: string expected"; + if (message.casePriority != null && message.hasOwnProperty("casePriority")) + if (!$util.isString(message.casePriority)) + return "casePriority: string expected"; + if (message.caseSla != null && message.hasOwnProperty("caseSla")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseSla); + if (error) + return "caseSla." + error; + } + if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseCreateTime); + if (error) + return "caseCreateTime." + error; + } + if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.caseCloseTime); + if (error) + return "caseCloseTime." + error; + } + if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) { + var error = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify(message.ticketInfo); + if (error) + return "ticketInfo." + error; + } + return null; + }; - /** - * Verifies a Detection message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Detection.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binary != null && message.hasOwnProperty("binary")) - if (!$util.isString(message.binary)) - return "binary: string expected"; - if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) - if (typeof message.percentPagesMatched !== "number") - return "percentPagesMatched: number expected"; - return null; - }; + /** + * Creates an ExternalSystem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ExternalSystem} ExternalSystem + */ + ExternalSystem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ExternalSystem) + return object; + var message = new $root.google.cloud.securitycenter.v1.ExternalSystem(); + if (object.name != null) + message.name = String(object.name); + if (object.assignees) { + if (!Array.isArray(object.assignees)) + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.assignees: array expected"); + message.assignees = []; + for (var i = 0; i < object.assignees.length; ++i) + message.assignees[i] = String(object.assignees[i]); + } + if (object.externalUid != null) + message.externalUid = String(object.externalUid); + if (object.status != null) + message.status = String(object.status); + if (object.externalSystemUpdateTime != null) { + if (typeof object.externalSystemUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.externalSystemUpdateTime: object expected"); + message.externalSystemUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.externalSystemUpdateTime); + } + if (object.caseUri != null) + message.caseUri = String(object.caseUri); + if (object.casePriority != null) + message.casePriority = String(object.casePriority); + if (object.caseSla != null) { + if (typeof object.caseSla !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseSla: object expected"); + message.caseSla = $root.google.protobuf.Timestamp.fromObject(object.caseSla); + } + if (object.caseCreateTime != null) { + if (typeof object.caseCreateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseCreateTime: object expected"); + message.caseCreateTime = $root.google.protobuf.Timestamp.fromObject(object.caseCreateTime); + } + if (object.caseCloseTime != null) { + if (typeof object.caseCloseTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.caseCloseTime: object expected"); + message.caseCloseTime = $root.google.protobuf.Timestamp.fromObject(object.caseCloseTime); + } + if (object.ticketInfo != null) { + if (typeof object.ticketInfo !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.ticketInfo: object expected"); + message.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.fromObject(object.ticketInfo); + } + return message; + }; - /** - * Creates a Detection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection - */ - Detection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) - return object; - var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(); - if (object.binary != null) - message.binary = String(object.binary); - if (object.percentPagesMatched != null) - message.percentPagesMatched = Number(object.percentPagesMatched); - return message; - }; + /** + * Creates a plain object from an ExternalSystem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {google.cloud.securitycenter.v1.ExternalSystem} message ExternalSystem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExternalSystem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assignees = []; + if (options.defaults) { + object.name = ""; + object.externalUid = ""; + object.status = ""; + object.externalSystemUpdateTime = null; + object.caseUri = ""; + object.casePriority = ""; + object.ticketInfo = null; + object.caseSla = null; + object.caseCreateTime = null; + object.caseCloseTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.assignees && message.assignees.length) { + object.assignees = []; + for (var j = 0; j < message.assignees.length; ++j) + object.assignees[j] = message.assignees[j]; + } + if (message.externalUid != null && message.hasOwnProperty("externalUid")) + object.externalUid = message.externalUid; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.externalSystemUpdateTime != null && message.hasOwnProperty("externalSystemUpdateTime")) + object.externalSystemUpdateTime = $root.google.protobuf.Timestamp.toObject(message.externalSystemUpdateTime, options); + if (message.caseUri != null && message.hasOwnProperty("caseUri")) + object.caseUri = message.caseUri; + if (message.casePriority != null && message.hasOwnProperty("casePriority")) + object.casePriority = message.casePriority; + if (message.ticketInfo != null && message.hasOwnProperty("ticketInfo")) + object.ticketInfo = $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.toObject(message.ticketInfo, options); + if (message.caseSla != null && message.hasOwnProperty("caseSla")) + object.caseSla = $root.google.protobuf.Timestamp.toObject(message.caseSla, options); + if (message.caseCreateTime != null && message.hasOwnProperty("caseCreateTime")) + object.caseCreateTime = $root.google.protobuf.Timestamp.toObject(message.caseCreateTime, options); + if (message.caseCloseTime != null && message.hasOwnProperty("caseCloseTime")) + object.caseCloseTime = $root.google.protobuf.Timestamp.toObject(message.caseCloseTime, options); + return object; + }; - /** - * Creates a plain object from a Detection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} message Detection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Detection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.binary = ""; - object.percentPagesMatched = 0; - } - if (message.binary != null && message.hasOwnProperty("binary")) - object.binary = message.binary; - if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) - object.percentPagesMatched = options.json && !isFinite(message.percentPagesMatched) ? String(message.percentPagesMatched) : message.percentPagesMatched; - return object; - }; + /** + * Converts this ExternalSystem to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @instance + * @returns {Object.} JSON object + */ + ExternalSystem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Detection to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @instance - * @returns {Object.} JSON object - */ - Detection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ExternalSystem + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalSystem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExternalSystem"; + }; - /** - * Gets the default type url for Detection - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Detection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection"; - }; + ExternalSystem.TicketInfo = (function() { - return Detection; - })(); + /** + * Properties of a TicketInfo. + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @interface ITicketInfo + * @property {string|null} [id] TicketInfo id + * @property {string|null} [assignee] TicketInfo assignee + * @property {string|null} [description] TicketInfo description + * @property {string|null} [uri] TicketInfo uri + * @property {string|null} [status] TicketInfo status + * @property {google.protobuf.ITimestamp|null} [updateTime] TicketInfo updateTime + */ - return MemoryHashSignature; - })(); + /** + * Constructs a new TicketInfo. + * @memberof google.cloud.securitycenter.v1.ExternalSystem + * @classdesc Represents a TicketInfo. + * @implements ITicketInfo + * @constructor + * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo=} [properties] Properties to set + */ + function TicketInfo(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]]; + } - ProcessSignature.YaraRuleSignature = (function() { + /** + * TicketInfo id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.id = ""; - /** - * Properties of a YaraRuleSignature. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @interface IYaraRuleSignature - * @property {string|null} [yaraRule] YaraRuleSignature yaraRule - */ + /** + * TicketInfo assignee. + * @member {string} assignee + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.assignee = ""; - /** - * Constructs a new YaraRuleSignature. - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature - * @classdesc Represents a YaraRuleSignature. - * @implements IYaraRuleSignature - * @constructor - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set - */ - function YaraRuleSignature(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]]; - } + /** + * TicketInfo description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.description = ""; - /** - * YaraRuleSignature yaraRule. - * @member {string} yaraRule - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @instance - */ - YaraRuleSignature.prototype.yaraRule = ""; + /** + * TicketInfo uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.uri = ""; - /** - * Creates a new YaraRuleSignature instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature instance - */ - YaraRuleSignature.create = function create(properties) { - return new YaraRuleSignature(properties); - }; + /** + * TicketInfo status. + * @member {string} status + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.status = ""; - /** - * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YaraRuleSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yaraRule != null && Object.hasOwnProperty.call(message, "yaraRule")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.yaraRule); - return writer; - }; + /** + * TicketInfo updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + */ + TicketInfo.prototype.updateTime = null; - /** - * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - YaraRuleSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new TicketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo instance + */ + TicketInfo.create = function create(properties) { + return new TicketInfo(properties); + }; - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YaraRuleSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.yaraRule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified TicketInfo message. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TicketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.assignee != null && Object.hasOwnProperty.call(message, "assignee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assignee); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.status); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - YaraRuleSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified TicketInfo message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v1.ExternalSystem.ITicketInfo} message TicketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TicketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a YaraRuleSignature message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - YaraRuleSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) - if (!$util.isString(message.yaraRule)) - return "yaraRule: string expected"; - return null; - }; + /** + * Decodes a TicketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TicketInfo.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.cloud.securitycenter.v1.ExternalSystem.TicketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.assignee = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.uri = reader.string(); + break; + } + case 5: { + message.status = reader.string(); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature - */ - YaraRuleSignature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) - return object; - var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); - if (object.yaraRule != null) - message.yaraRule = String(object.yaraRule); - return message; - }; + /** + * Decodes a TicketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TicketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} message YaraRuleSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - YaraRuleSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.yaraRule = ""; - if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) - object.yaraRule = message.yaraRule; - return object; - }; + /** + * Verifies a TicketInfo message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TicketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.assignee != null && message.hasOwnProperty("assignee")) + if (!$util.isString(message.assignee)) + return "assignee: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; - /** - * Converts this YaraRuleSignature to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @instance - * @returns {Object.} JSON object - */ - YaraRuleSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a TicketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} TicketInfo + */ + TicketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo) + return object; + var message = new $root.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.assignee != null) + message.assignee = String(object.assignee); + if (object.description != null) + message.description = String(object.description); + if (object.uri != null) + message.uri = String(object.uri); + if (object.status != null) + message.status = String(object.status); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ExternalSystem.TicketInfo.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * Gets the default type url for YaraRuleSignature - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - YaraRuleSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature"; - }; + /** + * Creates a plain object from a TicketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {google.cloud.securitycenter.v1.ExternalSystem.TicketInfo} message TicketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TicketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.assignee = ""; + object.description = ""; + object.uri = ""; + object.status = ""; + object.updateTime = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.assignee != null && message.hasOwnProperty("assignee")) + object.assignee = message.assignee; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - return YaraRuleSignature; - })(); + /** + * Converts this TicketInfo to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @instance + * @returns {Object.} JSON object + */ + TicketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * SignatureType enum. - * @name google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType - * @enum {number} - * @property {number} SIGNATURE_TYPE_UNSPECIFIED=0 SIGNATURE_TYPE_UNSPECIFIED value - * @property {number} SIGNATURE_TYPE_PROCESS=1 SIGNATURE_TYPE_PROCESS value - * @property {number} SIGNATURE_TYPE_FILE=2 SIGNATURE_TYPE_FILE value + * Gets the default type url for TicketInfo + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ExternalSystem.TicketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ProcessSignature.SignatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIGNATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SIGNATURE_TYPE_PROCESS"] = 1; - values[valuesById[2] = "SIGNATURE_TYPE_FILE"] = 2; - return values; - })(); + TicketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ExternalSystem.TicketInfo"; + }; - return ProcessSignature; + return TicketInfo; })(); - return Indicator; + return ExternalSystem; })(); - v1.KernelRootkit = (function() { + v1.File = (function() { /** - * Properties of a KernelRootkit. + * Properties of a File. * @memberof google.cloud.securitycenter.v1 - * @interface IKernelRootkit - * @property {string|null} [name] KernelRootkit name - * @property {boolean|null} [unexpectedCodeModification] KernelRootkit unexpectedCodeModification - * @property {boolean|null} [unexpectedReadOnlyDataModification] KernelRootkit unexpectedReadOnlyDataModification - * @property {boolean|null} [unexpectedFtraceHandler] KernelRootkit unexpectedFtraceHandler - * @property {boolean|null} [unexpectedKprobeHandler] KernelRootkit unexpectedKprobeHandler - * @property {boolean|null} [unexpectedKernelCodePages] KernelRootkit unexpectedKernelCodePages - * @property {boolean|null} [unexpectedSystemCallHandler] KernelRootkit unexpectedSystemCallHandler - * @property {boolean|null} [unexpectedInterruptHandler] KernelRootkit unexpectedInterruptHandler - * @property {boolean|null} [unexpectedProcessesInRunqueue] KernelRootkit unexpectedProcessesInRunqueue + * @interface IFile + * @property {string|null} [path] File path + * @property {number|Long|null} [size] File size + * @property {string|null} [sha256] File sha256 + * @property {number|Long|null} [hashedSize] File hashedSize + * @property {boolean|null} [partiallyHashed] File partiallyHashed + * @property {string|null} [contents] File contents + * @property {google.cloud.securitycenter.v1.File.IDiskPath|null} [diskPath] File diskPath */ /** - * Constructs a new KernelRootkit. + * Constructs a new File. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a KernelRootkit. - * @implements IKernelRootkit + * @classdesc Represents a File. + * @implements IFile * @constructor - * @param {google.cloud.securitycenter.v1.IKernelRootkit=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IFile=} [properties] Properties to set */ - function KernelRootkit(properties) { + function File(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14613,187 +13659,159 @@ } /** - * KernelRootkit name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.KernelRootkit - * @instance - */ - KernelRootkit.prototype.name = ""; - - /** - * KernelRootkit unexpectedCodeModification. - * @member {boolean} unexpectedCodeModification - * @memberof google.cloud.securitycenter.v1.KernelRootkit - * @instance - */ - KernelRootkit.prototype.unexpectedCodeModification = false; - - /** - * KernelRootkit unexpectedReadOnlyDataModification. - * @member {boolean} unexpectedReadOnlyDataModification - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File path. + * @member {string} path + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedReadOnlyDataModification = false; + File.prototype.path = ""; /** - * KernelRootkit unexpectedFtraceHandler. - * @member {boolean} unexpectedFtraceHandler - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File size. + * @member {number|Long} size + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedFtraceHandler = false; + File.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * KernelRootkit unexpectedKprobeHandler. - * @member {boolean} unexpectedKprobeHandler - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File sha256. + * @member {string} sha256 + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedKprobeHandler = false; + File.prototype.sha256 = ""; /** - * KernelRootkit unexpectedKernelCodePages. - * @member {boolean} unexpectedKernelCodePages - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File hashedSize. + * @member {number|Long} hashedSize + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedKernelCodePages = false; + File.prototype.hashedSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * KernelRootkit unexpectedSystemCallHandler. - * @member {boolean} unexpectedSystemCallHandler - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File partiallyHashed. + * @member {boolean} partiallyHashed + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedSystemCallHandler = false; + File.prototype.partiallyHashed = false; /** - * KernelRootkit unexpectedInterruptHandler. - * @member {boolean} unexpectedInterruptHandler - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File contents. + * @member {string} contents + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedInterruptHandler = false; + File.prototype.contents = ""; /** - * KernelRootkit unexpectedProcessesInRunqueue. - * @member {boolean} unexpectedProcessesInRunqueue - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * File diskPath. + * @member {google.cloud.securitycenter.v1.File.IDiskPath|null|undefined} diskPath + * @memberof google.cloud.securitycenter.v1.File * @instance */ - KernelRootkit.prototype.unexpectedProcessesInRunqueue = false; + File.prototype.diskPath = null; /** - * Creates a new KernelRootkit instance using the specified properties. + * Creates a new File instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static - * @param {google.cloud.securitycenter.v1.IKernelRootkit=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit instance + * @param {google.cloud.securitycenter.v1.IFile=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.File} File instance */ - KernelRootkit.create = function create(properties) { - return new KernelRootkit(properties); + File.create = function create(properties) { + return new File(properties); }; /** - * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * Encodes the specified File message. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static - * @param {google.cloud.securitycenter.v1.IKernelRootkit} message KernelRootkit message or plain object to encode + * @param {google.cloud.securitycenter.v1.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KernelRootkit.encode = function encode(message, writer) { + File.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.unexpectedCodeModification != null && Object.hasOwnProperty.call(message, "unexpectedCodeModification")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.unexpectedCodeModification); - if (message.unexpectedReadOnlyDataModification != null && Object.hasOwnProperty.call(message, "unexpectedReadOnlyDataModification")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unexpectedReadOnlyDataModification); - if (message.unexpectedFtraceHandler != null && Object.hasOwnProperty.call(message, "unexpectedFtraceHandler")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unexpectedFtraceHandler); - if (message.unexpectedKprobeHandler != null && Object.hasOwnProperty.call(message, "unexpectedKprobeHandler")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unexpectedKprobeHandler); - if (message.unexpectedKernelCodePages != null && Object.hasOwnProperty.call(message, "unexpectedKernelCodePages")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.unexpectedKernelCodePages); - if (message.unexpectedSystemCallHandler != null && Object.hasOwnProperty.call(message, "unexpectedSystemCallHandler")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.unexpectedSystemCallHandler); - if (message.unexpectedInterruptHandler != null && Object.hasOwnProperty.call(message, "unexpectedInterruptHandler")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.unexpectedInterruptHandler); - if (message.unexpectedProcessesInRunqueue != null && Object.hasOwnProperty.call(message, "unexpectedProcessesInRunqueue")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.unexpectedProcessesInRunqueue); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.size != null && Object.hasOwnProperty.call(message, "size")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.size); + if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sha256); + if (message.hashedSize != null && Object.hasOwnProperty.call(message, "hashedSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.hashedSize); + if (message.partiallyHashed != null && Object.hasOwnProperty.call(message, "partiallyHashed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.partiallyHashed); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.contents); + if (message.diskPath != null && Object.hasOwnProperty.call(message, "diskPath")) + $root.google.cloud.securitycenter.v1.File.DiskPath.encode(message.diskPath, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * Encodes the specified File message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static - * @param {google.cloud.securitycenter.v1.IKernelRootkit} message KernelRootkit message or plain object to encode + * @param {google.cloud.securitycenter.v1.IFile} message File message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KernelRootkit.encodeDelimited = function encodeDelimited(message, writer) { + File.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KernelRootkit message from the specified reader or buffer. + * Decodes a File message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + * @returns {google.cloud.securitycenter.v1.File} File * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KernelRootkit.decode = function decode(reader, length) { + File.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.cloud.securitycenter.v1.KernelRootkit(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.File(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.path = reader.string(); break; } case 2: { - message.unexpectedCodeModification = reader.bool(); + message.size = reader.int64(); break; } case 3: { - message.unexpectedReadOnlyDataModification = reader.bool(); + message.sha256 = reader.string(); break; } case 4: { - message.unexpectedFtraceHandler = reader.bool(); + message.hashedSize = reader.int64(); break; } case 5: { - message.unexpectedKprobeHandler = reader.bool(); + message.partiallyHashed = reader.bool(); break; } case 6: { - message.unexpectedKernelCodePages = reader.bool(); + message.contents = reader.string(); break; } case 7: { - message.unexpectedSystemCallHandler = reader.bool(); - break; - } - case 8: { - message.unexpectedInterruptHandler = reader.bool(); - break; - } - case 9: { - message.unexpectedProcessesInRunqueue = reader.bool(); + message.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.decode(reader, reader.uint32()); break; } default: @@ -14805,200 +13823,492 @@ }; /** - * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * Decodes a File message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + * @returns {google.cloud.securitycenter.v1.File} File * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KernelRootkit.decodeDelimited = function decodeDelimited(reader) { + File.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KernelRootkit message. + * Verifies a File message. * @function verify - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KernelRootkit.verify = function verify(message) { + File.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.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) - if (typeof message.unexpectedCodeModification !== "boolean") - return "unexpectedCodeModification: boolean expected"; - if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) - if (typeof message.unexpectedReadOnlyDataModification !== "boolean") - return "unexpectedReadOnlyDataModification: boolean expected"; - if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) - if (typeof message.unexpectedFtraceHandler !== "boolean") - return "unexpectedFtraceHandler: boolean expected"; - if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) - if (typeof message.unexpectedKprobeHandler !== "boolean") - return "unexpectedKprobeHandler: boolean expected"; - if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) - if (typeof message.unexpectedKernelCodePages !== "boolean") - return "unexpectedKernelCodePages: boolean expected"; - if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) - if (typeof message.unexpectedSystemCallHandler !== "boolean") - return "unexpectedSystemCallHandler: boolean expected"; - if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) - if (typeof message.unexpectedInterruptHandler !== "boolean") - return "unexpectedInterruptHandler: boolean expected"; - if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) - if (typeof message.unexpectedProcessesInRunqueue !== "boolean") - return "unexpectedProcessesInRunqueue: boolean expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.size != null && message.hasOwnProperty("size")) + if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high))) + return "size: integer|Long expected"; + if (message.sha256 != null && message.hasOwnProperty("sha256")) + if (!$util.isString(message.sha256)) + return "sha256: string expected"; + if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) + if (!$util.isInteger(message.hashedSize) && !(message.hashedSize && $util.isInteger(message.hashedSize.low) && $util.isInteger(message.hashedSize.high))) + return "hashedSize: integer|Long expected"; + if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) + if (typeof message.partiallyHashed !== "boolean") + return "partiallyHashed: boolean expected"; + if (message.contents != null && message.hasOwnProperty("contents")) + if (!$util.isString(message.contents)) + return "contents: string expected"; + if (message.diskPath != null && message.hasOwnProperty("diskPath")) { + var error = $root.google.cloud.securitycenter.v1.File.DiskPath.verify(message.diskPath); + if (error) + return "diskPath." + error; + } return null; }; /** - * Creates a KernelRootkit message from a plain object. Also converts values to their respective internal types. + * Creates a File message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + * @returns {google.cloud.securitycenter.v1.File} File */ - KernelRootkit.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.KernelRootkit) + File.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.File) return object; - var message = new $root.google.cloud.securitycenter.v1.KernelRootkit(); - if (object.name != null) - message.name = String(object.name); - if (object.unexpectedCodeModification != null) - message.unexpectedCodeModification = Boolean(object.unexpectedCodeModification); - if (object.unexpectedReadOnlyDataModification != null) - message.unexpectedReadOnlyDataModification = Boolean(object.unexpectedReadOnlyDataModification); - if (object.unexpectedFtraceHandler != null) - message.unexpectedFtraceHandler = Boolean(object.unexpectedFtraceHandler); - if (object.unexpectedKprobeHandler != null) - message.unexpectedKprobeHandler = Boolean(object.unexpectedKprobeHandler); - if (object.unexpectedKernelCodePages != null) - message.unexpectedKernelCodePages = Boolean(object.unexpectedKernelCodePages); - if (object.unexpectedSystemCallHandler != null) - message.unexpectedSystemCallHandler = Boolean(object.unexpectedSystemCallHandler); - if (object.unexpectedInterruptHandler != null) - message.unexpectedInterruptHandler = Boolean(object.unexpectedInterruptHandler); - if (object.unexpectedProcessesInRunqueue != null) - message.unexpectedProcessesInRunqueue = Boolean(object.unexpectedProcessesInRunqueue); + var message = new $root.google.cloud.securitycenter.v1.File(); + if (object.path != null) + message.path = String(object.path); + if (object.size != null) + if ($util.Long) + (message.size = $util.Long.fromValue(object.size)).unsigned = false; + else if (typeof object.size === "string") + message.size = parseInt(object.size, 10); + else if (typeof object.size === "number") + message.size = object.size; + else if (typeof object.size === "object") + message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(); + if (object.sha256 != null) + message.sha256 = String(object.sha256); + if (object.hashedSize != null) + if ($util.Long) + (message.hashedSize = $util.Long.fromValue(object.hashedSize)).unsigned = false; + else if (typeof object.hashedSize === "string") + message.hashedSize = parseInt(object.hashedSize, 10); + else if (typeof object.hashedSize === "number") + message.hashedSize = object.hashedSize; + else if (typeof object.hashedSize === "object") + message.hashedSize = new $util.LongBits(object.hashedSize.low >>> 0, object.hashedSize.high >>> 0).toNumber(); + if (object.partiallyHashed != null) + message.partiallyHashed = Boolean(object.partiallyHashed); + if (object.contents != null) + message.contents = String(object.contents); + if (object.diskPath != null) { + if (typeof object.diskPath !== "object") + throw TypeError(".google.cloud.securitycenter.v1.File.diskPath: object expected"); + message.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.fromObject(object.diskPath); + } return message; }; /** - * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. + * Creates a plain object from a File message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static - * @param {google.cloud.securitycenter.v1.KernelRootkit} message KernelRootkit + * @param {google.cloud.securitycenter.v1.File} message File * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KernelRootkit.toObject = function toObject(message, options) { + File.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.unexpectedCodeModification = false; - object.unexpectedReadOnlyDataModification = false; - object.unexpectedFtraceHandler = false; - object.unexpectedKprobeHandler = false; - object.unexpectedKernelCodePages = false; - object.unexpectedSystemCallHandler = false; - object.unexpectedInterruptHandler = false; - object.unexpectedProcessesInRunqueue = false; + object.path = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.size = options.longs === String ? "0" : 0; + object.sha256 = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hashedSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hashedSize = options.longs === String ? "0" : 0; + object.partiallyHashed = false; + object.contents = ""; + object.diskPath = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) - object.unexpectedCodeModification = message.unexpectedCodeModification; - if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) - object.unexpectedReadOnlyDataModification = message.unexpectedReadOnlyDataModification; - if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) - object.unexpectedFtraceHandler = message.unexpectedFtraceHandler; - if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) - object.unexpectedKprobeHandler = message.unexpectedKprobeHandler; - if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) - object.unexpectedKernelCodePages = message.unexpectedKernelCodePages; - if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) - object.unexpectedSystemCallHandler = message.unexpectedSystemCallHandler; - if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) - object.unexpectedInterruptHandler = message.unexpectedInterruptHandler; - if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) - object.unexpectedProcessesInRunqueue = message.unexpectedProcessesInRunqueue; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.size != null && message.hasOwnProperty("size")) + if (typeof message.size === "number") + object.size = options.longs === String ? String(message.size) : message.size; + else + object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber() : message.size; + if (message.sha256 != null && message.hasOwnProperty("sha256")) + object.sha256 = message.sha256; + if (message.hashedSize != null && message.hasOwnProperty("hashedSize")) + if (typeof message.hashedSize === "number") + object.hashedSize = options.longs === String ? String(message.hashedSize) : message.hashedSize; + else + object.hashedSize = options.longs === String ? $util.Long.prototype.toString.call(message.hashedSize) : options.longs === Number ? new $util.LongBits(message.hashedSize.low >>> 0, message.hashedSize.high >>> 0).toNumber() : message.hashedSize; + if (message.partiallyHashed != null && message.hasOwnProperty("partiallyHashed")) + object.partiallyHashed = message.partiallyHashed; + if (message.contents != null && message.hasOwnProperty("contents")) + object.contents = message.contents; + if (message.diskPath != null && message.hasOwnProperty("diskPath")) + object.diskPath = $root.google.cloud.securitycenter.v1.File.DiskPath.toObject(message.diskPath, options); return object; }; /** - * Converts this KernelRootkit to JSON. + * Converts this File to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @instance * @returns {Object.} JSON object */ - KernelRootkit.prototype.toJSON = function toJSON() { + File.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KernelRootkit + * Gets the default type url for File * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @memberof google.cloud.securitycenter.v1.File * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KernelRootkit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + File.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.KernelRootkit"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.File"; }; - return KernelRootkit; + File.DiskPath = (function() { + + /** + * Properties of a DiskPath. + * @memberof google.cloud.securitycenter.v1.File + * @interface IDiskPath + * @property {string|null} [partitionUuid] DiskPath partitionUuid + * @property {string|null} [relativePath] DiskPath relativePath + */ + + /** + * Constructs a new DiskPath. + * @memberof google.cloud.securitycenter.v1.File + * @classdesc Represents a DiskPath. + * @implements IDiskPath + * @constructor + * @param {google.cloud.securitycenter.v1.File.IDiskPath=} [properties] Properties to set + */ + function DiskPath(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]]; + } + + /** + * DiskPath partitionUuid. + * @member {string} partitionUuid + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @instance + */ + DiskPath.prototype.partitionUuid = ""; + + /** + * DiskPath relativePath. + * @member {string} relativePath + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @instance + */ + DiskPath.prototype.relativePath = ""; + + /** + * Creates a new DiskPath instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v1.File.IDiskPath=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath instance + */ + DiskPath.create = function create(properties) { + return new DiskPath(properties); + }; + + /** + * Encodes the specified DiskPath message. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v1.File.IDiskPath} message DiskPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiskPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitionUuid != null && Object.hasOwnProperty.call(message, "partitionUuid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partitionUuid); + if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePath); + return writer; + }; + + /** + * Encodes the specified DiskPath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.File.DiskPath.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v1.File.IDiskPath} message DiskPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiskPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiskPath message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiskPath.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.cloud.securitycenter.v1.File.DiskPath(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partitionUuid = reader.string(); + break; + } + case 2: { + message.relativePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiskPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiskPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiskPath message. + * @function verify + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiskPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) + if (!$util.isString(message.partitionUuid)) + return "partitionUuid: string expected"; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; + return null; + }; + + /** + * Creates a DiskPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.File.DiskPath} DiskPath + */ + DiskPath.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.File.DiskPath) + return object; + var message = new $root.google.cloud.securitycenter.v1.File.DiskPath(); + if (object.partitionUuid != null) + message.partitionUuid = String(object.partitionUuid); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); + return message; + }; + + /** + * Creates a plain object from a DiskPath message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {google.cloud.securitycenter.v1.File.DiskPath} message DiskPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiskPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partitionUuid = ""; + object.relativePath = ""; + } + if (message.partitionUuid != null && message.hasOwnProperty("partitionUuid")) + object.partitionUuid = message.partitionUuid; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + return object; + }; + + /** + * Converts this DiskPath to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @instance + * @returns {Object.} JSON object + */ + DiskPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiskPath + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.File.DiskPath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiskPath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.File.DiskPath"; + }; + + return DiskPath; + })(); + + return File; })(); - v1.Kubernetes = (function() { + v1.Finding = (function() { /** - * Properties of a Kubernetes. + * Properties of a Finding. * @memberof google.cloud.securitycenter.v1 - * @interface IKubernetes - * @property {Array.|null} [pods] Kubernetes pods - * @property {Array.|null} [nodes] Kubernetes nodes - * @property {Array.|null} [nodePools] Kubernetes nodePools - * @property {Array.|null} [roles] Kubernetes roles - * @property {Array.|null} [bindings] Kubernetes bindings - * @property {Array.|null} [accessReviews] Kubernetes accessReviews - * @property {Array.|null} [objects] Kubernetes objects + * @interface IFinding + * @property {string|null} [name] Finding name + * @property {string|null} [parent] Finding parent + * @property {string|null} [resourceName] Finding resourceName + * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] Finding state + * @property {string|null} [category] Finding category + * @property {string|null} [externalUri] Finding externalUri + * @property {Object.|null} [sourceProperties] Finding sourceProperties + * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] Finding securityMarks + * @property {google.protobuf.ITimestamp|null} [eventTime] Finding eventTime + * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime + * @property {google.cloud.securitycenter.v1.Finding.Severity|null} [severity] Finding severity + * @property {string|null} [canonicalName] Finding canonicalName + * @property {google.cloud.securitycenter.v1.Finding.Mute|null} [mute] Finding mute + * @property {google.cloud.securitycenter.v1.Finding.FindingClass|null} [findingClass] Finding findingClass + * @property {google.cloud.securitycenter.v1.IIndicator|null} [indicator] Finding indicator + * @property {google.cloud.securitycenter.v1.IVulnerability|null} [vulnerability] Finding vulnerability + * @property {google.protobuf.ITimestamp|null} [muteUpdateTime] Finding muteUpdateTime + * @property {Object.|null} [externalSystems] Finding externalSystems + * @property {google.cloud.securitycenter.v1.IMitreAttack|null} [mitreAttack] Finding mitreAttack + * @property {google.cloud.securitycenter.v1.IAccess|null} [access] Finding access + * @property {Array.|null} [connections] Finding connections + * @property {string|null} [muteInitiator] Finding muteInitiator + * @property {Array.|null} [processes] Finding processes + * @property {Object.|null} [contacts] Finding contacts + * @property {Array.|null} [compliances] Finding compliances + * @property {string|null} [parentDisplayName] Finding parentDisplayName + * @property {string|null} [description] Finding description + * @property {google.cloud.securitycenter.v1.IExfiltration|null} [exfiltration] Finding exfiltration + * @property {Array.|null} [iamBindings] Finding iamBindings + * @property {string|null} [nextSteps] Finding nextSteps + * @property {string|null} [moduleName] Finding moduleName + * @property {Array.|null} [containers] Finding containers + * @property {google.cloud.securitycenter.v1.IKubernetes|null} [kubernetes] Finding kubernetes + * @property {google.cloud.securitycenter.v1.IDatabase|null} [database] Finding database + * @property {google.cloud.securitycenter.v1.IAttackExposure|null} [attackExposure] Finding attackExposure + * @property {Array.|null} [files] Finding files + * @property {google.cloud.securitycenter.v1.ICloudDlpInspection|null} [cloudDlpInspection] Finding cloudDlpInspection + * @property {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null} [cloudDlpDataProfile] Finding cloudDlpDataProfile + * @property {google.cloud.securitycenter.v1.IKernelRootkit|null} [kernelRootkit] Finding kernelRootkit + * @property {Array.|null} [orgPolicies] Finding orgPolicies + * @property {google.cloud.securitycenter.v1.IApplication|null} [application] Finding application + * @property {google.cloud.securitycenter.v1.IBackupDisasterRecovery|null} [backupDisasterRecovery] Finding backupDisasterRecovery + * @property {google.cloud.securitycenter.v1.ISecurityPosture|null} [securityPosture] Finding securityPosture + * @property {Array.|null} [logEntries] Finding logEntries + * @property {Array.|null} [loadBalancers] Finding loadBalancers + * @property {google.cloud.securitycenter.v1.ICloudArmor|null} [cloudArmor] Finding cloudArmor + * @property {google.cloud.securitycenter.v1.INotebook|null} [notebook] Finding notebook + * @property {google.cloud.securitycenter.v1.IToxicCombination|null} [toxicCombination] Finding toxicCombination + * @property {Array.|null} [groupMemberships] Finding groupMemberships */ /** - * Constructs a new Kubernetes. + * Constructs a new Finding. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Kubernetes. - * @implements IKubernetes + * @classdesc Represents a Finding. + * @implements IFinding * @constructor - * @param {google.cloud.securitycenter.v1.IKubernetes=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set */ - function Kubernetes(properties) { - this.pods = []; - this.nodes = []; - this.nodePools = []; - this.roles = []; - this.bindings = []; - this.accessReviews = []; - this.objects = []; + function Finding(properties) { + this.sourceProperties = {}; + this.externalSystems = {}; + this.connections = []; + this.processes = []; + this.contacts = {}; + this.compliances = []; + this.iamBindings = []; + this.containers = []; + this.files = []; + this.orgPolicies = []; + this.logEntries = []; + this.loadBalancers = []; + this.groupMemberships = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15006,2993 +14316,1906 @@ } /** - * Kubernetes pods. - * @member {Array.} pods - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.pods = $util.emptyArray; + Finding.prototype.name = ""; /** - * Kubernetes nodes. - * @member {Array.} nodes - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.nodes = $util.emptyArray; + Finding.prototype.parent = ""; /** - * Kubernetes nodePools. - * @member {Array.} nodePools - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.nodePools = $util.emptyArray; + Finding.prototype.resourceName = ""; /** - * Kubernetes roles. - * @member {Array.} roles - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding state. + * @member {google.cloud.securitycenter.v1.Finding.State} state + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.roles = $util.emptyArray; + Finding.prototype.state = 0; /** - * Kubernetes bindings. - * @member {Array.} bindings - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding category. + * @member {string} category + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.bindings = $util.emptyArray; + Finding.prototype.category = ""; /** - * Kubernetes accessReviews. - * @member {Array.} accessReviews - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding externalUri. + * @member {string} externalUri + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.accessReviews = $util.emptyArray; + Finding.prototype.externalUri = ""; /** - * Kubernetes objects. - * @member {Array.} objects - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding sourceProperties. + * @member {Object.} sourceProperties + * @memberof google.cloud.securitycenter.v1.Finding * @instance */ - Kubernetes.prototype.objects = $util.emptyArray; + Finding.prototype.sourceProperties = $util.emptyObject; /** - * Creates a new Kubernetes instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {google.cloud.securitycenter.v1.IKubernetes=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes instance + * Finding securityMarks. + * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.create = function create(properties) { - return new Kubernetes(properties); - }; + Finding.prototype.securityMarks = null; /** - * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {google.cloud.securitycenter.v1.IKubernetes} message Kubernetes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pods != null && message.pods.length) - for (var i = 0; i < message.pods.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Pod.encode(message.pods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nodes != null && message.nodes.length) - for (var i = 0; i < message.nodes.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nodePools != null && message.nodePools.length) - for (var i = 0; i < message.nodePools.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.encode(message.nodePools[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.roles != null && message.roles.length) - for (var i = 0; i < message.roles.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Role.encode(message.roles[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Binding.encode(message.bindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.accessReviews != null && message.accessReviews.length) - for (var i = 0; i < message.accessReviews.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.encode(message.accessReviews[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.objects != null && message.objects.length) - for (var i = 0; i < message.objects.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Object.encode(message.objects[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; + Finding.prototype.eventTime = null; /** - * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {google.cloud.securitycenter.v1.IKubernetes} message Kubernetes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Finding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Finding.prototype.createTime = null; /** - * Decodes a Kubernetes message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding severity. + * @member {google.cloud.securitycenter.v1.Finding.Severity} severity + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.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.cloud.securitycenter.v1.Kubernetes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.pods && message.pods.length)) - message.pods = []; - message.pods.push($root.google.cloud.securitycenter.v1.Kubernetes.Pod.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.nodes && message.nodes.length)) - message.nodes = []; - message.nodes.push($root.google.cloud.securitycenter.v1.Kubernetes.Node.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nodePools && message.nodePools.length)) - message.nodePools = []; - message.nodePools.push($root.google.cloud.securitycenter.v1.Kubernetes.NodePool.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.roles && message.roles.length)) - message.roles = []; - message.roles.push($root.google.cloud.securitycenter.v1.Kubernetes.Role.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.cloud.securitycenter.v1.Kubernetes.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.accessReviews && message.accessReviews.length)) - message.accessReviews = []; - message.accessReviews.push($root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.objects && message.objects.length)) - message.objects = []; - message.objects.push($root.google.cloud.securitycenter.v1.Kubernetes.Object.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Finding.prototype.severity = 0; /** - * Decodes a Kubernetes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Finding canonicalName. + * @member {string} canonicalName + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Finding.prototype.canonicalName = ""; /** - * Verifies a Kubernetes message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Finding mute. + * @member {google.cloud.securitycenter.v1.Finding.Mute} mute + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pods != null && message.hasOwnProperty("pods")) { - if (!Array.isArray(message.pods)) - return "pods: array expected"; - for (var i = 0; i < message.pods.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.verify(message.pods[i]); - if (error) - return "pods." + error; - } - } - if (message.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) - return "nodes: array expected"; - for (var i = 0; i < message.nodes.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Node.verify(message.nodes[i]); - if (error) - return "nodes." + error; - } - } - if (message.nodePools != null && message.hasOwnProperty("nodePools")) { - if (!Array.isArray(message.nodePools)) - return "nodePools: array expected"; - for (var i = 0; i < message.nodePools.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.verify(message.nodePools[i]); - if (error) - return "nodePools." + error; - } - } - if (message.roles != null && message.hasOwnProperty("roles")) { - if (!Array.isArray(message.roles)) - return "roles: array expected"; - for (var i = 0; i < message.roles.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Role.verify(message.roles[i]); - if (error) - return "roles." + error; - } - } - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.accessReviews != null && message.hasOwnProperty("accessReviews")) { - if (!Array.isArray(message.accessReviews)) - return "accessReviews: array expected"; - for (var i = 0; i < message.accessReviews.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify(message.accessReviews[i]); - if (error) - return "accessReviews." + error; - } - } - if (message.objects != null && message.hasOwnProperty("objects")) { - if (!Array.isArray(message.objects)) - return "objects: array expected"; - for (var i = 0; i < message.objects.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Object.verify(message.objects[i]); - if (error) - return "objects." + error; - } - } - return null; - }; + Finding.prototype.mute = 0; /** - * Creates a Kubernetes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes + * Finding findingClass. + * @member {google.cloud.securitycenter.v1.Finding.FindingClass} findingClass + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes(); - if (object.pods) { - if (!Array.isArray(object.pods)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.pods: array expected"); - message.pods = []; - for (var i = 0; i < object.pods.length; ++i) { - if (typeof object.pods[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.pods: object expected"); - message.pods[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.fromObject(object.pods[i]); - } - } - if (object.nodes) { - if (!Array.isArray(object.nodes)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodes: array expected"); - message.nodes = []; - for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodes: object expected"); - message.nodes[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.fromObject(object.nodes[i]); - } - } - if (object.nodePools) { - if (!Array.isArray(object.nodePools)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodePools: array expected"); - message.nodePools = []; - for (var i = 0; i < object.nodePools.length; ++i) { - if (typeof object.nodePools[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodePools: object expected"); - message.nodePools[i] = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.fromObject(object.nodePools[i]); - } - } - if (object.roles) { - if (!Array.isArray(object.roles)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.roles: array expected"); - message.roles = []; - for (var i = 0; i < object.roles.length; ++i) { - if (typeof object.roles[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.roles: object expected"); - message.roles[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Role.fromObject(object.roles[i]); - } - } - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.bindings: object expected"); - message.bindings[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.fromObject(object.bindings[i]); - } - } - if (object.accessReviews) { - if (!Array.isArray(object.accessReviews)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.accessReviews: array expected"); - message.accessReviews = []; - for (var i = 0; i < object.accessReviews.length; ++i) { - if (typeof object.accessReviews[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.accessReviews: object expected"); - message.accessReviews[i] = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.fromObject(object.accessReviews[i]); - } - } - if (object.objects) { - if (!Array.isArray(object.objects)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.objects: array expected"); - message.objects = []; - for (var i = 0; i < object.objects.length; ++i) { - if (typeof object.objects[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.objects: object expected"); - message.objects[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Object.fromObject(object.objects[i]); - } - } - return message; - }; + Finding.prototype.findingClass = 0; /** - * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes} message Kubernetes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Finding indicator. + * @member {google.cloud.securitycenter.v1.IIndicator|null|undefined} indicator + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pods = []; - object.nodes = []; - object.nodePools = []; - object.roles = []; - object.bindings = []; - object.accessReviews = []; - object.objects = []; - } - if (message.pods && message.pods.length) { - object.pods = []; - for (var j = 0; j < message.pods.length; ++j) - object.pods[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.toObject(message.pods[j], options); - } - if (message.nodes && message.nodes.length) { - object.nodes = []; - for (var j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.toObject(message.nodes[j], options); - } - if (message.nodePools && message.nodePools.length) { - object.nodePools = []; - for (var j = 0; j < message.nodePools.length; ++j) - object.nodePools[j] = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.toObject(message.nodePools[j], options); - } - if (message.roles && message.roles.length) { - object.roles = []; - for (var j = 0; j < message.roles.length; ++j) - object.roles[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Role.toObject(message.roles[j], options); - } - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.toObject(message.bindings[j], options); - } - if (message.accessReviews && message.accessReviews.length) { - object.accessReviews = []; - for (var j = 0; j < message.accessReviews.length; ++j) - object.accessReviews[j] = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.toObject(message.accessReviews[j], options); - } - if (message.objects && message.objects.length) { - object.objects = []; - for (var j = 0; j < message.objects.length; ++j) - object.objects[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Object.toObject(message.objects[j], options); - } - return object; - }; + Finding.prototype.indicator = null; /** - * Converts this Kubernetes to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes + * Finding vulnerability. + * @member {google.cloud.securitycenter.v1.IVulnerability|null|undefined} vulnerability + * @memberof google.cloud.securitycenter.v1.Finding * @instance - * @returns {Object.} JSON object */ - Kubernetes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Finding.prototype.vulnerability = null; /** - * Gets the default type url for Kubernetes - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Finding muteUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} muteUpdateTime + * @memberof google.cloud.securitycenter.v1.Finding + * @instance */ - Kubernetes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes"; - }; - - Kubernetes.Pod = (function() { + Finding.prototype.muteUpdateTime = null; - /** - * Properties of a Pod. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface IPod - * @property {string|null} [ns] Pod ns - * @property {string|null} [name] Pod name - * @property {Array.|null} [labels] Pod labels - * @property {Array.|null} [containers] Pod containers - */ + /** + * Finding externalSystems. + * @member {Object.} externalSystems + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.externalSystems = $util.emptyObject; - /** - * Constructs a new Pod. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a Pod. - * @implements IPod - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.IPod=} [properties] Properties to set - */ - function Pod(properties) { - this.labels = []; - this.containers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Finding mitreAttack. + * @member {google.cloud.securitycenter.v1.IMitreAttack|null|undefined} mitreAttack + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.mitreAttack = null; - /** - * Pod ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @instance - */ - Pod.prototype.ns = ""; + /** + * Finding access. + * @member {google.cloud.securitycenter.v1.IAccess|null|undefined} access + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.access = null; - /** - * Pod name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @instance - */ - Pod.prototype.name = ""; - - /** - * Pod labels. - * @member {Array.} labels - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @instance - */ - Pod.prototype.labels = $util.emptyArray; + /** + * Finding connections. + * @member {Array.} connections + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.connections = $util.emptyArray; - /** - * Pod containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @instance - */ - Pod.prototype.containers = $util.emptyArray; + /** + * Finding muteInitiator. + * @member {string} muteInitiator + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.muteInitiator = ""; - /** - * Creates a new Pod instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IPod=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod instance - */ - Pod.create = function create(properties) { - return new Pod(properties); - }; + /** + * Finding processes. + * @member {Array.} processes + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.processes = $util.emptyArray; - /** - * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IPod} message Pod message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pod.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.cloud.securitycenter.v1.Label.encode(message.labels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Finding contacts. + * @member {Object.} contacts + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.contacts = $util.emptyObject; - /** - * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IPod} message Pod message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pod.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Finding compliances. + * @member {Array.} compliances + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.compliances = $util.emptyArray; - /** - * Decodes a Pod message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pod.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.cloud.securitycenter.v1.Kubernetes.Pod(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ns = reader.string(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.cloud.securitycenter.v1.Label.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Finding parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.parentDisplayName = ""; - /** - * Decodes a Pod message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pod.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Finding description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.description = ""; - /** - * Verifies a Pod message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pod.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Label.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } - } - return null; - }; + /** + * Finding exfiltration. + * @member {google.cloud.securitycenter.v1.IExfiltration|null|undefined} exfiltration + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.exfiltration = null; - /** - * Creates a Pod message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod - */ - Pod.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Pod) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Pod(); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.labels: object expected"); - message.labels[i] = $root.google.cloud.securitycenter.v1.Label.fromObject(object.labels[i]); - } - } - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); - } - } - return message; - }; + /** + * Finding iamBindings. + * @member {Array.} iamBindings + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.iamBindings = $util.emptyArray; - /** - * Creates a plain object from a Pod message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Pod} message Pod - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pod.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.containers = []; - } - if (options.defaults) { - object.ns = ""; - object.name = ""; - } - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.cloud.securitycenter.v1.Label.toObject(message.labels[j], options); - } - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); - } - return object; - }; + /** + * Finding nextSteps. + * @member {string} nextSteps + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.nextSteps = ""; - /** - * Converts this Pod to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @instance - * @returns {Object.} JSON object - */ - Pod.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Finding moduleName. + * @member {string} moduleName + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.moduleName = ""; - /** - * Gets the default type url for Pod - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Pod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Pod"; - }; + /** + * Finding containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.containers = $util.emptyArray; - return Pod; - })(); + /** + * Finding kubernetes. + * @member {google.cloud.securitycenter.v1.IKubernetes|null|undefined} kubernetes + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.kubernetes = null; - Kubernetes.Node = (function() { + /** + * Finding database. + * @member {google.cloud.securitycenter.v1.IDatabase|null|undefined} database + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.database = null; - /** - * Properties of a Node. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface INode - * @property {string|null} [name] Node name - */ + /** + * Finding attackExposure. + * @member {google.cloud.securitycenter.v1.IAttackExposure|null|undefined} attackExposure + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.attackExposure = null; - /** - * Constructs a new Node. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a Node. - * @implements INode - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.INode=} [properties] Properties to set - */ - function Node(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]]; - } + /** + * Finding files. + * @member {Array.} files + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.files = $util.emptyArray; - /** - * Node name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @instance - */ - Node.prototype.name = ""; + /** + * Finding cloudDlpInspection. + * @member {google.cloud.securitycenter.v1.ICloudDlpInspection|null|undefined} cloudDlpInspection + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.cloudDlpInspection = null; - /** - * Creates a new Node instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INode=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node instance - */ - Node.create = function create(properties) { - return new Node(properties); - }; + /** + * Finding cloudDlpDataProfile. + * @member {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null|undefined} cloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.cloudDlpDataProfile = null; - /** - * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.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); - return writer; - }; + /** + * Finding kernelRootkit. + * @member {google.cloud.securitycenter.v1.IKernelRootkit|null|undefined} kernelRootkit + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.kernelRootkit = null; - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Finding orgPolicies. + * @member {Array.} orgPolicies + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.orgPolicies = $util.emptyArray; - /** - * Decodes a Node message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.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.cloud.securitycenter.v1.Kubernetes.Node(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Finding application. + * @member {google.cloud.securitycenter.v1.IApplication|null|undefined} application + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.application = null; - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Node message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Node.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node - */ - Node.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Node) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Node(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Node message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Node} message Node - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Node.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Node to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @instance - * @returns {Object.} JSON object - */ - Node.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Finding backupDisasterRecovery. + * @member {google.cloud.securitycenter.v1.IBackupDisasterRecovery|null|undefined} backupDisasterRecovery + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.backupDisasterRecovery = null; - /** - * Gets the default type url for Node - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Node - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Node.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Node"; - }; + /** + * Finding securityPosture. + * @member {google.cloud.securitycenter.v1.ISecurityPosture|null|undefined} securityPosture + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.securityPosture = null; - return Node; - })(); + /** + * Finding logEntries. + * @member {Array.} logEntries + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.logEntries = $util.emptyArray; - Kubernetes.NodePool = (function() { + /** + * Finding loadBalancers. + * @member {Array.} loadBalancers + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.loadBalancers = $util.emptyArray; - /** - * Properties of a NodePool. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface INodePool - * @property {string|null} [name] NodePool name - * @property {Array.|null} [nodes] NodePool nodes - */ + /** + * Finding cloudArmor. + * @member {google.cloud.securitycenter.v1.ICloudArmor|null|undefined} cloudArmor + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.cloudArmor = null; - /** - * Constructs a new NodePool. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a NodePool. - * @implements INodePool - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool=} [properties] Properties to set - */ - function NodePool(properties) { - this.nodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Finding notebook. + * @member {google.cloud.securitycenter.v1.INotebook|null|undefined} notebook + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.notebook = null; - /** - * NodePool name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @instance - */ - NodePool.prototype.name = ""; + /** + * Finding toxicCombination. + * @member {google.cloud.securitycenter.v1.IToxicCombination|null|undefined} toxicCombination + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.toxicCombination = null; - /** - * NodePool nodes. - * @member {Array.} nodes - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @instance - */ - NodePool.prototype.nodes = $util.emptyArray; + /** + * Finding groupMemberships. + * @member {Array.} groupMemberships + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.groupMemberships = $util.emptyArray; - /** - * Creates a new NodePool instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool instance - */ - NodePool.create = function create(properties) { - return new NodePool(properties); - }; + /** + * Creates a new Finding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Finding} Finding instance + */ + Finding.create = function create(properties) { + return new Finding(properties); + }; - /** - * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.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.nodes != null && message.nodes.length) - for (var i = 0; i < message.nodes.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Finding message. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.category); + if (message.externalUri != null && Object.hasOwnProperty.call(message, "externalUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalUri); + if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) + for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) + $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.severity); + if (message.canonicalName != null && Object.hasOwnProperty.call(message, "canonicalName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.canonicalName); + if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mute); + if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.findingClass); + if (message.indicator != null && Object.hasOwnProperty.call(message, "indicator")) + $root.google.cloud.securitycenter.v1.Indicator.encode(message.indicator, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.vulnerability != null && Object.hasOwnProperty.call(message, "vulnerability")) + $root.google.cloud.securitycenter.v1.Vulnerability.encode(message.vulnerability, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.muteUpdateTime != null && Object.hasOwnProperty.call(message, "muteUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.muteUpdateTime, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.externalSystems != null && Object.hasOwnProperty.call(message, "externalSystems")) + for (var keys = Object.keys(message.externalSystems), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.securitycenter.v1.ExternalSystem.encode(message.externalSystems[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mitreAttack != null && Object.hasOwnProperty.call(message, "mitreAttack")) + $root.google.cloud.securitycenter.v1.MitreAttack.encode(message.mitreAttack, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + $root.google.cloud.securitycenter.v1.Access.encode(message.access, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.muteInitiator != null && Object.hasOwnProperty.call(message, "muteInitiator")) + writer.uint32(/* id 28, wireType 2 =*/226).string(message.muteInitiator); + if (message.processes != null && message.processes.length) + for (var i = 0; i < message.processes.length; ++i) + $root.google.cloud.securitycenter.v1.Process.encode(message.processes[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.connections != null && message.connections.length) + for (var i = 0; i < message.connections.length; ++i) + $root.google.cloud.securitycenter.v1.Connection.encode(message.connections[i], writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.contacts != null && Object.hasOwnProperty.call(message, "contacts")) + for (var keys = Object.keys(message.contacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.securitycenter.v1.ContactDetails.encode(message.contacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.compliances != null && message.compliances.length) + for (var i = 0; i < message.compliances.length; ++i) + $root.google.cloud.securitycenter.v1.Compliance.encode(message.compliances[i], writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.parentDisplayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.description); + if (message.exfiltration != null && Object.hasOwnProperty.call(message, "exfiltration")) + $root.google.cloud.securitycenter.v1.Exfiltration.encode(message.exfiltration, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.iamBindings != null && message.iamBindings.length) + for (var i = 0; i < message.iamBindings.length; ++i) + $root.google.cloud.securitycenter.v1.IamBinding.encode(message.iamBindings[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.nextSteps != null && Object.hasOwnProperty.call(message, "nextSteps")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.nextSteps); + if (message.moduleName != null && Object.hasOwnProperty.call(message, "moduleName")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.moduleName); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.kubernetes != null && Object.hasOwnProperty.call(message, "kubernetes")) + $root.google.cloud.securitycenter.v1.Kubernetes.encode(message.kubernetes, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + $root.google.cloud.securitycenter.v1.Database.encode(message.database, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.attackExposure != null && Object.hasOwnProperty.call(message, "attackExposure")) + $root.google.cloud.securitycenter.v1.AttackExposure.encode(message.attackExposure, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.google.cloud.securitycenter.v1.File.encode(message.files[i], writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.cloudDlpInspection != null && Object.hasOwnProperty.call(message, "cloudDlpInspection")) + $root.google.cloud.securitycenter.v1.CloudDlpInspection.encode(message.cloudDlpInspection, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.cloudDlpDataProfile != null && Object.hasOwnProperty.call(message, "cloudDlpDataProfile")) + $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.encode(message.cloudDlpDataProfile, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.kernelRootkit != null && Object.hasOwnProperty.call(message, "kernelRootkit")) + $root.google.cloud.securitycenter.v1.KernelRootkit.encode(message.kernelRootkit, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.orgPolicies != null && message.orgPolicies.length) + for (var i = 0; i < message.orgPolicies.length; ++i) + $root.google.cloud.securitycenter.v1.OrgPolicy.encode(message.orgPolicies[i], writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + if (message.application != null && Object.hasOwnProperty.call(message, "application")) + $root.google.cloud.securitycenter.v1.Application.encode(message.application, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.backupDisasterRecovery != null && Object.hasOwnProperty.call(message, "backupDisasterRecovery")) + $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.encode(message.backupDisasterRecovery, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.securityPosture != null && Object.hasOwnProperty.call(message, "securityPosture")) + $root.google.cloud.securitycenter.v1.SecurityPosture.encode(message.securityPosture, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); + if (message.logEntries != null && message.logEntries.length) + for (var i = 0; i < message.logEntries.length; ++i) + $root.google.cloud.securitycenter.v1.LogEntry.encode(message.logEntries[i], writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); + if (message.loadBalancers != null && message.loadBalancers.length) + for (var i = 0; i < message.loadBalancers.length; ++i) + $root.google.cloud.securitycenter.v1.LoadBalancer.encode(message.loadBalancers[i], writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); + if (message.cloudArmor != null && Object.hasOwnProperty.call(message, "cloudArmor")) + $root.google.cloud.securitycenter.v1.CloudArmor.encode(message.cloudArmor, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.securitycenter.v1.Notebook.encode(message.notebook, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim(); + if (message.toxicCombination != null && Object.hasOwnProperty.call(message, "toxicCombination")) + $root.google.cloud.securitycenter.v1.ToxicCombination.encode(message.toxicCombination, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); + if (message.groupMemberships != null && message.groupMemberships.length) + for (var i = 0; i < message.groupMemberships.length; ++i) + $root.google.cloud.securitycenter.v1.GroupMembership.encode(message.groupMemberships[i], writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool} message NodePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Finding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {google.cloud.securitycenter.v1.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a NodePool message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.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.cloud.securitycenter.v1.Kubernetes.NodePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.nodes && message.nodes.length)) - message.nodes = []; - message.nodes.push($root.google.cloud.securitycenter.v1.Kubernetes.Node.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a Finding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Finding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a NodePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodePool message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodePool.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.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) - return "nodes: array expected"; - for (var i = 0; i < message.nodes.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Node.verify(message.nodes[i]); - if (error) - return "nodes." + error; + case 2: { + message.parent = reader.string(); + break; } - } - return null; - }; - - /** - * Creates a NodePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool - */ - NodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.NodePool) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.NodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.nodes) { - if (!Array.isArray(object.nodes)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.NodePool.nodes: array expected"); - message.nodes = []; - for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.NodePool.nodes: object expected"); - message.nodes[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.fromObject(object.nodes[i]); + case 3: { + message.resourceName = reader.string(); + break; } - } - return message; - }; - - /** - * Creates a plain object from a NodePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.NodePool} message NodePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodes = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.nodes && message.nodes.length) { - object.nodes = []; - for (var j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.toObject(message.nodes[j], options); - } - return object; - }; - - /** - * Converts this NodePool to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @instance - * @returns {Object.} JSON object - */ - NodePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodePool - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.NodePool"; - }; - - return NodePool; - })(); - - Kubernetes.Role = (function() { - - /** - * Properties of a Role. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface IRole - * @property {google.cloud.securitycenter.v1.Kubernetes.Role.Kind|null} [kind] Role kind - * @property {string|null} [ns] Role ns - * @property {string|null} [name] Role name - */ - - /** - * Constructs a new Role. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a Role. - * @implements IRole - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.IRole=} [properties] Properties to set - */ - function Role(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]]; - } - - /** - * Role kind. - * @member {google.cloud.securitycenter.v1.Kubernetes.Role.Kind} kind - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @instance - */ - Role.prototype.kind = 0; - - /** - * Role ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @instance - */ - Role.prototype.ns = ""; - - /** - * Role name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @instance - */ - Role.prototype.name = ""; - - /** - * Creates a new Role instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IRole=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role instance - */ - Role.create = function create(properties) { - return new Role(properties); - }; - - /** - * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IRole} message Role message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Role.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IRole} message Role message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Role.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Role message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Role.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.cloud.securitycenter.v1.Kubernetes.Role(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.int32(); - break; + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.category = reader.string(); + break; + } + case 6: { + message.externalUri = reader.string(); + break; + } + case 7: { + if (message.sourceProperties === $util.emptyObject) + message.sourceProperties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - case 2: { - message.ns = reader.string(); - break; + message.sourceProperties[key] = value; + break; + } + case 8: { + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + break; + } + case 9: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.severity = reader.int32(); + break; + } + case 14: { + message.canonicalName = reader.string(); + break; + } + case 15: { + message.mute = reader.int32(); + break; + } + case 17: { + message.findingClass = reader.int32(); + break; + } + case 18: { + message.indicator = $root.google.cloud.securitycenter.v1.Indicator.decode(reader, reader.uint32()); + break; + } + case 20: { + message.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.decode(reader, reader.uint32()); + break; + } + case 21: { + message.muteUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 22: { + if (message.externalSystems === $util.emptyObject) + message.externalSystems = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.securitycenter.v1.ExternalSystem.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - case 3: { - message.name = reader.string(); - break; + message.externalSystems[key] = value; + break; + } + case 25: { + message.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.decode(reader, reader.uint32()); + break; + } + case 26: { + message.access = $root.google.cloud.securitycenter.v1.Access.decode(reader, reader.uint32()); + break; + } + case 31: { + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.google.cloud.securitycenter.v1.Connection.decode(reader, reader.uint32())); + break; + } + case 28: { + message.muteInitiator = reader.string(); + break; + } + case 30: { + if (!(message.processes && message.processes.length)) + message.processes = []; + message.processes.push($root.google.cloud.securitycenter.v1.Process.decode(reader, reader.uint32())); + break; + } + case 33: { + if (message.contacts === $util.emptyObject) + message.contacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.securitycenter.v1.ContactDetails.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - default: - reader.skipType(tag & 7); + message.contacts[key] = value; break; } - } - return message; - }; - - /** - * Decodes a Role message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Role.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Role message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Role.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: + case 34: { + if (!(message.compliances && message.compliances.length)) + message.compliances = []; + message.compliances.push($root.google.cloud.securitycenter.v1.Compliance.decode(reader, reader.uint32())); break; } - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Role message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role - */ - Role.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Role) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Role(); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; + case 36: { + message.parentDisplayName = reader.string(); break; } - break; - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "ROLE": - case 1: - message.kind = 1; - break; - case "CLUSTER_ROLE": - case 2: - message.kind = 2; + case 37: { + message.description = reader.string(); + break; + } + case 38: { + message.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.decode(reader, reader.uint32()); + break; + } + case 39: { + if (!(message.iamBindings && message.iamBindings.length)) + message.iamBindings = []; + message.iamBindings.push($root.google.cloud.securitycenter.v1.IamBinding.decode(reader, reader.uint32())); + break; + } + case 40: { + message.nextSteps = reader.string(); + break; + } + case 41: { + message.moduleName = reader.string(); + break; + } + case 42: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); + break; + } + case 43: { + message.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.decode(reader, reader.uint32()); + break; + } + case 44: { + message.database = $root.google.cloud.securitycenter.v1.Database.decode(reader, reader.uint32()); + break; + } + case 45: { + message.attackExposure = $root.google.cloud.securitycenter.v1.AttackExposure.decode(reader, reader.uint32()); + break; + } + case 46: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32())); + break; + } + case 48: { + message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.decode(reader, reader.uint32()); + break; + } + case 49: { + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.decode(reader, reader.uint32()); + break; + } + case 50: { + message.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.decode(reader, reader.uint32()); + break; + } + case 51: { + if (!(message.orgPolicies && message.orgPolicies.length)) + message.orgPolicies = []; + message.orgPolicies.push($root.google.cloud.securitycenter.v1.OrgPolicy.decode(reader, reader.uint32())); + break; + } + case 53: { + message.application = $root.google.cloud.securitycenter.v1.Application.decode(reader, reader.uint32()); + break; + } + case 55: { + message.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.decode(reader, reader.uint32()); + break; + } + case 56: { + message.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.decode(reader, reader.uint32()); + break; + } + case 57: { + if (!(message.logEntries && message.logEntries.length)) + message.logEntries = []; + message.logEntries.push($root.google.cloud.securitycenter.v1.LogEntry.decode(reader, reader.uint32())); + break; + } + case 58: { + if (!(message.loadBalancers && message.loadBalancers.length)) + message.loadBalancers = []; + message.loadBalancers.push($root.google.cloud.securitycenter.v1.LoadBalancer.decode(reader, reader.uint32())); + break; + } + case 59: { + message.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.decode(reader, reader.uint32()); + break; + } + case 63: { + message.notebook = $root.google.cloud.securitycenter.v1.Notebook.decode(reader, reader.uint32()); + break; + } + case 64: { + message.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.decode(reader, reader.uint32()); + break; + } + case 65: { + if (!(message.groupMemberships && message.groupMemberships.length)) + message.groupMemberships = []; + message.groupMemberships.push($root.google.cloud.securitycenter.v1.GroupMembership.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Role message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Role} message Role - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Role.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.ns = ""; - object.name = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.securitycenter.v1.Kubernetes.Role.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v1.Kubernetes.Role.Kind[message.kind] : message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Role to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @instance - * @returns {Object.} JSON object - */ - Role.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Role - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Role - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Role"; - }; - - /** - * Kind enum. - * @name google.cloud.securitycenter.v1.Kubernetes.Role.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} ROLE=1 ROLE value - * @property {number} CLUSTER_ROLE=2 CLUSTER_ROLE value - */ - Role.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROLE"] = 1; - values[valuesById[2] = "CLUSTER_ROLE"] = 2; - return values; - })(); - - return Role; - })(); - - Kubernetes.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface IBinding - * @property {string|null} [ns] Binding ns - * @property {string|null} [name] Binding name - * @property {google.cloud.securitycenter.v1.Kubernetes.IRole|null} [role] Binding role - * @property {Array.|null} [subjects] Binding subjects - */ - - /** - * Constructs a new Binding. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.subjects = []; - 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 message; + }; - /** - * Binding ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @instance - */ - Binding.prototype.ns = ""; - - /** - * Binding name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @instance - */ - Binding.prototype.name = ""; - - /** - * Binding role. - * @member {google.cloud.securitycenter.v1.Kubernetes.IRole|null|undefined} role - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @instance - */ - Binding.prototype.role = null; - - /** - * Binding subjects. - * @member {Array.} subjects - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @instance - */ - Binding.prototype.subjects = $util.emptyArray; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - $root.google.cloud.securitycenter.v1.Kubernetes.Role.encode(message.role, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.subjects != null && message.subjects.length) - for (var i = 0; i < message.subjects.length; ++i) - $root.google.cloud.securitycenter.v1.Kubernetes.Subject.encode(message.subjects[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.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.cloud.securitycenter.v1.Kubernetes.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ns = reader.string(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.subjects && message.subjects.length)) - message.subjects = []; - message.subjects.push($root.google.cloud.securitycenter.v1.Kubernetes.Subject.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Verifies a Finding message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Finding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.role != null && message.hasOwnProperty("role")) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Role.verify(message.role); + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + if (!$util.isString(message.externalUri)) + return "externalUri: string expected"; + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { + if (!$util.isObject(message.sourceProperties)) + return "sourceProperties: object expected"; + var key = Object.keys(message.sourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); if (error) - return "role." + error; - } - if (message.subjects != null && message.hasOwnProperty("subjects")) { - if (!Array.isArray(message.subjects)) - return "subjects: array expected"; - for (var i = 0; i < message.subjects.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.verify(message.subjects[i]); - if (error) - return "subjects." + error; - } + return "sourceProperties." + error; } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Binding) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Binding(); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.role != null) { - if (typeof object.role !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.role: object expected"); - message.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.fromObject(object.role); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - if (object.subjects) { - if (!Array.isArray(object.subjects)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.subjects: array expected"); - message.subjects = []; - for (var i = 0; i < object.subjects.length; ++i) { - if (typeof object.subjects[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.subjects: object expected"); - message.subjects[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.fromObject(object.subjects[i]); - } + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + if (!$util.isString(message.canonicalName)) + return "canonicalName: string expected"; + if (message.mute != null && message.hasOwnProperty("mute")) + switch (message.mute) { + default: + return "mute: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subjects = []; - if (options.defaults) { - object.ns = ""; - object.name = ""; - object.role = null; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + switch (message.findingClass) { + default: + return "findingClass: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.role != null && message.hasOwnProperty("role")) - object.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.toObject(message.role, options); - if (message.subjects && message.subjects.length) { - object.subjects = []; - for (var j = 0; j < message.subjects.length; ++j) - object.subjects[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.toObject(message.subjects[j], options); + if (message.indicator != null && message.hasOwnProperty("indicator")) { + var error = $root.google.cloud.securitycenter.v1.Indicator.verify(message.indicator); + if (error) + return "indicator." + error; + } + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) { + var error = $root.google.cloud.securitycenter.v1.Vulnerability.verify(message.vulnerability); + if (error) + return "vulnerability." + error; + } + if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.muteUpdateTime); + if (error) + return "muteUpdateTime." + error; + } + if (message.externalSystems != null && message.hasOwnProperty("externalSystems")) { + if (!$util.isObject(message.externalSystems)) + return "externalSystems: object expected"; + var key = Object.keys(message.externalSystems); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ExternalSystem.verify(message.externalSystems[key[i]]); + if (error) + return "externalSystems." + error; } - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) { + var error = $root.google.cloud.securitycenter.v1.MitreAttack.verify(message.mitreAttack); + if (error) + return "mitreAttack." + error; + } + if (message.access != null && message.hasOwnProperty("access")) { + var error = $root.google.cloud.securitycenter.v1.Access.verify(message.access); + if (error) + return "access." + error; + } + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (var i = 0; i < message.connections.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Connection.verify(message.connections[i]); + if (error) + return "connections." + error; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Binding"; - }; - - return Binding; - })(); - - Kubernetes.Subject = (function() { - - /** - * Properties of a Subject. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface ISubject - * @property {google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|null} [kind] Subject kind - * @property {string|null} [ns] Subject ns - * @property {string|null} [name] Subject name - */ - - /** - * Constructs a new Subject. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents a Subject. - * @implements ISubject - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject=} [properties] Properties to set - */ - function Subject(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]]; } - - /** - * Subject kind. - * @member {google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType} kind - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @instance - */ - Subject.prototype.kind = 0; - - /** - * Subject ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @instance - */ - Subject.prototype.ns = ""; - - /** - * Subject name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @instance - */ - Subject.prototype.name = ""; - - /** - * Creates a new Subject instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject instance - */ - Subject.create = function create(properties) { - return new Subject(properties); - }; - - /** - * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject} message Subject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Subject.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject} message Subject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Subject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Subject message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Subject.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.cloud.securitycenter.v1.Kubernetes.Subject(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.int32(); - break; - } - case 2: { - message.ns = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) + if (!$util.isString(message.muteInitiator)) + return "muteInitiator: string expected"; + if (message.processes != null && message.hasOwnProperty("processes")) { + if (!Array.isArray(message.processes)) + return "processes: array expected"; + for (var i = 0; i < message.processes.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Process.verify(message.processes[i]); + if (error) + return "processes." + error; } - return message; - }; - - /** - * Decodes a Subject message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Subject.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Subject message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Subject.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + } + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!$util.isObject(message.contacts)) + return "contacts: object expected"; + var key = Object.keys(message.contacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ContactDetails.verify(message.contacts[key[i]]); + if (error) + return "contacts." + error; + } + } + if (message.compliances != null && message.hasOwnProperty("compliances")) { + if (!Array.isArray(message.compliances)) + return "compliances: array expected"; + for (var i = 0; i < message.compliances.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Compliance.verify(message.compliances[i]); + if (error) + return "compliances." + error; + } + } + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) { + var error = $root.google.cloud.securitycenter.v1.Exfiltration.verify(message.exfiltration); + if (error) + return "exfiltration." + error; + } + if (message.iamBindings != null && message.hasOwnProperty("iamBindings")) { + if (!Array.isArray(message.iamBindings)) + return "iamBindings: array expected"; + for (var i = 0; i < message.iamBindings.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.IamBinding.verify(message.iamBindings[i]); + if (error) + return "iamBindings." + error; + } + } + if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) + if (!$util.isString(message.nextSteps)) + return "nextSteps: string expected"; + if (message.moduleName != null && message.hasOwnProperty("moduleName")) + if (!$util.isString(message.moduleName)) + return "moduleName: string expected"; + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); + if (error) + return "containers." + error; + } + } + if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.verify(message.kubernetes); + if (error) + return "kubernetes." + error; + } + if (message.database != null && message.hasOwnProperty("database")) { + var error = $root.google.cloud.securitycenter.v1.Database.verify(message.database); + if (error) + return "database." + error; + } + if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) { + var error = $root.google.cloud.securitycenter.v1.AttackExposure.verify(message.attackExposure); + if (error) + return "attackExposure." + error; + } + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.File.verify(message.files[i]); + if (error) + return "files." + error; + } + } + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) { + var error = $root.google.cloud.securitycenter.v1.CloudDlpInspection.verify(message.cloudDlpInspection); + if (error) + return "cloudDlpInspection." + error; + } + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) { + var error = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.verify(message.cloudDlpDataProfile); + if (error) + return "cloudDlpDataProfile." + error; + } + if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) { + var error = $root.google.cloud.securitycenter.v1.KernelRootkit.verify(message.kernelRootkit); + if (error) + return "kernelRootkit." + error; + } + if (message.orgPolicies != null && message.hasOwnProperty("orgPolicies")) { + if (!Array.isArray(message.orgPolicies)) + return "orgPolicies: array expected"; + for (var i = 0; i < message.orgPolicies.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.OrgPolicy.verify(message.orgPolicies[i]); + if (error) + return "orgPolicies." + error; + } + } + if (message.application != null && message.hasOwnProperty("application")) { + var error = $root.google.cloud.securitycenter.v1.Application.verify(message.application); + if (error) + return "application." + error; + } + if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) { + var error = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.verify(message.backupDisasterRecovery); + if (error) + return "backupDisasterRecovery." + error; + } + if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) { + var error = $root.google.cloud.securitycenter.v1.SecurityPosture.verify(message.securityPosture); + if (error) + return "securityPosture." + error; + } + if (message.logEntries != null && message.hasOwnProperty("logEntries")) { + if (!Array.isArray(message.logEntries)) + return "logEntries: array expected"; + for (var i = 0; i < message.logEntries.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.LogEntry.verify(message.logEntries[i]); + if (error) + return "logEntries." + error; + } + } + if (message.loadBalancers != null && message.hasOwnProperty("loadBalancers")) { + if (!Array.isArray(message.loadBalancers)) + return "loadBalancers: array expected"; + for (var i = 0; i < message.loadBalancers.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.LoadBalancer.verify(message.loadBalancers[i]); + if (error) + return "loadBalancers." + error; + } + } + if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) { + var error = $root.google.cloud.securitycenter.v1.CloudArmor.verify(message.cloudArmor); + if (error) + return "cloudArmor." + error; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + var error = $root.google.cloud.securitycenter.v1.Notebook.verify(message.notebook); + if (error) + return "notebook." + error; + } + if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) { + var error = $root.google.cloud.securitycenter.v1.ToxicCombination.verify(message.toxicCombination); + if (error) + return "toxicCombination." + error; + } + if (message.groupMemberships != null && message.hasOwnProperty("groupMemberships")) { + if (!Array.isArray(message.groupMemberships)) + return "groupMemberships: array expected"; + for (var i = 0; i < message.groupMemberships.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.GroupMembership.verify(message.groupMemberships[i]); + if (error) + return "groupMemberships." + error; + } + } + return null; + }; - /** - * Creates a Subject message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject - */ - Subject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Subject) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Subject(); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; - break; - } - break; - case "AUTH_TYPE_UNSPECIFIED": - case 0: - message.kind = 0; + /** + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Finding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Finding} Finding + */ + Finding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Finding) + return object; + var message = new $root.google.cloud.securitycenter.v1.Finding(); + if (object.name != null) + message.name = String(object.name); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; break; - case "USER": - case 1: - message.kind = 1; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.category != null) + message.category = String(object.category); + if (object.externalUri != null) + message.externalUri = String(object.externalUri); + if (object.sourceProperties) { + if (typeof object.sourceProperties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); + message.sourceProperties = {}; + for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.sourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.sourceProperties: object expected"); + message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + } + } + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; break; - case "SERVICEACCOUNT": - case 2: - message.kind = 2; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + if (object.canonicalName != null) + message.canonicalName = String(object.canonicalName); + switch (object.mute) { + default: + if (typeof object.mute === "number") { + message.mute = object.mute; break; - case "GROUP": - case 3: - message.kind = 3; + } + break; + case "MUTE_UNSPECIFIED": + case 0: + message.mute = 0; + break; + case "MUTED": + case 1: + message.mute = 1; + break; + case "UNMUTED": + case 2: + message.mute = 2; + break; + case "UNDEFINED": + case 4: + message.mute = 4; + break; + } + switch (object.findingClass) { + default: + if (typeof object.findingClass === "number") { + message.findingClass = object.findingClass; break; } - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Subject message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Subject} message Subject - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Subject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = options.enums === String ? "AUTH_TYPE_UNSPECIFIED" : 0; - object.ns = ""; - object.name = ""; + break; + case "FINDING_CLASS_UNSPECIFIED": + case 0: + message.findingClass = 0; + break; + case "THREAT": + case 1: + message.findingClass = 1; + break; + case "VULNERABILITY": + case 2: + message.findingClass = 2; + break; + case "MISCONFIGURATION": + case 3: + message.findingClass = 3; + break; + case "OBSERVATION": + case 4: + message.findingClass = 4; + break; + case "SCC_ERROR": + case 5: + message.findingClass = 5; + break; + case "POSTURE_VIOLATION": + case 6: + message.findingClass = 6; + break; + case "TOXIC_COMBINATION": + case 7: + message.findingClass = 7; + break; + } + if (object.indicator != null) { + if (typeof object.indicator !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.indicator: object expected"); + message.indicator = $root.google.cloud.securitycenter.v1.Indicator.fromObject(object.indicator); + } + if (object.vulnerability != null) { + if (typeof object.vulnerability !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.vulnerability: object expected"); + message.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.fromObject(object.vulnerability); + } + if (object.muteUpdateTime != null) { + if (typeof object.muteUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.muteUpdateTime: object expected"); + message.muteUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.muteUpdateTime); + } + if (object.externalSystems) { + if (typeof object.externalSystems !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.externalSystems: object expected"); + message.externalSystems = {}; + for (var keys = Object.keys(object.externalSystems), i = 0; i < keys.length; ++i) { + if (typeof object.externalSystems[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.externalSystems: object expected"); + message.externalSystems[keys[i]] = $root.google.cloud.securitycenter.v1.ExternalSystem.fromObject(object.externalSystems[keys[i]]); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType[message.kind] : message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Subject to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @instance - * @returns {Object.} JSON object - */ - Subject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Subject - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (object.mitreAttack != null) { + if (typeof object.mitreAttack !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.mitreAttack: object expected"); + message.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.fromObject(object.mitreAttack); + } + if (object.access != null) { + if (typeof object.access !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.access: object expected"); + message.access = $root.google.cloud.securitycenter.v1.Access.fromObject(object.access); + } + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.connections: array expected"); + message.connections = []; + for (var i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.connections: object expected"); + message.connections[i] = $root.google.cloud.securitycenter.v1.Connection.fromObject(object.connections[i]); } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Subject"; - }; - - /** - * AuthType enum. - * @name google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType - * @enum {number} - * @property {number} AUTH_TYPE_UNSPECIFIED=0 AUTH_TYPE_UNSPECIFIED value - * @property {number} USER=1 USER value - * @property {number} SERVICEACCOUNT=2 SERVICEACCOUNT value - * @property {number} GROUP=3 GROUP value - */ - Subject.AuthType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER"] = 1; - values[valuesById[2] = "SERVICEACCOUNT"] = 2; - values[valuesById[3] = "GROUP"] = 3; - return values; - })(); - - return Subject; - })(); - - Kubernetes.AccessReview = (function() { - - /** - * Properties of an AccessReview. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface IAccessReview - * @property {string|null} [group] AccessReview group - * @property {string|null} [ns] AccessReview ns - * @property {string|null} [name] AccessReview name - * @property {string|null} [resource] AccessReview resource - * @property {string|null} [subresource] AccessReview subresource - * @property {string|null} [verb] AccessReview verb - * @property {string|null} [version] AccessReview version - */ - - /** - * Constructs a new AccessReview. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents an AccessReview. - * @implements IAccessReview - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview=} [properties] Properties to set - */ - function AccessReview(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]]; } - - /** - * AccessReview group. - * @member {string} group - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.group = ""; - - /** - * AccessReview ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.ns = ""; - - /** - * AccessReview name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.name = ""; - - /** - * AccessReview resource. - * @member {string} resource - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.resource = ""; - - /** - * AccessReview subresource. - * @member {string} subresource - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.subresource = ""; - - /** - * AccessReview verb. - * @member {string} verb - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.verb = ""; - - /** - * AccessReview version. - * @member {string} version - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - */ - AccessReview.prototype.version = ""; - - /** - * Creates a new AccessReview instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview instance - */ - AccessReview.create = function create(properties) { - return new AccessReview(properties); - }; - - /** - * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview} message AccessReview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessReview.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); - if (message.subresource != null && Object.hasOwnProperty.call(message, "subresource")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.subresource); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.verb); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); - return writer; - }; - - /** - * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview} message AccessReview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessReview.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AccessReview message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessReview.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.cloud.securitycenter.v1.Kubernetes.AccessReview(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.group = reader.string(); - break; - } - case 2: { - message.ns = reader.string(); - break; - } - case 3: { - message.name = reader.string(); - break; - } - case 4: { - message.resource = reader.string(); - break; - } - case 5: { - message.subresource = reader.string(); - break; - } - case 6: { - message.verb = reader.string(); - break; - } - case 7: { - message.version = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (object.muteInitiator != null) + message.muteInitiator = String(object.muteInitiator); + if (object.processes) { + if (!Array.isArray(object.processes)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.processes: array expected"); + message.processes = []; + for (var i = 0; i < object.processes.length; ++i) { + if (typeof object.processes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.processes: object expected"); + message.processes[i] = $root.google.cloud.securitycenter.v1.Process.fromObject(object.processes[i]); } - return message; - }; - - /** - * Decodes an AccessReview message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessReview.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AccessReview message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessReview.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) - if (!$util.isString(message.group)) - return "group: string expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.subresource != null && message.hasOwnProperty("subresource")) - if (!$util.isString(message.subresource)) - return "subresource: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview - */ - AccessReview.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview(); - if (object.group != null) - message.group = String(object.group); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.resource != null) - message.resource = String(object.resource); - if (object.subresource != null) - message.subresource = String(object.subresource); - if (object.verb != null) - message.verb = String(object.verb); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from an AccessReview message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.AccessReview} message AccessReview - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessReview.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.group = ""; - object.ns = ""; - object.name = ""; - object.resource = ""; - object.subresource = ""; - object.verb = ""; - object.version = ""; + } + if (object.contacts) { + if (typeof object.contacts !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.contacts: object expected"); + message.contacts = {}; + for (var keys = Object.keys(object.contacts), i = 0; i < keys.length; ++i) { + if (typeof object.contacts[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.contacts: object expected"); + message.contacts[keys[i]] = $root.google.cloud.securitycenter.v1.ContactDetails.fromObject(object.contacts[keys[i]]); } - if (message.group != null && message.hasOwnProperty("group")) - object.group = message.group; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.subresource != null && message.hasOwnProperty("subresource")) - object.subresource = message.subresource; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this AccessReview to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @instance - * @returns {Object.} JSON object - */ - AccessReview.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessReview - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessReview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (object.compliances) { + if (!Array.isArray(object.compliances)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.compliances: array expected"); + message.compliances = []; + for (var i = 0; i < object.compliances.length; ++i) { + if (typeof object.compliances[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.compliances: object expected"); + message.compliances[i] = $root.google.cloud.securitycenter.v1.Compliance.fromObject(object.compliances[i]); } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.AccessReview"; - }; - - return AccessReview; - })(); - - Kubernetes.Object = (function() { - - /** - * Properties of an Object. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @interface IObject - * @property {string|null} [group] Object group - * @property {string|null} [kind] Object kind - * @property {string|null} [ns] Object ns - * @property {string|null} [name] Object name - * @property {Array.|null} [containers] Object containers - */ - - /** - * Constructs a new Object. - * @memberof google.cloud.securitycenter.v1.Kubernetes - * @classdesc Represents an Object. - * @implements IObject - * @constructor - * @param {google.cloud.securitycenter.v1.Kubernetes.IObject=} [properties] Properties to set - */ - function Object(properties) { - this.containers = []; - 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]]; } - - /** - * Object group. - * @member {string} group - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - */ - Object.prototype.group = ""; - - /** - * Object kind. - * @member {string} kind - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - */ - Object.prototype.kind = ""; - - /** - * Object ns. - * @member {string} ns - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - */ - Object.prototype.ns = ""; - - /** - * Object name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - */ - Object.prototype.name = ""; - - /** - * Object containers. - * @member {Array.} containers - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - */ - Object.prototype.containers = $util.emptyArray; - - /** - * Creates a new Object instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IObject=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object instance - */ - Object.create = function create(properties) { - return new Object(properties); - }; - - /** - * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IObject} message Object message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Object.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); - if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ns); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - if (message.containers != null && message.containers.length) - for (var i = 0; i < message.containers.length; ++i) - $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.IObject} message Object message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Object.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Object message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Object.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.cloud.securitycenter.v1.Kubernetes.Object(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.group = reader.string(); - break; - } - case 2: { - message.kind = reader.string(); - break; - } - case 3: { - message.ns = reader.string(); - break; - } - case 4: { - message.name = reader.string(); - break; - } - case 5: { - if (!(message.containers && message.containers.length)) - message.containers = []; - message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + if (object.description != null) + message.description = String(object.description); + if (object.exfiltration != null) { + if (typeof object.exfiltration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.exfiltration: object expected"); + message.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.fromObject(object.exfiltration); + } + if (object.iamBindings) { + if (!Array.isArray(object.iamBindings)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.iamBindings: array expected"); + message.iamBindings = []; + for (var i = 0; i < object.iamBindings.length; ++i) { + if (typeof object.iamBindings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.iamBindings: object expected"); + message.iamBindings[i] = $root.google.cloud.securitycenter.v1.IamBinding.fromObject(object.iamBindings[i]); } - return message; - }; - - /** - * Decodes an Object message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Object.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Object message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Object.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) - if (!$util.isString(message.group)) - return "group: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.ns != null && message.hasOwnProperty("ns")) - if (!$util.isString(message.ns)) - return "ns: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.containers != null && message.hasOwnProperty("containers")) { - if (!Array.isArray(message.containers)) - return "containers: array expected"; - for (var i = 0; i < message.containers.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); - if (error) - return "containers." + error; - } + } + if (object.nextSteps != null) + message.nextSteps = String(object.nextSteps); + if (object.moduleName != null) + message.moduleName = String(object.moduleName); + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); } - return null; - }; - - /** - * Creates an Object message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object - */ - Object.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Object) - return object; - var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Object(); - if (object.group != null) - message.group = String(object.group); - if (object.kind != null) - message.kind = String(object.kind); - if (object.ns != null) - message.ns = String(object.ns); - if (object.name != null) - message.name = String(object.name); - if (object.containers) { - if (!Array.isArray(object.containers)) - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Object.containers: array expected"); - message.containers = []; - for (var i = 0; i < object.containers.length; ++i) { - if (typeof object.containers[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Object.containers: object expected"); - message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); - } + } + if (object.kubernetes != null) { + if (typeof object.kubernetes !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.kubernetes: object expected"); + message.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.fromObject(object.kubernetes); + } + if (object.database != null) { + if (typeof object.database !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.database: object expected"); + message.database = $root.google.cloud.securitycenter.v1.Database.fromObject(object.database); + } + if (object.attackExposure != null) { + if (typeof object.attackExposure !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.attackExposure: object expected"); + message.attackExposure = $root.google.cloud.securitycenter.v1.AttackExposure.fromObject(object.attackExposure); + } + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) { + if (typeof object.files[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.files: object expected"); + message.files[i] = $root.google.cloud.securitycenter.v1.File.fromObject(object.files[i]); } - return message; - }; - - /** - * Creates a plain object from an Object message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {google.cloud.securitycenter.v1.Kubernetes.Object} message Object - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Object.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.containers = []; - if (options.defaults) { - object.group = ""; - object.kind = ""; - object.ns = ""; - object.name = ""; + } + if (object.cloudDlpInspection != null) { + if (typeof object.cloudDlpInspection !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpInspection: object expected"); + message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.fromObject(object.cloudDlpInspection); + } + if (object.cloudDlpDataProfile != null) { + if (typeof object.cloudDlpDataProfile !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpDataProfile: object expected"); + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.fromObject(object.cloudDlpDataProfile); + } + if (object.kernelRootkit != null) { + if (typeof object.kernelRootkit !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.kernelRootkit: object expected"); + message.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.fromObject(object.kernelRootkit); + } + if (object.orgPolicies) { + if (!Array.isArray(object.orgPolicies)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.orgPolicies: array expected"); + message.orgPolicies = []; + for (var i = 0; i < object.orgPolicies.length; ++i) { + if (typeof object.orgPolicies[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.orgPolicies: object expected"); + message.orgPolicies[i] = $root.google.cloud.securitycenter.v1.OrgPolicy.fromObject(object.orgPolicies[i]); } - if (message.group != null && message.hasOwnProperty("group")) - object.group = message.group; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.ns != null && message.hasOwnProperty("ns")) - object.ns = message.ns; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.containers && message.containers.length) { - object.containers = []; - for (var j = 0; j < message.containers.length; ++j) - object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); + } + if (object.application != null) { + if (typeof object.application !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.application: object expected"); + message.application = $root.google.cloud.securitycenter.v1.Application.fromObject(object.application); + } + if (object.backupDisasterRecovery != null) { + if (typeof object.backupDisasterRecovery !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.backupDisasterRecovery: object expected"); + message.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.fromObject(object.backupDisasterRecovery); + } + if (object.securityPosture != null) { + if (typeof object.securityPosture !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.securityPosture: object expected"); + message.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.fromObject(object.securityPosture); + } + if (object.logEntries) { + if (!Array.isArray(object.logEntries)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.logEntries: array expected"); + message.logEntries = []; + for (var i = 0; i < object.logEntries.length; ++i) { + if (typeof object.logEntries[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.logEntries: object expected"); + message.logEntries[i] = $root.google.cloud.securitycenter.v1.LogEntry.fromObject(object.logEntries[i]); } - return object; - }; - - /** - * Converts this Object to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @instance - * @returns {Object.} JSON object - */ - Object.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Object - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Kubernetes.Object - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Object.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + } + if (object.loadBalancers) { + if (!Array.isArray(object.loadBalancers)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.loadBalancers: array expected"); + message.loadBalancers = []; + for (var i = 0; i < object.loadBalancers.length; ++i) { + if (typeof object.loadBalancers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.loadBalancers: object expected"); + message.loadBalancers[i] = $root.google.cloud.securitycenter.v1.LoadBalancer.fromObject(object.loadBalancers[i]); } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Object"; - }; - - return Object; - })(); - - return Kubernetes; - })(); - - v1.LoadBalancer = (function() { - - /** - * Properties of a LoadBalancer. - * @memberof google.cloud.securitycenter.v1 - * @interface ILoadBalancer - * @property {string|null} [name] LoadBalancer name - */ - - /** - * Constructs a new LoadBalancer. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a LoadBalancer. - * @implements ILoadBalancer - * @constructor - * @param {google.cloud.securitycenter.v1.ILoadBalancer=} [properties] Properties to set - */ - function LoadBalancer(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]]; - } - - /** - * LoadBalancer name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @instance - */ - LoadBalancer.prototype.name = ""; - - /** - * Creates a new LoadBalancer instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {google.cloud.securitycenter.v1.ILoadBalancer=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer instance - */ - LoadBalancer.create = function create(properties) { - return new LoadBalancer(properties); + } + if (object.cloudArmor != null) { + if (typeof object.cloudArmor !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudArmor: object expected"); + message.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.fromObject(object.cloudArmor); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.notebook: object expected"); + message.notebook = $root.google.cloud.securitycenter.v1.Notebook.fromObject(object.notebook); + } + if (object.toxicCombination != null) { + if (typeof object.toxicCombination !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.toxicCombination: object expected"); + message.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.fromObject(object.toxicCombination); + } + if (object.groupMemberships) { + if (!Array.isArray(object.groupMemberships)) + throw TypeError(".google.cloud.securitycenter.v1.Finding.groupMemberships: array expected"); + message.groupMemberships = []; + for (var i = 0; i < object.groupMemberships.length; ++i) { + if (typeof object.groupMemberships[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.groupMemberships: object expected"); + message.groupMemberships[i] = $root.google.cloud.securitycenter.v1.GroupMembership.fromObject(object.groupMemberships[i]); + } + } + return message; }; /** - * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.LoadBalancer + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Finding * @static - * @param {google.cloud.securitycenter.v1.ILoadBalancer} message LoadBalancer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @param {google.cloud.securitycenter.v1.Finding} message Finding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - LoadBalancer.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); - return writer; - }; - - /** - * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {google.cloud.securitycenter.v1.ILoadBalancer} message LoadBalancer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancer.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.cloud.securitycenter.v1.LoadBalancer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancer message. - * @function verify - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a LoadBalancer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer - */ - LoadBalancer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.LoadBalancer) - return object; - var message = new $root.google.cloud.securitycenter.v1.LoadBalancer(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.LoadBalancer - * @static - * @param {google.cloud.securitycenter.v1.LoadBalancer} message LoadBalancer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancer.toObject = function toObject(message, options) { + Finding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) { + object.processes = []; + object.connections = []; + object.compliances = []; + object.iamBindings = []; + object.containers = []; + object.files = []; + object.orgPolicies = []; + object.logEntries = []; + object.loadBalancers = []; + object.groupMemberships = []; + } + if (options.objects || options.defaults) { + object.sourceProperties = {}; + object.externalSystems = {}; + object.contacts = {}; + } + if (options.defaults) { object.name = ""; + object.parent = ""; + object.resourceName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.category = ""; + object.externalUri = ""; + object.securityMarks = null; + object.eventTime = null; + object.createTime = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.canonicalName = ""; + object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; + object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; + object.indicator = null; + object.vulnerability = null; + object.muteUpdateTime = null; + object.mitreAttack = null; + object.access = null; + object.muteInitiator = ""; + object.parentDisplayName = ""; + object.description = ""; + object.exfiltration = null; + object.nextSteps = ""; + object.moduleName = ""; + object.kubernetes = null; + object.database = null; + object.attackExposure = null; + object.cloudDlpInspection = null; + object.cloudDlpDataProfile = null; + object.kernelRootkit = null; + object.application = null; + object.backupDisasterRecovery = null; + object.securityPosture = null; + object.cloudArmor = null; + object.notebook = null; + object.toxicCombination = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.externalUri != null && message.hasOwnProperty("externalUri")) + object.externalUri = message.externalUri; + var keys2; + if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { + object.sourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycenter.v1.Finding.Severity[message.severity] : message.severity; + if (message.canonicalName != null && message.hasOwnProperty("canonicalName")) + object.canonicalName = message.canonicalName; + if (message.mute != null && message.hasOwnProperty("mute")) + object.mute = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] : message.mute; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + object.findingClass = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycenter.v1.Finding.FindingClass[message.findingClass] : message.findingClass; + if (message.indicator != null && message.hasOwnProperty("indicator")) + object.indicator = $root.google.cloud.securitycenter.v1.Indicator.toObject(message.indicator, options); + if (message.vulnerability != null && message.hasOwnProperty("vulnerability")) + object.vulnerability = $root.google.cloud.securitycenter.v1.Vulnerability.toObject(message.vulnerability, options); + if (message.muteUpdateTime != null && message.hasOwnProperty("muteUpdateTime")) + object.muteUpdateTime = $root.google.protobuf.Timestamp.toObject(message.muteUpdateTime, options); + if (message.externalSystems && (keys2 = Object.keys(message.externalSystems)).length) { + object.externalSystems = {}; + for (var j = 0; j < keys2.length; ++j) + object.externalSystems[keys2[j]] = $root.google.cloud.securitycenter.v1.ExternalSystem.toObject(message.externalSystems[keys2[j]], options); + } + if (message.mitreAttack != null && message.hasOwnProperty("mitreAttack")) + object.mitreAttack = $root.google.cloud.securitycenter.v1.MitreAttack.toObject(message.mitreAttack, options); + if (message.access != null && message.hasOwnProperty("access")) + object.access = $root.google.cloud.securitycenter.v1.Access.toObject(message.access, options); + if (message.muteInitiator != null && message.hasOwnProperty("muteInitiator")) + object.muteInitiator = message.muteInitiator; + if (message.processes && message.processes.length) { + object.processes = []; + for (var j = 0; j < message.processes.length; ++j) + object.processes[j] = $root.google.cloud.securitycenter.v1.Process.toObject(message.processes[j], options); + } + if (message.connections && message.connections.length) { + object.connections = []; + for (var j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.google.cloud.securitycenter.v1.Connection.toObject(message.connections[j], options); + } + if (message.contacts && (keys2 = Object.keys(message.contacts)).length) { + object.contacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.contacts[keys2[j]] = $root.google.cloud.securitycenter.v1.ContactDetails.toObject(message.contacts[keys2[j]], options); + } + if (message.compliances && message.compliances.length) { + object.compliances = []; + for (var j = 0; j < message.compliances.length; ++j) + object.compliances[j] = $root.google.cloud.securitycenter.v1.Compliance.toObject(message.compliances[j], options); + } + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.exfiltration != null && message.hasOwnProperty("exfiltration")) + object.exfiltration = $root.google.cloud.securitycenter.v1.Exfiltration.toObject(message.exfiltration, options); + if (message.iamBindings && message.iamBindings.length) { + object.iamBindings = []; + for (var j = 0; j < message.iamBindings.length; ++j) + object.iamBindings[j] = $root.google.cloud.securitycenter.v1.IamBinding.toObject(message.iamBindings[j], options); + } + if (message.nextSteps != null && message.hasOwnProperty("nextSteps")) + object.nextSteps = message.nextSteps; + if (message.moduleName != null && message.hasOwnProperty("moduleName")) + object.moduleName = message.moduleName; + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); + } + if (message.kubernetes != null && message.hasOwnProperty("kubernetes")) + object.kubernetes = $root.google.cloud.securitycenter.v1.Kubernetes.toObject(message.kubernetes, options); + if (message.database != null && message.hasOwnProperty("database")) + object.database = $root.google.cloud.securitycenter.v1.Database.toObject(message.database, options); + if (message.attackExposure != null && message.hasOwnProperty("attackExposure")) + object.attackExposure = $root.google.cloud.securitycenter.v1.AttackExposure.toObject(message.attackExposure, options); + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.google.cloud.securitycenter.v1.File.toObject(message.files[j], options); + } + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) + object.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.toObject(message.cloudDlpInspection, options); + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) + object.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.toObject(message.cloudDlpDataProfile, options); + if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) + object.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.toObject(message.kernelRootkit, options); + if (message.orgPolicies && message.orgPolicies.length) { + object.orgPolicies = []; + for (var j = 0; j < message.orgPolicies.length; ++j) + object.orgPolicies[j] = $root.google.cloud.securitycenter.v1.OrgPolicy.toObject(message.orgPolicies[j], options); + } + if (message.application != null && message.hasOwnProperty("application")) + object.application = $root.google.cloud.securitycenter.v1.Application.toObject(message.application, options); + if (message.backupDisasterRecovery != null && message.hasOwnProperty("backupDisasterRecovery")) + object.backupDisasterRecovery = $root.google.cloud.securitycenter.v1.BackupDisasterRecovery.toObject(message.backupDisasterRecovery, options); + if (message.securityPosture != null && message.hasOwnProperty("securityPosture")) + object.securityPosture = $root.google.cloud.securitycenter.v1.SecurityPosture.toObject(message.securityPosture, options); + if (message.logEntries && message.logEntries.length) { + object.logEntries = []; + for (var j = 0; j < message.logEntries.length; ++j) + object.logEntries[j] = $root.google.cloud.securitycenter.v1.LogEntry.toObject(message.logEntries[j], options); + } + if (message.loadBalancers && message.loadBalancers.length) { + object.loadBalancers = []; + for (var j = 0; j < message.loadBalancers.length; ++j) + object.loadBalancers[j] = $root.google.cloud.securitycenter.v1.LoadBalancer.toObject(message.loadBalancers[j], options); + } + if (message.cloudArmor != null && message.hasOwnProperty("cloudArmor")) + object.cloudArmor = $root.google.cloud.securitycenter.v1.CloudArmor.toObject(message.cloudArmor, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = $root.google.cloud.securitycenter.v1.Notebook.toObject(message.notebook, options); + if (message.toxicCombination != null && message.hasOwnProperty("toxicCombination")) + object.toxicCombination = $root.google.cloud.securitycenter.v1.ToxicCombination.toObject(message.toxicCombination, options); + if (message.groupMemberships && message.groupMemberships.length) { + object.groupMemberships = []; + for (var j = 0; j < message.groupMemberships.length; ++j) + object.groupMemberships[j] = $root.google.cloud.securitycenter.v1.GroupMembership.toObject(message.groupMemberships[j], options); + } return object; }; /** - * Converts this LoadBalancer to JSON. + * Converts this Finding to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @memberof google.cloud.securitycenter.v1.Finding * @instance * @returns {Object.} JSON object */ - LoadBalancer.prototype.toJSON = function toJSON() { + Finding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LoadBalancer + * Gets the default type url for Finding * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @memberof google.cloud.securitycenter.v1.Finding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LoadBalancer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Finding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.LoadBalancer"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Finding"; }; - return LoadBalancer; + /** + * State enum. + * @name google.cloud.securitycenter.v1.Finding.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + Finding.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + /** + * Severity enum. + * @name google.cloud.securitycenter.v1.Finding.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value + */ + Finding.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); + + /** + * Mute enum. + * @name google.cloud.securitycenter.v1.Finding.Mute + * @enum {number} + * @property {number} MUTE_UNSPECIFIED=0 MUTE_UNSPECIFIED value + * @property {number} MUTED=1 MUTED value + * @property {number} UNMUTED=2 UNMUTED value + * @property {number} UNDEFINED=4 UNDEFINED value + */ + Finding.Mute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MUTED"] = 1; + values[valuesById[2] = "UNMUTED"] = 2; + values[valuesById[4] = "UNDEFINED"] = 4; + return values; + })(); + + /** + * FindingClass enum. + * @name google.cloud.securitycenter.v1.Finding.FindingClass + * @enum {number} + * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value + * @property {number} THREAT=1 THREAT value + * @property {number} VULNERABILITY=2 VULNERABILITY value + * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value + * @property {number} OBSERVATION=4 OBSERVATION value + * @property {number} SCC_ERROR=5 SCC_ERROR value + * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value + * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value + */ + Finding.FindingClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; + values[valuesById[1] = "THREAT"] = 1; + values[valuesById[2] = "VULNERABILITY"] = 2; + values[valuesById[3] = "MISCONFIGURATION"] = 3; + values[valuesById[4] = "OBSERVATION"] = 4; + values[valuesById[5] = "SCC_ERROR"] = 5; + values[valuesById[6] = "POSTURE_VIOLATION"] = 6; + values[valuesById[7] = "TOXIC_COMBINATION"] = 7; + return values; + })(); + + return Finding; })(); - v1.LogEntry = (function() { + v1.GroupMembership = (function() { /** - * Properties of a LogEntry. + * Properties of a GroupMembership. * @memberof google.cloud.securitycenter.v1 - * @interface ILogEntry - * @property {google.cloud.securitycenter.v1.ICloudLoggingEntry|null} [cloudLoggingEntry] LogEntry cloudLoggingEntry + * @interface IGroupMembership + * @property {google.cloud.securitycenter.v1.GroupMembership.GroupType|null} [groupType] GroupMembership groupType + * @property {string|null} [groupId] GroupMembership groupId */ /** - * Constructs a new LogEntry. + * Constructs a new GroupMembership. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a LogEntry. - * @implements ILogEntry + * @classdesc Represents a GroupMembership. + * @implements IGroupMembership * @constructor - * @param {google.cloud.securitycenter.v1.ILogEntry=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupMembership=} [properties] Properties to set */ - function LogEntry(properties) { + function GroupMembership(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18000,89 +16223,89 @@ } /** - * LogEntry cloudLoggingEntry. - * @member {google.cloud.securitycenter.v1.ICloudLoggingEntry|null|undefined} cloudLoggingEntry - * @memberof google.cloud.securitycenter.v1.LogEntry + * GroupMembership groupType. + * @member {google.cloud.securitycenter.v1.GroupMembership.GroupType} groupType + * @memberof google.cloud.securitycenter.v1.GroupMembership * @instance */ - LogEntry.prototype.cloudLoggingEntry = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GroupMembership.prototype.groupType = 0; /** - * LogEntry logEntry. - * @member {"cloudLoggingEntry"|undefined} logEntry - * @memberof google.cloud.securitycenter.v1.LogEntry + * GroupMembership groupId. + * @member {string} groupId + * @memberof google.cloud.securitycenter.v1.GroupMembership * @instance */ - Object.defineProperty(LogEntry.prototype, "logEntry", { - get: $util.oneOfGetter($oneOfFields = ["cloudLoggingEntry"]), - set: $util.oneOfSetter($oneOfFields) - }); + GroupMembership.prototype.groupId = ""; /** - * Creates a new LogEntry instance using the specified properties. + * Creates a new GroupMembership instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static - * @param {google.cloud.securitycenter.v1.ILogEntry=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry instance + * @param {google.cloud.securitycenter.v1.IGroupMembership=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership instance */ - LogEntry.create = function create(properties) { - return new LogEntry(properties); + GroupMembership.create = function create(properties) { + return new GroupMembership(properties); }; /** - * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * Encodes the specified GroupMembership message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static - * @param {google.cloud.securitycenter.v1.ILogEntry} message LogEntry message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupMembership} message GroupMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encode = function encode(message, writer) { + GroupMembership.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudLoggingEntry != null && Object.hasOwnProperty.call(message, "cloudLoggingEntry")) - $root.google.cloud.securitycenter.v1.CloudLoggingEntry.encode(message.cloudLoggingEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.groupType); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupId); return writer; }; /** - * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * Encodes the specified GroupMembership message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupMembership.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static - * @param {google.cloud.securitycenter.v1.ILogEntry} message LogEntry message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupMembership} message GroupMembership message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + GroupMembership.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LogEntry message from the specified reader or buffer. + * Decodes a GroupMembership message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decode = function decode(reader, length) { + GroupMembership.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.cloud.securitycenter.v1.LogEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupMembership(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.decode(reader, reader.uint32()); + message.groupType = reader.int32(); + break; + } + case 2: { + message.groupId = reader.string(); break; } default: @@ -18094,135 +16317,166 @@ }; /** - * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * Decodes a GroupMembership message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LogEntry.decodeDelimited = function decodeDelimited(reader) { + GroupMembership.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LogEntry message. + * Verifies a GroupMembership message. * @function verify - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LogEntry.verify = function verify(message) { + GroupMembership.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { - properties.logEntry = 1; - { - var error = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.verify(message.cloudLoggingEntry); - if (error) - return "cloudLoggingEntry." + error; + if (message.groupType != null && message.hasOwnProperty("groupType")) + switch (message.groupType) { + default: + return "groupType: enum value expected"; + case 0: + case 1: + break; } - } + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; return null; }; /** - * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * Creates a GroupMembership message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + * @returns {google.cloud.securitycenter.v1.GroupMembership} GroupMembership */ - LogEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.LogEntry) + GroupMembership.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupMembership) return object; - var message = new $root.google.cloud.securitycenter.v1.LogEntry(); - if (object.cloudLoggingEntry != null) { - if (typeof object.cloudLoggingEntry !== "object") - throw TypeError(".google.cloud.securitycenter.v1.LogEntry.cloudLoggingEntry: object expected"); - message.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.fromObject(object.cloudLoggingEntry); + var message = new $root.google.cloud.securitycenter.v1.GroupMembership(); + switch (object.groupType) { + default: + if (typeof object.groupType === "number") { + message.groupType = object.groupType; + break; + } + break; + case "GROUP_TYPE_UNSPECIFIED": + case 0: + message.groupType = 0; + break; + case "GROUP_TYPE_TOXIC_COMBINATION": + case 1: + message.groupType = 1; + break; } + if (object.groupId != null) + message.groupId = String(object.groupId); return message; }; /** - * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * Creates a plain object from a GroupMembership message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static - * @param {google.cloud.securitycenter.v1.LogEntry} message LogEntry + * @param {google.cloud.securitycenter.v1.GroupMembership} message GroupMembership * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LogEntry.toObject = function toObject(message, options) { + GroupMembership.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { - object.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.toObject(message.cloudLoggingEntry, options); - if (options.oneofs) - object.logEntry = "cloudLoggingEntry"; + if (options.defaults) { + object.groupType = options.enums === String ? "GROUP_TYPE_UNSPECIFIED" : 0; + object.groupId = ""; } + if (message.groupType != null && message.hasOwnProperty("groupType")) + object.groupType = options.enums === String ? $root.google.cloud.securitycenter.v1.GroupMembership.GroupType[message.groupType] === undefined ? message.groupType : $root.google.cloud.securitycenter.v1.GroupMembership.GroupType[message.groupType] : message.groupType; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; return object; }; /** - * Converts this LogEntry to JSON. + * Converts this GroupMembership to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @instance * @returns {Object.} JSON object */ - LogEntry.prototype.toJSON = function toJSON() { + GroupMembership.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LogEntry + * Gets the default type url for GroupMembership * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.LogEntry + * @memberof google.cloud.securitycenter.v1.GroupMembership * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupMembership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.LogEntry"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupMembership"; }; - return LogEntry; + /** + * GroupType enum. + * @name google.cloud.securitycenter.v1.GroupMembership.GroupType + * @enum {number} + * @property {number} GROUP_TYPE_UNSPECIFIED=0 GROUP_TYPE_UNSPECIFIED value + * @property {number} GROUP_TYPE_TOXIC_COMBINATION=1 GROUP_TYPE_TOXIC_COMBINATION value + */ + GroupMembership.GroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GROUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GROUP_TYPE_TOXIC_COMBINATION"] = 1; + return values; + })(); + + return GroupMembership; })(); - v1.CloudLoggingEntry = (function() { + v1.IamBinding = (function() { /** - * Properties of a CloudLoggingEntry. + * Properties of an IamBinding. * @memberof google.cloud.securitycenter.v1 - * @interface ICloudLoggingEntry - * @property {string|null} [insertId] CloudLoggingEntry insertId - * @property {string|null} [logId] CloudLoggingEntry logId - * @property {string|null} [resourceContainer] CloudLoggingEntry resourceContainer - * @property {google.protobuf.ITimestamp|null} [timestamp] CloudLoggingEntry timestamp + * @interface IIamBinding + * @property {google.cloud.securitycenter.v1.IamBinding.Action|null} [action] IamBinding action + * @property {string|null} [role] IamBinding role + * @property {string|null} [member] IamBinding member */ /** - * Constructs a new CloudLoggingEntry. + * Constructs a new IamBinding. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CloudLoggingEntry. - * @implements ICloudLoggingEntry + * @classdesc Represents an IamBinding. + * @implements IIamBinding * @constructor - * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IIamBinding=} [properties] Properties to set */ - function CloudLoggingEntry(properties) { + function IamBinding(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18230,117 +16484,103 @@ } /** - * CloudLoggingEntry insertId. - * @member {string} insertId - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry - * @instance - */ - CloudLoggingEntry.prototype.insertId = ""; - - /** - * CloudLoggingEntry logId. - * @member {string} logId - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * IamBinding action. + * @member {google.cloud.securitycenter.v1.IamBinding.Action} action + * @memberof google.cloud.securitycenter.v1.IamBinding * @instance */ - CloudLoggingEntry.prototype.logId = ""; + IamBinding.prototype.action = 0; /** - * CloudLoggingEntry resourceContainer. - * @member {string} resourceContainer - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * IamBinding role. + * @member {string} role + * @memberof google.cloud.securitycenter.v1.IamBinding * @instance */ - CloudLoggingEntry.prototype.resourceContainer = ""; + IamBinding.prototype.role = ""; /** - * CloudLoggingEntry timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * IamBinding member. + * @member {string} member + * @memberof google.cloud.securitycenter.v1.IamBinding * @instance */ - CloudLoggingEntry.prototype.timestamp = null; + IamBinding.prototype.member = ""; /** - * Creates a new CloudLoggingEntry instance using the specified properties. + * Creates a new IamBinding instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static - * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry instance + * @param {google.cloud.securitycenter.v1.IIamBinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding instance */ - CloudLoggingEntry.create = function create(properties) { - return new CloudLoggingEntry(properties); + IamBinding.create = function create(properties) { + return new IamBinding(properties); }; /** - * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * Encodes the specified IamBinding message. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static - * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {google.cloud.securitycenter.v1.IIamBinding} message IamBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudLoggingEntry.encode = function encode(message, writer) { + IamBinding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.insertId); - if (message.logId != null && Object.hasOwnProperty.call(message, "logId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.logId); - if (message.resourceContainer != null && Object.hasOwnProperty.call(message, "resourceContainer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceContainer); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); return writer; }; /** - * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * Encodes the specified IamBinding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.IamBinding.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static - * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {google.cloud.securitycenter.v1.IIamBinding} message IamBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudLoggingEntry.encodeDelimited = function encodeDelimited(message, writer) { + IamBinding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * Decodes an IamBinding message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudLoggingEntry.decode = function decode(reader, length) { + IamBinding.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.cloud.securitycenter.v1.CloudLoggingEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.IamBinding(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.insertId = reader.string(); + message.action = reader.int32(); break; } case 2: { - message.logId = reader.string(); + message.role = reader.string(); break; } case 3: { - message.resourceContainer = reader.string(); - break; - } - case 4: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.member = reader.string(); break; } default: @@ -18352,159 +16592,186 @@ }; /** - * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * Decodes an IamBinding message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudLoggingEntry.decodeDelimited = function decodeDelimited(reader) { + IamBinding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudLoggingEntry message. + * Verifies an IamBinding message. * @function verify - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudLoggingEntry.verify = function verify(message) { + IamBinding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.insertId != null && message.hasOwnProperty("insertId")) - if (!$util.isString(message.insertId)) - return "insertId: string expected"; - if (message.logId != null && message.hasOwnProperty("logId")) - if (!$util.isString(message.logId)) - return "logId: string expected"; - if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) - if (!$util.isString(message.resourceContainer)) - return "resourceContainer: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; return null; }; /** - * Creates a CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * Creates an IamBinding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + * @returns {google.cloud.securitycenter.v1.IamBinding} IamBinding */ - CloudLoggingEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CloudLoggingEntry) + IamBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.IamBinding) return object; - var message = new $root.google.cloud.securitycenter.v1.CloudLoggingEntry(); - if (object.insertId != null) - message.insertId = String(object.insertId); - if (object.logId != null) - message.logId = String(object.logId); - if (object.resourceContainer != null) - message.resourceContainer = String(object.resourceContainer); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CloudLoggingEntry.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + var message = new $root.google.cloud.securitycenter.v1.IamBinding(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); return message; }; /** - * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. + * Creates a plain object from an IamBinding message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static - * @param {google.cloud.securitycenter.v1.CloudLoggingEntry} message CloudLoggingEntry + * @param {google.cloud.securitycenter.v1.IamBinding} message IamBinding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudLoggingEntry.toObject = function toObject(message, options) { + IamBinding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.insertId = ""; - object.logId = ""; - object.resourceContainer = ""; - object.timestamp = null; + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; } - if (message.insertId != null && message.hasOwnProperty("insertId")) - object.insertId = message.insertId; - if (message.logId != null && message.hasOwnProperty("logId")) - object.logId = message.logId; - if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) - object.resourceContainer = message.resourceContainer; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.cloud.securitycenter.v1.IamBinding.Action[message.action] === undefined ? message.action : $root.google.cloud.securitycenter.v1.IamBinding.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; return object; }; /** - * Converts this CloudLoggingEntry to JSON. + * Converts this IamBinding to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @instance * @returns {Object.} JSON object */ - CloudLoggingEntry.prototype.toJSON = function toJSON() { + IamBinding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudLoggingEntry + * Gets the default type url for IamBinding * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.IamBinding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudLoggingEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IamBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudLoggingEntry"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.IamBinding"; }; - return CloudLoggingEntry; + /** + * Action enum. + * @name google.cloud.securitycenter.v1.IamBinding.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + IamBinding.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return IamBinding; })(); - v1.MitreAttack = (function() { + v1.Indicator = (function() { /** - * Properties of a MitreAttack. + * Properties of an Indicator. * @memberof google.cloud.securitycenter.v1 - * @interface IMitreAttack - * @property {google.cloud.securitycenter.v1.MitreAttack.Tactic|null} [primaryTactic] MitreAttack primaryTactic - * @property {Array.|null} [primaryTechniques] MitreAttack primaryTechniques - * @property {Array.|null} [additionalTactics] MitreAttack additionalTactics - * @property {Array.|null} [additionalTechniques] MitreAttack additionalTechniques - * @property {string|null} [version] MitreAttack version + * @interface IIndicator + * @property {Array.|null} [ipAddresses] Indicator ipAddresses + * @property {Array.|null} [domains] Indicator domains + * @property {Array.|null} [signatures] Indicator signatures + * @property {Array.|null} [uris] Indicator uris */ /** - * Constructs a new MitreAttack. + * Constructs a new Indicator. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a MitreAttack. - * @implements IMitreAttack + * @classdesc Represents an Indicator. + * @implements IIndicator * @constructor - * @param {google.cloud.securitycenter.v1.IMitreAttack=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IIndicator=} [properties] Properties to set */ - function MitreAttack(properties) { - this.primaryTechniques = []; - this.additionalTactics = []; - this.additionalTechniques = []; + function Indicator(properties) { + this.ipAddresses = []; + this.domains = []; + this.signatures = []; + this.uris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18512,164 +16779,129 @@ } /** - * MitreAttack primaryTactic. - * @member {google.cloud.securitycenter.v1.MitreAttack.Tactic} primaryTactic - * @memberof google.cloud.securitycenter.v1.MitreAttack - * @instance - */ - MitreAttack.prototype.primaryTactic = 0; - - /** - * MitreAttack primaryTechniques. - * @member {Array.} primaryTechniques - * @memberof google.cloud.securitycenter.v1.MitreAttack + * Indicator ipAddresses. + * @member {Array.} ipAddresses + * @memberof google.cloud.securitycenter.v1.Indicator * @instance */ - MitreAttack.prototype.primaryTechniques = $util.emptyArray; + Indicator.prototype.ipAddresses = $util.emptyArray; /** - * MitreAttack additionalTactics. - * @member {Array.} additionalTactics - * @memberof google.cloud.securitycenter.v1.MitreAttack + * Indicator domains. + * @member {Array.} domains + * @memberof google.cloud.securitycenter.v1.Indicator * @instance */ - MitreAttack.prototype.additionalTactics = $util.emptyArray; + Indicator.prototype.domains = $util.emptyArray; /** - * MitreAttack additionalTechniques. - * @member {Array.} additionalTechniques - * @memberof google.cloud.securitycenter.v1.MitreAttack + * Indicator signatures. + * @member {Array.} signatures + * @memberof google.cloud.securitycenter.v1.Indicator * @instance */ - MitreAttack.prototype.additionalTechniques = $util.emptyArray; + Indicator.prototype.signatures = $util.emptyArray; /** - * MitreAttack version. - * @member {string} version - * @memberof google.cloud.securitycenter.v1.MitreAttack + * Indicator uris. + * @member {Array.} uris + * @memberof google.cloud.securitycenter.v1.Indicator * @instance */ - MitreAttack.prototype.version = ""; + Indicator.prototype.uris = $util.emptyArray; /** - * Creates a new MitreAttack instance using the specified properties. + * Creates a new Indicator instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static - * @param {google.cloud.securitycenter.v1.IMitreAttack=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack instance + * @param {google.cloud.securitycenter.v1.IIndicator=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Indicator} Indicator instance */ - MitreAttack.create = function create(properties) { - return new MitreAttack(properties); + Indicator.create = function create(properties) { + return new Indicator(properties); }; /** - * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * Encodes the specified Indicator message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static - * @param {google.cloud.securitycenter.v1.IMitreAttack} message MitreAttack message or plain object to encode + * @param {google.cloud.securitycenter.v1.IIndicator} message Indicator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MitreAttack.encode = function encode(message, writer) { + Indicator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.primaryTactic != null && Object.hasOwnProperty.call(message, "primaryTactic")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primaryTactic); - if (message.primaryTechniques != null && message.primaryTechniques.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.primaryTechniques.length; ++i) - writer.int32(message.primaryTechniques[i]); - writer.ldelim(); - } - if (message.additionalTactics != null && message.additionalTactics.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.additionalTactics.length; ++i) - writer.int32(message.additionalTactics[i]); - writer.ldelim(); - } - if (message.additionalTechniques != null && message.additionalTechniques.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.additionalTechniques.length; ++i) - writer.int32(message.additionalTechniques[i]); - writer.ldelim(); - } - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.ipAddresses != null && message.ipAddresses.length) + for (var i = 0; i < message.ipAddresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddresses[i]); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domains[i]); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.encode(message.signatures[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.uris[i]); return writer; }; /** - * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * Encodes the specified Indicator message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static - * @param {google.cloud.securitycenter.v1.IMitreAttack} message MitreAttack message or plain object to encode + * @param {google.cloud.securitycenter.v1.IIndicator} message Indicator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MitreAttack.encodeDelimited = function encodeDelimited(message, writer) { + Indicator.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MitreAttack message from the specified reader or buffer. + * Decodes an Indicator message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + * @returns {google.cloud.securitycenter.v1.Indicator} Indicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MitreAttack.decode = function decode(reader, length) { + Indicator.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.cloud.securitycenter.v1.MitreAttack(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Indicator(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.primaryTactic = reader.int32(); + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); break; } case 2: { - if (!(message.primaryTechniques && message.primaryTechniques.length)) - message.primaryTechniques = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.primaryTechniques.push(reader.int32()); - } else - message.primaryTechniques.push(reader.int32()); + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push(reader.string()); break; } case 3: { - if (!(message.additionalTactics && message.additionalTactics.length)) - message.additionalTactics = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.additionalTactics.push(reader.int32()); - } else - message.additionalTactics.push(reader.int32()); + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.decode(reader, reader.uint32())); break; } case 4: { - if (!(message.additionalTechniques && message.additionalTechniques.length)) - message.additionalTechniques = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.additionalTechniques.push(reader.int32()); - } else - message.additionalTechniques.push(reader.int32()); - break; - } - case 5: { - message.version = reader.string(); + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); break; } default: @@ -18681,2362 +16913,19341 @@ }; /** - * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * Decodes an Indicator message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + * @returns {google.cloud.securitycenter.v1.Indicator} Indicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MitreAttack.decodeDelimited = function decodeDelimited(reader) { + Indicator.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MitreAttack message. + * Verifies an Indicator message. * @function verify - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MitreAttack.verify = function verify(message) { + Indicator.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) - switch (message.primaryTactic) { - default: - return "primaryTactic: enum value expected"; - case 0: - case 1: - case 2: - case 5: - case 3: - case 6: - case 8: - case 7: - case 9: - case 10: - case 11: - case 12: - case 4: - case 13: - case 14: - break; - } - if (message.primaryTechniques != null && message.hasOwnProperty("primaryTechniques")) { - if (!Array.isArray(message.primaryTechniques)) - return "primaryTechniques: array expected"; - for (var i = 0; i < message.primaryTechniques.length; ++i) - switch (message.primaryTechniques[i]) { - default: - return "primaryTechniques: enum value[] expected"; - case 0: - case 49: - case 50: - case 37: - case 38: - case 32: - case 56: - case 6: - case 7: - case 18: - case 19: - case 45: - case 46: - case 47: - case 14: - case 35: - case 15: - case 16: - case 9: - case 10: - case 11: - case 22: - case 40: - case 23: - case 58: - case 3: - case 4: - case 44: - case 5: - case 33: - case 39: - case 27: - case 30: - case 29: - case 52: - case 36: - case 8: - case 17: - case 48: - case 42: - case 51: - case 25: - case 24: - case 34: - case 13: - case 28: - case 31: - case 55: - case 20: - case 21: - case 12: - case 41: - case 26: - case 54: - case 53: - case 43: - case 1: - case 2: - case 57: - break; - } + if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { + if (!Array.isArray(message.ipAddresses)) + return "ipAddresses: array expected"; + for (var i = 0; i < message.ipAddresses.length; ++i) + if (!$util.isString(message.ipAddresses[i])) + return "ipAddresses: string[] expected"; } - if (message.additionalTactics != null && message.hasOwnProperty("additionalTactics")) { - if (!Array.isArray(message.additionalTactics)) - return "additionalTactics: array expected"; - for (var i = 0; i < message.additionalTactics.length; ++i) - switch (message.additionalTactics[i]) { - default: - return "additionalTactics: enum value[] expected"; - case 0: - case 1: - case 2: - case 5: - case 3: - case 6: - case 8: - case 7: - case 9: - case 10: - case 11: - case 12: - case 4: - case 13: - case 14: - break; - } + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) + if (!$util.isString(message.domains[i])) + return "domains: string[] expected"; } - if (message.additionalTechniques != null && message.hasOwnProperty("additionalTechniques")) { - if (!Array.isArray(message.additionalTechniques)) - return "additionalTechniques: array expected"; - for (var i = 0; i < message.additionalTechniques.length; ++i) - switch (message.additionalTechniques[i]) { - default: - return "additionalTechniques: enum value[] expected"; - case 0: - case 49: - case 50: - case 37: - case 38: - case 32: - case 56: - case 6: - case 7: - case 18: - case 19: - case 45: - case 46: - case 47: - case 14: - case 35: - case 15: - case 16: - case 9: - case 10: - case 11: - case 22: - case 40: - case 23: - case 58: - case 3: - case 4: - case 44: - case 5: - case 33: - case 39: - case 27: - case 30: - case 29: - case 52: - case 36: - case 8: - case 17: - case 48: - case 42: - case 51: - case 25: - case 24: - case 34: - case 13: - case 28: - case 31: - case 55: - case 20: - case 21: - case 12: - case 41: - case 26: - case 54: - case 53: - case 43: - case 1: - case 2: - case 57: - break; - } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; return null; }; /** - * Creates a MitreAttack message from a plain object. Also converts values to their respective internal types. + * Creates an Indicator message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.MitreAttack + * @memberof google.cloud.securitycenter.v1.Indicator * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + * @returns {google.cloud.securitycenter.v1.Indicator} Indicator */ - MitreAttack.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.MitreAttack) + Indicator.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Indicator) return object; - var message = new $root.google.cloud.securitycenter.v1.MitreAttack(); - switch (object.primaryTactic) { - default: - if (typeof object.primaryTactic === "number") { - message.primaryTactic = object.primaryTactic; - break; + var message = new $root.google.cloud.securitycenter.v1.Indicator(); + if (object.ipAddresses) { + if (!Array.isArray(object.ipAddresses)) + throw TypeError(".google.cloud.securitycenter.v1.Indicator.ipAddresses: array expected"); + message.ipAddresses = []; + for (var i = 0; i < object.ipAddresses.length; ++i) + message.ipAddresses[i] = String(object.ipAddresses[i]); + } + if (object.domains) { + if (!Array.isArray(object.domains)) + throw TypeError(".google.cloud.securitycenter.v1.Indicator.domains: array expected"); + message.domains = []; + for (var i = 0; i < object.domains.length; ++i) + message.domains[i] = String(object.domains[i]); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".google.cloud.securitycenter.v1.Indicator.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Indicator.signatures: object expected"); + message.signatures[i] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.fromObject(object.signatures[i]); } - break; - case "TACTIC_UNSPECIFIED": - case 0: - message.primaryTactic = 0; - break; - case "RECONNAISSANCE": - case 1: - message.primaryTactic = 1; - break; - case "RESOURCE_DEVELOPMENT": - case 2: - message.primaryTactic = 2; - break; - case "INITIAL_ACCESS": - case 5: - message.primaryTactic = 5; - break; - case "EXECUTION": - case 3: - message.primaryTactic = 3; - break; - case "PERSISTENCE": - case 6: - message.primaryTactic = 6; - break; - case "PRIVILEGE_ESCALATION": - case 8: - message.primaryTactic = 8; - break; - case "DEFENSE_EVASION": - case 7: - message.primaryTactic = 7; - break; - case "CREDENTIAL_ACCESS": - case 9: - message.primaryTactic = 9; - break; - case "DISCOVERY": - case 10: - message.primaryTactic = 10; - break; - case "LATERAL_MOVEMENT": - case 11: - message.primaryTactic = 11; - break; - case "COLLECTION": - case 12: - message.primaryTactic = 12; - break; - case "COMMAND_AND_CONTROL": - case 4: - message.primaryTactic = 4; - break; - case "EXFILTRATION": - case 13: - message.primaryTactic = 13; - break; - case "IMPACT": - case 14: - message.primaryTactic = 14; - break; } - if (object.primaryTechniques) { - if (!Array.isArray(object.primaryTechniques)) - throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.primaryTechniques: array expected"); - message.primaryTechniques = []; - for (var i = 0; i < object.primaryTechniques.length; ++i) - switch (object.primaryTechniques[i]) { - default: - if (typeof object.primaryTechniques[i] === "number") { - message.primaryTechniques[i] = object.primaryTechniques[i]; - break; - } - case "TECHNIQUE_UNSPECIFIED": - case 0: - message.primaryTechniques[i] = 0; - break; - case "MASQUERADING": - case 49: - message.primaryTechniques[i] = 49; - break; - case "MATCH_LEGITIMATE_NAME_OR_LOCATION": - case 50: - message.primaryTechniques[i] = 50; - break; - case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": - case 37: - message.primaryTechniques[i] = 37; - break; - case "STARTUP_ITEMS": - case 38: - message.primaryTechniques[i] = 38; - break; - case "NETWORK_SERVICE_DISCOVERY": - case 32: - message.primaryTechniques[i] = 32; - break; - case "PROCESS_DISCOVERY": - case 56: - message.primaryTechniques[i] = 56; - break; - case "COMMAND_AND_SCRIPTING_INTERPRETER": - case 6: - message.primaryTechniques[i] = 6; - break; - case "UNIX_SHELL": - case 7: - message.primaryTechniques[i] = 7; - break; - case "PERMISSION_GROUPS_DISCOVERY": - case 18: - message.primaryTechniques[i] = 18; - break; - case "CLOUD_GROUPS": - case 19: - message.primaryTechniques[i] = 19; - break; - case "APPLICATION_LAYER_PROTOCOL": - case 45: - message.primaryTechniques[i] = 45; - break; - case "DNS": - case 46: - message.primaryTechniques[i] = 46; - break; - case "SOFTWARE_DEPLOYMENT_TOOLS": - case 47: - message.primaryTechniques[i] = 47; - break; - case "VALID_ACCOUNTS": - case 14: - message.primaryTechniques[i] = 14; - break; - case "DEFAULT_ACCOUNTS": - case 35: - message.primaryTechniques[i] = 35; - break; - case "LOCAL_ACCOUNTS": - case 15: - message.primaryTechniques[i] = 15; - break; - case "CLOUD_ACCOUNTS": - case 16: - message.primaryTechniques[i] = 16; - break; - case "PROXY": - case 9: - message.primaryTechniques[i] = 9; - break; - case "EXTERNAL_PROXY": - case 10: - message.primaryTechniques[i] = 10; - break; - case "MULTI_HOP_PROXY": - case 11: - message.primaryTechniques[i] = 11; - break; - case "ACCOUNT_MANIPULATION": - case 22: - message.primaryTechniques[i] = 22; - break; - case "ADDITIONAL_CLOUD_CREDENTIALS": - case 40: - message.primaryTechniques[i] = 40; - break; - case "SSH_AUTHORIZED_KEYS": - case 23: - message.primaryTechniques[i] = 23; - break; - case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": - case 58: - message.primaryTechniques[i] = 58; - break; - case "INGRESS_TOOL_TRANSFER": - case 3: - message.primaryTechniques[i] = 3; - break; - case "NATIVE_API": - case 4: - message.primaryTechniques[i] = 4; - break; - case "BRUTE_FORCE": - case 44: - message.primaryTechniques[i] = 44; - break; - case "SHARED_MODULES": - case 5: - message.primaryTechniques[i] = 5; - break; - case "ACCESS_TOKEN_MANIPULATION": - case 33: - message.primaryTechniques[i] = 33; - break; - case "TOKEN_IMPERSONATION_OR_THEFT": - case 39: - message.primaryTechniques[i] = 39; - break; - case "EXPLOIT_PUBLIC_FACING_APPLICATION": - case 27: - message.primaryTechniques[i] = 27; - break; - case "DOMAIN_POLICY_MODIFICATION": - case 30: - message.primaryTechniques[i] = 30; - break; - case "DATA_DESTRUCTION": - case 29: - message.primaryTechniques[i] = 29; - break; - case "SERVICE_STOP": - case 52: - message.primaryTechniques[i] = 52; - break; - case "INHIBIT_SYSTEM_RECOVERY": - case 36: - message.primaryTechniques[i] = 36; - break; - case "RESOURCE_HIJACKING": - case 8: - message.primaryTechniques[i] = 8; - break; - case "NETWORK_DENIAL_OF_SERVICE": - case 17: - message.primaryTechniques[i] = 17; - break; - case "CLOUD_SERVICE_DISCOVERY": - case 48: - message.primaryTechniques[i] = 48; - break; - case "STEAL_APPLICATION_ACCESS_TOKEN": - case 42: - message.primaryTechniques[i] = 42; - break; - case "ACCOUNT_ACCESS_REMOVAL": - case 51: - message.primaryTechniques[i] = 51; - break; - case "STEAL_WEB_SESSION_COOKIE": - case 25: - message.primaryTechniques[i] = 25; - break; - case "CREATE_OR_MODIFY_SYSTEM_PROCESS": - case 24: - message.primaryTechniques[i] = 24; - break; - case "ABUSE_ELEVATION_CONTROL_MECHANISM": - case 34: - message.primaryTechniques[i] = 34; - break; - case "UNSECURED_CREDENTIALS": - case 13: - message.primaryTechniques[i] = 13; - break; - case "MODIFY_AUTHENTICATION_PROCESS": - case 28: - message.primaryTechniques[i] = 28; - break; - case "IMPAIR_DEFENSES": - case 31: - message.primaryTechniques[i] = 31; - break; - case "DISABLE_OR_MODIFY_TOOLS": - case 55: - message.primaryTechniques[i] = 55; - break; - case "EXFILTRATION_OVER_WEB_SERVICE": - case 20: - message.primaryTechniques[i] = 20; - break; - case "EXFILTRATION_TO_CLOUD_STORAGE": - case 21: - message.primaryTechniques[i] = 21; - break; - case "DYNAMIC_RESOLUTION": - case 12: - message.primaryTechniques[i] = 12; - break; - case "LATERAL_TOOL_TRANSFER": - case 41: - message.primaryTechniques[i] = 41; - break; - case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": - case 26: - message.primaryTechniques[i] = 26; - break; - case "CREATE_SNAPSHOT": - case 54: - message.primaryTechniques[i] = 54; - break; - case "CLOUD_INFRASTRUCTURE_DISCOVERY": - case 53: - message.primaryTechniques[i] = 53; - break; - case "OBTAIN_CAPABILITIES": - case 43: - message.primaryTechniques[i] = 43; - break; - case "ACTIVE_SCANNING": - case 1: - message.primaryTechniques[i] = 1; - break; - case "SCANNING_IP_BLOCKS": - case 2: - message.primaryTechniques[i] = 2; - break; - case "CONTAINER_AND_RESOURCE_DISCOVERY": - case 57: - message.primaryTechniques[i] = 57; - break; - } + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.securitycenter.v1.Indicator.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); } - if (object.additionalTactics) { - if (!Array.isArray(object.additionalTactics)) - throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.additionalTactics: array expected"); - message.additionalTactics = []; - for (var i = 0; i < object.additionalTactics.length; ++i) - switch (object.additionalTactics[i]) { - default: - if (typeof object.additionalTactics[i] === "number") { - message.additionalTactics[i] = object.additionalTactics[i]; + return message; + }; + + /** + * Creates a plain object from an Indicator message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Indicator + * @static + * @param {google.cloud.securitycenter.v1.Indicator} message Indicator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Indicator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ipAddresses = []; + object.domains = []; + object.signatures = []; + object.uris = []; + } + if (message.ipAddresses && message.ipAddresses.length) { + object.ipAddresses = []; + for (var j = 0; j < message.ipAddresses.length; ++j) + object.ipAddresses[j] = message.ipAddresses[j]; + } + if (message.domains && message.domains.length) { + object.domains = []; + for (var j = 0; j < message.domains.length; ++j) + object.domains[j] = message.domains[j]; + } + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.toObject(message.signatures[j], options); + } + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + return object; + }; + + /** + * Converts this Indicator to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Indicator + * @instance + * @returns {Object.} JSON object + */ + Indicator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Indicator + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Indicator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Indicator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator"; + }; + + Indicator.ProcessSignature = (function() { + + /** + * Properties of a ProcessSignature. + * @memberof google.cloud.securitycenter.v1.Indicator + * @interface IProcessSignature + * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null} [memoryHashSignature] ProcessSignature memoryHashSignature + * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null} [yaraRuleSignature] ProcessSignature yaraRuleSignature + * @property {google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType|null} [signatureType] ProcessSignature signatureType + */ + + /** + * Constructs a new ProcessSignature. + * @memberof google.cloud.securitycenter.v1.Indicator + * @classdesc Represents a ProcessSignature. + * @implements IProcessSignature + * @constructor + * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature=} [properties] Properties to set + */ + function ProcessSignature(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]]; + } + + /** + * ProcessSignature memoryHashSignature. + * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature|null|undefined} memoryHashSignature + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @instance + */ + ProcessSignature.prototype.memoryHashSignature = null; + + /** + * ProcessSignature yaraRuleSignature. + * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature|null|undefined} yaraRuleSignature + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @instance + */ + ProcessSignature.prototype.yaraRuleSignature = null; + + /** + * ProcessSignature signatureType. + * @member {google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType} signatureType + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @instance + */ + ProcessSignature.prototype.signatureType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ProcessSignature signature. + * @member {"memoryHashSignature"|"yaraRuleSignature"|undefined} signature + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @instance + */ + Object.defineProperty(ProcessSignature.prototype, "signature", { + get: $util.oneOfGetter($oneOfFields = ["memoryHashSignature", "yaraRuleSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProcessSignature instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature instance + */ + ProcessSignature.create = function create(properties) { + return new ProcessSignature(properties); + }; + + /** + * Encodes the specified ProcessSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memoryHashSignature != null && Object.hasOwnProperty.call(message, "memoryHashSignature")) + $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.encode(message.memoryHashSignature, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.yaraRuleSignature != null && Object.hasOwnProperty.call(message, "yaraRuleSignature")) + $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.encode(message.yaraRuleSignature, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.signatureType); + return writer; + }; + + /** + * Encodes the specified ProcessSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.IProcessSignature} message ProcessSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProcessSignature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.decode(reader, reader.uint32()); break; } - case "TACTIC_UNSPECIFIED": - case 0: - message.additionalTactics[i] = 0; - break; - case "RECONNAISSANCE": - case 1: - message.additionalTactics[i] = 1; - break; - case "RESOURCE_DEVELOPMENT": - case 2: - message.additionalTactics[i] = 2; - break; - case "INITIAL_ACCESS": - case 5: - message.additionalTactics[i] = 5; - break; - case "EXECUTION": - case 3: - message.additionalTactics[i] = 3; - break; - case "PERSISTENCE": - case 6: - message.additionalTactics[i] = 6; - break; - case "PRIVILEGE_ESCALATION": - case 8: - message.additionalTactics[i] = 8; - break; - case "DEFENSE_EVASION": - case 7: - message.additionalTactics[i] = 7; - break; - case "CREDENTIAL_ACCESS": - case 9: - message.additionalTactics[i] = 9; - break; - case "DISCOVERY": - case 10: - message.additionalTactics[i] = 10; - break; - case "LATERAL_MOVEMENT": - case 11: - message.additionalTactics[i] = 11; - break; - case "COLLECTION": - case 12: - message.additionalTactics[i] = 12; - break; - case "COMMAND_AND_CONTROL": - case 4: - message.additionalTactics[i] = 4; - break; - case "EXFILTRATION": - case 13: - message.additionalTactics[i] = 13; - break; - case "IMPACT": - case 14: - message.additionalTactics[i] = 14; + case 7: { + message.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.decode(reader, reader.uint32()); + break; + } + case 8: { + message.signatureType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - } - if (object.additionalTechniques) { - if (!Array.isArray(object.additionalTechniques)) - throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.additionalTechniques: array expected"); - message.additionalTechniques = []; - for (var i = 0; i < object.additionalTechniques.length; ++i) - switch (object.additionalTechniques[i]) { + } + return message; + }; + + /** + * Decodes a ProcessSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProcessSignature message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProcessSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { + properties.signature = 1; + { + var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify(message.memoryHashSignature); + if (error) + return "memoryHashSignature." + error; + } + } + if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { + if (properties.signature === 1) + return "signature: multiple values"; + properties.signature = 1; + { + var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify(message.yaraRuleSignature); + if (error) + return "yaraRuleSignature." + error; + } + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + switch (message.signatureType) { default: - if (typeof object.additionalTechniques[i] === "number") { - message.additionalTechniques[i] = object.additionalTechniques[i]; - break; - } - case "TECHNIQUE_UNSPECIFIED": + return "signatureType: enum value expected"; case 0: - message.additionalTechniques[i] = 0; - break; - case "MASQUERADING": - case 49: - message.additionalTechniques[i] = 49; - break; - case "MATCH_LEGITIMATE_NAME_OR_LOCATION": - case 50: - message.additionalTechniques[i] = 50; - break; - case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": - case 37: - message.additionalTechniques[i] = 37; - break; - case "STARTUP_ITEMS": - case 38: - message.additionalTechniques[i] = 38; - break; - case "NETWORK_SERVICE_DISCOVERY": - case 32: - message.additionalTechniques[i] = 32; - break; - case "PROCESS_DISCOVERY": - case 56: - message.additionalTechniques[i] = 56; - break; - case "COMMAND_AND_SCRIPTING_INTERPRETER": - case 6: - message.additionalTechniques[i] = 6; - break; - case "UNIX_SHELL": - case 7: - message.additionalTechniques[i] = 7; - break; - case "PERMISSION_GROUPS_DISCOVERY": - case 18: - message.additionalTechniques[i] = 18; - break; - case "CLOUD_GROUPS": - case 19: - message.additionalTechniques[i] = 19; - break; - case "APPLICATION_LAYER_PROTOCOL": - case 45: - message.additionalTechniques[i] = 45; + case 1: + case 2: break; - case "DNS": - case 46: - message.additionalTechniques[i] = 46; - break; - case "SOFTWARE_DEPLOYMENT_TOOLS": - case 47: - message.additionalTechniques[i] = 47; - break; - case "VALID_ACCOUNTS": - case 14: - message.additionalTechniques[i] = 14; - break; - case "DEFAULT_ACCOUNTS": - case 35: - message.additionalTechniques[i] = 35; - break; - case "LOCAL_ACCOUNTS": - case 15: - message.additionalTechniques[i] = 15; - break; - case "CLOUD_ACCOUNTS": - case 16: - message.additionalTechniques[i] = 16; - break; - case "PROXY": - case 9: - message.additionalTechniques[i] = 9; - break; - case "EXTERNAL_PROXY": - case 10: - message.additionalTechniques[i] = 10; - break; - case "MULTI_HOP_PROXY": - case 11: - message.additionalTechniques[i] = 11; - break; - case "ACCOUNT_MANIPULATION": - case 22: - message.additionalTechniques[i] = 22; - break; - case "ADDITIONAL_CLOUD_CREDENTIALS": - case 40: - message.additionalTechniques[i] = 40; - break; - case "SSH_AUTHORIZED_KEYS": - case 23: - message.additionalTechniques[i] = 23; - break; - case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": - case 58: - message.additionalTechniques[i] = 58; - break; - case "INGRESS_TOOL_TRANSFER": - case 3: - message.additionalTechniques[i] = 3; - break; - case "NATIVE_API": - case 4: - message.additionalTechniques[i] = 4; - break; - case "BRUTE_FORCE": - case 44: - message.additionalTechniques[i] = 44; - break; - case "SHARED_MODULES": - case 5: - message.additionalTechniques[i] = 5; - break; - case "ACCESS_TOKEN_MANIPULATION": - case 33: - message.additionalTechniques[i] = 33; - break; - case "TOKEN_IMPERSONATION_OR_THEFT": - case 39: - message.additionalTechniques[i] = 39; - break; - case "EXPLOIT_PUBLIC_FACING_APPLICATION": - case 27: - message.additionalTechniques[i] = 27; - break; - case "DOMAIN_POLICY_MODIFICATION": - case 30: - message.additionalTechniques[i] = 30; - break; - case "DATA_DESTRUCTION": - case 29: - message.additionalTechniques[i] = 29; - break; - case "SERVICE_STOP": - case 52: - message.additionalTechniques[i] = 52; - break; - case "INHIBIT_SYSTEM_RECOVERY": - case 36: - message.additionalTechniques[i] = 36; - break; - case "RESOURCE_HIJACKING": - case 8: - message.additionalTechniques[i] = 8; - break; - case "NETWORK_DENIAL_OF_SERVICE": - case 17: - message.additionalTechniques[i] = 17; - break; - case "CLOUD_SERVICE_DISCOVERY": - case 48: - message.additionalTechniques[i] = 48; - break; - case "STEAL_APPLICATION_ACCESS_TOKEN": - case 42: - message.additionalTechniques[i] = 42; - break; - case "ACCOUNT_ACCESS_REMOVAL": - case 51: - message.additionalTechniques[i] = 51; - break; - case "STEAL_WEB_SESSION_COOKIE": - case 25: - message.additionalTechniques[i] = 25; - break; - case "CREATE_OR_MODIFY_SYSTEM_PROCESS": - case 24: - message.additionalTechniques[i] = 24; - break; - case "ABUSE_ELEVATION_CONTROL_MECHANISM": - case 34: - message.additionalTechniques[i] = 34; - break; - case "UNSECURED_CREDENTIALS": - case 13: - message.additionalTechniques[i] = 13; - break; - case "MODIFY_AUTHENTICATION_PROCESS": - case 28: - message.additionalTechniques[i] = 28; - break; - case "IMPAIR_DEFENSES": - case 31: - message.additionalTechniques[i] = 31; - break; - case "DISABLE_OR_MODIFY_TOOLS": - case 55: - message.additionalTechniques[i] = 55; - break; - case "EXFILTRATION_OVER_WEB_SERVICE": - case 20: - message.additionalTechniques[i] = 20; - break; - case "EXFILTRATION_TO_CLOUD_STORAGE": - case 21: - message.additionalTechniques[i] = 21; - break; - case "DYNAMIC_RESOLUTION": - case 12: - message.additionalTechniques[i] = 12; - break; - case "LATERAL_TOOL_TRANSFER": - case 41: - message.additionalTechniques[i] = 41; - break; - case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": - case 26: - message.additionalTechniques[i] = 26; - break; - case "CREATE_SNAPSHOT": - case 54: - message.additionalTechniques[i] = 54; - break; - case "CLOUD_INFRASTRUCTURE_DISCOVERY": - case 53: - message.additionalTechniques[i] = 53; - break; - case "OBTAIN_CAPABILITIES": - case 43: - message.additionalTechniques[i] = 43; - break; - case "ACTIVE_SCANNING": - case 1: - message.additionalTechniques[i] = 1; - break; - case "SCANNING_IP_BLOCKS": - case 2: - message.additionalTechniques[i] = 2; - break; - case "CONTAINER_AND_RESOURCE_DISCOVERY": - case 57: - message.additionalTechniques[i] = 57; + } + return null; + }; + + /** + * Creates a ProcessSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature} ProcessSignature + */ + ProcessSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature) + return object; + var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature(); + if (object.memoryHashSignature != null) { + if (typeof object.memoryHashSignature !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.memoryHashSignature: object expected"); + message.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.fromObject(object.memoryHashSignature); + } + if (object.yaraRuleSignature != null) { + if (typeof object.yaraRuleSignature !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.yaraRuleSignature: object expected"); + message.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.fromObject(object.yaraRuleSignature); + } + switch (object.signatureType) { + default: + if (typeof object.signatureType === "number") { + message.signatureType = object.signatureType; break; } - } - if (object.version != null) - message.version = String(object.version); - return message; - }; + break; + case "SIGNATURE_TYPE_UNSPECIFIED": + case 0: + message.signatureType = 0; + break; + case "SIGNATURE_TYPE_PROCESS": + case 1: + message.signatureType = 1; + break; + case "SIGNATURE_TYPE_FILE": + case 2: + message.signatureType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ProcessSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature} message ProcessSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProcessSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.signatureType = options.enums === String ? "SIGNATURE_TYPE_UNSPECIFIED" : 0; + if (message.memoryHashSignature != null && message.hasOwnProperty("memoryHashSignature")) { + object.memoryHashSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.toObject(message.memoryHashSignature, options); + if (options.oneofs) + object.signature = "memoryHashSignature"; + } + if (message.yaraRuleSignature != null && message.hasOwnProperty("yaraRuleSignature")) { + object.yaraRuleSignature = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.toObject(message.yaraRuleSignature, options); + if (options.oneofs) + object.signature = "yaraRuleSignature"; + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + object.signatureType = options.enums === String ? $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType[message.signatureType] : message.signatureType; + return object; + }; + + /** + * Converts this ProcessSignature to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @instance + * @returns {Object.} JSON object + */ + ProcessSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProcessSignature + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProcessSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature"; + }; + + ProcessSignature.MemoryHashSignature = (function() { + + /** + * Properties of a MemoryHashSignature. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @interface IMemoryHashSignature + * @property {string|null} [binaryFamily] MemoryHashSignature binaryFamily + * @property {Array.|null} [detections] MemoryHashSignature detections + */ + + /** + * Constructs a new MemoryHashSignature. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @classdesc Represents a MemoryHashSignature. + * @implements IMemoryHashSignature + * @constructor + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set + */ + function MemoryHashSignature(properties) { + this.detections = []; + 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]]; + } + + /** + * MemoryHashSignature binaryFamily. + * @member {string} binaryFamily + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @instance + */ + MemoryHashSignature.prototype.binaryFamily = ""; + + /** + * MemoryHashSignature detections. + * @member {Array.} detections + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @instance + */ + MemoryHashSignature.prototype.detections = $util.emptyArray; + + /** + * Creates a new MemoryHashSignature instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature instance + */ + MemoryHashSignature.create = function create(properties) { + return new MemoryHashSignature(properties); + }; + + /** + * Encodes the specified MemoryHashSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryHashSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binaryFamily != null && Object.hasOwnProperty.call(message, "binaryFamily")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.binaryFamily); + if (message.detections != null && message.detections.length) + for (var i = 0; i < message.detections.length; ++i) + $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.encode(message.detections[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MemoryHashSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IMemoryHashSignature} message MemoryHashSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryHashSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryHashSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.binaryFamily = reader.string(); + break; + } + case 4: { + if (!(message.detections && message.detections.length)) + message.detections = []; + message.detections.push($root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MemoryHashSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryHashSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MemoryHashSignature message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MemoryHashSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) + if (!$util.isString(message.binaryFamily)) + return "binaryFamily: string expected"; + if (message.detections != null && message.hasOwnProperty("detections")) { + if (!Array.isArray(message.detections)) + return "detections: array expected"; + for (var i = 0; i < message.detections.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify(message.detections[i]); + if (error) + return "detections." + error; + } + } + return null; + }; + + /** + * Creates a MemoryHashSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} MemoryHashSignature + */ + MemoryHashSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + return object; + var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); + if (object.binaryFamily != null) + message.binaryFamily = String(object.binaryFamily); + if (object.detections) { + if (!Array.isArray(object.detections)) + throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.detections: array expected"); + message.detections = []; + for (var i = 0; i < object.detections.length; ++i) { + if (typeof object.detections[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.detections: object expected"); + message.detections[i] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.fromObject(object.detections[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MemoryHashSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} message MemoryHashSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MemoryHashSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.detections = []; + if (options.defaults) + object.binaryFamily = ""; + if (message.binaryFamily != null && message.hasOwnProperty("binaryFamily")) + object.binaryFamily = message.binaryFamily; + if (message.detections && message.detections.length) { + object.detections = []; + for (var j = 0; j < message.detections.length; ++j) + object.detections[j] = $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.toObject(message.detections[j], options); + } + return object; + }; + + /** + * Converts this MemoryHashSignature to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @instance + * @returns {Object.} JSON object + */ + MemoryHashSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MemoryHashSignature + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MemoryHashSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature"; + }; + + MemoryHashSignature.Detection = (function() { + + /** + * Properties of a Detection. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @interface IDetection + * @property {string|null} [binary] Detection binary + * @property {number|null} [percentPagesMatched] Detection percentPagesMatched + */ + + /** + * Constructs a new Detection. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + * @classdesc Represents a Detection. + * @implements IDetection + * @constructor + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set + */ + function Detection(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]]; + } + + /** + * Detection binary. + * @member {string} binary + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + */ + Detection.prototype.binary = ""; + + /** + * Detection percentPagesMatched. + * @member {number} percentPagesMatched + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + */ + Detection.prototype.percentPagesMatched = 0; + + /** + * Creates a new Detection instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection instance + */ + Detection.create = function create(properties) { + return new Detection(properties); + }; + + /** + * Encodes the specified Detection message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.binary); + if (message.percentPagesMatched != null && Object.hasOwnProperty.call(message, "percentPagesMatched")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.percentPagesMatched); + return writer; + }; + + /** + * Encodes the specified Detection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.IDetection} message Detection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Detection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Detection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detection.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.binary = reader.string(); + break; + } + case 3: { + message.percentPagesMatched = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Detection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Detection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Detection message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Detection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.binary != null && message.hasOwnProperty("binary")) + if (!$util.isString(message.binary)) + return "binary: string expected"; + if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) + if (typeof message.percentPagesMatched !== "number") + return "percentPagesMatched: number expected"; + return null; + }; + + /** + * Creates a Detection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} Detection + */ + Detection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + return object; + var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection(); + if (object.binary != null) + message.binary = String(object.binary); + if (object.percentPagesMatched != null) + message.percentPagesMatched = Number(object.percentPagesMatched); + return message; + }; + + /** + * Creates a plain object from a Detection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} message Detection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Detection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.binary = ""; + object.percentPagesMatched = 0; + } + if (message.binary != null && message.hasOwnProperty("binary")) + object.binary = message.binary; + if (message.percentPagesMatched != null && message.hasOwnProperty("percentPagesMatched")) + object.percentPagesMatched = options.json && !isFinite(message.percentPagesMatched) ? String(message.percentPagesMatched) : message.percentPagesMatched; + return object; + }; + + /** + * Converts this Detection to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @instance + * @returns {Object.} JSON object + */ + Detection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Detection + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Detection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection"; + }; + + return Detection; + })(); + + return MemoryHashSignature; + })(); + + ProcessSignature.YaraRuleSignature = (function() { + + /** + * Properties of a YaraRuleSignature. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @interface IYaraRuleSignature + * @property {string|null} [yaraRule] YaraRuleSignature yaraRule + */ + + /** + * Constructs a new YaraRuleSignature. + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature + * @classdesc Represents a YaraRuleSignature. + * @implements IYaraRuleSignature + * @constructor + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set + */ + function YaraRuleSignature(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]]; + } + + /** + * YaraRuleSignature yaraRule. + * @member {string} yaraRule + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @instance + */ + YaraRuleSignature.prototype.yaraRule = ""; + + /** + * Creates a new YaraRuleSignature instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature instance + */ + YaraRuleSignature.create = function create(properties) { + return new YaraRuleSignature(properties); + }; + + /** + * Encodes the specified YaraRuleSignature message. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YaraRuleSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yaraRule != null && Object.hasOwnProperty.call(message, "yaraRule")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.yaraRule); + return writer; + }; + + /** + * Encodes the specified YaraRuleSignature message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.IYaraRuleSignature} message YaraRuleSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + YaraRuleSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YaraRuleSignature.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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.yaraRule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a YaraRuleSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + YaraRuleSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a YaraRuleSignature message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + YaraRuleSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) + if (!$util.isString(message.yaraRule)) + return "yaraRule: string expected"; + return null; + }; + + /** + * Creates a YaraRuleSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} YaraRuleSignature + */ + YaraRuleSignature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + return object; + var message = new $root.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); + if (object.yaraRule != null) + message.yaraRule = String(object.yaraRule); + return message; + }; + + /** + * Creates a plain object from a YaraRuleSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} message YaraRuleSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + YaraRuleSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.yaraRule = ""; + if (message.yaraRule != null && message.hasOwnProperty("yaraRule")) + object.yaraRule = message.yaraRule; + return object; + }; + + /** + * Converts this YaraRuleSignature to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @instance + * @returns {Object.} JSON object + */ + YaraRuleSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for YaraRuleSignature + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + YaraRuleSignature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature"; + }; + + return YaraRuleSignature; + })(); + + /** + * SignatureType enum. + * @name google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType + * @enum {number} + * @property {number} SIGNATURE_TYPE_UNSPECIFIED=0 SIGNATURE_TYPE_UNSPECIFIED value + * @property {number} SIGNATURE_TYPE_PROCESS=1 SIGNATURE_TYPE_PROCESS value + * @property {number} SIGNATURE_TYPE_FILE=2 SIGNATURE_TYPE_FILE value + */ + ProcessSignature.SignatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SIGNATURE_TYPE_PROCESS"] = 1; + values[valuesById[2] = "SIGNATURE_TYPE_FILE"] = 2; + return values; + })(); + + return ProcessSignature; + })(); + + return Indicator; + })(); + + v1.KernelRootkit = (function() { + + /** + * Properties of a KernelRootkit. + * @memberof google.cloud.securitycenter.v1 + * @interface IKernelRootkit + * @property {string|null} [name] KernelRootkit name + * @property {boolean|null} [unexpectedCodeModification] KernelRootkit unexpectedCodeModification + * @property {boolean|null} [unexpectedReadOnlyDataModification] KernelRootkit unexpectedReadOnlyDataModification + * @property {boolean|null} [unexpectedFtraceHandler] KernelRootkit unexpectedFtraceHandler + * @property {boolean|null} [unexpectedKprobeHandler] KernelRootkit unexpectedKprobeHandler + * @property {boolean|null} [unexpectedKernelCodePages] KernelRootkit unexpectedKernelCodePages + * @property {boolean|null} [unexpectedSystemCallHandler] KernelRootkit unexpectedSystemCallHandler + * @property {boolean|null} [unexpectedInterruptHandler] KernelRootkit unexpectedInterruptHandler + * @property {boolean|null} [unexpectedProcessesInRunqueue] KernelRootkit unexpectedProcessesInRunqueue + */ + + /** + * Constructs a new KernelRootkit. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a KernelRootkit. + * @implements IKernelRootkit + * @constructor + * @param {google.cloud.securitycenter.v1.IKernelRootkit=} [properties] Properties to set + */ + function KernelRootkit(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]]; + } + + /** + * KernelRootkit name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.name = ""; + + /** + * KernelRootkit unexpectedCodeModification. + * @member {boolean} unexpectedCodeModification + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedCodeModification = false; + + /** + * KernelRootkit unexpectedReadOnlyDataModification. + * @member {boolean} unexpectedReadOnlyDataModification + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedReadOnlyDataModification = false; + + /** + * KernelRootkit unexpectedFtraceHandler. + * @member {boolean} unexpectedFtraceHandler + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedFtraceHandler = false; + + /** + * KernelRootkit unexpectedKprobeHandler. + * @member {boolean} unexpectedKprobeHandler + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedKprobeHandler = false; + + /** + * KernelRootkit unexpectedKernelCodePages. + * @member {boolean} unexpectedKernelCodePages + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedKernelCodePages = false; + + /** + * KernelRootkit unexpectedSystemCallHandler. + * @member {boolean} unexpectedSystemCallHandler + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedSystemCallHandler = false; + + /** + * KernelRootkit unexpectedInterruptHandler. + * @member {boolean} unexpectedInterruptHandler + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedInterruptHandler = false; + + /** + * KernelRootkit unexpectedProcessesInRunqueue. + * @member {boolean} unexpectedProcessesInRunqueue + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + */ + KernelRootkit.prototype.unexpectedProcessesInRunqueue = false; + + /** + * Creates a new KernelRootkit instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {google.cloud.securitycenter.v1.IKernelRootkit=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit instance + */ + KernelRootkit.create = function create(properties) { + return new KernelRootkit(properties); + }; + + /** + * Encodes the specified KernelRootkit message. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {google.cloud.securitycenter.v1.IKernelRootkit} message KernelRootkit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KernelRootkit.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.unexpectedCodeModification != null && Object.hasOwnProperty.call(message, "unexpectedCodeModification")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.unexpectedCodeModification); + if (message.unexpectedReadOnlyDataModification != null && Object.hasOwnProperty.call(message, "unexpectedReadOnlyDataModification")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unexpectedReadOnlyDataModification); + if (message.unexpectedFtraceHandler != null && Object.hasOwnProperty.call(message, "unexpectedFtraceHandler")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unexpectedFtraceHandler); + if (message.unexpectedKprobeHandler != null && Object.hasOwnProperty.call(message, "unexpectedKprobeHandler")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unexpectedKprobeHandler); + if (message.unexpectedKernelCodePages != null && Object.hasOwnProperty.call(message, "unexpectedKernelCodePages")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.unexpectedKernelCodePages); + if (message.unexpectedSystemCallHandler != null && Object.hasOwnProperty.call(message, "unexpectedSystemCallHandler")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.unexpectedSystemCallHandler); + if (message.unexpectedInterruptHandler != null && Object.hasOwnProperty.call(message, "unexpectedInterruptHandler")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.unexpectedInterruptHandler); + if (message.unexpectedProcessesInRunqueue != null && Object.hasOwnProperty.call(message, "unexpectedProcessesInRunqueue")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.unexpectedProcessesInRunqueue); + return writer; + }; + + /** + * Encodes the specified KernelRootkit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.KernelRootkit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {google.cloud.securitycenter.v1.IKernelRootkit} message KernelRootkit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KernelRootkit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KernelRootkit.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.cloud.securitycenter.v1.KernelRootkit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.unexpectedCodeModification = reader.bool(); + break; + } + case 3: { + message.unexpectedReadOnlyDataModification = reader.bool(); + break; + } + case 4: { + message.unexpectedFtraceHandler = reader.bool(); + break; + } + case 5: { + message.unexpectedKprobeHandler = reader.bool(); + break; + } + case 6: { + message.unexpectedKernelCodePages = reader.bool(); + break; + } + case 7: { + message.unexpectedSystemCallHandler = reader.bool(); + break; + } + case 8: { + message.unexpectedInterruptHandler = reader.bool(); + break; + } + case 9: { + message.unexpectedProcessesInRunqueue = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KernelRootkit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KernelRootkit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KernelRootkit message. + * @function verify + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KernelRootkit.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.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) + if (typeof message.unexpectedCodeModification !== "boolean") + return "unexpectedCodeModification: boolean expected"; + if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) + if (typeof message.unexpectedReadOnlyDataModification !== "boolean") + return "unexpectedReadOnlyDataModification: boolean expected"; + if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) + if (typeof message.unexpectedFtraceHandler !== "boolean") + return "unexpectedFtraceHandler: boolean expected"; + if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) + if (typeof message.unexpectedKprobeHandler !== "boolean") + return "unexpectedKprobeHandler: boolean expected"; + if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) + if (typeof message.unexpectedKernelCodePages !== "boolean") + return "unexpectedKernelCodePages: boolean expected"; + if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) + if (typeof message.unexpectedSystemCallHandler !== "boolean") + return "unexpectedSystemCallHandler: boolean expected"; + if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) + if (typeof message.unexpectedInterruptHandler !== "boolean") + return "unexpectedInterruptHandler: boolean expected"; + if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) + if (typeof message.unexpectedProcessesInRunqueue !== "boolean") + return "unexpectedProcessesInRunqueue: boolean expected"; + return null; + }; + + /** + * Creates a KernelRootkit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.KernelRootkit} KernelRootkit + */ + KernelRootkit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.KernelRootkit) + return object; + var message = new $root.google.cloud.securitycenter.v1.KernelRootkit(); + if (object.name != null) + message.name = String(object.name); + if (object.unexpectedCodeModification != null) + message.unexpectedCodeModification = Boolean(object.unexpectedCodeModification); + if (object.unexpectedReadOnlyDataModification != null) + message.unexpectedReadOnlyDataModification = Boolean(object.unexpectedReadOnlyDataModification); + if (object.unexpectedFtraceHandler != null) + message.unexpectedFtraceHandler = Boolean(object.unexpectedFtraceHandler); + if (object.unexpectedKprobeHandler != null) + message.unexpectedKprobeHandler = Boolean(object.unexpectedKprobeHandler); + if (object.unexpectedKernelCodePages != null) + message.unexpectedKernelCodePages = Boolean(object.unexpectedKernelCodePages); + if (object.unexpectedSystemCallHandler != null) + message.unexpectedSystemCallHandler = Boolean(object.unexpectedSystemCallHandler); + if (object.unexpectedInterruptHandler != null) + message.unexpectedInterruptHandler = Boolean(object.unexpectedInterruptHandler); + if (object.unexpectedProcessesInRunqueue != null) + message.unexpectedProcessesInRunqueue = Boolean(object.unexpectedProcessesInRunqueue); + return message; + }; + + /** + * Creates a plain object from a KernelRootkit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {google.cloud.securitycenter.v1.KernelRootkit} message KernelRootkit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KernelRootkit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.unexpectedCodeModification = false; + object.unexpectedReadOnlyDataModification = false; + object.unexpectedFtraceHandler = false; + object.unexpectedKprobeHandler = false; + object.unexpectedKernelCodePages = false; + object.unexpectedSystemCallHandler = false; + object.unexpectedInterruptHandler = false; + object.unexpectedProcessesInRunqueue = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.unexpectedCodeModification != null && message.hasOwnProperty("unexpectedCodeModification")) + object.unexpectedCodeModification = message.unexpectedCodeModification; + if (message.unexpectedReadOnlyDataModification != null && message.hasOwnProperty("unexpectedReadOnlyDataModification")) + object.unexpectedReadOnlyDataModification = message.unexpectedReadOnlyDataModification; + if (message.unexpectedFtraceHandler != null && message.hasOwnProperty("unexpectedFtraceHandler")) + object.unexpectedFtraceHandler = message.unexpectedFtraceHandler; + if (message.unexpectedKprobeHandler != null && message.hasOwnProperty("unexpectedKprobeHandler")) + object.unexpectedKprobeHandler = message.unexpectedKprobeHandler; + if (message.unexpectedKernelCodePages != null && message.hasOwnProperty("unexpectedKernelCodePages")) + object.unexpectedKernelCodePages = message.unexpectedKernelCodePages; + if (message.unexpectedSystemCallHandler != null && message.hasOwnProperty("unexpectedSystemCallHandler")) + object.unexpectedSystemCallHandler = message.unexpectedSystemCallHandler; + if (message.unexpectedInterruptHandler != null && message.hasOwnProperty("unexpectedInterruptHandler")) + object.unexpectedInterruptHandler = message.unexpectedInterruptHandler; + if (message.unexpectedProcessesInRunqueue != null && message.hasOwnProperty("unexpectedProcessesInRunqueue")) + object.unexpectedProcessesInRunqueue = message.unexpectedProcessesInRunqueue; + return object; + }; + + /** + * Converts this KernelRootkit to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @instance + * @returns {Object.} JSON object + */ + KernelRootkit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KernelRootkit + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.KernelRootkit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KernelRootkit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.KernelRootkit"; + }; + + return KernelRootkit; + })(); + + v1.Kubernetes = (function() { + + /** + * Properties of a Kubernetes. + * @memberof google.cloud.securitycenter.v1 + * @interface IKubernetes + * @property {Array.|null} [pods] Kubernetes pods + * @property {Array.|null} [nodes] Kubernetes nodes + * @property {Array.|null} [nodePools] Kubernetes nodePools + * @property {Array.|null} [roles] Kubernetes roles + * @property {Array.|null} [bindings] Kubernetes bindings + * @property {Array.|null} [accessReviews] Kubernetes accessReviews + * @property {Array.|null} [objects] Kubernetes objects + */ + + /** + * Constructs a new Kubernetes. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Kubernetes. + * @implements IKubernetes + * @constructor + * @param {google.cloud.securitycenter.v1.IKubernetes=} [properties] Properties to set + */ + function Kubernetes(properties) { + this.pods = []; + this.nodes = []; + this.nodePools = []; + this.roles = []; + this.bindings = []; + this.accessReviews = []; + this.objects = []; + 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]]; + } + + /** + * Kubernetes pods. + * @member {Array.} pods + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.pods = $util.emptyArray; + + /** + * Kubernetes nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.nodes = $util.emptyArray; + + /** + * Kubernetes nodePools. + * @member {Array.} nodePools + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.nodePools = $util.emptyArray; + + /** + * Kubernetes roles. + * @member {Array.} roles + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.roles = $util.emptyArray; + + /** + * Kubernetes bindings. + * @member {Array.} bindings + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.bindings = $util.emptyArray; + + /** + * Kubernetes accessReviews. + * @member {Array.} accessReviews + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.accessReviews = $util.emptyArray; + + /** + * Kubernetes objects. + * @member {Array.} objects + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + */ + Kubernetes.prototype.objects = $util.emptyArray; + + /** + * Creates a new Kubernetes instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {google.cloud.securitycenter.v1.IKubernetes=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes instance + */ + Kubernetes.create = function create(properties) { + return new Kubernetes(properties); + }; + + /** + * Encodes the specified Kubernetes message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {google.cloud.securitycenter.v1.IKubernetes} message Kubernetes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Kubernetes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pods != null && message.pods.length) + for (var i = 0; i < message.pods.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Pod.encode(message.pods[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nodePools != null && message.nodePools.length) + for (var i = 0; i < message.nodePools.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.encode(message.nodePools[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.roles != null && message.roles.length) + for (var i = 0; i < message.roles.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Role.encode(message.roles[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Binding.encode(message.bindings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.accessReviews != null && message.accessReviews.length) + for (var i = 0; i < message.accessReviews.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.encode(message.accessReviews[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.objects != null && message.objects.length) + for (var i = 0; i < message.objects.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Object.encode(message.objects[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Kubernetes message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {google.cloud.securitycenter.v1.IKubernetes} message Kubernetes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Kubernetes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Kubernetes message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Kubernetes.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.cloud.securitycenter.v1.Kubernetes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.pods && message.pods.length)) + message.pods = []; + message.pods.push($root.google.cloud.securitycenter.v1.Kubernetes.Pod.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v1.Kubernetes.Node.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nodePools && message.nodePools.length)) + message.nodePools = []; + message.nodePools.push($root.google.cloud.securitycenter.v1.Kubernetes.NodePool.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.roles && message.roles.length)) + message.roles = []; + message.roles.push($root.google.cloud.securitycenter.v1.Kubernetes.Role.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.cloud.securitycenter.v1.Kubernetes.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.accessReviews && message.accessReviews.length)) + message.accessReviews = []; + message.accessReviews.push($root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.objects && message.objects.length)) + message.objects = []; + message.objects.push($root.google.cloud.securitycenter.v1.Kubernetes.Object.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Kubernetes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Kubernetes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Kubernetes message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Kubernetes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pods != null && message.hasOwnProperty("pods")) { + if (!Array.isArray(message.pods)) + return "pods: array expected"; + for (var i = 0; i < message.pods.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.verify(message.pods[i]); + if (error) + return "pods." + error; + } + } + if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Node.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } + } + if (message.nodePools != null && message.hasOwnProperty("nodePools")) { + if (!Array.isArray(message.nodePools)) + return "nodePools: array expected"; + for (var i = 0; i < message.nodePools.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.verify(message.nodePools[i]); + if (error) + return "nodePools." + error; + } + } + if (message.roles != null && message.hasOwnProperty("roles")) { + if (!Array.isArray(message.roles)) + return "roles: array expected"; + for (var i = 0; i < message.roles.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Role.verify(message.roles[i]); + if (error) + return "roles." + error; + } + } + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.accessReviews != null && message.hasOwnProperty("accessReviews")) { + if (!Array.isArray(message.accessReviews)) + return "accessReviews: array expected"; + for (var i = 0; i < message.accessReviews.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify(message.accessReviews[i]); + if (error) + return "accessReviews." + error; + } + } + if (message.objects != null && message.hasOwnProperty("objects")) { + if (!Array.isArray(message.objects)) + return "objects: array expected"; + for (var i = 0; i < message.objects.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Object.verify(message.objects[i]); + if (error) + return "objects." + error; + } + } + return null; + }; + + /** + * Creates a Kubernetes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes} Kubernetes + */ + Kubernetes.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes(); + if (object.pods) { + if (!Array.isArray(object.pods)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.pods: array expected"); + message.pods = []; + for (var i = 0; i < object.pods.length; ++i) { + if (typeof object.pods[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.pods: object expected"); + message.pods[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.fromObject(object.pods[i]); + } + } + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.fromObject(object.nodes[i]); + } + } + if (object.nodePools) { + if (!Array.isArray(object.nodePools)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodePools: array expected"); + message.nodePools = []; + for (var i = 0; i < object.nodePools.length; ++i) { + if (typeof object.nodePools[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.nodePools: object expected"); + message.nodePools[i] = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.fromObject(object.nodePools[i]); + } + } + if (object.roles) { + if (!Array.isArray(object.roles)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.roles: array expected"); + message.roles = []; + for (var i = 0; i < object.roles.length; ++i) { + if (typeof object.roles[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.roles: object expected"); + message.roles[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Role.fromObject(object.roles[i]); + } + } + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.bindings: object expected"); + message.bindings[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.fromObject(object.bindings[i]); + } + } + if (object.accessReviews) { + if (!Array.isArray(object.accessReviews)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.accessReviews: array expected"); + message.accessReviews = []; + for (var i = 0; i < object.accessReviews.length; ++i) { + if (typeof object.accessReviews[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.accessReviews: object expected"); + message.accessReviews[i] = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.fromObject(object.accessReviews[i]); + } + } + if (object.objects) { + if (!Array.isArray(object.objects)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.objects: array expected"); + message.objects = []; + for (var i = 0; i < object.objects.length; ++i) { + if (typeof object.objects[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.objects: object expected"); + message.objects[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Object.fromObject(object.objects[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Kubernetes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes} message Kubernetes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Kubernetes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pods = []; + object.nodes = []; + object.nodePools = []; + object.roles = []; + object.bindings = []; + object.accessReviews = []; + object.objects = []; + } + if (message.pods && message.pods.length) { + object.pods = []; + for (var j = 0; j < message.pods.length; ++j) + object.pods[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Pod.toObject(message.pods[j], options); + } + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.toObject(message.nodes[j], options); + } + if (message.nodePools && message.nodePools.length) { + object.nodePools = []; + for (var j = 0; j < message.nodePools.length; ++j) + object.nodePools[j] = $root.google.cloud.securitycenter.v1.Kubernetes.NodePool.toObject(message.nodePools[j], options); + } + if (message.roles && message.roles.length) { + object.roles = []; + for (var j = 0; j < message.roles.length; ++j) + object.roles[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Role.toObject(message.roles[j], options); + } + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Binding.toObject(message.bindings[j], options); + } + if (message.accessReviews && message.accessReviews.length) { + object.accessReviews = []; + for (var j = 0; j < message.accessReviews.length; ++j) + object.accessReviews[j] = $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview.toObject(message.accessReviews[j], options); + } + if (message.objects && message.objects.length) { + object.objects = []; + for (var j = 0; j < message.objects.length; ++j) + object.objects[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Object.toObject(message.objects[j], options); + } + return object; + }; + + /** + * Converts this Kubernetes to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @instance + * @returns {Object.} JSON object + */ + Kubernetes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Kubernetes + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Kubernetes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes"; + }; + + Kubernetes.Pod = (function() { + + /** + * Properties of a Pod. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface IPod + * @property {string|null} [ns] Pod ns + * @property {string|null} [name] Pod name + * @property {Array.|null} [labels] Pod labels + * @property {Array.|null} [containers] Pod containers + */ + + /** + * Constructs a new Pod. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a Pod. + * @implements IPod + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.IPod=} [properties] Properties to set + */ + function Pod(properties) { + this.labels = []; + this.containers = []; + 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]]; + } + + /** + * Pod ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @instance + */ + Pod.prototype.ns = ""; + + /** + * Pod name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @instance + */ + Pod.prototype.name = ""; + + /** + * Pod labels. + * @member {Array.} labels + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @instance + */ + Pod.prototype.labels = $util.emptyArray; + + /** + * Pod containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @instance + */ + Pod.prototype.containers = $util.emptyArray; + + /** + * Creates a new Pod instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IPod=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod instance + */ + Pod.create = function create(properties) { + return new Pod(properties); + }; + + /** + * Encodes the specified Pod message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IPod} message Pod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pod.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.cloud.securitycenter.v1.Label.encode(message.labels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Pod message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Pod.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IPod} message Pod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pod.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pod message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pod.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.cloud.securitycenter.v1.Kubernetes.Pod(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ns = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.cloud.securitycenter.v1.Label.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pod message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pod.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pod message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pod.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Label.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); + if (error) + return "containers." + error; + } + } + return null; + }; + + /** + * Creates a Pod message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Pod} Pod + */ + Pod.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Pod) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Pod(); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.labels: object expected"); + message.labels[i] = $root.google.cloud.securitycenter.v1.Label.fromObject(object.labels[i]); + } + } + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Pod.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Pod message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Pod} message Pod + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pod.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.containers = []; + } + if (options.defaults) { + object.ns = ""; + object.name = ""; + } + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.cloud.securitycenter.v1.Label.toObject(message.labels[j], options); + } + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); + } + return object; + }; + + /** + * Converts this Pod to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @instance + * @returns {Object.} JSON object + */ + Pod.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Pod + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Pod + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Pod"; + }; + + return Pod; + })(); + + Kubernetes.Node = (function() { + + /** + * Properties of a Node. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface INode + * @property {string|null} [name] Node name + */ + + /** + * Constructs a new Node. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a Node. + * @implements INode + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.INode=} [properties] Properties to set + */ + function Node(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]]; + } + + /** + * Node name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @instance + */ + Node.prototype.name = ""; + + /** + * Creates a new Node instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node instance + */ + Node.create = function create(properties) { + return new Node(properties); + }; + + /** + * Encodes the specified Node message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INode} message Node message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Node.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); + return writer; + }; + + /** + * Encodes the specified Node message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Node.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INode} message Node message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Node.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Node message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Node.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.cloud.securitycenter.v1.Kubernetes.Node(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Node message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Node.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Node message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Node.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Node message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Node} Node + */ + Node.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Node) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Node(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Node message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Node} message Node + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Node.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Node to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @instance + * @returns {Object.} JSON object + */ + Node.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Node + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Node + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Node.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Node"; + }; + + return Node; + })(); + + Kubernetes.NodePool = (function() { + + /** + * Properties of a NodePool. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface INodePool + * @property {string|null} [name] NodePool name + * @property {Array.|null} [nodes] NodePool nodes + */ + + /** + * Constructs a new NodePool. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a NodePool. + * @implements INodePool + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool=} [properties] Properties to set + */ + function NodePool(properties) { + this.nodes = []; + 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]]; + } + + /** + * NodePool name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @instance + */ + NodePool.prototype.name = ""; + + /** + * NodePool nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @instance + */ + NodePool.prototype.nodes = $util.emptyArray; + + /** + * Creates a new NodePool instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool instance + */ + NodePool.create = function create(properties) { + return new NodePool(properties); + }; + + /** + * Encodes the specified NodePool message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.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.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Node.encode(message.nodes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePool message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.NodePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.INodePool} message NodePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.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.cloud.securitycenter.v1.Kubernetes.NodePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v1.Kubernetes.Node.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePool message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePool.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.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Node.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } + } + return null; + }; + + /** + * Creates a NodePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.NodePool} NodePool + */ + NodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.NodePool) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.NodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.NodePool.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.NodePool.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.fromObject(object.nodes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a NodePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.NodePool} message NodePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodes = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Node.toObject(message.nodes[j], options); + } + return object; + }; + + /** + * Converts this NodePool to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @instance + * @returns {Object.} JSON object + */ + NodePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePool + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.NodePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.NodePool"; + }; + + return NodePool; + })(); + + Kubernetes.Role = (function() { + + /** + * Properties of a Role. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface IRole + * @property {google.cloud.securitycenter.v1.Kubernetes.Role.Kind|null} [kind] Role kind + * @property {string|null} [ns] Role ns + * @property {string|null} [name] Role name + */ + + /** + * Constructs a new Role. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a Role. + * @implements IRole + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.IRole=} [properties] Properties to set + */ + function Role(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]]; + } + + /** + * Role kind. + * @member {google.cloud.securitycenter.v1.Kubernetes.Role.Kind} kind + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @instance + */ + Role.prototype.kind = 0; + + /** + * Role ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @instance + */ + Role.prototype.ns = ""; + + /** + * Role name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @instance + */ + Role.prototype.name = ""; + + /** + * Creates a new Role instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IRole=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role instance + */ + Role.create = function create(properties) { + return new Role(properties); + }; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Role.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Role message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.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.cloud.securitycenter.v1.Kubernetes.Role(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.int32(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Role message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Role.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Role message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Role} Role + */ + Role.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Role) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Role(); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "ROLE": + case 1: + message.kind = 1; + break; + case "CLUSTER_ROLE": + case 2: + message.kind = 2; + break; + } + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Role} message Role + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Role.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.ns = ""; + object.name = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.securitycenter.v1.Kubernetes.Role.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v1.Kubernetes.Role.Kind[message.kind] : message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Role to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @instance + * @returns {Object.} JSON object + */ + Role.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Role + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Role + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Role"; + }; + + /** + * Kind enum. + * @name google.cloud.securitycenter.v1.Kubernetes.Role.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} ROLE=1 ROLE value + * @property {number} CLUSTER_ROLE=2 CLUSTER_ROLE value + */ + Role.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROLE"] = 1; + values[valuesById[2] = "CLUSTER_ROLE"] = 2; + return values; + })(); + + return Role; + })(); + + Kubernetes.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface IBinding + * @property {string|null} [ns] Binding ns + * @property {string|null} [name] Binding name + * @property {google.cloud.securitycenter.v1.Kubernetes.IRole|null} [role] Binding role + * @property {Array.|null} [subjects] Binding subjects + */ + + /** + * Constructs a new Binding. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.subjects = []; + 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]]; + } + + /** + * Binding ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @instance + */ + Binding.prototype.ns = ""; + + /** + * Binding name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @instance + */ + Binding.prototype.name = ""; + + /** + * Binding role. + * @member {google.cloud.securitycenter.v1.Kubernetes.IRole|null|undefined} role + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @instance + */ + Binding.prototype.role = null; + + /** + * Binding subjects. + * @member {Array.} subjects + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @instance + */ + Binding.prototype.subjects = $util.emptyArray; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + $root.google.cloud.securitycenter.v1.Kubernetes.Role.encode(message.role, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.subjects != null && message.subjects.length) + for (var i = 0; i < message.subjects.length; ++i) + $root.google.cloud.securitycenter.v1.Kubernetes.Subject.encode(message.subjects[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.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.cloud.securitycenter.v1.Kubernetes.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ns = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.subjects && message.subjects.length)) + message.subjects = []; + message.subjects.push($root.google.cloud.securitycenter.v1.Kubernetes.Subject.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.role != null && message.hasOwnProperty("role")) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Role.verify(message.role); + if (error) + return "role." + error; + } + if (message.subjects != null && message.hasOwnProperty("subjects")) { + if (!Array.isArray(message.subjects)) + return "subjects: array expected"; + for (var i = 0; i < message.subjects.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.verify(message.subjects[i]); + if (error) + return "subjects." + error; + } + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Binding) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Binding(); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.role != null) { + if (typeof object.role !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.role: object expected"); + message.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.fromObject(object.role); + } + if (object.subjects) { + if (!Array.isArray(object.subjects)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.subjects: array expected"); + message.subjects = []; + for (var i = 0; i < object.subjects.length; ++i) { + if (typeof object.subjects[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Binding.subjects: object expected"); + message.subjects[i] = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.fromObject(object.subjects[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subjects = []; + if (options.defaults) { + object.ns = ""; + object.name = ""; + object.role = null; + } + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.role != null && message.hasOwnProperty("role")) + object.role = $root.google.cloud.securitycenter.v1.Kubernetes.Role.toObject(message.role, options); + if (message.subjects && message.subjects.length) { + object.subjects = []; + for (var j = 0; j < message.subjects.length; ++j) + object.subjects[j] = $root.google.cloud.securitycenter.v1.Kubernetes.Subject.toObject(message.subjects[j], options); + } + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Binding"; + }; + + return Binding; + })(); + + Kubernetes.Subject = (function() { + + /** + * Properties of a Subject. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface ISubject + * @property {google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType|null} [kind] Subject kind + * @property {string|null} [ns] Subject ns + * @property {string|null} [name] Subject name + */ + + /** + * Constructs a new Subject. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents a Subject. + * @implements ISubject + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject=} [properties] Properties to set + */ + function Subject(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]]; + } + + /** + * Subject kind. + * @member {google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType} kind + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @instance + */ + Subject.prototype.kind = 0; + + /** + * Subject ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @instance + */ + Subject.prototype.ns = ""; + + /** + * Subject name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @instance + */ + Subject.prototype.name = ""; + + /** + * Creates a new Subject instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject instance + */ + Subject.create = function create(properties) { + return new Subject(properties); + }; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Subject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.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.cloud.securitycenter.v1.Kubernetes.Subject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.int32(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subject message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Subject} Subject + */ + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Subject) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Subject(); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "AUTH_TYPE_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "USER": + case 1: + message.kind = 1; + break; + case "SERVICEACCOUNT": + case 2: + message.kind = 2; + break; + case "GROUP": + case 3: + message.kind = 3; + break; + } + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Subject} message Subject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "AUTH_TYPE_UNSPECIFIED" : 0; + object.ns = ""; + object.name = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType[message.kind] === undefined ? message.kind : $root.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType[message.kind] : message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Subject to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @instance + * @returns {Object.} JSON object + */ + Subject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Subject + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Subject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Subject"; + }; + + /** + * AuthType enum. + * @name google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType + * @enum {number} + * @property {number} AUTH_TYPE_UNSPECIFIED=0 AUTH_TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} SERVICEACCOUNT=2 SERVICEACCOUNT value + * @property {number} GROUP=3 GROUP value + */ + Subject.AuthType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "SERVICEACCOUNT"] = 2; + values[valuesById[3] = "GROUP"] = 3; + return values; + })(); + + return Subject; + })(); + + Kubernetes.AccessReview = (function() { + + /** + * Properties of an AccessReview. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface IAccessReview + * @property {string|null} [group] AccessReview group + * @property {string|null} [ns] AccessReview ns + * @property {string|null} [name] AccessReview name + * @property {string|null} [resource] AccessReview resource + * @property {string|null} [subresource] AccessReview subresource + * @property {string|null} [verb] AccessReview verb + * @property {string|null} [version] AccessReview version + */ + + /** + * Constructs a new AccessReview. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents an AccessReview. + * @implements IAccessReview + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview=} [properties] Properties to set + */ + function AccessReview(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]]; + } + + /** + * AccessReview group. + * @member {string} group + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.group = ""; + + /** + * AccessReview ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.ns = ""; + + /** + * AccessReview name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.name = ""; + + /** + * AccessReview resource. + * @member {string} resource + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.resource = ""; + + /** + * AccessReview subresource. + * @member {string} subresource + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.subresource = ""; + + /** + * AccessReview verb. + * @member {string} verb + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.verb = ""; + + /** + * AccessReview version. + * @member {string} version + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + */ + AccessReview.prototype.version = ""; + + /** + * Creates a new AccessReview instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview instance + */ + AccessReview.create = function create(properties) { + return new AccessReview(properties); + }; + + /** + * Encodes the specified AccessReview message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview} message AccessReview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessReview.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && Object.hasOwnProperty.call(message, "group")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resource); + if (message.subresource != null && Object.hasOwnProperty.call(message, "subresource")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.subresource); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.verb); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); + return writer; + }; + + /** + * Encodes the specified AccessReview message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.AccessReview.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IAccessReview} message AccessReview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessReview.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessReview message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessReview.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.cloud.securitycenter.v1.Kubernetes.AccessReview(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.group = reader.string(); + break; + } + case 2: { + message.ns = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.resource = reader.string(); + break; + } + case 5: { + message.subresource = reader.string(); + break; + } + case 6: { + message.verb = reader.string(); + break; + } + case 7: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessReview message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessReview.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessReview message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessReview.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) + if (!$util.isString(message.group)) + return "group: string expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.subresource != null && message.hasOwnProperty("subresource")) + if (!$util.isString(message.subresource)) + return "subresource: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates an AccessReview message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.AccessReview} AccessReview + */ + AccessReview.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.AccessReview(); + if (object.group != null) + message.group = String(object.group); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.resource != null) + message.resource = String(object.resource); + if (object.subresource != null) + message.subresource = String(object.subresource); + if (object.verb != null) + message.verb = String(object.verb); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from an AccessReview message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.AccessReview} message AccessReview + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessReview.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.group = ""; + object.ns = ""; + object.name = ""; + object.resource = ""; + object.subresource = ""; + object.verb = ""; + object.version = ""; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = message.group; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.subresource != null && message.hasOwnProperty("subresource")) + object.subresource = message.subresource; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this AccessReview to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @instance + * @returns {Object.} JSON object + */ + AccessReview.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessReview + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.AccessReview + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessReview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.AccessReview"; + }; + + return AccessReview; + })(); + + Kubernetes.Object = (function() { + + /** + * Properties of an Object. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @interface IObject + * @property {string|null} [group] Object group + * @property {string|null} [kind] Object kind + * @property {string|null} [ns] Object ns + * @property {string|null} [name] Object name + * @property {Array.|null} [containers] Object containers + */ + + /** + * Constructs a new Object. + * @memberof google.cloud.securitycenter.v1.Kubernetes + * @classdesc Represents an Object. + * @implements IObject + * @constructor + * @param {google.cloud.securitycenter.v1.Kubernetes.IObject=} [properties] Properties to set + */ + function Object(properties) { + this.containers = []; + 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]]; + } + + /** + * Object group. + * @member {string} group + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + */ + Object.prototype.group = ""; + + /** + * Object kind. + * @member {string} kind + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + */ + Object.prototype.kind = ""; + + /** + * Object ns. + * @member {string} ns + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + */ + Object.prototype.ns = ""; + + /** + * Object name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + */ + Object.prototype.name = ""; + + /** + * Object containers. + * @member {Array.} containers + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + */ + Object.prototype.containers = $util.emptyArray; + + /** + * Creates a new Object instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IObject=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object instance + */ + Object.create = function create(properties) { + return new Object(properties); + }; + + /** + * Encodes the specified Object message. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IObject} message Object message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Object.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && Object.hasOwnProperty.call(message, "group")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.group); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + if (message.ns != null && Object.hasOwnProperty.call(message, "ns")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ns); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.containers != null && message.containers.length) + for (var i = 0; i < message.containers.length; ++i) + $root.google.cloud.securitycenter.v1.Container.encode(message.containers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Object message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Kubernetes.Object.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.IObject} message Object message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Object.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Object message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Object.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.cloud.securitycenter.v1.Kubernetes.Object(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.group = reader.string(); + break; + } + case 2: { + message.kind = reader.string(); + break; + } + case 3: { + message.ns = reader.string(); + break; + } + case 4: { + message.name = reader.string(); + break; + } + case 5: { + if (!(message.containers && message.containers.length)) + message.containers = []; + message.containers.push($root.google.cloud.securitycenter.v1.Container.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Object message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Object.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Object message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Object.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) + if (!$util.isString(message.group)) + return "group: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.ns != null && message.hasOwnProperty("ns")) + if (!$util.isString(message.ns)) + return "ns: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.containers != null && message.hasOwnProperty("containers")) { + if (!Array.isArray(message.containers)) + return "containers: array expected"; + for (var i = 0; i < message.containers.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Container.verify(message.containers[i]); + if (error) + return "containers." + error; + } + } + return null; + }; + + /** + * Creates an Object message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Kubernetes.Object} Object + */ + Object.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Kubernetes.Object) + return object; + var message = new $root.google.cloud.securitycenter.v1.Kubernetes.Object(); + if (object.group != null) + message.group = String(object.group); + if (object.kind != null) + message.kind = String(object.kind); + if (object.ns != null) + message.ns = String(object.ns); + if (object.name != null) + message.name = String(object.name); + if (object.containers) { + if (!Array.isArray(object.containers)) + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Object.containers: array expected"); + message.containers = []; + for (var i = 0; i < object.containers.length; ++i) { + if (typeof object.containers[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Kubernetes.Object.containers: object expected"); + message.containers[i] = $root.google.cloud.securitycenter.v1.Container.fromObject(object.containers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Object message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {google.cloud.securitycenter.v1.Kubernetes.Object} message Object + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Object.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.containers = []; + if (options.defaults) { + object.group = ""; + object.kind = ""; + object.ns = ""; + object.name = ""; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = message.group; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.ns != null && message.hasOwnProperty("ns")) + object.ns = message.ns; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.containers && message.containers.length) { + object.containers = []; + for (var j = 0; j < message.containers.length; ++j) + object.containers[j] = $root.google.cloud.securitycenter.v1.Container.toObject(message.containers[j], options); + } + return object; + }; + + /** + * Converts this Object to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @instance + * @returns {Object.} JSON object + */ + Object.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Object + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Kubernetes.Object + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Object.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Kubernetes.Object"; + }; + + return Object; + })(); + + return Kubernetes; + })(); + + v1.LoadBalancer = (function() { + + /** + * Properties of a LoadBalancer. + * @memberof google.cloud.securitycenter.v1 + * @interface ILoadBalancer + * @property {string|null} [name] LoadBalancer name + */ + + /** + * Constructs a new LoadBalancer. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a LoadBalancer. + * @implements ILoadBalancer + * @constructor + * @param {google.cloud.securitycenter.v1.ILoadBalancer=} [properties] Properties to set + */ + function LoadBalancer(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]]; + } + + /** + * LoadBalancer name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @instance + */ + LoadBalancer.prototype.name = ""; + + /** + * Creates a new LoadBalancer instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v1.ILoadBalancer=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer instance + */ + LoadBalancer.create = function create(properties) { + return new LoadBalancer(properties); + }; + + /** + * Encodes the specified LoadBalancer message. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v1.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancer.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); + return writer; + }; + + /** + * Encodes the specified LoadBalancer message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LoadBalancer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v1.ILoadBalancer} message LoadBalancer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancer.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.cloud.securitycenter.v1.LoadBalancer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancer message. + * @function verify + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a LoadBalancer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.LoadBalancer} LoadBalancer + */ + LoadBalancer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.LoadBalancer) + return object; + var message = new $root.google.cloud.securitycenter.v1.LoadBalancer(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LoadBalancer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {google.cloud.securitycenter.v1.LoadBalancer} message LoadBalancer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this LoadBalancer to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @instance + * @returns {Object.} JSON object + */ + LoadBalancer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancer + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.LoadBalancer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.LoadBalancer"; + }; + + return LoadBalancer; + })(); + + v1.LogEntry = (function() { + + /** + * Properties of a LogEntry. + * @memberof google.cloud.securitycenter.v1 + * @interface ILogEntry + * @property {google.cloud.securitycenter.v1.ICloudLoggingEntry|null} [cloudLoggingEntry] LogEntry cloudLoggingEntry + */ + + /** + * Constructs a new LogEntry. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a LogEntry. + * @implements ILogEntry + * @constructor + * @param {google.cloud.securitycenter.v1.ILogEntry=} [properties] Properties to set + */ + function LogEntry(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]]; + } + + /** + * LogEntry cloudLoggingEntry. + * @member {google.cloud.securitycenter.v1.ICloudLoggingEntry|null|undefined} cloudLoggingEntry + * @memberof google.cloud.securitycenter.v1.LogEntry + * @instance + */ + LogEntry.prototype.cloudLoggingEntry = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LogEntry logEntry. + * @member {"cloudLoggingEntry"|undefined} logEntry + * @memberof google.cloud.securitycenter.v1.LogEntry + * @instance + */ + Object.defineProperty(LogEntry.prototype, "logEntry", { + get: $util.oneOfGetter($oneOfFields = ["cloudLoggingEntry"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogEntry instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {google.cloud.securitycenter.v1.ILogEntry=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry instance + */ + LogEntry.create = function create(properties) { + return new LogEntry(properties); + }; + + /** + * Encodes the specified LogEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {google.cloud.securitycenter.v1.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudLoggingEntry != null && Object.hasOwnProperty.call(message, "cloudLoggingEntry")) + $root.google.cloud.securitycenter.v1.CloudLoggingEntry.encode(message.cloudLoggingEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LogEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.LogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {google.cloud.securitycenter.v1.ILogEntry} message LogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.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.cloud.securitycenter.v1.LogEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogEntry message. + * @function verify + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { + properties.logEntry = 1; + { + var error = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.verify(message.cloudLoggingEntry); + if (error) + return "cloudLoggingEntry." + error; + } + } + return null; + }; + + /** + * Creates a LogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.LogEntry} LogEntry + */ + LogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.LogEntry) + return object; + var message = new $root.google.cloud.securitycenter.v1.LogEntry(); + if (object.cloudLoggingEntry != null) { + if (typeof object.cloudLoggingEntry !== "object") + throw TypeError(".google.cloud.securitycenter.v1.LogEntry.cloudLoggingEntry: object expected"); + message.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.fromObject(object.cloudLoggingEntry); + } + return message; + }; + + /** + * Creates a plain object from a LogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {google.cloud.securitycenter.v1.LogEntry} message LogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudLoggingEntry != null && message.hasOwnProperty("cloudLoggingEntry")) { + object.cloudLoggingEntry = $root.google.cloud.securitycenter.v1.CloudLoggingEntry.toObject(message.cloudLoggingEntry, options); + if (options.oneofs) + object.logEntry = "cloudLoggingEntry"; + } + return object; + }; + + /** + * Converts this LogEntry to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.LogEntry + * @instance + * @returns {Object.} JSON object + */ + LogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LogEntry + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.LogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.LogEntry"; + }; + + return LogEntry; + })(); + + v1.CloudLoggingEntry = (function() { + + /** + * Properties of a CloudLoggingEntry. + * @memberof google.cloud.securitycenter.v1 + * @interface ICloudLoggingEntry + * @property {string|null} [insertId] CloudLoggingEntry insertId + * @property {string|null} [logId] CloudLoggingEntry logId + * @property {string|null} [resourceContainer] CloudLoggingEntry resourceContainer + * @property {google.protobuf.ITimestamp|null} [timestamp] CloudLoggingEntry timestamp + */ + + /** + * Constructs a new CloudLoggingEntry. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a CloudLoggingEntry. + * @implements ICloudLoggingEntry + * @constructor + * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry=} [properties] Properties to set + */ + function CloudLoggingEntry(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]]; + } + + /** + * CloudLoggingEntry insertId. + * @member {string} insertId + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.insertId = ""; + + /** + * CloudLoggingEntry logId. + * @member {string} logId + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.logId = ""; + + /** + * CloudLoggingEntry resourceContainer. + * @member {string} resourceContainer + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.resourceContainer = ""; + + /** + * CloudLoggingEntry timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @instance + */ + CloudLoggingEntry.prototype.timestamp = null; + + /** + * Creates a new CloudLoggingEntry instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry instance + */ + CloudLoggingEntry.create = function create(properties) { + return new CloudLoggingEntry(properties); + }; + + /** + * Encodes the specified CloudLoggingEntry message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudLoggingEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.insertId); + if (message.logId != null && Object.hasOwnProperty.call(message, "logId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.logId); + if (message.resourceContainer != null && Object.hasOwnProperty.call(message, "resourceContainer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceContainer); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudLoggingEntry message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudLoggingEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v1.ICloudLoggingEntry} message CloudLoggingEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudLoggingEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudLoggingEntry.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.cloud.securitycenter.v1.CloudLoggingEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.insertId = reader.string(); + break; + } + case 2: { + message.logId = reader.string(); + break; + } + case 3: { + message.resourceContainer = reader.string(); + break; + } + case 4: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudLoggingEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudLoggingEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudLoggingEntry message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudLoggingEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.insertId != null && message.hasOwnProperty("insertId")) + if (!$util.isString(message.insertId)) + return "insertId: string expected"; + if (message.logId != null && message.hasOwnProperty("logId")) + if (!$util.isString(message.logId)) + return "logId: string expected"; + if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) + if (!$util.isString(message.resourceContainer)) + return "resourceContainer: string expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a CloudLoggingEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CloudLoggingEntry} CloudLoggingEntry + */ + CloudLoggingEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudLoggingEntry) + return object; + var message = new $root.google.cloud.securitycenter.v1.CloudLoggingEntry(); + if (object.insertId != null) + message.insertId = String(object.insertId); + if (object.logId != null) + message.logId = String(object.logId); + if (object.resourceContainer != null) + message.resourceContainer = String(object.resourceContainer); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CloudLoggingEntry.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a CloudLoggingEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {google.cloud.securitycenter.v1.CloudLoggingEntry} message CloudLoggingEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudLoggingEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.insertId = ""; + object.logId = ""; + object.resourceContainer = ""; + object.timestamp = null; + } + if (message.insertId != null && message.hasOwnProperty("insertId")) + object.insertId = message.insertId; + if (message.logId != null && message.hasOwnProperty("logId")) + object.logId = message.logId; + if (message.resourceContainer != null && message.hasOwnProperty("resourceContainer")) + object.resourceContainer = message.resourceContainer; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this CloudLoggingEntry to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @instance + * @returns {Object.} JSON object + */ + CloudLoggingEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudLoggingEntry + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CloudLoggingEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudLoggingEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudLoggingEntry"; + }; + + return CloudLoggingEntry; + })(); + + v1.MitreAttack = (function() { + + /** + * Properties of a MitreAttack. + * @memberof google.cloud.securitycenter.v1 + * @interface IMitreAttack + * @property {google.cloud.securitycenter.v1.MitreAttack.Tactic|null} [primaryTactic] MitreAttack primaryTactic + * @property {Array.|null} [primaryTechniques] MitreAttack primaryTechniques + * @property {Array.|null} [additionalTactics] MitreAttack additionalTactics + * @property {Array.|null} [additionalTechniques] MitreAttack additionalTechniques + * @property {string|null} [version] MitreAttack version + */ + + /** + * Constructs a new MitreAttack. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a MitreAttack. + * @implements IMitreAttack + * @constructor + * @param {google.cloud.securitycenter.v1.IMitreAttack=} [properties] Properties to set + */ + function MitreAttack(properties) { + this.primaryTechniques = []; + this.additionalTactics = []; + this.additionalTechniques = []; + 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]]; + } + + /** + * MitreAttack primaryTactic. + * @member {google.cloud.securitycenter.v1.MitreAttack.Tactic} primaryTactic + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + */ + MitreAttack.prototype.primaryTactic = 0; + + /** + * MitreAttack primaryTechniques. + * @member {Array.} primaryTechniques + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + */ + MitreAttack.prototype.primaryTechniques = $util.emptyArray; + + /** + * MitreAttack additionalTactics. + * @member {Array.} additionalTactics + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + */ + MitreAttack.prototype.additionalTactics = $util.emptyArray; + + /** + * MitreAttack additionalTechniques. + * @member {Array.} additionalTechniques + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + */ + MitreAttack.prototype.additionalTechniques = $util.emptyArray; + + /** + * MitreAttack version. + * @member {string} version + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + */ + MitreAttack.prototype.version = ""; + + /** + * Creates a new MitreAttack instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {google.cloud.securitycenter.v1.IMitreAttack=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack instance + */ + MitreAttack.create = function create(properties) { + return new MitreAttack(properties); + }; + + /** + * Encodes the specified MitreAttack message. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {google.cloud.securitycenter.v1.IMitreAttack} message MitreAttack message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MitreAttack.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryTactic != null && Object.hasOwnProperty.call(message, "primaryTactic")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primaryTactic); + if (message.primaryTechniques != null && message.primaryTechniques.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.primaryTechniques.length; ++i) + writer.int32(message.primaryTechniques[i]); + writer.ldelim(); + } + if (message.additionalTactics != null && message.additionalTactics.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.additionalTactics.length; ++i) + writer.int32(message.additionalTactics[i]); + writer.ldelim(); + } + if (message.additionalTechniques != null && message.additionalTechniques.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.additionalTechniques.length; ++i) + writer.int32(message.additionalTechniques[i]); + writer.ldelim(); + } + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + return writer; + }; + + /** + * Encodes the specified MitreAttack message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MitreAttack.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {google.cloud.securitycenter.v1.IMitreAttack} message MitreAttack message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MitreAttack.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MitreAttack message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MitreAttack.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.cloud.securitycenter.v1.MitreAttack(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.primaryTactic = reader.int32(); + break; + } + case 2: { + if (!(message.primaryTechniques && message.primaryTechniques.length)) + message.primaryTechniques = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.primaryTechniques.push(reader.int32()); + } else + message.primaryTechniques.push(reader.int32()); + break; + } + case 3: { + if (!(message.additionalTactics && message.additionalTactics.length)) + message.additionalTactics = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.additionalTactics.push(reader.int32()); + } else + message.additionalTactics.push(reader.int32()); + break; + } + case 4: { + if (!(message.additionalTechniques && message.additionalTechniques.length)) + message.additionalTechniques = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.additionalTechniques.push(reader.int32()); + } else + message.additionalTechniques.push(reader.int32()); + break; + } + case 5: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MitreAttack message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MitreAttack.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MitreAttack message. + * @function verify + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MitreAttack.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) + switch (message.primaryTactic) { + default: + return "primaryTactic: enum value expected"; + case 0: + case 1: + case 2: + case 5: + case 3: + case 6: + case 8: + case 7: + case 9: + case 10: + case 11: + case 12: + case 4: + case 13: + case 14: + break; + } + if (message.primaryTechniques != null && message.hasOwnProperty("primaryTechniques")) { + if (!Array.isArray(message.primaryTechniques)) + return "primaryTechniques: array expected"; + for (var i = 0; i < message.primaryTechniques.length; ++i) + switch (message.primaryTechniques[i]) { + default: + return "primaryTechniques: enum value[] expected"; + case 0: + case 49: + case 50: + case 37: + case 38: + case 32: + case 56: + case 6: + case 7: + case 59: + case 18: + case 19: + case 45: + case 46: + case 47: + case 14: + case 35: + case 15: + case 16: + case 9: + case 10: + case 11: + case 22: + case 40: + case 23: + case 58: + case 3: + case 4: + case 44: + case 5: + case 33: + case 39: + case 27: + case 30: + case 29: + case 52: + case 36: + case 8: + case 17: + case 48: + case 42: + case 51: + case 25: + case 24: + case 34: + case 13: + case 28: + case 31: + case 55: + case 20: + case 21: + case 12: + case 41: + case 26: + case 54: + case 53: + case 43: + case 1: + case 2: + case 60: + case 61: + case 57: + case 62: + break; + } + } + if (message.additionalTactics != null && message.hasOwnProperty("additionalTactics")) { + if (!Array.isArray(message.additionalTactics)) + return "additionalTactics: array expected"; + for (var i = 0; i < message.additionalTactics.length; ++i) + switch (message.additionalTactics[i]) { + default: + return "additionalTactics: enum value[] expected"; + case 0: + case 1: + case 2: + case 5: + case 3: + case 6: + case 8: + case 7: + case 9: + case 10: + case 11: + case 12: + case 4: + case 13: + case 14: + break; + } + } + if (message.additionalTechniques != null && message.hasOwnProperty("additionalTechniques")) { + if (!Array.isArray(message.additionalTechniques)) + return "additionalTechniques: array expected"; + for (var i = 0; i < message.additionalTechniques.length; ++i) + switch (message.additionalTechniques[i]) { + default: + return "additionalTechniques: enum value[] expected"; + case 0: + case 49: + case 50: + case 37: + case 38: + case 32: + case 56: + case 6: + case 7: + case 59: + case 18: + case 19: + case 45: + case 46: + case 47: + case 14: + case 35: + case 15: + case 16: + case 9: + case 10: + case 11: + case 22: + case 40: + case 23: + case 58: + case 3: + case 4: + case 44: + case 5: + case 33: + case 39: + case 27: + case 30: + case 29: + case 52: + case 36: + case 8: + case 17: + case 48: + case 42: + case 51: + case 25: + case 24: + case 34: + case 13: + case 28: + case 31: + case 55: + case 20: + case 21: + case 12: + case 41: + case 26: + case 54: + case 53: + case 43: + case 1: + case 2: + case 60: + case 61: + case 57: + case 62: + break; + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a MitreAttack message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.MitreAttack} MitreAttack + */ + MitreAttack.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.MitreAttack) + return object; + var message = new $root.google.cloud.securitycenter.v1.MitreAttack(); + switch (object.primaryTactic) { + default: + if (typeof object.primaryTactic === "number") { + message.primaryTactic = object.primaryTactic; + break; + } + break; + case "TACTIC_UNSPECIFIED": + case 0: + message.primaryTactic = 0; + break; + case "RECONNAISSANCE": + case 1: + message.primaryTactic = 1; + break; + case "RESOURCE_DEVELOPMENT": + case 2: + message.primaryTactic = 2; + break; + case "INITIAL_ACCESS": + case 5: + message.primaryTactic = 5; + break; + case "EXECUTION": + case 3: + message.primaryTactic = 3; + break; + case "PERSISTENCE": + case 6: + message.primaryTactic = 6; + break; + case "PRIVILEGE_ESCALATION": + case 8: + message.primaryTactic = 8; + break; + case "DEFENSE_EVASION": + case 7: + message.primaryTactic = 7; + break; + case "CREDENTIAL_ACCESS": + case 9: + message.primaryTactic = 9; + break; + case "DISCOVERY": + case 10: + message.primaryTactic = 10; + break; + case "LATERAL_MOVEMENT": + case 11: + message.primaryTactic = 11; + break; + case "COLLECTION": + case 12: + message.primaryTactic = 12; + break; + case "COMMAND_AND_CONTROL": + case 4: + message.primaryTactic = 4; + break; + case "EXFILTRATION": + case 13: + message.primaryTactic = 13; + break; + case "IMPACT": + case 14: + message.primaryTactic = 14; + break; + } + if (object.primaryTechniques) { + if (!Array.isArray(object.primaryTechniques)) + throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.primaryTechniques: array expected"); + message.primaryTechniques = []; + for (var i = 0; i < object.primaryTechniques.length; ++i) + switch (object.primaryTechniques[i]) { + default: + if (typeof object.primaryTechniques[i] === "number") { + message.primaryTechniques[i] = object.primaryTechniques[i]; + break; + } + case "TECHNIQUE_UNSPECIFIED": + case 0: + message.primaryTechniques[i] = 0; + break; + case "MASQUERADING": + case 49: + message.primaryTechniques[i] = 49; + break; + case "MATCH_LEGITIMATE_NAME_OR_LOCATION": + case 50: + message.primaryTechniques[i] = 50; + break; + case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": + case 37: + message.primaryTechniques[i] = 37; + break; + case "STARTUP_ITEMS": + case 38: + message.primaryTechniques[i] = 38; + break; + case "NETWORK_SERVICE_DISCOVERY": + case 32: + message.primaryTechniques[i] = 32; + break; + case "PROCESS_DISCOVERY": + case 56: + message.primaryTechniques[i] = 56; + break; + case "COMMAND_AND_SCRIPTING_INTERPRETER": + case 6: + message.primaryTechniques[i] = 6; + break; + case "UNIX_SHELL": + case 7: + message.primaryTechniques[i] = 7; + break; + case "PYTHON": + case 59: + message.primaryTechniques[i] = 59; + break; + case "PERMISSION_GROUPS_DISCOVERY": + case 18: + message.primaryTechniques[i] = 18; + break; + case "CLOUD_GROUPS": + case 19: + message.primaryTechniques[i] = 19; + break; + case "APPLICATION_LAYER_PROTOCOL": + case 45: + message.primaryTechniques[i] = 45; + break; + case "DNS": + case 46: + message.primaryTechniques[i] = 46; + break; + case "SOFTWARE_DEPLOYMENT_TOOLS": + case 47: + message.primaryTechniques[i] = 47; + break; + case "VALID_ACCOUNTS": + case 14: + message.primaryTechniques[i] = 14; + break; + case "DEFAULT_ACCOUNTS": + case 35: + message.primaryTechniques[i] = 35; + break; + case "LOCAL_ACCOUNTS": + case 15: + message.primaryTechniques[i] = 15; + break; + case "CLOUD_ACCOUNTS": + case 16: + message.primaryTechniques[i] = 16; + break; + case "PROXY": + case 9: + message.primaryTechniques[i] = 9; + break; + case "EXTERNAL_PROXY": + case 10: + message.primaryTechniques[i] = 10; + break; + case "MULTI_HOP_PROXY": + case 11: + message.primaryTechniques[i] = 11; + break; + case "ACCOUNT_MANIPULATION": + case 22: + message.primaryTechniques[i] = 22; + break; + case "ADDITIONAL_CLOUD_CREDENTIALS": + case 40: + message.primaryTechniques[i] = 40; + break; + case "SSH_AUTHORIZED_KEYS": + case 23: + message.primaryTechniques[i] = 23; + break; + case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": + case 58: + message.primaryTechniques[i] = 58; + break; + case "INGRESS_TOOL_TRANSFER": + case 3: + message.primaryTechniques[i] = 3; + break; + case "NATIVE_API": + case 4: + message.primaryTechniques[i] = 4; + break; + case "BRUTE_FORCE": + case 44: + message.primaryTechniques[i] = 44; + break; + case "SHARED_MODULES": + case 5: + message.primaryTechniques[i] = 5; + break; + case "ACCESS_TOKEN_MANIPULATION": + case 33: + message.primaryTechniques[i] = 33; + break; + case "TOKEN_IMPERSONATION_OR_THEFT": + case 39: + message.primaryTechniques[i] = 39; + break; + case "EXPLOIT_PUBLIC_FACING_APPLICATION": + case 27: + message.primaryTechniques[i] = 27; + break; + case "DOMAIN_POLICY_MODIFICATION": + case 30: + message.primaryTechniques[i] = 30; + break; + case "DATA_DESTRUCTION": + case 29: + message.primaryTechniques[i] = 29; + break; + case "SERVICE_STOP": + case 52: + message.primaryTechniques[i] = 52; + break; + case "INHIBIT_SYSTEM_RECOVERY": + case 36: + message.primaryTechniques[i] = 36; + break; + case "RESOURCE_HIJACKING": + case 8: + message.primaryTechniques[i] = 8; + break; + case "NETWORK_DENIAL_OF_SERVICE": + case 17: + message.primaryTechniques[i] = 17; + break; + case "CLOUD_SERVICE_DISCOVERY": + case 48: + message.primaryTechniques[i] = 48; + break; + case "STEAL_APPLICATION_ACCESS_TOKEN": + case 42: + message.primaryTechniques[i] = 42; + break; + case "ACCOUNT_ACCESS_REMOVAL": + case 51: + message.primaryTechniques[i] = 51; + break; + case "STEAL_WEB_SESSION_COOKIE": + case 25: + message.primaryTechniques[i] = 25; + break; + case "CREATE_OR_MODIFY_SYSTEM_PROCESS": + case 24: + message.primaryTechniques[i] = 24; + break; + case "ABUSE_ELEVATION_CONTROL_MECHANISM": + case 34: + message.primaryTechniques[i] = 34; + break; + case "UNSECURED_CREDENTIALS": + case 13: + message.primaryTechniques[i] = 13; + break; + case "MODIFY_AUTHENTICATION_PROCESS": + case 28: + message.primaryTechniques[i] = 28; + break; + case "IMPAIR_DEFENSES": + case 31: + message.primaryTechniques[i] = 31; + break; + case "DISABLE_OR_MODIFY_TOOLS": + case 55: + message.primaryTechniques[i] = 55; + break; + case "EXFILTRATION_OVER_WEB_SERVICE": + case 20: + message.primaryTechniques[i] = 20; + break; + case "EXFILTRATION_TO_CLOUD_STORAGE": + case 21: + message.primaryTechniques[i] = 21; + break; + case "DYNAMIC_RESOLUTION": + case 12: + message.primaryTechniques[i] = 12; + break; + case "LATERAL_TOOL_TRANSFER": + case 41: + message.primaryTechniques[i] = 41; + break; + case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": + case 26: + message.primaryTechniques[i] = 26; + break; + case "CREATE_SNAPSHOT": + case 54: + message.primaryTechniques[i] = 54; + break; + case "CLOUD_INFRASTRUCTURE_DISCOVERY": + case 53: + message.primaryTechniques[i] = 53; + break; + case "OBTAIN_CAPABILITIES": + case 43: + message.primaryTechniques[i] = 43; + break; + case "ACTIVE_SCANNING": + case 1: + message.primaryTechniques[i] = 1; + break; + case "SCANNING_IP_BLOCKS": + case 2: + message.primaryTechniques[i] = 2; + break; + case "CONTAINER_ADMINISTRATION_COMMAND": + case 60: + message.primaryTechniques[i] = 60; + break; + case "ESCAPE_TO_HOST": + case 61: + message.primaryTechniques[i] = 61; + break; + case "CONTAINER_AND_RESOURCE_DISCOVERY": + case 57: + message.primaryTechniques[i] = 57; + break; + case "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": + case 62: + message.primaryTechniques[i] = 62; + break; + } + } + if (object.additionalTactics) { + if (!Array.isArray(object.additionalTactics)) + throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.additionalTactics: array expected"); + message.additionalTactics = []; + for (var i = 0; i < object.additionalTactics.length; ++i) + switch (object.additionalTactics[i]) { + default: + if (typeof object.additionalTactics[i] === "number") { + message.additionalTactics[i] = object.additionalTactics[i]; + break; + } + case "TACTIC_UNSPECIFIED": + case 0: + message.additionalTactics[i] = 0; + break; + case "RECONNAISSANCE": + case 1: + message.additionalTactics[i] = 1; + break; + case "RESOURCE_DEVELOPMENT": + case 2: + message.additionalTactics[i] = 2; + break; + case "INITIAL_ACCESS": + case 5: + message.additionalTactics[i] = 5; + break; + case "EXECUTION": + case 3: + message.additionalTactics[i] = 3; + break; + case "PERSISTENCE": + case 6: + message.additionalTactics[i] = 6; + break; + case "PRIVILEGE_ESCALATION": + case 8: + message.additionalTactics[i] = 8; + break; + case "DEFENSE_EVASION": + case 7: + message.additionalTactics[i] = 7; + break; + case "CREDENTIAL_ACCESS": + case 9: + message.additionalTactics[i] = 9; + break; + case "DISCOVERY": + case 10: + message.additionalTactics[i] = 10; + break; + case "LATERAL_MOVEMENT": + case 11: + message.additionalTactics[i] = 11; + break; + case "COLLECTION": + case 12: + message.additionalTactics[i] = 12; + break; + case "COMMAND_AND_CONTROL": + case 4: + message.additionalTactics[i] = 4; + break; + case "EXFILTRATION": + case 13: + message.additionalTactics[i] = 13; + break; + case "IMPACT": + case 14: + message.additionalTactics[i] = 14; + break; + } + } + if (object.additionalTechniques) { + if (!Array.isArray(object.additionalTechniques)) + throw TypeError(".google.cloud.securitycenter.v1.MitreAttack.additionalTechniques: array expected"); + message.additionalTechniques = []; + for (var i = 0; i < object.additionalTechniques.length; ++i) + switch (object.additionalTechniques[i]) { + default: + if (typeof object.additionalTechniques[i] === "number") { + message.additionalTechniques[i] = object.additionalTechniques[i]; + break; + } + case "TECHNIQUE_UNSPECIFIED": + case 0: + message.additionalTechniques[i] = 0; + break; + case "MASQUERADING": + case 49: + message.additionalTechniques[i] = 49; + break; + case "MATCH_LEGITIMATE_NAME_OR_LOCATION": + case 50: + message.additionalTechniques[i] = 50; + break; + case "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS": + case 37: + message.additionalTechniques[i] = 37; + break; + case "STARTUP_ITEMS": + case 38: + message.additionalTechniques[i] = 38; + break; + case "NETWORK_SERVICE_DISCOVERY": + case 32: + message.additionalTechniques[i] = 32; + break; + case "PROCESS_DISCOVERY": + case 56: + message.additionalTechniques[i] = 56; + break; + case "COMMAND_AND_SCRIPTING_INTERPRETER": + case 6: + message.additionalTechniques[i] = 6; + break; + case "UNIX_SHELL": + case 7: + message.additionalTechniques[i] = 7; + break; + case "PYTHON": + case 59: + message.additionalTechniques[i] = 59; + break; + case "PERMISSION_GROUPS_DISCOVERY": + case 18: + message.additionalTechniques[i] = 18; + break; + case "CLOUD_GROUPS": + case 19: + message.additionalTechniques[i] = 19; + break; + case "APPLICATION_LAYER_PROTOCOL": + case 45: + message.additionalTechniques[i] = 45; + break; + case "DNS": + case 46: + message.additionalTechniques[i] = 46; + break; + case "SOFTWARE_DEPLOYMENT_TOOLS": + case 47: + message.additionalTechniques[i] = 47; + break; + case "VALID_ACCOUNTS": + case 14: + message.additionalTechniques[i] = 14; + break; + case "DEFAULT_ACCOUNTS": + case 35: + message.additionalTechniques[i] = 35; + break; + case "LOCAL_ACCOUNTS": + case 15: + message.additionalTechniques[i] = 15; + break; + case "CLOUD_ACCOUNTS": + case 16: + message.additionalTechniques[i] = 16; + break; + case "PROXY": + case 9: + message.additionalTechniques[i] = 9; + break; + case "EXTERNAL_PROXY": + case 10: + message.additionalTechniques[i] = 10; + break; + case "MULTI_HOP_PROXY": + case 11: + message.additionalTechniques[i] = 11; + break; + case "ACCOUNT_MANIPULATION": + case 22: + message.additionalTechniques[i] = 22; + break; + case "ADDITIONAL_CLOUD_CREDENTIALS": + case 40: + message.additionalTechniques[i] = 40; + break; + case "SSH_AUTHORIZED_KEYS": + case 23: + message.additionalTechniques[i] = 23; + break; + case "ADDITIONAL_CONTAINER_CLUSTER_ROLES": + case 58: + message.additionalTechniques[i] = 58; + break; + case "INGRESS_TOOL_TRANSFER": + case 3: + message.additionalTechniques[i] = 3; + break; + case "NATIVE_API": + case 4: + message.additionalTechniques[i] = 4; + break; + case "BRUTE_FORCE": + case 44: + message.additionalTechniques[i] = 44; + break; + case "SHARED_MODULES": + case 5: + message.additionalTechniques[i] = 5; + break; + case "ACCESS_TOKEN_MANIPULATION": + case 33: + message.additionalTechniques[i] = 33; + break; + case "TOKEN_IMPERSONATION_OR_THEFT": + case 39: + message.additionalTechniques[i] = 39; + break; + case "EXPLOIT_PUBLIC_FACING_APPLICATION": + case 27: + message.additionalTechniques[i] = 27; + break; + case "DOMAIN_POLICY_MODIFICATION": + case 30: + message.additionalTechniques[i] = 30; + break; + case "DATA_DESTRUCTION": + case 29: + message.additionalTechniques[i] = 29; + break; + case "SERVICE_STOP": + case 52: + message.additionalTechniques[i] = 52; + break; + case "INHIBIT_SYSTEM_RECOVERY": + case 36: + message.additionalTechniques[i] = 36; + break; + case "RESOURCE_HIJACKING": + case 8: + message.additionalTechniques[i] = 8; + break; + case "NETWORK_DENIAL_OF_SERVICE": + case 17: + message.additionalTechniques[i] = 17; + break; + case "CLOUD_SERVICE_DISCOVERY": + case 48: + message.additionalTechniques[i] = 48; + break; + case "STEAL_APPLICATION_ACCESS_TOKEN": + case 42: + message.additionalTechniques[i] = 42; + break; + case "ACCOUNT_ACCESS_REMOVAL": + case 51: + message.additionalTechniques[i] = 51; + break; + case "STEAL_WEB_SESSION_COOKIE": + case 25: + message.additionalTechniques[i] = 25; + break; + case "CREATE_OR_MODIFY_SYSTEM_PROCESS": + case 24: + message.additionalTechniques[i] = 24; + break; + case "ABUSE_ELEVATION_CONTROL_MECHANISM": + case 34: + message.additionalTechniques[i] = 34; + break; + case "UNSECURED_CREDENTIALS": + case 13: + message.additionalTechniques[i] = 13; + break; + case "MODIFY_AUTHENTICATION_PROCESS": + case 28: + message.additionalTechniques[i] = 28; + break; + case "IMPAIR_DEFENSES": + case 31: + message.additionalTechniques[i] = 31; + break; + case "DISABLE_OR_MODIFY_TOOLS": + case 55: + message.additionalTechniques[i] = 55; + break; + case "EXFILTRATION_OVER_WEB_SERVICE": + case 20: + message.additionalTechniques[i] = 20; + break; + case "EXFILTRATION_TO_CLOUD_STORAGE": + case 21: + message.additionalTechniques[i] = 21; + break; + case "DYNAMIC_RESOLUTION": + case 12: + message.additionalTechniques[i] = 12; + break; + case "LATERAL_TOOL_TRANSFER": + case 41: + message.additionalTechniques[i] = 41; + break; + case "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE": + case 26: + message.additionalTechniques[i] = 26; + break; + case "CREATE_SNAPSHOT": + case 54: + message.additionalTechniques[i] = 54; + break; + case "CLOUD_INFRASTRUCTURE_DISCOVERY": + case 53: + message.additionalTechniques[i] = 53; + break; + case "OBTAIN_CAPABILITIES": + case 43: + message.additionalTechniques[i] = 43; + break; + case "ACTIVE_SCANNING": + case 1: + message.additionalTechniques[i] = 1; + break; + case "SCANNING_IP_BLOCKS": + case 2: + message.additionalTechniques[i] = 2; + break; + case "CONTAINER_ADMINISTRATION_COMMAND": + case 60: + message.additionalTechniques[i] = 60; + break; + case "ESCAPE_TO_HOST": + case 61: + message.additionalTechniques[i] = 61; + break; + case "CONTAINER_AND_RESOURCE_DISCOVERY": + case 57: + message.additionalTechniques[i] = 57; + break; + case "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": + case 62: + message.additionalTechniques[i] = 62; + break; + } + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {google.cloud.securitycenter.v1.MitreAttack} message MitreAttack + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MitreAttack.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.primaryTechniques = []; + object.additionalTactics = []; + object.additionalTechniques = []; + } + if (options.defaults) { + object.primaryTactic = options.enums === String ? "TACTIC_UNSPECIFIED" : 0; + object.version = ""; + } + if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) + object.primaryTactic = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.primaryTactic] === undefined ? message.primaryTactic : $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.primaryTactic] : message.primaryTactic; + if (message.primaryTechniques && message.primaryTechniques.length) { + object.primaryTechniques = []; + for (var j = 0; j < message.primaryTechniques.length; ++j) + object.primaryTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.primaryTechniques[j]] === undefined ? message.primaryTechniques[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.primaryTechniques[j]] : message.primaryTechniques[j]; + } + if (message.additionalTactics && message.additionalTactics.length) { + object.additionalTactics = []; + for (var j = 0; j < message.additionalTactics.length; ++j) + object.additionalTactics[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.additionalTactics[j]] === undefined ? message.additionalTactics[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.additionalTactics[j]] : message.additionalTactics[j]; + } + if (message.additionalTechniques && message.additionalTechniques.length) { + object.additionalTechniques = []; + for (var j = 0; j < message.additionalTechniques.length; ++j) + object.additionalTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.additionalTechniques[j]] === undefined ? message.additionalTechniques[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.additionalTechniques[j]] : message.additionalTechniques[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this MitreAttack to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @instance + * @returns {Object.} JSON object + */ + MitreAttack.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MitreAttack + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.MitreAttack + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MitreAttack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.MitreAttack"; + }; + + /** + * Tactic enum. + * @name google.cloud.securitycenter.v1.MitreAttack.Tactic + * @enum {number} + * @property {number} TACTIC_UNSPECIFIED=0 TACTIC_UNSPECIFIED value + * @property {number} RECONNAISSANCE=1 RECONNAISSANCE value + * @property {number} RESOURCE_DEVELOPMENT=2 RESOURCE_DEVELOPMENT value + * @property {number} INITIAL_ACCESS=5 INITIAL_ACCESS value + * @property {number} EXECUTION=3 EXECUTION value + * @property {number} PERSISTENCE=6 PERSISTENCE value + * @property {number} PRIVILEGE_ESCALATION=8 PRIVILEGE_ESCALATION value + * @property {number} DEFENSE_EVASION=7 DEFENSE_EVASION value + * @property {number} CREDENTIAL_ACCESS=9 CREDENTIAL_ACCESS value + * @property {number} DISCOVERY=10 DISCOVERY value + * @property {number} LATERAL_MOVEMENT=11 LATERAL_MOVEMENT value + * @property {number} COLLECTION=12 COLLECTION value + * @property {number} COMMAND_AND_CONTROL=4 COMMAND_AND_CONTROL value + * @property {number} EXFILTRATION=13 EXFILTRATION value + * @property {number} IMPACT=14 IMPACT value + */ + MitreAttack.Tactic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TACTIC_UNSPECIFIED"] = 0; + values[valuesById[1] = "RECONNAISSANCE"] = 1; + values[valuesById[2] = "RESOURCE_DEVELOPMENT"] = 2; + values[valuesById[5] = "INITIAL_ACCESS"] = 5; + values[valuesById[3] = "EXECUTION"] = 3; + values[valuesById[6] = "PERSISTENCE"] = 6; + values[valuesById[8] = "PRIVILEGE_ESCALATION"] = 8; + values[valuesById[7] = "DEFENSE_EVASION"] = 7; + values[valuesById[9] = "CREDENTIAL_ACCESS"] = 9; + values[valuesById[10] = "DISCOVERY"] = 10; + values[valuesById[11] = "LATERAL_MOVEMENT"] = 11; + values[valuesById[12] = "COLLECTION"] = 12; + values[valuesById[4] = "COMMAND_AND_CONTROL"] = 4; + values[valuesById[13] = "EXFILTRATION"] = 13; + values[valuesById[14] = "IMPACT"] = 14; + return values; + })(); + + /** + * Technique enum. + * @name google.cloud.securitycenter.v1.MitreAttack.Technique + * @enum {number} + * @property {number} TECHNIQUE_UNSPECIFIED=0 TECHNIQUE_UNSPECIFIED value + * @property {number} MASQUERADING=49 MASQUERADING value + * @property {number} MATCH_LEGITIMATE_NAME_OR_LOCATION=50 MATCH_LEGITIMATE_NAME_OR_LOCATION value + * @property {number} BOOT_OR_LOGON_INITIALIZATION_SCRIPTS=37 BOOT_OR_LOGON_INITIALIZATION_SCRIPTS value + * @property {number} STARTUP_ITEMS=38 STARTUP_ITEMS value + * @property {number} NETWORK_SERVICE_DISCOVERY=32 NETWORK_SERVICE_DISCOVERY value + * @property {number} PROCESS_DISCOVERY=56 PROCESS_DISCOVERY value + * @property {number} COMMAND_AND_SCRIPTING_INTERPRETER=6 COMMAND_AND_SCRIPTING_INTERPRETER value + * @property {number} UNIX_SHELL=7 UNIX_SHELL value + * @property {number} PYTHON=59 PYTHON value + * @property {number} PERMISSION_GROUPS_DISCOVERY=18 PERMISSION_GROUPS_DISCOVERY value + * @property {number} CLOUD_GROUPS=19 CLOUD_GROUPS value + * @property {number} APPLICATION_LAYER_PROTOCOL=45 APPLICATION_LAYER_PROTOCOL value + * @property {number} DNS=46 DNS value + * @property {number} SOFTWARE_DEPLOYMENT_TOOLS=47 SOFTWARE_DEPLOYMENT_TOOLS value + * @property {number} VALID_ACCOUNTS=14 VALID_ACCOUNTS value + * @property {number} DEFAULT_ACCOUNTS=35 DEFAULT_ACCOUNTS value + * @property {number} LOCAL_ACCOUNTS=15 LOCAL_ACCOUNTS value + * @property {number} CLOUD_ACCOUNTS=16 CLOUD_ACCOUNTS value + * @property {number} PROXY=9 PROXY value + * @property {number} EXTERNAL_PROXY=10 EXTERNAL_PROXY value + * @property {number} MULTI_HOP_PROXY=11 MULTI_HOP_PROXY value + * @property {number} ACCOUNT_MANIPULATION=22 ACCOUNT_MANIPULATION value + * @property {number} ADDITIONAL_CLOUD_CREDENTIALS=40 ADDITIONAL_CLOUD_CREDENTIALS value + * @property {number} SSH_AUTHORIZED_KEYS=23 SSH_AUTHORIZED_KEYS value + * @property {number} ADDITIONAL_CONTAINER_CLUSTER_ROLES=58 ADDITIONAL_CONTAINER_CLUSTER_ROLES value + * @property {number} INGRESS_TOOL_TRANSFER=3 INGRESS_TOOL_TRANSFER value + * @property {number} NATIVE_API=4 NATIVE_API value + * @property {number} BRUTE_FORCE=44 BRUTE_FORCE value + * @property {number} SHARED_MODULES=5 SHARED_MODULES value + * @property {number} ACCESS_TOKEN_MANIPULATION=33 ACCESS_TOKEN_MANIPULATION value + * @property {number} TOKEN_IMPERSONATION_OR_THEFT=39 TOKEN_IMPERSONATION_OR_THEFT value + * @property {number} EXPLOIT_PUBLIC_FACING_APPLICATION=27 EXPLOIT_PUBLIC_FACING_APPLICATION value + * @property {number} DOMAIN_POLICY_MODIFICATION=30 DOMAIN_POLICY_MODIFICATION value + * @property {number} DATA_DESTRUCTION=29 DATA_DESTRUCTION value + * @property {number} SERVICE_STOP=52 SERVICE_STOP value + * @property {number} INHIBIT_SYSTEM_RECOVERY=36 INHIBIT_SYSTEM_RECOVERY value + * @property {number} RESOURCE_HIJACKING=8 RESOURCE_HIJACKING value + * @property {number} NETWORK_DENIAL_OF_SERVICE=17 NETWORK_DENIAL_OF_SERVICE value + * @property {number} CLOUD_SERVICE_DISCOVERY=48 CLOUD_SERVICE_DISCOVERY value + * @property {number} STEAL_APPLICATION_ACCESS_TOKEN=42 STEAL_APPLICATION_ACCESS_TOKEN value + * @property {number} ACCOUNT_ACCESS_REMOVAL=51 ACCOUNT_ACCESS_REMOVAL value + * @property {number} STEAL_WEB_SESSION_COOKIE=25 STEAL_WEB_SESSION_COOKIE value + * @property {number} CREATE_OR_MODIFY_SYSTEM_PROCESS=24 CREATE_OR_MODIFY_SYSTEM_PROCESS value + * @property {number} ABUSE_ELEVATION_CONTROL_MECHANISM=34 ABUSE_ELEVATION_CONTROL_MECHANISM value + * @property {number} UNSECURED_CREDENTIALS=13 UNSECURED_CREDENTIALS value + * @property {number} MODIFY_AUTHENTICATION_PROCESS=28 MODIFY_AUTHENTICATION_PROCESS value + * @property {number} IMPAIR_DEFENSES=31 IMPAIR_DEFENSES value + * @property {number} DISABLE_OR_MODIFY_TOOLS=55 DISABLE_OR_MODIFY_TOOLS value + * @property {number} EXFILTRATION_OVER_WEB_SERVICE=20 EXFILTRATION_OVER_WEB_SERVICE value + * @property {number} EXFILTRATION_TO_CLOUD_STORAGE=21 EXFILTRATION_TO_CLOUD_STORAGE value + * @property {number} DYNAMIC_RESOLUTION=12 DYNAMIC_RESOLUTION value + * @property {number} LATERAL_TOOL_TRANSFER=41 LATERAL_TOOL_TRANSFER value + * @property {number} MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE=26 MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE value + * @property {number} CREATE_SNAPSHOT=54 CREATE_SNAPSHOT value + * @property {number} CLOUD_INFRASTRUCTURE_DISCOVERY=53 CLOUD_INFRASTRUCTURE_DISCOVERY value + * @property {number} OBTAIN_CAPABILITIES=43 OBTAIN_CAPABILITIES value + * @property {number} ACTIVE_SCANNING=1 ACTIVE_SCANNING value + * @property {number} SCANNING_IP_BLOCKS=2 SCANNING_IP_BLOCKS value + * @property {number} CONTAINER_ADMINISTRATION_COMMAND=60 CONTAINER_ADMINISTRATION_COMMAND value + * @property {number} ESCAPE_TO_HOST=61 ESCAPE_TO_HOST value + * @property {number} CONTAINER_AND_RESOURCE_DISCOVERY=57 CONTAINER_AND_RESOURCE_DISCOVERY value + * @property {number} STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES=62 STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES value + */ + MitreAttack.Technique = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TECHNIQUE_UNSPECIFIED"] = 0; + values[valuesById[49] = "MASQUERADING"] = 49; + values[valuesById[50] = "MATCH_LEGITIMATE_NAME_OR_LOCATION"] = 50; + values[valuesById[37] = "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS"] = 37; + values[valuesById[38] = "STARTUP_ITEMS"] = 38; + values[valuesById[32] = "NETWORK_SERVICE_DISCOVERY"] = 32; + values[valuesById[56] = "PROCESS_DISCOVERY"] = 56; + values[valuesById[6] = "COMMAND_AND_SCRIPTING_INTERPRETER"] = 6; + values[valuesById[7] = "UNIX_SHELL"] = 7; + values[valuesById[59] = "PYTHON"] = 59; + values[valuesById[18] = "PERMISSION_GROUPS_DISCOVERY"] = 18; + values[valuesById[19] = "CLOUD_GROUPS"] = 19; + values[valuesById[45] = "APPLICATION_LAYER_PROTOCOL"] = 45; + values[valuesById[46] = "DNS"] = 46; + values[valuesById[47] = "SOFTWARE_DEPLOYMENT_TOOLS"] = 47; + values[valuesById[14] = "VALID_ACCOUNTS"] = 14; + values[valuesById[35] = "DEFAULT_ACCOUNTS"] = 35; + values[valuesById[15] = "LOCAL_ACCOUNTS"] = 15; + values[valuesById[16] = "CLOUD_ACCOUNTS"] = 16; + values[valuesById[9] = "PROXY"] = 9; + values[valuesById[10] = "EXTERNAL_PROXY"] = 10; + values[valuesById[11] = "MULTI_HOP_PROXY"] = 11; + values[valuesById[22] = "ACCOUNT_MANIPULATION"] = 22; + values[valuesById[40] = "ADDITIONAL_CLOUD_CREDENTIALS"] = 40; + values[valuesById[23] = "SSH_AUTHORIZED_KEYS"] = 23; + values[valuesById[58] = "ADDITIONAL_CONTAINER_CLUSTER_ROLES"] = 58; + values[valuesById[3] = "INGRESS_TOOL_TRANSFER"] = 3; + values[valuesById[4] = "NATIVE_API"] = 4; + values[valuesById[44] = "BRUTE_FORCE"] = 44; + values[valuesById[5] = "SHARED_MODULES"] = 5; + values[valuesById[33] = "ACCESS_TOKEN_MANIPULATION"] = 33; + values[valuesById[39] = "TOKEN_IMPERSONATION_OR_THEFT"] = 39; + values[valuesById[27] = "EXPLOIT_PUBLIC_FACING_APPLICATION"] = 27; + values[valuesById[30] = "DOMAIN_POLICY_MODIFICATION"] = 30; + values[valuesById[29] = "DATA_DESTRUCTION"] = 29; + values[valuesById[52] = "SERVICE_STOP"] = 52; + values[valuesById[36] = "INHIBIT_SYSTEM_RECOVERY"] = 36; + values[valuesById[8] = "RESOURCE_HIJACKING"] = 8; + values[valuesById[17] = "NETWORK_DENIAL_OF_SERVICE"] = 17; + values[valuesById[48] = "CLOUD_SERVICE_DISCOVERY"] = 48; + values[valuesById[42] = "STEAL_APPLICATION_ACCESS_TOKEN"] = 42; + values[valuesById[51] = "ACCOUNT_ACCESS_REMOVAL"] = 51; + values[valuesById[25] = "STEAL_WEB_SESSION_COOKIE"] = 25; + values[valuesById[24] = "CREATE_OR_MODIFY_SYSTEM_PROCESS"] = 24; + values[valuesById[34] = "ABUSE_ELEVATION_CONTROL_MECHANISM"] = 34; + values[valuesById[13] = "UNSECURED_CREDENTIALS"] = 13; + values[valuesById[28] = "MODIFY_AUTHENTICATION_PROCESS"] = 28; + values[valuesById[31] = "IMPAIR_DEFENSES"] = 31; + values[valuesById[55] = "DISABLE_OR_MODIFY_TOOLS"] = 55; + values[valuesById[20] = "EXFILTRATION_OVER_WEB_SERVICE"] = 20; + values[valuesById[21] = "EXFILTRATION_TO_CLOUD_STORAGE"] = 21; + values[valuesById[12] = "DYNAMIC_RESOLUTION"] = 12; + values[valuesById[41] = "LATERAL_TOOL_TRANSFER"] = 41; + values[valuesById[26] = "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE"] = 26; + values[valuesById[54] = "CREATE_SNAPSHOT"] = 54; + values[valuesById[53] = "CLOUD_INFRASTRUCTURE_DISCOVERY"] = 53; + values[valuesById[43] = "OBTAIN_CAPABILITIES"] = 43; + values[valuesById[1] = "ACTIVE_SCANNING"] = 1; + values[valuesById[2] = "SCANNING_IP_BLOCKS"] = 2; + values[valuesById[60] = "CONTAINER_ADMINISTRATION_COMMAND"] = 60; + values[valuesById[61] = "ESCAPE_TO_HOST"] = 61; + values[valuesById[57] = "CONTAINER_AND_RESOURCE_DISCOVERY"] = 57; + values[valuesById[62] = "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES"] = 62; + return values; + })(); + + return MitreAttack; + })(); + + v1.Notebook = (function() { + + /** + * Properties of a Notebook. + * @memberof google.cloud.securitycenter.v1 + * @interface INotebook + * @property {string|null} [name] Notebook name + * @property {string|null} [service] Notebook service + * @property {string|null} [lastAuthor] Notebook lastAuthor + * @property {google.protobuf.ITimestamp|null} [notebookUpdateTime] Notebook notebookUpdateTime + */ + + /** + * Constructs a new Notebook. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Notebook. + * @implements INotebook + * @constructor + * @param {google.cloud.securitycenter.v1.INotebook=} [properties] Properties to set + */ + function Notebook(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]]; + } + + /** + * Notebook name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Notebook + * @instance + */ + Notebook.prototype.name = ""; + + /** + * Notebook service. + * @member {string} service + * @memberof google.cloud.securitycenter.v1.Notebook + * @instance + */ + Notebook.prototype.service = ""; + + /** + * Notebook lastAuthor. + * @member {string} lastAuthor + * @memberof google.cloud.securitycenter.v1.Notebook + * @instance + */ + Notebook.prototype.lastAuthor = ""; + + /** + * Notebook notebookUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} notebookUpdateTime + * @memberof google.cloud.securitycenter.v1.Notebook + * @instance + */ + Notebook.prototype.notebookUpdateTime = null; + + /** + * Creates a new Notebook instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {google.cloud.securitycenter.v1.INotebook=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Notebook} Notebook instance + */ + Notebook.create = function create(properties) { + return new Notebook(properties); + }; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {google.cloud.securitycenter.v1.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.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.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.lastAuthor != null && Object.hasOwnProperty.call(message, "lastAuthor")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAuthor); + if (message.notebookUpdateTime != null && Object.hasOwnProperty.call(message, "notebookUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.notebookUpdateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {google.cloud.securitycenter.v1.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.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.cloud.securitycenter.v1.Notebook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.lastAuthor = reader.string(); + break; + } + case 4: { + message.notebookUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Notebook message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Notebook.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.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) + if (!$util.isString(message.lastAuthor)) + return "lastAuthor: string expected"; + if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notebookUpdateTime); + if (error) + return "notebookUpdateTime." + error; + } + return null; + }; + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Notebook} Notebook + */ + Notebook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Notebook) + return object; + var message = new $root.google.cloud.securitycenter.v1.Notebook(); + if (object.name != null) + message.name = String(object.name); + if (object.service != null) + message.service = String(object.service); + if (object.lastAuthor != null) + message.lastAuthor = String(object.lastAuthor); + if (object.notebookUpdateTime != null) { + if (typeof object.notebookUpdateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Notebook.notebookUpdateTime: object expected"); + message.notebookUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.notebookUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {google.cloud.securitycenter.v1.Notebook} message Notebook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Notebook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.service = ""; + object.lastAuthor = ""; + object.notebookUpdateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) + object.lastAuthor = message.lastAuthor; + if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) + object.notebookUpdateTime = $root.google.protobuf.Timestamp.toObject(message.notebookUpdateTime, options); + return object; + }; + + /** + * Converts this Notebook to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Notebook + * @instance + * @returns {Object.} JSON object + */ + Notebook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Notebook + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Notebook + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Notebook"; + }; + + return Notebook; + })(); + + v1.OrgPolicy = (function() { + + /** + * Properties of an OrgPolicy. + * @memberof google.cloud.securitycenter.v1 + * @interface IOrgPolicy + * @property {string|null} [name] OrgPolicy name + */ + + /** + * Constructs a new OrgPolicy. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an OrgPolicy. + * @implements IOrgPolicy + * @constructor + * @param {google.cloud.securitycenter.v1.IOrgPolicy=} [properties] Properties to set + */ + function OrgPolicy(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]]; + } + + /** + * OrgPolicy name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @instance + */ + OrgPolicy.prototype.name = ""; + + /** + * Creates a new OrgPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v1.IOrgPolicy=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy instance + */ + OrgPolicy.create = function create(properties) { + return new OrgPolicy(properties); + }; + + /** + * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v1.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgPolicy.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); + return writer; + }; + + /** + * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v1.IOrgPolicy} message OrgPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgPolicy.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.cloud.securitycenter.v1.OrgPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrgPolicy message. + * @function verify + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrgPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an OrgPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy + */ + OrgPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.OrgPolicy) + return object; + var message = new $root.google.cloud.securitycenter.v1.OrgPolicy(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {google.cloud.securitycenter.v1.OrgPolicy} message OrgPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrgPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this OrgPolicy to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @instance + * @returns {Object.} JSON object + */ + OrgPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrgPolicy + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.OrgPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrgPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrgPolicy"; + }; + + return OrgPolicy; + })(); + + v1.Process = (function() { + + /** + * Properties of a Process. + * @memberof google.cloud.securitycenter.v1 + * @interface IProcess + * @property {string|null} [name] Process name + * @property {google.cloud.securitycenter.v1.IFile|null} [binary] Process binary + * @property {Array.|null} [libraries] Process libraries + * @property {google.cloud.securitycenter.v1.IFile|null} [script] Process script + * @property {Array.|null} [args] Process args + * @property {boolean|null} [argumentsTruncated] Process argumentsTruncated + * @property {Array.|null} [envVariables] Process envVariables + * @property {boolean|null} [envVariablesTruncated] Process envVariablesTruncated + * @property {number|Long|null} [pid] Process pid + * @property {number|Long|null} [parentPid] Process parentPid + */ + + /** + * Constructs a new Process. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Process. + * @implements IProcess + * @constructor + * @param {google.cloud.securitycenter.v1.IProcess=} [properties] Properties to set + */ + function Process(properties) { + this.libraries = []; + this.args = []; + this.envVariables = []; + 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]]; + } + + /** + * Process name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.name = ""; + + /** + * Process binary. + * @member {google.cloud.securitycenter.v1.IFile|null|undefined} binary + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.binary = null; + + /** + * Process libraries. + * @member {Array.} libraries + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.libraries = $util.emptyArray; + + /** + * Process script. + * @member {google.cloud.securitycenter.v1.IFile|null|undefined} script + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.script = null; + + /** + * Process args. + * @member {Array.} args + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.args = $util.emptyArray; + + /** + * Process argumentsTruncated. + * @member {boolean} argumentsTruncated + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.argumentsTruncated = false; + + /** + * Process envVariables. + * @member {Array.} envVariables + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.envVariables = $util.emptyArray; + + /** + * Process envVariablesTruncated. + * @member {boolean} envVariablesTruncated + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.envVariablesTruncated = false; + + /** + * Process pid. + * @member {number|Long} pid + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Process parentPid. + * @member {number|Long} parentPid + * @memberof google.cloud.securitycenter.v1.Process + * @instance + */ + Process.prototype.parentPid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Process instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {google.cloud.securitycenter.v1.IProcess=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Process} Process instance + */ + Process.create = function create(properties) { + return new Process(properties); + }; + + /** + * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {google.cloud.securitycenter.v1.IProcess} message Process message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Process.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) + $root.google.cloud.securitycenter.v1.File.encode(message.binary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.libraries != null && message.libraries.length) + for (var i = 0; i < message.libraries.length; ++i) + $root.google.cloud.securitycenter.v1.File.encode(message.libraries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + $root.google.cloud.securitycenter.v1.File.encode(message.script, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.args[i]); + if (message.argumentsTruncated != null && Object.hasOwnProperty.call(message, "argumentsTruncated")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.argumentsTruncated); + if (message.envVariables != null && message.envVariables.length) + for (var i = 0; i < message.envVariables.length; ++i) + $root.google.cloud.securitycenter.v1.EnvironmentVariable.encode(message.envVariables[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.envVariablesTruncated != null && Object.hasOwnProperty.call(message, "envVariablesTruncated")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.envVariablesTruncated); + if (message.pid != null && Object.hasOwnProperty.call(message, "pid")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.pid); + if (message.parentPid != null && Object.hasOwnProperty.call(message, "parentPid")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.parentPid); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); + return writer; + }; + + /** + * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {google.cloud.securitycenter.v1.IProcess} message Process message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Process.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Process message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Process} Process + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Process.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.cloud.securitycenter.v1.Process(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: { + message.name = reader.string(); + break; + } + case 3: { + message.binary = $root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.libraries && message.libraries.length)) + message.libraries = []; + message.libraries.push($root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32())); + break; + } + case 5: { + message.script = $root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + } + case 7: { + message.argumentsTruncated = reader.bool(); + break; + } + case 8: { + if (!(message.envVariables && message.envVariables.length)) + message.envVariables = []; + message.envVariables.push($root.google.cloud.securitycenter.v1.EnvironmentVariable.decode(reader, reader.uint32())); + break; + } + case 9: { + message.envVariablesTruncated = reader.bool(); + break; + } + case 10: { + message.pid = reader.int64(); + break; + } + case 11: { + message.parentPid = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Process message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Process} Process + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Process.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Process message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Process.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.binary != null && message.hasOwnProperty("binary")) { + var error = $root.google.cloud.securitycenter.v1.File.verify(message.binary); + if (error) + return "binary." + error; + } + if (message.libraries != null && message.hasOwnProperty("libraries")) { + if (!Array.isArray(message.libraries)) + return "libraries: array expected"; + for (var i = 0; i < message.libraries.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.File.verify(message.libraries[i]); + if (error) + return "libraries." + error; + } + } + if (message.script != null && message.hasOwnProperty("script")) { + var error = $root.google.cloud.securitycenter.v1.File.verify(message.script); + if (error) + return "script." + error; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) + if (typeof message.argumentsTruncated !== "boolean") + return "argumentsTruncated: boolean expected"; + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!Array.isArray(message.envVariables)) + return "envVariables: array expected"; + for (var i = 0; i < message.envVariables.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.EnvironmentVariable.verify(message.envVariables[i]); + if (error) + return "envVariables." + error; + } + } + if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) + if (typeof message.envVariablesTruncated !== "boolean") + return "envVariablesTruncated: boolean expected"; + if (message.pid != null && message.hasOwnProperty("pid")) + if (!$util.isInteger(message.pid) && !(message.pid && $util.isInteger(message.pid.low) && $util.isInteger(message.pid.high))) + return "pid: integer|Long expected"; + if (message.parentPid != null && message.hasOwnProperty("parentPid")) + if (!$util.isInteger(message.parentPid) && !(message.parentPid && $util.isInteger(message.parentPid.low) && $util.isInteger(message.parentPid.high))) + return "parentPid: integer|Long expected"; + return null; + }; + + /** + * Creates a Process message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Process} Process + */ + Process.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Process) + return object; + var message = new $root.google.cloud.securitycenter.v1.Process(); + if (object.name != null) + message.name = String(object.name); + if (object.binary != null) { + if (typeof object.binary !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Process.binary: object expected"); + message.binary = $root.google.cloud.securitycenter.v1.File.fromObject(object.binary); + } + if (object.libraries) { + if (!Array.isArray(object.libraries)) + throw TypeError(".google.cloud.securitycenter.v1.Process.libraries: array expected"); + message.libraries = []; + for (var i = 0; i < object.libraries.length; ++i) { + if (typeof object.libraries[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Process.libraries: object expected"); + message.libraries[i] = $root.google.cloud.securitycenter.v1.File.fromObject(object.libraries[i]); + } + } + if (object.script != null) { + if (typeof object.script !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Process.script: object expected"); + message.script = $root.google.cloud.securitycenter.v1.File.fromObject(object.script); + } + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.cloud.securitycenter.v1.Process.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + if (object.argumentsTruncated != null) + message.argumentsTruncated = Boolean(object.argumentsTruncated); + if (object.envVariables) { + if (!Array.isArray(object.envVariables)) + throw TypeError(".google.cloud.securitycenter.v1.Process.envVariables: array expected"); + message.envVariables = []; + for (var i = 0; i < object.envVariables.length; ++i) { + if (typeof object.envVariables[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Process.envVariables: object expected"); + message.envVariables[i] = $root.google.cloud.securitycenter.v1.EnvironmentVariable.fromObject(object.envVariables[i]); + } + } + if (object.envVariablesTruncated != null) + message.envVariablesTruncated = Boolean(object.envVariablesTruncated); + if (object.pid != null) + if ($util.Long) + (message.pid = $util.Long.fromValue(object.pid)).unsigned = false; + else if (typeof object.pid === "string") + message.pid = parseInt(object.pid, 10); + else if (typeof object.pid === "number") + message.pid = object.pid; + else if (typeof object.pid === "object") + message.pid = new $util.LongBits(object.pid.low >>> 0, object.pid.high >>> 0).toNumber(); + if (object.parentPid != null) + if ($util.Long) + (message.parentPid = $util.Long.fromValue(object.parentPid)).unsigned = false; + else if (typeof object.parentPid === "string") + message.parentPid = parseInt(object.parentPid, 10); + else if (typeof object.parentPid === "number") + message.parentPid = object.parentPid; + else if (typeof object.parentPid === "object") + message.parentPid = new $util.LongBits(object.parentPid.low >>> 0, object.parentPid.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Process message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {google.cloud.securitycenter.v1.Process} message Process + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Process.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.libraries = []; + object.args = []; + object.envVariables = []; + } + if (options.defaults) { + object.binary = null; + object.script = null; + object.argumentsTruncated = false; + object.envVariablesTruncated = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pid = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.parentPid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.parentPid = options.longs === String ? "0" : 0; + object.name = ""; + } + if (message.binary != null && message.hasOwnProperty("binary")) + object.binary = $root.google.cloud.securitycenter.v1.File.toObject(message.binary, options); + if (message.libraries && message.libraries.length) { + object.libraries = []; + for (var j = 0; j < message.libraries.length; ++j) + object.libraries[j] = $root.google.cloud.securitycenter.v1.File.toObject(message.libraries[j], options); + } + if (message.script != null && message.hasOwnProperty("script")) + object.script = $root.google.cloud.securitycenter.v1.File.toObject(message.script, options); + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) + object.argumentsTruncated = message.argumentsTruncated; + if (message.envVariables && message.envVariables.length) { + object.envVariables = []; + for (var j = 0; j < message.envVariables.length; ++j) + object.envVariables[j] = $root.google.cloud.securitycenter.v1.EnvironmentVariable.toObject(message.envVariables[j], options); + } + if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) + object.envVariablesTruncated = message.envVariablesTruncated; + if (message.pid != null && message.hasOwnProperty("pid")) + if (typeof message.pid === "number") + object.pid = options.longs === String ? String(message.pid) : message.pid; + else + object.pid = options.longs === String ? $util.Long.prototype.toString.call(message.pid) : options.longs === Number ? new $util.LongBits(message.pid.low >>> 0, message.pid.high >>> 0).toNumber() : message.pid; + if (message.parentPid != null && message.hasOwnProperty("parentPid")) + if (typeof message.parentPid === "number") + object.parentPid = options.longs === String ? String(message.parentPid) : message.parentPid; + else + object.parentPid = options.longs === String ? $util.Long.prototype.toString.call(message.parentPid) : options.longs === Number ? new $util.LongBits(message.parentPid.low >>> 0, message.parentPid.high >>> 0).toNumber() : message.parentPid; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Process to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Process + * @instance + * @returns {Object.} JSON object + */ + Process.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Process + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Process + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Process.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Process"; + }; + + return Process; + })(); + + v1.EnvironmentVariable = (function() { + + /** + * Properties of an EnvironmentVariable. + * @memberof google.cloud.securitycenter.v1 + * @interface IEnvironmentVariable + * @property {string|null} [name] EnvironmentVariable name + * @property {string|null} [val] EnvironmentVariable val + */ + + /** + * Constructs a new EnvironmentVariable. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an EnvironmentVariable. + * @implements IEnvironmentVariable + * @constructor + * @param {google.cloud.securitycenter.v1.IEnvironmentVariable=} [properties] Properties to set + */ + function EnvironmentVariable(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]]; + } + + /** + * EnvironmentVariable name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @instance + */ + EnvironmentVariable.prototype.name = ""; + + /** + * EnvironmentVariable val. + * @member {string} val + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @instance + */ + EnvironmentVariable.prototype.val = ""; + + /** + * Creates a new EnvironmentVariable instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v1.IEnvironmentVariable=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable instance + */ + EnvironmentVariable.create = function create(properties) { + return new EnvironmentVariable(properties); + }; + + /** + * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v1.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentVariable.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.val != null && Object.hasOwnProperty.call(message, "val")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.val); + return writer; + }; + + /** + * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v1.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentVariable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentVariable.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.cloud.securitycenter.v1.EnvironmentVariable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.val = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentVariable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentVariable message. + * @function verify + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentVariable.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.val != null && message.hasOwnProperty("val")) + if (!$util.isString(message.val)) + return "val: string expected"; + return null; + }; + + /** + * Creates an EnvironmentVariable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable + */ + EnvironmentVariable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.EnvironmentVariable) + return object; + var message = new $root.google.cloud.securitycenter.v1.EnvironmentVariable(); + if (object.name != null) + message.name = String(object.name); + if (object.val != null) + message.val = String(object.val); + return message; + }; + + /** + * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {google.cloud.securitycenter.v1.EnvironmentVariable} message EnvironmentVariable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentVariable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.val = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.val != null && message.hasOwnProperty("val")) + object.val = message.val; + return object; + }; + + /** + * Converts this EnvironmentVariable to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @instance + * @returns {Object.} JSON object + */ + EnvironmentVariable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnvironmentVariable + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.EnvironmentVariable"; + }; + + return EnvironmentVariable; + })(); + + v1.SecurityPosture = (function() { + + /** + * Properties of a SecurityPosture. + * @memberof google.cloud.securitycenter.v1 + * @interface ISecurityPosture + * @property {string|null} [name] SecurityPosture name + * @property {string|null} [revisionId] SecurityPosture revisionId + * @property {string|null} [postureDeploymentResource] SecurityPosture postureDeploymentResource + * @property {string|null} [postureDeployment] SecurityPosture postureDeployment + * @property {string|null} [changedPolicy] SecurityPosture changedPolicy + * @property {string|null} [policySet] SecurityPosture policySet + * @property {string|null} [policy] SecurityPosture policy + * @property {Array.|null} [policyDriftDetails] SecurityPosture policyDriftDetails + */ + + /** + * Constructs a new SecurityPosture. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityPosture. + * @implements ISecurityPosture + * @constructor + * @param {google.cloud.securitycenter.v1.ISecurityPosture=} [properties] Properties to set + */ + function SecurityPosture(properties) { + this.policyDriftDetails = []; + 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]]; + } + + /** + * SecurityPosture name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.name = ""; + + /** + * SecurityPosture revisionId. + * @member {string} revisionId + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.revisionId = ""; + + /** + * SecurityPosture postureDeploymentResource. + * @member {string} postureDeploymentResource + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.postureDeploymentResource = ""; + + /** + * SecurityPosture postureDeployment. + * @member {string} postureDeployment + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.postureDeployment = ""; + + /** + * SecurityPosture changedPolicy. + * @member {string} changedPolicy + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.changedPolicy = ""; + + /** + * SecurityPosture policySet. + * @member {string} policySet + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policySet = ""; + + /** + * SecurityPosture policy. + * @member {string} policy + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policy = ""; + + /** + * SecurityPosture policyDriftDetails. + * @member {Array.} policyDriftDetails + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + */ + SecurityPosture.prototype.policyDriftDetails = $util.emptyArray; + + /** + * Creates a new SecurityPosture instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v1.ISecurityPosture=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture instance + */ + SecurityPosture.create = function create(properties) { + return new SecurityPosture(properties); + }; + + /** + * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v1.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPosture.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + if (message.postureDeploymentResource != null && Object.hasOwnProperty.call(message, "postureDeploymentResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.postureDeploymentResource); + if (message.postureDeployment != null && Object.hasOwnProperty.call(message, "postureDeployment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.postureDeployment); + if (message.changedPolicy != null && Object.hasOwnProperty.call(message, "changedPolicy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.changedPolicy); + if (message.policySet != null && Object.hasOwnProperty.call(message, "policySet")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.policySet); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.policy); + if (message.policyDriftDetails != null && message.policyDriftDetails.length) + for (var i = 0; i < message.policyDriftDetails.length; ++i) + $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.encode(message.policyDriftDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v1.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPosture.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPosture.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.cloud.securitycenter.v1.SecurityPosture(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.revisionId = reader.string(); + break; + } + case 3: { + message.postureDeploymentResource = reader.string(); + break; + } + case 4: { + message.postureDeployment = reader.string(); + break; + } + case 5: { + message.changedPolicy = reader.string(); + break; + } + case 6: { + message.policySet = reader.string(); + break; + } + case 7: { + message.policy = reader.string(); + break; + } + case 8: { + if (!(message.policyDriftDetails && message.policyDriftDetails.length)) + message.policyDriftDetails = []; + message.policyDriftDetails.push($root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPosture.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityPosture message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityPosture.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) + if (!$util.isString(message.postureDeploymentResource)) + return "postureDeploymentResource: string expected"; + if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) + if (!$util.isString(message.postureDeployment)) + return "postureDeployment: string expected"; + if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) + if (!$util.isString(message.changedPolicy)) + return "changedPolicy: string expected"; + if (message.policySet != null && message.hasOwnProperty("policySet")) + if (!$util.isString(message.policySet)) + return "policySet: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyDriftDetails != null && message.hasOwnProperty("policyDriftDetails")) { + if (!Array.isArray(message.policyDriftDetails)) + return "policyDriftDetails: array expected"; + for (var i = 0; i < message.policyDriftDetails.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify(message.policyDriftDetails[i]); + if (error) + return "policyDriftDetails." + error; + } + } + return null; + }; + + /** + * Creates a SecurityPosture message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + */ + SecurityPosture.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPosture) + return object; + var message = new $root.google.cloud.securitycenter.v1.SecurityPosture(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.postureDeploymentResource != null) + message.postureDeploymentResource = String(object.postureDeploymentResource); + if (object.postureDeployment != null) + message.postureDeployment = String(object.postureDeployment); + if (object.changedPolicy != null) + message.changedPolicy = String(object.changedPolicy); + if (object.policySet != null) + message.policySet = String(object.policySet); + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyDriftDetails) { + if (!Array.isArray(object.policyDriftDetails)) + throw TypeError(".google.cloud.securitycenter.v1.SecurityPosture.policyDriftDetails: array expected"); + message.policyDriftDetails = []; + for (var i = 0; i < object.policyDriftDetails.length; ++i) { + if (typeof object.policyDriftDetails[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SecurityPosture.policyDriftDetails: object expected"); + message.policyDriftDetails[i] = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.fromObject(object.policyDriftDetails[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {google.cloud.securitycenter.v1.SecurityPosture} message SecurityPosture + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityPosture.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.policyDriftDetails = []; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + object.postureDeploymentResource = ""; + object.postureDeployment = ""; + object.changedPolicy = ""; + object.policySet = ""; + object.policy = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) + object.postureDeploymentResource = message.postureDeploymentResource; + if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) + object.postureDeployment = message.postureDeployment; + if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) + object.changedPolicy = message.changedPolicy; + if (message.policySet != null && message.hasOwnProperty("policySet")) + object.policySet = message.policySet; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.policyDriftDetails && message.policyDriftDetails.length) { + object.policyDriftDetails = []; + for (var j = 0; j < message.policyDriftDetails.length; ++j) + object.policyDriftDetails[j] = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.toObject(message.policyDriftDetails[j], options); + } + return object; + }; + + /** + * Converts this SecurityPosture to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @instance + * @returns {Object.} JSON object + */ + SecurityPosture.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityPosture + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityPosture.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPosture"; + }; + + SecurityPosture.PolicyDriftDetails = (function() { + + /** + * Properties of a PolicyDriftDetails. + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @interface IPolicyDriftDetails + * @property {string|null} [field] PolicyDriftDetails field + * @property {string|null} [expectedValue] PolicyDriftDetails expectedValue + * @property {string|null} [detectedValue] PolicyDriftDetails detectedValue + */ + + /** + * Constructs a new PolicyDriftDetails. + * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @classdesc Represents a PolicyDriftDetails. + * @implements IPolicyDriftDetails + * @constructor + * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set + */ + function PolicyDriftDetails(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]]; + } + + /** + * PolicyDriftDetails field. + * @member {string} field + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.field = ""; + + /** + * PolicyDriftDetails expectedValue. + * @member {string} expectedValue + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.expectedValue = ""; + + /** + * PolicyDriftDetails detectedValue. + * @member {string} detectedValue + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @instance + */ + PolicyDriftDetails.prototype.detectedValue = ""; + + /** + * Creates a new PolicyDriftDetails instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails instance + */ + PolicyDriftDetails.create = function create(properties) { + return new PolicyDriftDetails(properties); + }; + + /** + * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDriftDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); + if (message.detectedValue != null && Object.hasOwnProperty.call(message, "detectedValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.detectedValue); + return writer; + }; + + /** + * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDriftDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDriftDetails.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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.expectedValue = reader.string(); + break; + } + case 3: { + message.detectedValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDriftDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDriftDetails message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDriftDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + if (!$util.isString(message.expectedValue)) + return "expectedValue: string expected"; + if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) + if (!$util.isString(message.detectedValue)) + return "detectedValue: string expected"; + return null; + }; + + /** + * Creates a PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails + */ + PolicyDriftDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails) + return object; + var message = new $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails(); + if (object.field != null) + message.field = String(object.field); + if (object.expectedValue != null) + message.expectedValue = String(object.expectedValue); + if (object.detectedValue != null) + message.detectedValue = String(object.detectedValue); + return message; + }; + + /** + * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} message PolicyDriftDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDriftDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.expectedValue = ""; + object.detectedValue = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) + object.expectedValue = message.expectedValue; + if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) + object.detectedValue = message.detectedValue; + return object; + }; + + /** + * Converts this PolicyDriftDetails to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @instance + * @returns {Object.} JSON object + */ + PolicyDriftDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDriftDetails + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDriftDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails"; + }; + + return PolicyDriftDetails; + })(); + + return SecurityPosture; + })(); + + v1.ToxicCombination = (function() { + + /** + * Properties of a ToxicCombination. + * @memberof google.cloud.securitycenter.v1 + * @interface IToxicCombination + * @property {number|null} [attackExposureScore] ToxicCombination attackExposureScore + * @property {Array.|null} [relatedFindings] ToxicCombination relatedFindings + */ + + /** + * Constructs a new ToxicCombination. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ToxicCombination. + * @implements IToxicCombination + * @constructor + * @param {google.cloud.securitycenter.v1.IToxicCombination=} [properties] Properties to set + */ + function ToxicCombination(properties) { + this.relatedFindings = []; + 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]]; + } + + /** + * ToxicCombination attackExposureScore. + * @member {number} attackExposureScore + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @instance + */ + ToxicCombination.prototype.attackExposureScore = 0; + + /** + * ToxicCombination relatedFindings. + * @member {Array.} relatedFindings + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @instance + */ + ToxicCombination.prototype.relatedFindings = $util.emptyArray; + + /** + * Creates a new ToxicCombination instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v1.IToxicCombination=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination instance + */ + ToxicCombination.create = function create(properties) { + return new ToxicCombination(properties); + }; + + /** + * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v1.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToxicCombination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attackExposureScore != null && Object.hasOwnProperty.call(message, "attackExposureScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.attackExposureScore); + if (message.relatedFindings != null && message.relatedFindings.length) + for (var i = 0; i < message.relatedFindings.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relatedFindings[i]); + return writer; + }; + + /** + * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v1.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToxicCombination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToxicCombination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToxicCombination.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.cloud.securitycenter.v1.ToxicCombination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.attackExposureScore = reader.double(); + break; + } + case 2: { + if (!(message.relatedFindings && message.relatedFindings.length)) + message.relatedFindings = []; + message.relatedFindings.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToxicCombination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToxicCombination message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToxicCombination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) + if (typeof message.attackExposureScore !== "number") + return "attackExposureScore: number expected"; + if (message.relatedFindings != null && message.hasOwnProperty("relatedFindings")) { + if (!Array.isArray(message.relatedFindings)) + return "relatedFindings: array expected"; + for (var i = 0; i < message.relatedFindings.length; ++i) + if (!$util.isString(message.relatedFindings[i])) + return "relatedFindings: string[] expected"; + } + return null; + }; + + /** + * Creates a ToxicCombination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + */ + ToxicCombination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ToxicCombination) + return object; + var message = new $root.google.cloud.securitycenter.v1.ToxicCombination(); + if (object.attackExposureScore != null) + message.attackExposureScore = Number(object.attackExposureScore); + if (object.relatedFindings) { + if (!Array.isArray(object.relatedFindings)) + throw TypeError(".google.cloud.securitycenter.v1.ToxicCombination.relatedFindings: array expected"); + message.relatedFindings = []; + for (var i = 0; i < object.relatedFindings.length; ++i) + message.relatedFindings[i] = String(object.relatedFindings[i]); + } + return message; + }; + + /** + * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {google.cloud.securitycenter.v1.ToxicCombination} message ToxicCombination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToxicCombination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedFindings = []; + if (options.defaults) + object.attackExposureScore = 0; + if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) + object.attackExposureScore = options.json && !isFinite(message.attackExposureScore) ? String(message.attackExposureScore) : message.attackExposureScore; + if (message.relatedFindings && message.relatedFindings.length) { + object.relatedFindings = []; + for (var j = 0; j < message.relatedFindings.length; ++j) + object.relatedFindings[j] = message.relatedFindings[j]; + } + return object; + }; + + /** + * Converts this ToxicCombination to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @instance + * @returns {Object.} JSON object + */ + ToxicCombination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToxicCombination + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToxicCombination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ToxicCombination"; + }; + + return ToxicCombination; + })(); + + v1.Vulnerability = (function() { + + /** + * Properties of a Vulnerability. + * @memberof google.cloud.securitycenter.v1 + * @interface IVulnerability + * @property {google.cloud.securitycenter.v1.ICve|null} [cve] Vulnerability cve + * @property {google.cloud.securitycenter.v1.IPackage|null} [offendingPackage] Vulnerability offendingPackage + * @property {google.cloud.securitycenter.v1.IPackage|null} [fixedPackage] Vulnerability fixedPackage + * @property {google.cloud.securitycenter.v1.ISecurityBulletin|null} [securityBulletin] Vulnerability securityBulletin + */ + + /** + * Constructs a new Vulnerability. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Vulnerability. + * @implements IVulnerability + * @constructor + * @param {google.cloud.securitycenter.v1.IVulnerability=} [properties] Properties to set + */ + function Vulnerability(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]]; + } + + /** + * Vulnerability cve. + * @member {google.cloud.securitycenter.v1.ICve|null|undefined} cve + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @instance + */ + Vulnerability.prototype.cve = null; + + /** + * Vulnerability offendingPackage. + * @member {google.cloud.securitycenter.v1.IPackage|null|undefined} offendingPackage + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @instance + */ + Vulnerability.prototype.offendingPackage = null; + + /** + * Vulnerability fixedPackage. + * @member {google.cloud.securitycenter.v1.IPackage|null|undefined} fixedPackage + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @instance + */ + Vulnerability.prototype.fixedPackage = null; + + /** + * Vulnerability securityBulletin. + * @member {google.cloud.securitycenter.v1.ISecurityBulletin|null|undefined} securityBulletin + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @instance + */ + Vulnerability.prototype.securityBulletin = null; + + /** + * Creates a new Vulnerability instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {google.cloud.securitycenter.v1.IVulnerability=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability instance + */ + Vulnerability.create = function create(properties) { + return new Vulnerability(properties); + }; + + /** + * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {google.cloud.securitycenter.v1.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) + $root.google.cloud.securitycenter.v1.Cve.encode(message.cve, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.offendingPackage != null && Object.hasOwnProperty.call(message, "offendingPackage")) + $root.google.cloud.securitycenter.v1.Package.encode(message.offendingPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) + $root.google.cloud.securitycenter.v1.Package.encode(message.fixedPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.securityBulletin != null && Object.hasOwnProperty.call(message, "securityBulletin")) + $root.google.cloud.securitycenter.v1.SecurityBulletin.encode(message.securityBulletin, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {google.cloud.securitycenter.v1.IVulnerability} message Vulnerability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.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.cloud.securitycenter.v1.Vulnerability(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cve = $root.google.cloud.securitycenter.v1.Cve.decode(reader, reader.uint32()); + break; + } + case 2: { + message.offendingPackage = $root.google.cloud.securitycenter.v1.Package.decode(reader, reader.uint32()); + break; + } + case 3: { + message.fixedPackage = $root.google.cloud.securitycenter.v1.Package.decode(reader, reader.uint32()); + break; + } + case 4: { + message.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vulnerability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vulnerability message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vulnerability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cve != null && message.hasOwnProperty("cve")) { + var error = $root.google.cloud.securitycenter.v1.Cve.verify(message.cve); + if (error) + return "cve." + error; + } + if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) { + var error = $root.google.cloud.securitycenter.v1.Package.verify(message.offendingPackage); + if (error) + return "offendingPackage." + error; + } + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) { + var error = $root.google.cloud.securitycenter.v1.Package.verify(message.fixedPackage); + if (error) + return "fixedPackage." + error; + } + if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) { + var error = $root.google.cloud.securitycenter.v1.SecurityBulletin.verify(message.securityBulletin); + if (error) + return "securityBulletin." + error; + } + return null; + }; + + /** + * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + */ + Vulnerability.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Vulnerability) + return object; + var message = new $root.google.cloud.securitycenter.v1.Vulnerability(); + if (object.cve != null) { + if (typeof object.cve !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.cve: object expected"); + message.cve = $root.google.cloud.securitycenter.v1.Cve.fromObject(object.cve); + } + if (object.offendingPackage != null) { + if (typeof object.offendingPackage !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.offendingPackage: object expected"); + message.offendingPackage = $root.google.cloud.securitycenter.v1.Package.fromObject(object.offendingPackage); + } + if (object.fixedPackage != null) { + if (typeof object.fixedPackage !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.fixedPackage: object expected"); + message.fixedPackage = $root.google.cloud.securitycenter.v1.Package.fromObject(object.fixedPackage); + } + if (object.securityBulletin != null) { + if (typeof object.securityBulletin !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.securityBulletin: object expected"); + message.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.fromObject(object.securityBulletin); + } + return message; + }; + + /** + * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {google.cloud.securitycenter.v1.Vulnerability} message Vulnerability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vulnerability.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cve = null; + object.offendingPackage = null; + object.fixedPackage = null; + object.securityBulletin = null; + } + if (message.cve != null && message.hasOwnProperty("cve")) + object.cve = $root.google.cloud.securitycenter.v1.Cve.toObject(message.cve, options); + if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) + object.offendingPackage = $root.google.cloud.securitycenter.v1.Package.toObject(message.offendingPackage, options); + if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) + object.fixedPackage = $root.google.cloud.securitycenter.v1.Package.toObject(message.fixedPackage, options); + if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) + object.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.toObject(message.securityBulletin, options); + return object; + }; + + /** + * Converts this Vulnerability to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @instance + * @returns {Object.} JSON object + */ + Vulnerability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Vulnerability + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Vulnerability + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Vulnerability"; + }; + + return Vulnerability; + })(); + + v1.Cve = (function() { + + /** + * Properties of a Cve. + * @memberof google.cloud.securitycenter.v1 + * @interface ICve + * @property {string|null} [id] Cve id + * @property {Array.|null} [references] Cve references + * @property {google.cloud.securitycenter.v1.ICvssv3|null} [cvssv3] Cve cvssv3 + * @property {boolean|null} [upstreamFixAvailable] Cve upstreamFixAvailable + * @property {google.cloud.securitycenter.v1.Cve.RiskRating|null} [impact] Cve impact + * @property {google.cloud.securitycenter.v1.Cve.ExploitationActivity|null} [exploitationActivity] Cve exploitationActivity + * @property {boolean|null} [observedInTheWild] Cve observedInTheWild + * @property {boolean|null} [zeroDay] Cve zeroDay + */ + + /** + * Constructs a new Cve. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Cve. + * @implements ICve + * @constructor + * @param {google.cloud.securitycenter.v1.ICve=} [properties] Properties to set + */ + function Cve(properties) { + this.references = []; + 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]]; + } + + /** + * Cve id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.id = ""; + + /** + * Cve references. + * @member {Array.} references + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.references = $util.emptyArray; + + /** + * Cve cvssv3. + * @member {google.cloud.securitycenter.v1.ICvssv3|null|undefined} cvssv3 + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.cvssv3 = null; + + /** + * Cve upstreamFixAvailable. + * @member {boolean} upstreamFixAvailable + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.upstreamFixAvailable = false; + + /** + * Cve impact. + * @member {google.cloud.securitycenter.v1.Cve.RiskRating} impact + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.impact = 0; + + /** + * Cve exploitationActivity. + * @member {google.cloud.securitycenter.v1.Cve.ExploitationActivity} exploitationActivity + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.exploitationActivity = 0; + + /** + * Cve observedInTheWild. + * @member {boolean} observedInTheWild + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.observedInTheWild = false; + + /** + * Cve zeroDay. + * @member {boolean} zeroDay + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + */ + Cve.prototype.zeroDay = false; + + /** + * Creates a new Cve instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {google.cloud.securitycenter.v1.ICve=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Cve} Cve instance + */ + Cve.create = function create(properties) { + return new Cve(properties); + }; + + /** + * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {google.cloud.securitycenter.v1.ICve} message Cve message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cve.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.securitycenter.v1.Reference.encode(message.references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) + $root.google.cloud.securitycenter.v1.Cvssv3.encode(message.cvssv3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.upstreamFixAvailable != null && Object.hasOwnProperty.call(message, "upstreamFixAvailable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.upstreamFixAvailable); + if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.impact); + if (message.exploitationActivity != null && Object.hasOwnProperty.call(message, "exploitationActivity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.exploitationActivity); + if (message.observedInTheWild != null && Object.hasOwnProperty.call(message, "observedInTheWild")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.observedInTheWild); + if (message.zeroDay != null && Object.hasOwnProperty.call(message, "zeroDay")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.zeroDay); + return writer; + }; + + /** + * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {google.cloud.securitycenter.v1.ICve} message Cve message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cve.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cve message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Cve} Cve + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cve.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.cloud.securitycenter.v1.Cve(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.securitycenter.v1.Reference.decode(reader, reader.uint32())); + break; + } + case 3: { + message.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.decode(reader, reader.uint32()); + break; + } + case 4: { + message.upstreamFixAvailable = reader.bool(); + break; + } + case 5: { + message.impact = reader.int32(); + break; + } + case 6: { + message.exploitationActivity = reader.int32(); + break; + } + case 7: { + message.observedInTheWild = reader.bool(); + break; + } + case 8: { + message.zeroDay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cve message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Cve} Cve + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cve.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cve message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cve.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Reference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { + var error = $root.google.cloud.securitycenter.v1.Cvssv3.verify(message.cvssv3); + if (error) + return "cvssv3." + error; + } + if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) + if (typeof message.upstreamFixAvailable !== "boolean") + return "upstreamFixAvailable: boolean expected"; + if (message.impact != null && message.hasOwnProperty("impact")) + switch (message.impact) { + default: + return "impact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) + switch (message.exploitationActivity) { + default: + return "exploitationActivity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) + if (typeof message.observedInTheWild !== "boolean") + return "observedInTheWild: boolean expected"; + if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) + if (typeof message.zeroDay !== "boolean") + return "zeroDay: boolean expected"; + return null; + }; + + /** + * Creates a Cve message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Cve} Cve + */ + Cve.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Cve) + return object; + var message = new $root.google.cloud.securitycenter.v1.Cve(); + if (object.id != null) + message.id = String(object.id); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.securitycenter.v1.Cve.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Cve.references: object expected"); + message.references[i] = $root.google.cloud.securitycenter.v1.Reference.fromObject(object.references[i]); + } + } + if (object.cvssv3 != null) { + if (typeof object.cvssv3 !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Cve.cvssv3: object expected"); + message.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.fromObject(object.cvssv3); + } + if (object.upstreamFixAvailable != null) + message.upstreamFixAvailable = Boolean(object.upstreamFixAvailable); + switch (object.impact) { + default: + if (typeof object.impact === "number") { + message.impact = object.impact; + break; + } + break; + case "RISK_RATING_UNSPECIFIED": + case 0: + message.impact = 0; + break; + case "LOW": + case 1: + message.impact = 1; + break; + case "MEDIUM": + case 2: + message.impact = 2; + break; + case "HIGH": + case 3: + message.impact = 3; + break; + case "CRITICAL": + case 4: + message.impact = 4; + break; + } + switch (object.exploitationActivity) { + default: + if (typeof object.exploitationActivity === "number") { + message.exploitationActivity = object.exploitationActivity; + break; + } + break; + case "EXPLOITATION_ACTIVITY_UNSPECIFIED": + case 0: + message.exploitationActivity = 0; + break; + case "WIDE": + case 1: + message.exploitationActivity = 1; + break; + case "CONFIRMED": + case 2: + message.exploitationActivity = 2; + break; + case "AVAILABLE": + case 3: + message.exploitationActivity = 3; + break; + case "ANTICIPATED": + case 4: + message.exploitationActivity = 4; + break; + case "NO_KNOWN": + case 5: + message.exploitationActivity = 5; + break; + } + if (object.observedInTheWild != null) + message.observedInTheWild = Boolean(object.observedInTheWild); + if (object.zeroDay != null) + message.zeroDay = Boolean(object.zeroDay); + return message; + }; + + /** + * Creates a plain object from a Cve message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {google.cloud.securitycenter.v1.Cve} message Cve + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cve.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.id = ""; + object.cvssv3 = null; + object.upstreamFixAvailable = false; + object.impact = options.enums === String ? "RISK_RATING_UNSPECIFIED" : 0; + object.exploitationActivity = options.enums === String ? "EXPLOITATION_ACTIVITY_UNSPECIFIED" : 0; + object.observedInTheWild = false; + object.zeroDay = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.securitycenter.v1.Reference.toObject(message.references[j], options); + } + if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) + object.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.toObject(message.cvssv3, options); + if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) + object.upstreamFixAvailable = message.upstreamFixAvailable; + if (message.impact != null && message.hasOwnProperty("impact")) + object.impact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cve.RiskRating[message.impact] === undefined ? message.impact : $root.google.cloud.securitycenter.v1.Cve.RiskRating[message.impact] : message.impact; + if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) + object.exploitationActivity = options.enums === String ? $root.google.cloud.securitycenter.v1.Cve.ExploitationActivity[message.exploitationActivity] === undefined ? message.exploitationActivity : $root.google.cloud.securitycenter.v1.Cve.ExploitationActivity[message.exploitationActivity] : message.exploitationActivity; + if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) + object.observedInTheWild = message.observedInTheWild; + if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) + object.zeroDay = message.zeroDay; + return object; + }; + + /** + * Converts this Cve to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Cve + * @instance + * @returns {Object.} JSON object + */ + Cve.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cve + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Cve + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cve.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Cve"; + }; + + /** + * RiskRating enum. + * @name google.cloud.securitycenter.v1.Cve.RiskRating + * @enum {number} + * @property {number} RISK_RATING_UNSPECIFIED=0 RISK_RATING_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + * @property {number} CRITICAL=4 CRITICAL value + */ + Cve.RiskRating = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RISK_RATING_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + values[valuesById[4] = "CRITICAL"] = 4; + return values; + })(); + + /** + * ExploitationActivity enum. + * @name google.cloud.securitycenter.v1.Cve.ExploitationActivity + * @enum {number} + * @property {number} EXPLOITATION_ACTIVITY_UNSPECIFIED=0 EXPLOITATION_ACTIVITY_UNSPECIFIED value + * @property {number} WIDE=1 WIDE value + * @property {number} CONFIRMED=2 CONFIRMED value + * @property {number} AVAILABLE=3 AVAILABLE value + * @property {number} ANTICIPATED=4 ANTICIPATED value + * @property {number} NO_KNOWN=5 NO_KNOWN value + */ + Cve.ExploitationActivity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXPLOITATION_ACTIVITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "WIDE"] = 1; + values[valuesById[2] = "CONFIRMED"] = 2; + values[valuesById[3] = "AVAILABLE"] = 3; + values[valuesById[4] = "ANTICIPATED"] = 4; + values[valuesById[5] = "NO_KNOWN"] = 5; + return values; + })(); + + return Cve; + })(); + + v1.Reference = (function() { + + /** + * Properties of a Reference. + * @memberof google.cloud.securitycenter.v1 + * @interface IReference + * @property {string|null} [source] Reference source + * @property {string|null} [uri] Reference uri + */ + + /** + * Constructs a new Reference. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Reference. + * @implements IReference + * @constructor + * @param {google.cloud.securitycenter.v1.IReference=} [properties] Properties to set + */ + function Reference(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]]; + } + + /** + * Reference source. + * @member {string} source + * @memberof google.cloud.securitycenter.v1.Reference + * @instance + */ + Reference.prototype.source = ""; + + /** + * Reference uri. + * @member {string} uri + * @memberof google.cloud.securitycenter.v1.Reference + * @instance + */ + Reference.prototype.uri = ""; + + /** + * Creates a new Reference instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {google.cloud.securitycenter.v1.IReference=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Reference} Reference instance + */ + Reference.create = function create(properties) { + return new Reference(properties); + }; + + /** + * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {google.cloud.securitycenter.v1.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + return writer; + }; + + /** + * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {google.cloud.securitycenter.v1.IReference} message Reference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.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.cloud.securitycenter.v1.Reference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.source = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Reference} Reference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reference message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Reference} Reference + */ + Reference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Reference) + return object; + var message = new $root.google.cloud.securitycenter.v1.Reference(); + if (object.source != null) + message.source = String(object.source); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a Reference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {google.cloud.securitycenter.v1.Reference} message Reference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = ""; + object.uri = ""; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this Reference to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Reference + * @instance + * @returns {Object.} JSON object + */ + Reference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Reference + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Reference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Reference"; + }; + + return Reference; + })(); + + v1.Cvssv3 = (function() { + + /** + * Properties of a Cvssv3. + * @memberof google.cloud.securitycenter.v1 + * @interface ICvssv3 + * @property {number|null} [baseScore] Cvssv3 baseScore + * @property {google.cloud.securitycenter.v1.Cvssv3.AttackVector|null} [attackVector] Cvssv3 attackVector + * @property {google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|null} [attackComplexity] Cvssv3 attackComplexity + * @property {google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|null} [privilegesRequired] Cvssv3 privilegesRequired + * @property {google.cloud.securitycenter.v1.Cvssv3.UserInteraction|null} [userInteraction] Cvssv3 userInteraction + * @property {google.cloud.securitycenter.v1.Cvssv3.Scope|null} [scope] Cvssv3 scope + * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [confidentialityImpact] Cvssv3 confidentialityImpact + * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [integrityImpact] Cvssv3 integrityImpact + * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [availabilityImpact] Cvssv3 availabilityImpact + */ + + /** + * Constructs a new Cvssv3. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Cvssv3. + * @implements ICvssv3 + * @constructor + * @param {google.cloud.securitycenter.v1.ICvssv3=} [properties] Properties to set + */ + function Cvssv3(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]]; + } + + /** + * Cvssv3 baseScore. + * @member {number} baseScore + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.baseScore = 0; + + /** + * Cvssv3 attackVector. + * @member {google.cloud.securitycenter.v1.Cvssv3.AttackVector} attackVector + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.attackVector = 0; + + /** + * Cvssv3 attackComplexity. + * @member {google.cloud.securitycenter.v1.Cvssv3.AttackComplexity} attackComplexity + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.attackComplexity = 0; + + /** + * Cvssv3 privilegesRequired. + * @member {google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired} privilegesRequired + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.privilegesRequired = 0; + + /** + * Cvssv3 userInteraction. + * @member {google.cloud.securitycenter.v1.Cvssv3.UserInteraction} userInteraction + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.userInteraction = 0; + + /** + * Cvssv3 scope. + * @member {google.cloud.securitycenter.v1.Cvssv3.Scope} scope + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.scope = 0; + + /** + * Cvssv3 confidentialityImpact. + * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} confidentialityImpact + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.confidentialityImpact = 0; + + /** + * Cvssv3 integrityImpact. + * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} integrityImpact + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.integrityImpact = 0; + + /** + * Cvssv3 availabilityImpact. + * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} availabilityImpact + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + */ + Cvssv3.prototype.availabilityImpact = 0; + + /** + * Creates a new Cvssv3 instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {google.cloud.securitycenter.v1.ICvssv3=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 instance + */ + Cvssv3.create = function create(properties) { + return new Cvssv3(properties); + }; + + /** + * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {google.cloud.securitycenter.v1.ICvssv3} message Cvssv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cvssv3.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.baseScore); + if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); + if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); + if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); + if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); + if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); + if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); + if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + return writer; + }; + + /** + * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {google.cloud.securitycenter.v1.ICvssv3} message Cvssv3 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cvssv3.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cvssv3 message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cvssv3.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.cloud.securitycenter.v1.Cvssv3(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.baseScore = reader.double(); + break; + } + case 5: { + message.attackVector = reader.int32(); + break; + } + case 6: { + message.attackComplexity = reader.int32(); + break; + } + case 7: { + message.privilegesRequired = reader.int32(); + break; + } + case 8: { + message.userInteraction = reader.int32(); + break; + } + case 9: { + message.scope = reader.int32(); + break; + } + case 10: { + message.confidentialityImpact = reader.int32(); + break; + } + case 11: { + message.integrityImpact = reader.int32(); + break; + } + case 12: { + message.availabilityImpact = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cvssv3.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cvssv3 message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cvssv3.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + if (typeof message.baseScore !== "number") + return "baseScore: number expected"; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + switch (message.attackVector) { + default: + return "attackVector: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + switch (message.attackComplexity) { + default: + return "attackComplexity: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + switch (message.privilegesRequired) { + default: + return "privilegesRequired: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + switch (message.userInteraction) { + default: + return "userInteraction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + switch (message.confidentialityImpact) { + default: + return "confidentialityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + switch (message.integrityImpact) { + default: + return "integrityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + switch (message.availabilityImpact) { + default: + return "availabilityImpact: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Cvssv3 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + */ + Cvssv3.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Cvssv3) + return object; + var message = new $root.google.cloud.securitycenter.v1.Cvssv3(); + if (object.baseScore != null) + message.baseScore = Number(object.baseScore); + switch (object.attackVector) { + default: + if (typeof object.attackVector === "number") { + message.attackVector = object.attackVector; + break; + } + break; + case "ATTACK_VECTOR_UNSPECIFIED": + case 0: + message.attackVector = 0; + break; + case "ATTACK_VECTOR_NETWORK": + case 1: + message.attackVector = 1; + break; + case "ATTACK_VECTOR_ADJACENT": + case 2: + message.attackVector = 2; + break; + case "ATTACK_VECTOR_LOCAL": + case 3: + message.attackVector = 3; + break; + case "ATTACK_VECTOR_PHYSICAL": + case 4: + message.attackVector = 4; + break; + } + switch (object.attackComplexity) { + default: + if (typeof object.attackComplexity === "number") { + message.attackComplexity = object.attackComplexity; + break; + } + break; + case "ATTACK_COMPLEXITY_UNSPECIFIED": + case 0: + message.attackComplexity = 0; + break; + case "ATTACK_COMPLEXITY_LOW": + case 1: + message.attackComplexity = 1; + break; + case "ATTACK_COMPLEXITY_HIGH": + case 2: + message.attackComplexity = 2; + break; + } + switch (object.privilegesRequired) { + default: + if (typeof object.privilegesRequired === "number") { + message.privilegesRequired = object.privilegesRequired; + break; + } + break; + case "PRIVILEGES_REQUIRED_UNSPECIFIED": + case 0: + message.privilegesRequired = 0; + break; + case "PRIVILEGES_REQUIRED_NONE": + case 1: + message.privilegesRequired = 1; + break; + case "PRIVILEGES_REQUIRED_LOW": + case 2: + message.privilegesRequired = 2; + break; + case "PRIVILEGES_REQUIRED_HIGH": + case 3: + message.privilegesRequired = 3; + break; + } + switch (object.userInteraction) { + default: + if (typeof object.userInteraction === "number") { + message.userInteraction = object.userInteraction; + break; + } + break; + case "USER_INTERACTION_UNSPECIFIED": + case 0: + message.userInteraction = 0; + break; + case "USER_INTERACTION_NONE": + case 1: + message.userInteraction = 1; + break; + case "USER_INTERACTION_REQUIRED": + case 2: + message.userInteraction = 2; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "SCOPE_UNCHANGED": + case 1: + message.scope = 1; + break; + case "SCOPE_CHANGED": + case 2: + message.scope = 2; + break; + } + switch (object.confidentialityImpact) { + default: + if (typeof object.confidentialityImpact === "number") { + message.confidentialityImpact = object.confidentialityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.confidentialityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.confidentialityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.confidentialityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.confidentialityImpact = 3; + break; + } + switch (object.integrityImpact) { + default: + if (typeof object.integrityImpact === "number") { + message.integrityImpact = object.integrityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.integrityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.integrityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.integrityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.integrityImpact = 3; + break; + } + switch (object.availabilityImpact) { + default: + if (typeof object.availabilityImpact === "number") { + message.availabilityImpact = object.availabilityImpact; + break; + } + break; + case "IMPACT_UNSPECIFIED": + case 0: + message.availabilityImpact = 0; + break; + case "IMPACT_HIGH": + case 1: + message.availabilityImpact = 1; + break; + case "IMPACT_LOW": + case 2: + message.availabilityImpact = 2; + break; + case "IMPACT_NONE": + case 3: + message.availabilityImpact = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {google.cloud.securitycenter.v1.Cvssv3} message Cvssv3 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cvssv3.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseScore = 0; + object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; + object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; + object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; + object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + } + if (message.baseScore != null && message.hasOwnProperty("baseScore")) + object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; + if (message.attackVector != null && message.hasOwnProperty("attackVector")) + object.attackVector = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.securitycenter.v1.Cvssv3.AttackVector[message.attackVector] : message.attackVector; + if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) + object.attackComplexity = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; + if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) + object.privilegesRequired = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; + if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) + object.userInteraction = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.securitycenter.v1.Cvssv3.UserInteraction[message.userInteraction] : message.userInteraction; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.securitycenter.v1.Cvssv3.Scope[message.scope] : message.scope; + if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) + object.confidentialityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; + if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) + object.integrityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.integrityImpact] : message.integrityImpact; + if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) + object.availabilityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.availabilityImpact] : message.availabilityImpact; + return object; + }; + + /** + * Converts this Cvssv3 to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @instance + * @returns {Object.} JSON object + */ + Cvssv3.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Cvssv3 + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cvssv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Cvssv3"; + }; + + /** + * AttackVector enum. + * @name google.cloud.securitycenter.v1.Cvssv3.AttackVector + * @enum {number} + * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value + * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value + * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value + * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value + * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value + */ + Cvssv3.AttackVector = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; + values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; + values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; + values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; + return values; + })(); + + /** + * AttackComplexity enum. + * @name google.cloud.securitycenter.v1.Cvssv3.AttackComplexity + * @enum {number} + * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value + * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value + * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + */ + Cvssv3.AttackComplexity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; + values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + return values; + })(); + + /** + * PrivilegesRequired enum. + * @name google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired + * @enum {number} + * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value + * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value + * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value + * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value + */ + Cvssv3.PrivilegesRequired = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; + values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; + values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; + return values; + })(); + + /** + * UserInteraction enum. + * @name google.cloud.securitycenter.v1.Cvssv3.UserInteraction + * @enum {number} + * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value + * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value + * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value + */ + Cvssv3.UserInteraction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; + values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.securitycenter.v1.Cvssv3.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value + * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value + */ + Cvssv3.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; + values[valuesById[2] = "SCOPE_CHANGED"] = 2; + return values; + })(); + + /** + * Impact enum. + * @name google.cloud.securitycenter.v1.Cvssv3.Impact + * @enum {number} + * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value + * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value + * @property {number} IMPACT_LOW=2 IMPACT_LOW value + * @property {number} IMPACT_NONE=3 IMPACT_NONE value + */ + Cvssv3.Impact = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPACT_HIGH"] = 1; + values[valuesById[2] = "IMPACT_LOW"] = 2; + values[valuesById[3] = "IMPACT_NONE"] = 3; + return values; + })(); + + return Cvssv3; + })(); + + v1.Package = (function() { + + /** + * Properties of a Package. + * @memberof google.cloud.securitycenter.v1 + * @interface IPackage + * @property {string|null} [packageName] Package packageName + * @property {string|null} [cpeUri] Package cpeUri + * @property {string|null} [packageType] Package packageType + * @property {string|null} [packageVersion] Package packageVersion + */ + + /** + * Constructs a new Package. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Package. + * @implements IPackage + * @constructor + * @param {google.cloud.securitycenter.v1.IPackage=} [properties] Properties to set + */ + function Package(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]]; + } + + /** + * Package packageName. + * @member {string} packageName + * @memberof google.cloud.securitycenter.v1.Package + * @instance + */ + Package.prototype.packageName = ""; + + /** + * Package cpeUri. + * @member {string} cpeUri + * @memberof google.cloud.securitycenter.v1.Package + * @instance + */ + Package.prototype.cpeUri = ""; + + /** + * Package packageType. + * @member {string} packageType + * @memberof google.cloud.securitycenter.v1.Package + * @instance + */ + Package.prototype.packageType = ""; + + /** + * Package packageVersion. + * @member {string} packageVersion + * @memberof google.cloud.securitycenter.v1.Package + * @instance + */ + Package.prototype.packageVersion = ""; + + /** + * Creates a new Package instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {google.cloud.securitycenter.v1.IPackage=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Package} Package instance + */ + Package.create = function create(properties) { + return new Package(properties); + }; + + /** + * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {google.cloud.securitycenter.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageName); + if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cpeUri); + if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); + if (message.packageVersion != null && Object.hasOwnProperty.call(message, "packageVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageVersion); + return writer; + }; + + /** + * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {google.cloud.securitycenter.v1.IPackage} message Package message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Package.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Package message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.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.cloud.securitycenter.v1.Package(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.packageName = reader.string(); + break; + } + case 2: { + message.cpeUri = reader.string(); + break; + } + case 3: { + message.packageType = reader.string(); + break; + } + case 4: { + message.packageVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Package message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Package} Package + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Package.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Package message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Package.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + if (!$util.isString(message.cpeUri)) + return "cpeUri: string expected"; + if (message.packageType != null && message.hasOwnProperty("packageType")) + if (!$util.isString(message.packageType)) + return "packageType: string expected"; + if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) + if (!$util.isString(message.packageVersion)) + return "packageVersion: string expected"; + return null; + }; + + /** + * Creates a Package message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Package} Package + */ + Package.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Package) + return object; + var message = new $root.google.cloud.securitycenter.v1.Package(); + if (object.packageName != null) + message.packageName = String(object.packageName); + if (object.cpeUri != null) + message.cpeUri = String(object.cpeUri); + if (object.packageType != null) + message.packageType = String(object.packageType); + if (object.packageVersion != null) + message.packageVersion = String(object.packageVersion); + return message; + }; + + /** + * Creates a plain object from a Package message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {google.cloud.securitycenter.v1.Package} message Package + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Package.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packageName = ""; + object.cpeUri = ""; + object.packageType = ""; + object.packageVersion = ""; + } + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) + object.cpeUri = message.cpeUri; + if (message.packageType != null && message.hasOwnProperty("packageType")) + object.packageType = message.packageType; + if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) + object.packageVersion = message.packageVersion; + return object; + }; + + /** + * Converts this Package to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Package + * @instance + * @returns {Object.} JSON object + */ + Package.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Package + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Package + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Package"; + }; + + return Package; + })(); + + v1.SecurityBulletin = (function() { + + /** + * Properties of a SecurityBulletin. + * @memberof google.cloud.securitycenter.v1 + * @interface ISecurityBulletin + * @property {string|null} [bulletinId] SecurityBulletin bulletinId + * @property {google.protobuf.ITimestamp|null} [submissionTime] SecurityBulletin submissionTime + * @property {string|null} [suggestedUpgradeVersion] SecurityBulletin suggestedUpgradeVersion + */ + + /** + * Constructs a new SecurityBulletin. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityBulletin. + * @implements ISecurityBulletin + * @constructor + * @param {google.cloud.securitycenter.v1.ISecurityBulletin=} [properties] Properties to set + */ + function SecurityBulletin(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]]; + } + + /** + * SecurityBulletin bulletinId. + * @member {string} bulletinId + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @instance + */ + SecurityBulletin.prototype.bulletinId = ""; + + /** + * SecurityBulletin submissionTime. + * @member {google.protobuf.ITimestamp|null|undefined} submissionTime + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @instance + */ + SecurityBulletin.prototype.submissionTime = null; + + /** + * SecurityBulletin suggestedUpgradeVersion. + * @member {string} suggestedUpgradeVersion + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @instance + */ + SecurityBulletin.prototype.suggestedUpgradeVersion = ""; + + /** + * Creates a new SecurityBulletin instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {google.cloud.securitycenter.v1.ISecurityBulletin=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin instance + */ + SecurityBulletin.create = function create(properties) { + return new SecurityBulletin(properties); + }; + + /** + * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {google.cloud.securitycenter.v1.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bulletinId); + if (message.submissionTime != null && Object.hasOwnProperty.call(message, "submissionTime")) + $root.google.protobuf.Timestamp.encode(message.submissionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.suggestedUpgradeVersion != null && Object.hasOwnProperty.call(message, "suggestedUpgradeVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.suggestedUpgradeVersion); + return writer; + }; + + /** + * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {google.cloud.securitycenter.v1.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityBulletin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityBulletin message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletin.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.cloud.securitycenter.v1.SecurityBulletin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bulletinId = reader.string(); + break; + } + case 2: { + message.submissionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.suggestedUpgradeVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityBulletin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityBulletin message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityBulletin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + if (!$util.isString(message.bulletinId)) + return "bulletinId: string expected"; + if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.submissionTime); + if (error) + return "submissionTime." + error; + } + if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) + if (!$util.isString(message.suggestedUpgradeVersion)) + return "suggestedUpgradeVersion: string expected"; + return null; + }; + + /** + * Creates a SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + */ + SecurityBulletin.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityBulletin) + return object; + var message = new $root.google.cloud.securitycenter.v1.SecurityBulletin(); + if (object.bulletinId != null) + message.bulletinId = String(object.bulletinId); + if (object.submissionTime != null) { + if (typeof object.submissionTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SecurityBulletin.submissionTime: object expected"); + message.submissionTime = $root.google.protobuf.Timestamp.fromObject(object.submissionTime); + } + if (object.suggestedUpgradeVersion != null) + message.suggestedUpgradeVersion = String(object.suggestedUpgradeVersion); + return message; + }; + + /** + * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {google.cloud.securitycenter.v1.SecurityBulletin} message SecurityBulletin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityBulletin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bulletinId = ""; + object.submissionTime = null; + object.suggestedUpgradeVersion = ""; + } + if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) + object.bulletinId = message.bulletinId; + if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) + object.submissionTime = $root.google.protobuf.Timestamp.toObject(message.submissionTime, options); + if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) + object.suggestedUpgradeVersion = message.suggestedUpgradeVersion; + return object; + }; + + /** + * Converts this SecurityBulletin to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @instance + * @returns {Object.} JSON object + */ + SecurityBulletin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityBulletin + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityBulletin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityBulletin"; + }; + + return SecurityBulletin; + })(); + + v1.MuteConfig = (function() { + + /** + * Properties of a MuteConfig. + * @memberof google.cloud.securitycenter.v1 + * @interface IMuteConfig + * @property {string|null} [name] MuteConfig name + * @property {string|null} [displayName] MuteConfig displayName + * @property {string|null} [description] MuteConfig description + * @property {string|null} [filter] MuteConfig filter + * @property {google.protobuf.ITimestamp|null} [createTime] MuteConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MuteConfig updateTime + * @property {string|null} [mostRecentEditor] MuteConfig mostRecentEditor + */ + + /** + * Constructs a new MuteConfig. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a MuteConfig. + * @implements IMuteConfig + * @constructor + * @param {google.cloud.securitycenter.v1.IMuteConfig=} [properties] Properties to set + */ + function MuteConfig(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]]; + } + + /** + * MuteConfig name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.name = ""; + + /** + * MuteConfig displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.displayName = ""; + + /** + * MuteConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.description = ""; + + /** + * MuteConfig filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.filter = ""; + + /** + * MuteConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.createTime = null; + + /** + * MuteConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.updateTime = null; + + /** + * MuteConfig mostRecentEditor. + * @member {string} mostRecentEditor + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + */ + MuteConfig.prototype.mostRecentEditor = ""; + + /** + * Creates a new MuteConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {google.cloud.securitycenter.v1.IMuteConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig instance + */ + MuteConfig.create = function create(properties) { + return new MuteConfig(properties); + }; + + /** + * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {google.cloud.securitycenter.v1.IMuteConfig} message MuteConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteConfig.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.mostRecentEditor); + return writer; + }; + + /** + * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {google.cloud.securitycenter.v1.IMuteConfig} message MuteConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MuteConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteConfig.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.cloud.securitycenter.v1.MuteConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.mostRecentEditor = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MuteConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MuteConfig.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + if (!$util.isString(message.mostRecentEditor)) + return "mostRecentEditor: string expected"; + return null; + }; + + /** + * Creates a MuteConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig + */ + MuteConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.MuteConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.MuteConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.filter != null) + message.filter = String(object.filter); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.MuteConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.MuteConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.mostRecentEditor != null) + message.mostRecentEditor = String(object.mostRecentEditor); + return message; + }; + + /** + * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {google.cloud.securitycenter.v1.MuteConfig} message MuteConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MuteConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.filter = ""; + object.createTime = null; + object.updateTime = null; + object.mostRecentEditor = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) + object.mostRecentEditor = message.mostRecentEditor; + return object; + }; + + /** + * Converts this MuteConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @instance + * @returns {Object.} JSON object + */ + MuteConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MuteConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.MuteConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MuteConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.MuteConfig"; + }; + + return MuteConfig; + })(); + + v1.NotificationConfig = (function() { + + /** + * Properties of a NotificationConfig. + * @memberof google.cloud.securitycenter.v1 + * @interface INotificationConfig + * @property {string|null} [name] NotificationConfig name + * @property {string|null} [description] NotificationConfig description + * @property {string|null} [pubsubTopic] NotificationConfig pubsubTopic + * @property {string|null} [serviceAccount] NotificationConfig serviceAccount + * @property {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null} [streamingConfig] NotificationConfig streamingConfig + */ + + /** + * Constructs a new NotificationConfig. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig + * @constructor + * @param {google.cloud.securitycenter.v1.INotificationConfig=} [properties] Properties to set + */ + function NotificationConfig(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]]; + } + + /** + * NotificationConfig name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.name = ""; + + /** + * NotificationConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.description = ""; + + /** + * NotificationConfig pubsubTopic. + * @member {string} pubsubTopic + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.pubsubTopic = ""; + + /** + * NotificationConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.serviceAccount = ""; + + /** + * NotificationConfig streamingConfig. + * @member {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null|undefined} streamingConfig + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + NotificationConfig.prototype.streamingConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NotificationConfig notifyConfig. + * @member {"streamingConfig"|undefined} notifyConfig + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + */ + Object.defineProperty(NotificationConfig.prototype, "notifyConfig", { + get: $util.oneOfGetter($oneOfFields = ["streamingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {google.cloud.securitycenter.v1.INotificationConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig instance + */ + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); + }; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {google.cloud.securitycenter.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.pubsubTopic != null && Object.hasOwnProperty.call(message, "pubsubTopic")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pubsubTopic); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceAccount); + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) + $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.encode(message.streamingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {google.cloud.securitycenter.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.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.cloud.securitycenter.v1.NotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.pubsubTopic = reader.string(); + break; + } + case 4: { + message.serviceAccount = reader.string(); + break; + } + case 5: { + message.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) + if (!$util.isString(message.pubsubTopic)) + return "pubsubTopic: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + properties.notifyConfig = 1; + { + var error = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify(message.streamingConfig); + if (error) + return "streamingConfig." + error; + } + } + return null; + }; + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + */ + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.NotificationConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.NotificationConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.pubsubTopic != null) + message.pubsubTopic = String(object.pubsubTopic); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.streamingConfig != null) { + if (typeof object.streamingConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.NotificationConfig.streamingConfig: object expected"); + message.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.fromObject(object.streamingConfig); + } + return message; + }; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {google.cloud.securitycenter.v1.NotificationConfig} message NotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.pubsubTopic = ""; + object.serviceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) + object.pubsubTopic = message.pubsubTopic; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + object.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.toObject(message.streamingConfig, options); + if (options.oneofs) + object.notifyConfig = "streamingConfig"; + } + return object; + }; + + /** + * Converts this NotificationConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @instance + * @returns {Object.} JSON object + */ + NotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationConfig"; + }; + + NotificationConfig.StreamingConfig = (function() { + + /** + * Properties of a StreamingConfig. + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @interface IStreamingConfig + * @property {string|null} [filter] StreamingConfig filter + */ + + /** + * Constructs a new StreamingConfig. + * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @classdesc Represents a StreamingConfig. + * @implements IStreamingConfig + * @constructor + * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig=} [properties] Properties to set + */ + function StreamingConfig(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]]; + } + + /** + * StreamingConfig filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @instance + */ + StreamingConfig.prototype.filter = ""; + + /** + * Creates a new StreamingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig instance + */ + StreamingConfig.create = function create(properties) { + return new StreamingConfig(properties); + }; + + /** + * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + return writer; + }; + + /** + * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingConfig.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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamingConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a StreamingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig + */ + StreamingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig(); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} message StreamingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filter = ""; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this StreamingConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @instance + * @returns {Object.} JSON object + */ + StreamingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamingConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig"; + }; + + return StreamingConfig; + })(); + + return NotificationConfig; + })(); + + v1.NotificationMessage = (function() { + + /** + * Properties of a NotificationMessage. + * @memberof google.cloud.securitycenter.v1 + * @interface INotificationMessage + * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] NotificationMessage finding + * @property {google.cloud.securitycenter.v1.IResource|null} [resource] NotificationMessage resource + */ + + /** + * Constructs a new NotificationMessage. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a NotificationMessage. + * @implements INotificationMessage + * @constructor + * @param {google.cloud.securitycenter.v1.INotificationMessage=} [properties] Properties to set + */ + function NotificationMessage(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]]; + } + + /** + * NotificationMessage notificationConfigName. + * @member {string} notificationConfigName + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + */ + NotificationMessage.prototype.notificationConfigName = ""; + + /** + * NotificationMessage finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + */ + NotificationMessage.prototype.finding = null; + + /** + * NotificationMessage resource. + * @member {google.cloud.securitycenter.v1.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + */ + NotificationMessage.prototype.resource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NotificationMessage event. + * @member {"finding"|undefined} event + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + */ + Object.defineProperty(NotificationMessage.prototype, "event", { + get: $util.oneOfGetter($oneOfFields = ["finding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NotificationMessage instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {google.cloud.securitycenter.v1.INotificationMessage=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage instance + */ + NotificationMessage.create = function create(properties) { + return new NotificationMessage(properties); + }; + + /** + * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {google.cloud.securitycenter.v1.INotificationMessage} message NotificationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notificationConfigName != null && Object.hasOwnProperty.call(message, "notificationConfigName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycenter.v1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {google.cloud.securitycenter.v1.INotificationMessage} message NotificationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessage.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.cloud.securitycenter.v1.NotificationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.notificationConfigName = reader.string(); + break; + } + case 2: { + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resource = $root.google.cloud.securitycenter.v1.Resource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationMessage message. + * @function verify + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) + if (!$util.isString(message.notificationConfigName)) + return "notificationConfigName: string expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + properties.event = 1; + { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a NotificationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + */ + NotificationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.NotificationMessage) + return object; + var message = new $root.google.cloud.securitycenter.v1.NotificationMessage(); + if (object.notificationConfigName != null) + message.notificationConfigName = String(object.notificationConfigName); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1.Resource.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {google.cloud.securitycenter.v1.NotificationMessage} message NotificationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notificationConfigName = ""; + object.resource = null; + } + if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) + object.notificationConfigName = message.notificationConfigName; + if (message.finding != null && message.hasOwnProperty("finding")) { + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (options.oneofs) + object.event = "finding"; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1.Resource.toObject(message.resource, options); + return object; + }; + + /** + * Converts this NotificationMessage to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @instance + * @returns {Object.} JSON object + */ + NotificationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationMessage + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationMessage"; + }; + + return NotificationMessage; + })(); + + v1.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v1 + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [displayName] Resource displayName + * @property {string|null} [type] Resource type + * @property {string|null} [project] Resource project + * @property {string|null} [projectDisplayName] Resource projectDisplayName + * @property {string|null} [parent] Resource parent + * @property {string|null} [parentDisplayName] Resource parentDisplayName + * @property {Array.|null} [folders] Resource folders + * @property {google.cloud.securitycenter.v1.CloudProvider|null} [cloudProvider] Resource cloudProvider + * @property {string|null} [organization] Resource organization + * @property {string|null} [service] Resource service + * @property {string|null} [location] Resource location + * @property {google.cloud.securitycenter.v1.IAwsMetadata|null} [awsMetadata] Resource awsMetadata + * @property {google.cloud.securitycenter.v1.IAzureMetadata|null} [azureMetadata] Resource azureMetadata + * @property {google.cloud.securitycenter.v1.IResourcePath|null} [resourcePath] Resource resourcePath + * @property {string|null} [resourcePathString] Resource resourcePathString + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set + */ + function Resource(properties) { + this.folders = []; + 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]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.name = ""; + + /** + * Resource displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.displayName = ""; + + /** + * Resource type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.type = ""; + + /** + * Resource project. + * @member {string} project + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.project = ""; + + /** + * Resource projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.projectDisplayName = ""; + + /** + * Resource parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.parent = ""; + + /** + * Resource parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.parentDisplayName = ""; + + /** + * Resource folders. + * @member {Array.} folders + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.folders = $util.emptyArray; + + /** + * Resource cloudProvider. + * @member {google.cloud.securitycenter.v1.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.cloudProvider = 0; + + /** + * Resource organization. + * @member {string} organization + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.organization = ""; + + /** + * Resource service. + * @member {string} service + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.service = ""; + + /** + * Resource location. + * @member {string} location + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.location = ""; + + /** + * Resource awsMetadata. + * @member {google.cloud.securitycenter.v1.IAwsMetadata|null|undefined} awsMetadata + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.awsMetadata = null; + + /** + * Resource azureMetadata. + * @member {google.cloud.securitycenter.v1.IAzureMetadata|null|undefined} azureMetadata + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.azureMetadata = null; + + /** + * Resource resourcePath. + * @member {google.cloud.securitycenter.v1.IResourcePath|null|undefined} resourcePath + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.resourcePath = null; + + /** + * Resource resourcePathString. + * @member {string} resourcePathString + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Resource.prototype.resourcePathString = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Resource cloudProviderMetadata. + * @member {"awsMetadata"|"azureMetadata"|undefined} cloudProviderMetadata + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + */ + Object.defineProperty(Resource.prototype, "cloudProviderMetadata", { + get: $util.oneOfGetter($oneOfFields = ["awsMetadata", "azureMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.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.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); + if (message.folders != null && message.folders.length) + for (var i = 0; i < message.folders.length; ++i) + $root.google.cloud.securitycenter.v1.Folder.encode(message.folders[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.cloudProvider); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.organization); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.service); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.location); + if (message.awsMetadata != null && Object.hasOwnProperty.call(message, "awsMetadata")) + $root.google.cloud.securitycenter.v1.AwsMetadata.encode(message.awsMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.azureMetadata != null && Object.hasOwnProperty.call(message, "azureMetadata")) + $root.google.cloud.securitycenter.v1.AzureMetadata.encode(message.azureMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.resourcePath != null && Object.hasOwnProperty.call(message, "resourcePath")) + $root.google.cloud.securitycenter.v1.ResourcePath.encode(message.resourcePath, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.resourcePathString != null && Object.hasOwnProperty.call(message, "resourcePathString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.resourcePathString); + return writer; + }; + + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.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.cloud.securitycenter.v1.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 6: { + message.type = reader.string(); + break; + } + case 2: { + message.project = reader.string(); + break; + } + case 3: { + message.projectDisplayName = reader.string(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + case 5: { + message.parentDisplayName = reader.string(); + break; + } + case 7: { + if (!(message.folders && message.folders.length)) + message.folders = []; + message.folders.push($root.google.cloud.securitycenter.v1.Folder.decode(reader, reader.uint32())); + break; + } + case 9: { + message.cloudProvider = reader.int32(); + break; + } + case 10: { + message.organization = reader.string(); + break; + } + case 11: { + message.service = reader.string(); + break; + } + case 12: { + message.location = reader.string(); + break; + } + case 16: { + message.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.decode(reader, reader.uint32()); + break; + } + case 17: { + message.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.decode(reader, reader.uint32()); + break; + } + case 18: { + message.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.decode(reader, reader.uint32()); + break; + } + case 19: { + message.resourcePathString = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + if (message.folders != null && message.hasOwnProperty("folders")) { + if (!Array.isArray(message.folders)) + return "folders: array expected"; + for (var i = 0; i < message.folders.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Folder.verify(message.folders[i]); + if (error) + return "folders." + error; + } + } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.organization != null && message.hasOwnProperty("organization")) + if (!$util.isString(message.organization)) + return "organization: string expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v1.AwsMetadata.verify(message.awsMetadata); + if (error) + return "awsMetadata." + error; + } + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v1.AzureMetadata.verify(message.azureMetadata); + if (error) + return "azureMetadata." + error; + } + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) { + var error = $root.google.cloud.securitycenter.v1.ResourcePath.verify(message.resourcePath); + if (error) + return "resourcePath." + error; + } + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + if (!$util.isString(message.resourcePathString)) + return "resourcePathString: string expected"; + return null; + }; + + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Resource) + return object; + var message = new $root.google.cloud.securitycenter.v1.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.type != null) + message.type = String(object.type); + if (object.project != null) + message.project = String(object.project); + if (object.projectDisplayName != null) + message.projectDisplayName = String(object.projectDisplayName); + if (object.parent != null) + message.parent = String(object.parent); + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + if (object.folders) { + if (!Array.isArray(object.folders)) + throw TypeError(".google.cloud.securitycenter.v1.Resource.folders: array expected"); + message.folders = []; + for (var i = 0; i < object.folders.length; ++i) { + if (typeof object.folders[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Resource.folders: object expected"); + message.folders[i] = $root.google.cloud.securitycenter.v1.Folder.fromObject(object.folders[i]); + } + } + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } + if (object.organization != null) + message.organization = String(object.organization); + if (object.service != null) + message.service = String(object.service); + if (object.location != null) + message.location = String(object.location); + if (object.awsMetadata != null) { + if (typeof object.awsMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Resource.awsMetadata: object expected"); + message.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.fromObject(object.awsMetadata); + } + if (object.azureMetadata != null) { + if (typeof object.azureMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Resource.azureMetadata: object expected"); + message.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.fromObject(object.azureMetadata); + } + if (object.resourcePath != null) { + if (typeof object.resourcePath !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Resource.resourcePath: object expected"); + message.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.fromObject(object.resourcePath); + } + if (object.resourcePathString != null) + message.resourcePathString = String(object.resourcePathString); + return message; + }; + + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {google.cloud.securitycenter.v1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.folders = []; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.projectDisplayName = ""; + object.parent = ""; + object.parentDisplayName = ""; + object.type = ""; + object.displayName = ""; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; + object.organization = ""; + object.service = ""; + object.location = ""; + object.resourcePath = null; + object.resourcePathString = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.folders && message.folders.length) { + object.folders = []; + for (var j = 0; j < message.folders.length; ++j) + object.folders[j] = $root.google.cloud.securitycenter.v1.Folder.toObject(message.folders[j], options); + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] : message.cloudProvider; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = message.organization; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + object.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.toObject(message.awsMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "awsMetadata"; + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + object.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.toObject(message.azureMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "azureMetadata"; + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) + object.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.toObject(message.resourcePath, options); + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + object.resourcePathString = message.resourcePathString; + return object; + }; + + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.Resource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Resource"; + }; + + return Resource; + })(); + + /** + * CloudProvider enum. + * @name google.cloud.securitycenter.v1.CloudProvider + * @enum {number} + * @property {number} CLOUD_PROVIDER_UNSPECIFIED=0 CLOUD_PROVIDER_UNSPECIFIED value + * @property {number} GOOGLE_CLOUD_PLATFORM=1 GOOGLE_CLOUD_PLATFORM value + * @property {number} AMAZON_WEB_SERVICES=2 AMAZON_WEB_SERVICES value + * @property {number} MICROSOFT_AZURE=3 MICROSOFT_AZURE value + */ + v1.CloudProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_CLOUD_PLATFORM"] = 1; + values[valuesById[2] = "AMAZON_WEB_SERVICES"] = 2; + values[valuesById[3] = "MICROSOFT_AZURE"] = 3; + return values; + })(); + + v1.AwsMetadata = (function() { + + /** + * Properties of an AwsMetadata. + * @memberof google.cloud.securitycenter.v1 + * @interface IAwsMetadata + * @property {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization|null} [organization] AwsMetadata organization + * @property {Array.|null} [organizationalUnits] AwsMetadata organizationalUnits + * @property {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount|null} [account] AwsMetadata account + */ + + /** + * Constructs a new AwsMetadata. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an AwsMetadata. + * @implements IAwsMetadata + * @constructor + * @param {google.cloud.securitycenter.v1.IAwsMetadata=} [properties] Properties to set + */ + function AwsMetadata(properties) { + this.organizationalUnits = []; + 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]]; + } + + /** + * AwsMetadata organization. + * @member {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization|null|undefined} organization + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @instance + */ + AwsMetadata.prototype.organization = null; + + /** + * AwsMetadata organizationalUnits. + * @member {Array.} organizationalUnits + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @instance + */ + AwsMetadata.prototype.organizationalUnits = $util.emptyArray; + + /** + * AwsMetadata account. + * @member {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount|null|undefined} account + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @instance + */ + AwsMetadata.prototype.account = null; + + /** + * Creates a new AwsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAwsMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AwsMetadata} AwsMetadata instance + */ + AwsMetadata.create = function create(properties) { + return new AwsMetadata(properties); + }; + + /** + * Encodes the specified AwsMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAwsMetadata} message AwsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.encode(message.organization, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.organizationalUnits != null && message.organizationalUnits.length) + for (var i = 0; i < message.organizationalUnits.length; ++i) + $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.encode(message.organizationalUnits[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.encode(message.account, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AwsMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAwsMetadata} message AwsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AwsMetadata} AwsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsMetadata.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.cloud.securitycenter.v1.AwsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.organization = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.organizationalUnits && message.organizationalUnits.length)) + message.organizationalUnits = []; + message.organizationalUnits.push($root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.decode(reader, reader.uint32())); + break; + } + case 4: { + message.account = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AwsMetadata} AwsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsMetadata message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.organization != null && message.hasOwnProperty("organization")) { + var error = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.verify(message.organization); + if (error) + return "organization." + error; + } + if (message.organizationalUnits != null && message.hasOwnProperty("organizationalUnits")) { + if (!Array.isArray(message.organizationalUnits)) + return "organizationalUnits: array expected"; + for (var i = 0; i < message.organizationalUnits.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.verify(message.organizationalUnits[i]); + if (error) + return "organizationalUnits." + error; + } + } + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.verify(message.account); + if (error) + return "account." + error; + } + return null; + }; + + /** + * Creates an AwsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AwsMetadata} AwsMetadata + */ + AwsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AwsMetadata) + return object; + var message = new $root.google.cloud.securitycenter.v1.AwsMetadata(); + if (object.organization != null) { + if (typeof object.organization !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AwsMetadata.organization: object expected"); + message.organization = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.fromObject(object.organization); + } + if (object.organizationalUnits) { + if (!Array.isArray(object.organizationalUnits)) + throw TypeError(".google.cloud.securitycenter.v1.AwsMetadata.organizationalUnits: array expected"); + message.organizationalUnits = []; + for (var i = 0; i < object.organizationalUnits.length; ++i) { + if (typeof object.organizationalUnits[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AwsMetadata.organizationalUnits: object expected"); + message.organizationalUnits[i] = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.fromObject(object.organizationalUnits[i]); + } + } + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AwsMetadata.account: object expected"); + message.account = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.fromObject(object.account); + } + return message; + }; + + /** + * Creates a plain object from an AwsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata} message AwsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.organizationalUnits = []; + if (options.defaults) { + object.organization = null; + object.account = null; + } + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.toObject(message.organization, options); + if (message.organizationalUnits && message.organizationalUnits.length) { + object.organizationalUnits = []; + for (var j = 0; j < message.organizationalUnits.length; ++j) + object.organizationalUnits[j] = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.toObject(message.organizationalUnits[j], options); + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.toObject(message.account, options); + return object; + }; + + /** + * Converts this AwsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @instance + * @returns {Object.} JSON object + */ + AwsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsMetadata + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AwsMetadata"; + }; + + AwsMetadata.AwsOrganization = (function() { + + /** + * Properties of an AwsOrganization. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @interface IAwsOrganization + * @property {string|null} [id] AwsOrganization id + */ + + /** + * Constructs a new AwsOrganization. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @classdesc Represents an AwsOrganization. + * @implements IAwsOrganization + * @constructor + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization=} [properties] Properties to set + */ + function AwsOrganization(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]]; + } + + /** + * AwsOrganization id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @instance + */ + AwsOrganization.prototype.id = ""; + + /** + * Creates a new AwsOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization} AwsOrganization instance + */ + AwsOrganization.create = function create(properties) { + return new AwsOrganization(properties); + }; + + /** + * Encodes the specified AwsOrganization message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization} message AwsOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + return writer; + }; + + /** + * Encodes the specified AwsOrganization message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganization} message AwsOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization} AwsOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganization.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.cloud.securitycenter.v1.AwsMetadata.AwsOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization} AwsOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsOrganization message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates an AwsOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization} AwsOrganization + */ + AwsOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization) + return object; + var message = new $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization(); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from an AwsOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization} message AwsOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsOrganization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this AwsOrganization to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @instance + * @returns {Object.} JSON object + */ + AwsOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsOrganization + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsOrganization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AwsMetadata.AwsOrganization"; + }; + + return AwsOrganization; + })(); + + AwsMetadata.AwsOrganizationalUnit = (function() { + + /** + * Properties of an AwsOrganizationalUnit. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @interface IAwsOrganizationalUnit + * @property {string|null} [id] AwsOrganizationalUnit id + * @property {string|null} [name] AwsOrganizationalUnit name + */ + + /** + * Constructs a new AwsOrganizationalUnit. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @classdesc Represents an AwsOrganizationalUnit. + * @implements IAwsOrganizationalUnit + * @constructor + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit=} [properties] Properties to set + */ + function AwsOrganizationalUnit(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]]; + } + + /** + * AwsOrganizationalUnit id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @instance + */ + AwsOrganizationalUnit.prototype.id = ""; + + /** + * AwsOrganizationalUnit name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @instance + */ + AwsOrganizationalUnit.prototype.name = ""; + + /** + * Creates a new AwsOrganizationalUnit instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit instance + */ + AwsOrganizationalUnit.create = function create(properties) { + return new AwsOrganizationalUnit(properties); + }; + + /** + * Encodes the specified AwsOrganizationalUnit message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit} message AwsOrganizationalUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganizationalUnit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified AwsOrganizationalUnit message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsOrganizationalUnit} message AwsOrganizationalUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsOrganizationalUnit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganizationalUnit.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.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsOrganizationalUnit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsOrganizationalUnit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsOrganizationalUnit message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsOrganizationalUnit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an AwsOrganizationalUnit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit} AwsOrganizationalUnit + */ + AwsOrganizationalUnit.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit) + return object; + var message = new $root.google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AwsOrganizationalUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit} message AwsOrganizationalUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsOrganizationalUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AwsOrganizationalUnit to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @instance + * @returns {Object.} JSON object + */ + AwsOrganizationalUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsOrganizationalUnit + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsOrganizationalUnit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AwsMetadata.AwsOrganizationalUnit"; + }; + + return AwsOrganizationalUnit; + })(); + + AwsMetadata.AwsAccount = (function() { + + /** + * Properties of an AwsAccount. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @interface IAwsAccount + * @property {string|null} [id] AwsAccount id + * @property {string|null} [name] AwsAccount name + */ + + /** + * Constructs a new AwsAccount. + * @memberof google.cloud.securitycenter.v1.AwsMetadata + * @classdesc Represents an AwsAccount. + * @implements IAwsAccount + * @constructor + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount=} [properties] Properties to set + */ + function AwsAccount(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]]; + } + + /** + * AwsAccount id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @instance + */ + AwsAccount.prototype.id = ""; + + /** + * AwsAccount name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @instance + */ + AwsAccount.prototype.name = ""; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsAccount} AwsAccount instance + */ + AwsAccount.create = function create(properties) { + return new AwsAccount(properties); + }; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AwsMetadata.AwsAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.cloud.securitycenter.v1.AwsMetadata.AwsAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsAccount message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AwsMetadata.AwsAccount} AwsAccount + */ + AwsAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount) + return object; + var message = new $root.google.cloud.securitycenter.v1.AwsMetadata.AwsAccount(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {google.cloud.securitycenter.v1.AwsMetadata.AwsAccount} message AwsAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AwsAccount to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @instance + * @returns {Object.} JSON object + */ + AwsAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsAccount + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AwsMetadata.AwsAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AwsMetadata.AwsAccount"; + }; + + return AwsAccount; + })(); + + return AwsMetadata; + })(); + + v1.AzureMetadata = (function() { + + /** + * Properties of an AzureMetadata. + * @memberof google.cloud.securitycenter.v1 + * @interface IAzureMetadata + * @property {Array.|null} [managementGroups] AzureMetadata managementGroups + * @property {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription|null} [subscription] AzureMetadata subscription + * @property {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup|null} [resourceGroup] AzureMetadata resourceGroup + */ + + /** + * Constructs a new AzureMetadata. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an AzureMetadata. + * @implements IAzureMetadata + * @constructor + * @param {google.cloud.securitycenter.v1.IAzureMetadata=} [properties] Properties to set + */ + function AzureMetadata(properties) { + this.managementGroups = []; + 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]]; + } + + /** + * AzureMetadata managementGroups. + * @member {Array.} managementGroups + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @instance + */ + AzureMetadata.prototype.managementGroups = $util.emptyArray; + + /** + * AzureMetadata subscription. + * @member {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription|null|undefined} subscription + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @instance + */ + AzureMetadata.prototype.subscription = null; + + /** + * AzureMetadata resourceGroup. + * @member {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup|null|undefined} resourceGroup + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @instance + */ + AzureMetadata.prototype.resourceGroup = null; + + /** + * Creates a new AzureMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAzureMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AzureMetadata} AzureMetadata instance + */ + AzureMetadata.create = function create(properties) { + return new AzureMetadata(properties); + }; + + /** + * Encodes the specified AzureMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAzureMetadata} message AzureMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.managementGroups != null && message.managementGroups.length) + for (var i = 0; i < message.managementGroups.length; ++i) + $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.encode(message.managementGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.encode(message.subscription, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) + $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AzureMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {google.cloud.securitycenter.v1.IAzureMetadata} message AzureMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AzureMetadata} AzureMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureMetadata.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.cloud.securitycenter.v1.AzureMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (!(message.managementGroups && message.managementGroups.length)) + message.managementGroups = []; + message.managementGroups.push($root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.decode(reader, reader.uint32())); + break; + } + case 5: { + message.subscription = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.decode(reader, reader.uint32()); + break; + } + case 6: { + message.resourceGroup = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AzureMetadata} AzureMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureMetadata message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.managementGroups != null && message.hasOwnProperty("managementGroups")) { + if (!Array.isArray(message.managementGroups)) + return "managementGroups: array expected"; + for (var i = 0; i < message.managementGroups.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.verify(message.managementGroups[i]); + if (error) + return "managementGroups." + error; + } + } + if (message.subscription != null && message.hasOwnProperty("subscription")) { + var error = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.verify(message.subscription); + if (error) + return "subscription." + error; + } + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) { + var error = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.verify(message.resourceGroup); + if (error) + return "resourceGroup." + error; + } + return null; + }; + + /** + * Creates an AzureMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AzureMetadata} AzureMetadata + */ + AzureMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AzureMetadata) + return object; + var message = new $root.google.cloud.securitycenter.v1.AzureMetadata(); + if (object.managementGroups) { + if (!Array.isArray(object.managementGroups)) + throw TypeError(".google.cloud.securitycenter.v1.AzureMetadata.managementGroups: array expected"); + message.managementGroups = []; + for (var i = 0; i < object.managementGroups.length; ++i) { + if (typeof object.managementGroups[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AzureMetadata.managementGroups: object expected"); + message.managementGroups[i] = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.fromObject(object.managementGroups[i]); + } + } + if (object.subscription != null) { + if (typeof object.subscription !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AzureMetadata.subscription: object expected"); + message.subscription = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.fromObject(object.subscription); + } + if (object.resourceGroup != null) { + if (typeof object.resourceGroup !== "object") + throw TypeError(".google.cloud.securitycenter.v1.AzureMetadata.resourceGroup: object expected"); + message.resourceGroup = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.fromObject(object.resourceGroup); + } + return message; + }; + + /** + * Creates a plain object from an AzureMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata} message AzureMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.managementGroups = []; + if (options.defaults) { + object.subscription = null; + object.resourceGroup = null; + } + if (message.managementGroups && message.managementGroups.length) { + object.managementGroups = []; + for (var j = 0; j < message.managementGroups.length; ++j) + object.managementGroups[j] = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.toObject(message.managementGroups[j], options); + } + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.toObject(message.subscription, options); + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + object.resourceGroup = $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.toObject(message.resourceGroup, options); + return object; + }; + + /** + * Converts this AzureMetadata to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @instance + * @returns {Object.} JSON object + */ + AzureMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureMetadata + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AzureMetadata"; + }; + + AzureMetadata.AzureManagementGroup = (function() { + + /** + * Properties of an AzureManagementGroup. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @interface IAzureManagementGroup + * @property {string|null} [id] AzureManagementGroup id + * @property {string|null} [displayName] AzureManagementGroup displayName + */ + + /** + * Constructs a new AzureManagementGroup. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @classdesc Represents an AzureManagementGroup. + * @implements IAzureManagementGroup + * @constructor + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup=} [properties] Properties to set + */ + function AzureManagementGroup(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]]; + } + + /** + * AzureManagementGroup id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @instance + */ + AzureManagementGroup.prototype.id = ""; + + /** + * AzureManagementGroup displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @instance + */ + AzureManagementGroup.prototype.displayName = ""; + + /** + * Creates a new AzureManagementGroup instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup} AzureManagementGroup instance + */ + AzureManagementGroup.create = function create(properties) { + return new AzureManagementGroup(properties); + }; + + /** + * Encodes the specified AzureManagementGroup message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup} message AzureManagementGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureManagementGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified AzureManagementGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureManagementGroup} message AzureManagementGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureManagementGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup} AzureManagementGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureManagementGroup.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.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureManagementGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup} AzureManagementGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureManagementGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureManagementGroup message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureManagementGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an AzureManagementGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup} AzureManagementGroup + */ + AzureManagementGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup) + return object; + var message = new $root.google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an AzureManagementGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup} message AzureManagementGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureManagementGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this AzureManagementGroup to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @instance + * @returns {Object.} JSON object + */ + AzureManagementGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureManagementGroup + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureManagementGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup"; + }; + + return AzureManagementGroup; + })(); + + AzureMetadata.AzureSubscription = (function() { + + /** + * Properties of an AzureSubscription. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @interface IAzureSubscription + * @property {string|null} [id] AzureSubscription id + * @property {string|null} [displayName] AzureSubscription displayName + */ + + /** + * Constructs a new AzureSubscription. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @classdesc Represents an AzureSubscription. + * @implements IAzureSubscription + * @constructor + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription=} [properties] Properties to set + */ + function AzureSubscription(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]]; + } + + /** + * AzureSubscription id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @instance + */ + AzureSubscription.prototype.id = ""; + + /** + * AzureSubscription displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @instance + */ + AzureSubscription.prototype.displayName = ""; + + /** + * Creates a new AzureSubscription instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription} AzureSubscription instance + */ + AzureSubscription.create = function create(properties) { + return new AzureSubscription(properties); + }; + + /** + * Encodes the specified AzureSubscription message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription} message AzureSubscription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureSubscription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified AzureSubscription message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureSubscription} message AzureSubscription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureSubscription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureSubscription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription} AzureSubscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureSubscription.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.cloud.securitycenter.v1.AzureMetadata.AzureSubscription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureSubscription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription} AzureSubscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureSubscription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureSubscription message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureSubscription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an AzureSubscription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription} AzureSubscription + */ + AzureSubscription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription) + return object; + var message = new $root.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an AzureSubscription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription} message AzureSubscription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureSubscription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this AzureSubscription to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @instance + * @returns {Object.} JSON object + */ + AzureSubscription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureSubscription + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureSubscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription"; + }; + + return AzureSubscription; + })(); + + AzureMetadata.AzureResourceGroup = (function() { + + /** + * Properties of an AzureResourceGroup. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @interface IAzureResourceGroup + * @property {string|null} [name] AzureResourceGroup name + */ + + /** + * Constructs a new AzureResourceGroup. + * @memberof google.cloud.securitycenter.v1.AzureMetadata + * @classdesc Represents an AzureResourceGroup. + * @implements IAzureResourceGroup + * @constructor + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup=} [properties] Properties to set + */ + function AzureResourceGroup(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]]; + } + + /** + * AzureResourceGroup name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @instance + */ + AzureResourceGroup.prototype.name = ""; + + /** + * Creates a new AzureResourceGroup instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup} AzureResourceGroup instance + */ + AzureResourceGroup.create = function create(properties) { + return new AzureResourceGroup(properties); + }; + + /** + * Encodes the specified AzureResourceGroup message. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup} message AzureResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureResourceGroup.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); + return writer; + }; + + /** + * Encodes the specified AzureResourceGroup message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.IAzureResourceGroup} message AzureResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup} AzureResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureResourceGroup.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.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup} AzureResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureResourceGroup message. + * @function verify + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an AzureResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup} AzureResourceGroup + */ + AzureResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup) + return object; + var message = new $root.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AzureResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup} message AzureResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this AzureResourceGroup to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @instance + * @returns {Object.} JSON object + */ + AzureResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AzureResourceGroup + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AzureResourceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup"; + }; + + return AzureResourceGroup; + })(); + + return AzureMetadata; + })(); + + v1.ResourcePath = (function() { + + /** + * Properties of a ResourcePath. + * @memberof google.cloud.securitycenter.v1 + * @interface IResourcePath + * @property {Array.|null} [nodes] ResourcePath nodes + */ + + /** + * Constructs a new ResourcePath. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ResourcePath. + * @implements IResourcePath + * @constructor + * @param {google.cloud.securitycenter.v1.IResourcePath=} [properties] Properties to set + */ + function ResourcePath(properties) { + this.nodes = []; + 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]]; + } + + /** + * ResourcePath nodes. + * @member {Array.} nodes + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @instance + */ + ResourcePath.prototype.nodes = $util.emptyArray; + + /** + * Creates a new ResourcePath instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {google.cloud.securitycenter.v1.IResourcePath=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ResourcePath} ResourcePath instance + */ + ResourcePath.create = function create(properties) { + return new ResourcePath(properties); + }; + + /** + * Encodes the specified ResourcePath message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {google.cloud.securitycenter.v1.IResourcePath} message ResourcePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourcePath message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {google.cloud.securitycenter.v1.IResourcePath} message ResourcePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourcePath message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ResourcePath} ResourcePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePath.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.cloud.securitycenter.v1.ResourcePath(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourcePath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ResourcePath} ResourcePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourcePath message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourcePath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.verify(message.nodes[i]); + if (error) + return "nodes." + error; + } + } + return null; + }; + + /** + * Creates a ResourcePath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ResourcePath} ResourcePath + */ + ResourcePath.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ResourcePath) + return object; + var message = new $root.google.cloud.securitycenter.v1.ResourcePath(); + if (object.nodes) { + if (!Array.isArray(object.nodes)) + throw TypeError(".google.cloud.securitycenter.v1.ResourcePath.nodes: array expected"); + message.nodes = []; + for (var i = 0; i < object.nodes.length; ++i) { + if (typeof object.nodes[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ResourcePath.nodes: object expected"); + message.nodes[i] = $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.fromObject(object.nodes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourcePath message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {google.cloud.securitycenter.v1.ResourcePath} message ResourcePath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourcePath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodes = []; + if (message.nodes && message.nodes.length) { + object.nodes = []; + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.toObject(message.nodes[j], options); + } + return object; + }; + + /** + * Converts this ResourcePath to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @instance + * @returns {Object.} JSON object + */ + ResourcePath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourcePath + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourcePath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ResourcePath"; + }; + + /** + * ResourcePathNodeType enum. + * @name google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType + * @enum {number} + * @property {number} RESOURCE_PATH_NODE_TYPE_UNSPECIFIED=0 RESOURCE_PATH_NODE_TYPE_UNSPECIFIED value + * @property {number} GCP_ORGANIZATION=1 GCP_ORGANIZATION value + * @property {number} GCP_FOLDER=2 GCP_FOLDER value + * @property {number} GCP_PROJECT=3 GCP_PROJECT value + * @property {number} AWS_ORGANIZATION=4 AWS_ORGANIZATION value + * @property {number} AWS_ORGANIZATIONAL_UNIT=5 AWS_ORGANIZATIONAL_UNIT value + * @property {number} AWS_ACCOUNT=6 AWS_ACCOUNT value + * @property {number} AZURE_MANAGEMENT_GROUP=7 AZURE_MANAGEMENT_GROUP value + * @property {number} AZURE_SUBSCRIPTION=8 AZURE_SUBSCRIPTION value + * @property {number} AZURE_RESOURCE_GROUP=9 AZURE_RESOURCE_GROUP value + */ + ResourcePath.ResourcePathNodeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_ORGANIZATION"] = 1; + values[valuesById[2] = "GCP_FOLDER"] = 2; + values[valuesById[3] = "GCP_PROJECT"] = 3; + values[valuesById[4] = "AWS_ORGANIZATION"] = 4; + values[valuesById[5] = "AWS_ORGANIZATIONAL_UNIT"] = 5; + values[valuesById[6] = "AWS_ACCOUNT"] = 6; + values[valuesById[7] = "AZURE_MANAGEMENT_GROUP"] = 7; + values[valuesById[8] = "AZURE_SUBSCRIPTION"] = 8; + values[valuesById[9] = "AZURE_RESOURCE_GROUP"] = 9; + return values; + })(); + + ResourcePath.ResourcePathNode = (function() { + + /** + * Properties of a ResourcePathNode. + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @interface IResourcePathNode + * @property {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType|null} [nodeType] ResourcePathNode nodeType + * @property {string|null} [id] ResourcePathNode id + * @property {string|null} [displayName] ResourcePathNode displayName + */ + + /** + * Constructs a new ResourcePathNode. + * @memberof google.cloud.securitycenter.v1.ResourcePath + * @classdesc Represents a ResourcePathNode. + * @implements IResourcePathNode + * @constructor + * @param {google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode=} [properties] Properties to set + */ + function ResourcePathNode(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]]; + } + + /** + * ResourcePathNode nodeType. + * @member {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType} nodeType + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.nodeType = 0; + + /** + * ResourcePathNode id. + * @member {string} id + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.id = ""; + + /** + * ResourcePathNode displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @instance + */ + ResourcePathNode.prototype.displayName = ""; + + /** + * Creates a new ResourcePathNode instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode} ResourcePathNode instance + */ + ResourcePathNode.create = function create(properties) { + return new ResourcePathNode(properties); + }; + + /** + * Encodes the specified ResourcePathNode message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode} message ResourcePathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePathNode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeType != null && Object.hasOwnProperty.call(message, "nodeType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nodeType); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ResourcePathNode message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v1.ResourcePath.IResourcePathNode} message ResourcePathNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourcePathNode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode} ResourcePathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePathNode.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.cloud.securitycenter.v1.ResourcePath.ResourcePathNode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeType = reader.int32(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourcePathNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode} ResourcePathNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourcePathNode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourcePathNode message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourcePathNode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeType != null && message.hasOwnProperty("nodeType")) + switch (message.nodeType) { + default: + return "nodeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ResourcePathNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode} ResourcePathNode + */ + ResourcePathNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode) + return object; + var message = new $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode(); + switch (object.nodeType) { + default: + if (typeof object.nodeType === "number") { + message.nodeType = object.nodeType; + break; + } + break; + case "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED": + case 0: + message.nodeType = 0; + break; + case "GCP_ORGANIZATION": + case 1: + message.nodeType = 1; + break; + case "GCP_FOLDER": + case 2: + message.nodeType = 2; + break; + case "GCP_PROJECT": + case 3: + message.nodeType = 3; + break; + case "AWS_ORGANIZATION": + case 4: + message.nodeType = 4; + break; + case "AWS_ORGANIZATIONAL_UNIT": + case 5: + message.nodeType = 5; + break; + case "AWS_ACCOUNT": + case 6: + message.nodeType = 6; + break; + case "AZURE_MANAGEMENT_GROUP": + case 7: + message.nodeType = 7; + break; + case "AZURE_SUBSCRIPTION": + case 8: + message.nodeType = 8; + break; + case "AZURE_RESOURCE_GROUP": + case 9: + message.nodeType = 9; + break; + } + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ResourcePathNode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode} message ResourcePathNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourcePathNode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.nodeType = options.enums === String ? "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" : 0; + object.id = ""; + object.displayName = ""; + } + if (message.nodeType != null && message.hasOwnProperty("nodeType")) + object.nodeType = options.enums === String ? $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType[message.nodeType] === undefined ? message.nodeType : $root.google.cloud.securitycenter.v1.ResourcePath.ResourcePathNodeType[message.nodeType] : message.nodeType; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ResourcePathNode to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @instance + * @returns {Object.} JSON object + */ + ResourcePathNode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourcePathNode + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourcePathNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ResourcePath.ResourcePathNode"; + }; + + return ResourcePathNode; + })(); + + return ResourcePath; + })(); + + v1.OrganizationSettings = (function() { + + /** + * Properties of an OrganizationSettings. + * @memberof google.cloud.securitycenter.v1 + * @interface IOrganizationSettings + * @property {string|null} [name] OrganizationSettings name + * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery + * @property {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig + */ + + /** + * Constructs a new OrganizationSettings. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an OrganizationSettings. + * @implements IOrganizationSettings + * @constructor + * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set + */ + function OrganizationSettings(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]]; + } + + /** + * OrganizationSettings name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @instance + */ + OrganizationSettings.prototype.name = ""; + + /** + * OrganizationSettings enableAssetDiscovery. + * @member {boolean} enableAssetDiscovery + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @instance + */ + OrganizationSettings.prototype.enableAssetDiscovery = false; + + /** + * OrganizationSettings assetDiscoveryConfig. + * @member {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @instance + */ + OrganizationSettings.prototype.assetDiscoveryConfig = null; + + /** + * Creates a new OrganizationSettings instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings instance + */ + OrganizationSettings.create = function create(properties) { + return new OrganizationSettings(properties); + }; + + /** + * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrganizationSettings.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.enableAssetDiscovery != null && Object.hasOwnProperty.call(message, "enableAssetDiscovery")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); + if (message.assetDiscoveryConfig != null && Object.hasOwnProperty.call(message, "assetDiscoveryConfig")) + $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrganizationSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrganizationSettings.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.cloud.securitycenter.v1.OrganizationSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.enableAssetDiscovery = reader.bool(); + break; + } + case 3: { + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrganizationSettings message. + * @function verify + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrganizationSettings.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.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + if (typeof message.enableAssetDiscovery !== "boolean") + return "enableAssetDiscovery: boolean expected"; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { + var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); + if (error) + return "assetDiscoveryConfig." + error; + } + return null; + }; + + /** + * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + */ + OrganizationSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings) + return object; + var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.enableAssetDiscovery != null) + message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); + if (object.assetDiscoveryConfig != null) { + if (typeof object.assetDiscoveryConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.assetDiscoveryConfig: object expected"); + message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); + } + return message; + }; + + /** + * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings} message OrganizationSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrganizationSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.enableAssetDiscovery = false; + object.assetDiscoveryConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) + object.enableAssetDiscovery = message.enableAssetDiscovery; + if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) + object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); + return object; + }; + + /** + * Converts this OrganizationSettings to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @instance + * @returns {Object.} JSON object + */ + OrganizationSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrganizationSettings + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrganizationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrganizationSettings"; + }; + + OrganizationSettings.AssetDiscoveryConfig = (function() { + + /** + * Properties of an AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @interface IAssetDiscoveryConfig + * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds + * @property {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode + * @property {Array.|null} [folderIds] AssetDiscoveryConfig folderIds + */ + + /** + * Constructs a new AssetDiscoveryConfig. + * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @classdesc Represents an AssetDiscoveryConfig. + * @implements IAssetDiscoveryConfig + * @constructor + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + */ + function AssetDiscoveryConfig(properties) { + this.projectIds = []; + this.folderIds = []; + 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]]; + } + + /** + * AssetDiscoveryConfig projectIds. + * @member {Array.} projectIds + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; + + /** + * AssetDiscoveryConfig inclusionMode. + * @member {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.inclusionMode = 0; + + /** + * AssetDiscoveryConfig folderIds. + * @member {Array.} folderIds + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + */ + AssetDiscoveryConfig.prototype.folderIds = $util.emptyArray; + + /** + * Creates a new AssetDiscoveryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance + */ + AssetDiscoveryConfig.create = function create(properties) { + return new AssetDiscoveryConfig(properties); + }; + + /** + * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIds != null && message.projectIds.length) + for (var i = 0; i < message.projectIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); + if (message.inclusionMode != null && Object.hasOwnProperty.call(message, "inclusionMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); + if (message.folderIds != null && message.folderIds.length) + for (var i = 0; i < message.folderIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.folderIds[i]); + return writer; + }; + + /** + * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.projectIds && message.projectIds.length)) + message.projectIds = []; + message.projectIds.push(reader.string()); + break; + } + case 2: { + message.inclusionMode = reader.int32(); + break; + } + case 3: { + if (!(message.folderIds && message.folderIds.length)) + message.folderIds = []; + message.folderIds.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssetDiscoveryConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetDiscoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIds != null && message.hasOwnProperty("projectIds")) { + if (!Array.isArray(message.projectIds)) + return "projectIds: array expected"; + for (var i = 0; i < message.projectIds.length; ++i) + if (!$util.isString(message.projectIds[i])) + return "projectIds: string[] expected"; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + switch (message.inclusionMode) { + default: + return "inclusionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.folderIds != null && message.hasOwnProperty("folderIds")) { + if (!Array.isArray(message.folderIds)) + return "folderIds: array expected"; + for (var i = 0; i < message.folderIds.length; ++i) + if (!$util.isString(message.folderIds[i])) + return "folderIds: string[] expected"; + } + return null; + }; + + /** + * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig + */ + AssetDiscoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); + if (object.projectIds) { + if (!Array.isArray(object.projectIds)) + throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); + message.projectIds = []; + for (var i = 0; i < object.projectIds.length; ++i) + message.projectIds[i] = String(object.projectIds[i]); + } + switch (object.inclusionMode) { + default: + if (typeof object.inclusionMode === "number") { + message.inclusionMode = object.inclusionMode; + break; + } + break; + case "INCLUSION_MODE_UNSPECIFIED": + case 0: + message.inclusionMode = 0; + break; + case "INCLUDE_ONLY": + case 1: + message.inclusionMode = 1; + break; + case "EXCLUDE": + case 2: + message.inclusionMode = 2; + break; + } + if (object.folderIds) { + if (!Array.isArray(object.folderIds)) + throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.folderIds: array expected"); + message.folderIds = []; + for (var i = 0; i < object.folderIds.length; ++i) + message.folderIds[i] = String(object.folderIds[i]); + } + return message; + }; + + /** + * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetDiscoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.projectIds = []; + object.folderIds = []; + } + if (options.defaults) + object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; + if (message.projectIds && message.projectIds.length) { + object.projectIds = []; + for (var j = 0; j < message.projectIds.length; ++j) + object.projectIds[j] = message.projectIds[j]; + } + if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) + object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] === undefined ? message.inclusionMode : $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; + if (message.folderIds && message.folderIds.length) { + object.folderIds = []; + for (var j = 0; j < message.folderIds.length; ++j) + object.folderIds[j] = message.folderIds[j]; + } + return object; + }; + + /** + * Converts this AssetDiscoveryConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @instance + * @returns {Object.} JSON object + */ + AssetDiscoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssetDiscoveryConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssetDiscoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig"; + }; + + /** + * InclusionMode enum. + * @name google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + * @enum {number} + * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value + * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AssetDiscoveryConfig.InclusionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE_ONLY"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AssetDiscoveryConfig; + })(); + + return OrganizationSettings; + })(); + + v1.ResourceValueConfig = (function() { + + /** + * Properties of a ResourceValueConfig. + * @memberof google.cloud.securitycenter.v1 + * @interface IResourceValueConfig + * @property {string|null} [name] ResourceValueConfig name + * @property {google.cloud.securitycenter.v1.ResourceValue|null} [resourceValue] ResourceValueConfig resourceValue + * @property {Array.|null} [tagValues] ResourceValueConfig tagValues + * @property {string|null} [resourceType] ResourceValueConfig resourceType + * @property {string|null} [scope] ResourceValueConfig scope + * @property {Object.|null} [resourceLabelsSelector] ResourceValueConfig resourceLabelsSelector + * @property {string|null} [description] ResourceValueConfig description + * @property {google.protobuf.ITimestamp|null} [createTime] ResourceValueConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceValueConfig updateTime + * @property {google.cloud.securitycenter.v1.CloudProvider|null} [cloudProvider] ResourceValueConfig cloudProvider + * @property {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping|null} [sensitiveDataProtectionMapping] ResourceValueConfig sensitiveDataProtectionMapping + */ + + /** + * Constructs a new ResourceValueConfig. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ResourceValueConfig. + * @implements IResourceValueConfig + * @constructor + * @param {google.cloud.securitycenter.v1.IResourceValueConfig=} [properties] Properties to set + */ + function ResourceValueConfig(properties) { + this.tagValues = []; + this.resourceLabelsSelector = {}; + 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]]; + } + + /** + * ResourceValueConfig name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.name = ""; + + /** + * ResourceValueConfig resourceValue. + * @member {google.cloud.securitycenter.v1.ResourceValue} resourceValue + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.resourceValue = 0; + + /** + * ResourceValueConfig tagValues. + * @member {Array.} tagValues + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.tagValues = $util.emptyArray; + + /** + * ResourceValueConfig resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.resourceType = ""; + + /** + * ResourceValueConfig scope. + * @member {string} scope + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.scope = ""; + + /** + * ResourceValueConfig resourceLabelsSelector. + * @member {Object.} resourceLabelsSelector + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.resourceLabelsSelector = $util.emptyObject; + + /** + * ResourceValueConfig description. + * @member {string} description + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.description = ""; + + /** + * ResourceValueConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.createTime = null; + + /** + * ResourceValueConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.updateTime = null; + + /** + * ResourceValueConfig cloudProvider. + * @member {google.cloud.securitycenter.v1.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.cloudProvider = 0; + + /** + * ResourceValueConfig sensitiveDataProtectionMapping. + * @member {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping|null|undefined} sensitiveDataProtectionMapping + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + */ + ResourceValueConfig.prototype.sensitiveDataProtectionMapping = null; + + /** + * Creates a new ResourceValueConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {google.cloud.securitycenter.v1.IResourceValueConfig=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig} ResourceValueConfig instance + */ + ResourceValueConfig.create = function create(properties) { + return new ResourceValueConfig(properties); + }; + + /** + * Encodes the specified ResourceValueConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {google.cloud.securitycenter.v1.IResourceValueConfig} message ResourceValueConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceValueConfig.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.resourceValue != null && Object.hasOwnProperty.call(message, "resourceValue")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceValue); + if (message.tagValues != null && message.tagValues.length) + for (var i = 0; i < message.tagValues.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagValues[i]); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceType); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.scope); + if (message.resourceLabelsSelector != null && Object.hasOwnProperty.call(message, "resourceLabelsSelector")) + for (var keys = Object.keys(message.resourceLabelsSelector), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabelsSelector[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.cloudProvider); + if (message.sensitiveDataProtectionMapping != null && Object.hasOwnProperty.call(message, "sensitiveDataProtectionMapping")) + $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.encode(message.sensitiveDataProtectionMapping, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceValueConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {google.cloud.securitycenter.v1.IResourceValueConfig} message ResourceValueConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceValueConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceValueConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig} ResourceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceValueConfig.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.cloud.securitycenter.v1.ResourceValueConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.resourceValue = reader.int32(); + break; + } + case 3: { + if (!(message.tagValues && message.tagValues.length)) + message.tagValues = []; + message.tagValues.push(reader.string()); + break; + } + case 4: { + message.resourceType = reader.string(); + break; + } + case 5: { + message.scope = reader.string(); + break; + } + case 6: { + if (message.resourceLabelsSelector === $util.emptyObject) + message.resourceLabelsSelector = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.resourceLabelsSelector[key] = value; + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.cloudProvider = reader.int32(); + break; + } + case 11: { + message.sensitiveDataProtectionMapping = $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceValueConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig} ResourceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceValueConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceValueConfig message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceValueConfig.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.resourceValue != null && message.hasOwnProperty("resourceValue")) + switch (message.resourceValue) { + default: + return "resourceValue: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.tagValues != null && message.hasOwnProperty("tagValues")) { + if (!Array.isArray(message.tagValues)) + return "tagValues: array expected"; + for (var i = 0; i < message.tagValues.length; ++i) + if (!$util.isString(message.tagValues[i])) + return "tagValues: string[] expected"; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.resourceLabelsSelector != null && message.hasOwnProperty("resourceLabelsSelector")) { + if (!$util.isObject(message.resourceLabelsSelector)) + return "resourceLabelsSelector: object expected"; + var key = Object.keys(message.resourceLabelsSelector); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabelsSelector[key[i]])) + return "resourceLabelsSelector: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + 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.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sensitiveDataProtectionMapping != null && message.hasOwnProperty("sensitiveDataProtectionMapping")) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.verify(message.sensitiveDataProtectionMapping); + if (error) + return "sensitiveDataProtectionMapping." + error; + } + return null; + }; + + /** + * Creates a ResourceValueConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig} ResourceValueConfig + */ + ResourceValueConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ResourceValueConfig) + return object; + var message = new $root.google.cloud.securitycenter.v1.ResourceValueConfig(); + if (object.name != null) + message.name = String(object.name); + switch (object.resourceValue) { + default: + if (typeof object.resourceValue === "number") { + message.resourceValue = object.resourceValue; + break; + } + break; + case "RESOURCE_VALUE_UNSPECIFIED": + case 0: + message.resourceValue = 0; + break; + case "HIGH": + case 1: + message.resourceValue = 1; + break; + case "MEDIUM": + case 2: + message.resourceValue = 2; + break; + case "LOW": + case 3: + message.resourceValue = 3; + break; + case "NONE": + case 4: + message.resourceValue = 4; + break; + } + if (object.tagValues) { + if (!Array.isArray(object.tagValues)) + throw TypeError(".google.cloud.securitycenter.v1.ResourceValueConfig.tagValues: array expected"); + message.tagValues = []; + for (var i = 0; i < object.tagValues.length; ++i) + message.tagValues[i] = String(object.tagValues[i]); + } + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.scope != null) + message.scope = String(object.scope); + if (object.resourceLabelsSelector) { + if (typeof object.resourceLabelsSelector !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ResourceValueConfig.resourceLabelsSelector: object expected"); + message.resourceLabelsSelector = {}; + for (var keys = Object.keys(object.resourceLabelsSelector), i = 0; i < keys.length; ++i) + message.resourceLabelsSelector[keys[i]] = String(object.resourceLabelsSelector[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ResourceValueConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ResourceValueConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } + if (object.sensitiveDataProtectionMapping != null) { + if (typeof object.sensitiveDataProtectionMapping !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ResourceValueConfig.sensitiveDataProtectionMapping: object expected"); + message.sensitiveDataProtectionMapping = $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.fromObject(object.sensitiveDataProtectionMapping); + } + return message; + }; + + /** + * Creates a plain object from a ResourceValueConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {google.cloud.securitycenter.v1.ResourceValueConfig} message ResourceValueConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceValueConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tagValues = []; + if (options.objects || options.defaults) + object.resourceLabelsSelector = {}; + if (options.defaults) { + object.name = ""; + object.resourceValue = options.enums === String ? "RESOURCE_VALUE_UNSPECIFIED" : 0; + object.resourceType = ""; + object.scope = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; + object.sensitiveDataProtectionMapping = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceValue != null && message.hasOwnProperty("resourceValue")) + object.resourceValue = options.enums === String ? $root.google.cloud.securitycenter.v1.ResourceValue[message.resourceValue] === undefined ? message.resourceValue : $root.google.cloud.securitycenter.v1.ResourceValue[message.resourceValue] : message.resourceValue; + if (message.tagValues && message.tagValues.length) { + object.tagValues = []; + for (var j = 0; j < message.tagValues.length; ++j) + object.tagValues[j] = message.tagValues[j]; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + var keys2; + if (message.resourceLabelsSelector && (keys2 = Object.keys(message.resourceLabelsSelector)).length) { + object.resourceLabelsSelector = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceLabelsSelector[keys2[j]] = message.resourceLabelsSelector[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] : message.cloudProvider; + if (message.sensitiveDataProtectionMapping != null && message.hasOwnProperty("sensitiveDataProtectionMapping")) + object.sensitiveDataProtectionMapping = $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.toObject(message.sensitiveDataProtectionMapping, options); + return object; + }; + + /** + * Converts this ResourceValueConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @instance + * @returns {Object.} JSON object + */ + ResourceValueConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceValueConfig + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceValueConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ResourceValueConfig"; + }; + + ResourceValueConfig.SensitiveDataProtectionMapping = (function() { + + /** + * Properties of a SensitiveDataProtectionMapping. + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @interface ISensitiveDataProtectionMapping + * @property {google.cloud.securitycenter.v1.ResourceValue|null} [highSensitivityMapping] SensitiveDataProtectionMapping highSensitivityMapping + * @property {google.cloud.securitycenter.v1.ResourceValue|null} [mediumSensitivityMapping] SensitiveDataProtectionMapping mediumSensitivityMapping + */ + + /** + * Constructs a new SensitiveDataProtectionMapping. + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig + * @classdesc Represents a SensitiveDataProtectionMapping. + * @implements ISensitiveDataProtectionMapping + * @constructor + * @param {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping=} [properties] Properties to set + */ + function SensitiveDataProtectionMapping(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]]; + } + + /** + * SensitiveDataProtectionMapping highSensitivityMapping. + * @member {google.cloud.securitycenter.v1.ResourceValue} highSensitivityMapping + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @instance + */ + SensitiveDataProtectionMapping.prototype.highSensitivityMapping = 0; + + /** + * SensitiveDataProtectionMapping mediumSensitivityMapping. + * @member {google.cloud.securitycenter.v1.ResourceValue} mediumSensitivityMapping + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @instance + */ + SensitiveDataProtectionMapping.prototype.mediumSensitivityMapping = 0; + + /** + * Creates a new SensitiveDataProtectionMapping instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping} SensitiveDataProtectionMapping instance + */ + SensitiveDataProtectionMapping.create = function create(properties) { + return new SensitiveDataProtectionMapping(properties); + }; + + /** + * Encodes the specified SensitiveDataProtectionMapping message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping} message SensitiveDataProtectionMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SensitiveDataProtectionMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.highSensitivityMapping != null && Object.hasOwnProperty.call(message, "highSensitivityMapping")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.highSensitivityMapping); + if (message.mediumSensitivityMapping != null && Object.hasOwnProperty.call(message, "mediumSensitivityMapping")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediumSensitivityMapping); + return writer; + }; + + /** + * Encodes the specified SensitiveDataProtectionMapping message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {google.cloud.securitycenter.v1.ResourceValueConfig.ISensitiveDataProtectionMapping} message SensitiveDataProtectionMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SensitiveDataProtectionMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SensitiveDataProtectionMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping} SensitiveDataProtectionMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SensitiveDataProtectionMapping.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.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.highSensitivityMapping = reader.int32(); + break; + } + case 2: { + message.mediumSensitivityMapping = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SensitiveDataProtectionMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping} SensitiveDataProtectionMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SensitiveDataProtectionMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SensitiveDataProtectionMapping message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SensitiveDataProtectionMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.highSensitivityMapping != null && message.hasOwnProperty("highSensitivityMapping")) + switch (message.highSensitivityMapping) { + default: + return "highSensitivityMapping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.mediumSensitivityMapping != null && message.hasOwnProperty("mediumSensitivityMapping")) + switch (message.mediumSensitivityMapping) { + default: + return "mediumSensitivityMapping: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a SensitiveDataProtectionMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping} SensitiveDataProtectionMapping + */ + SensitiveDataProtectionMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping) + return object; + var message = new $root.google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping(); + switch (object.highSensitivityMapping) { + default: + if (typeof object.highSensitivityMapping === "number") { + message.highSensitivityMapping = object.highSensitivityMapping; + break; + } + break; + case "RESOURCE_VALUE_UNSPECIFIED": + case 0: + message.highSensitivityMapping = 0; + break; + case "HIGH": + case 1: + message.highSensitivityMapping = 1; + break; + case "MEDIUM": + case 2: + message.highSensitivityMapping = 2; + break; + case "LOW": + case 3: + message.highSensitivityMapping = 3; + break; + case "NONE": + case 4: + message.highSensitivityMapping = 4; + break; + } + switch (object.mediumSensitivityMapping) { + default: + if (typeof object.mediumSensitivityMapping === "number") { + message.mediumSensitivityMapping = object.mediumSensitivityMapping; + break; + } + break; + case "RESOURCE_VALUE_UNSPECIFIED": + case 0: + message.mediumSensitivityMapping = 0; + break; + case "HIGH": + case 1: + message.mediumSensitivityMapping = 1; + break; + case "MEDIUM": + case 2: + message.mediumSensitivityMapping = 2; + break; + case "LOW": + case 3: + message.mediumSensitivityMapping = 3; + break; + case "NONE": + case 4: + message.mediumSensitivityMapping = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a SensitiveDataProtectionMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping} message SensitiveDataProtectionMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SensitiveDataProtectionMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.highSensitivityMapping = options.enums === String ? "RESOURCE_VALUE_UNSPECIFIED" : 0; + object.mediumSensitivityMapping = options.enums === String ? "RESOURCE_VALUE_UNSPECIFIED" : 0; + } + if (message.highSensitivityMapping != null && message.hasOwnProperty("highSensitivityMapping")) + object.highSensitivityMapping = options.enums === String ? $root.google.cloud.securitycenter.v1.ResourceValue[message.highSensitivityMapping] === undefined ? message.highSensitivityMapping : $root.google.cloud.securitycenter.v1.ResourceValue[message.highSensitivityMapping] : message.highSensitivityMapping; + if (message.mediumSensitivityMapping != null && message.hasOwnProperty("mediumSensitivityMapping")) + object.mediumSensitivityMapping = options.enums === String ? $root.google.cloud.securitycenter.v1.ResourceValue[message.mediumSensitivityMapping] === undefined ? message.mediumSensitivityMapping : $root.google.cloud.securitycenter.v1.ResourceValue[message.mediumSensitivityMapping] : message.mediumSensitivityMapping; + return object; + }; + + /** + * Converts this SensitiveDataProtectionMapping to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @instance + * @returns {Object.} JSON object + */ + SensitiveDataProtectionMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SensitiveDataProtectionMapping + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SensitiveDataProtectionMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ResourceValueConfig.SensitiveDataProtectionMapping"; + }; + + return SensitiveDataProtectionMapping; + })(); + + return ResourceValueConfig; + })(); + + /** + * ResourceValue enum. + * @name google.cloud.securitycenter.v1.ResourceValue + * @enum {number} + * @property {number} RESOURCE_VALUE_UNSPECIFIED=0 RESOURCE_VALUE_UNSPECIFIED value + * @property {number} HIGH=1 HIGH value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} LOW=3 LOW value + * @property {number} NONE=4 NONE value + */ + v1.ResourceValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_VALUE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIGH"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "LOW"] = 3; + values[valuesById[4] = "NONE"] = 4; + return values; + })(); + + v1.RunAssetDiscoveryResponse = (function() { + + /** + * Properties of a RunAssetDiscoveryResponse. + * @memberof google.cloud.securitycenter.v1 + * @interface IRunAssetDiscoveryResponse + * @property {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null} [state] RunAssetDiscoveryResponse state + * @property {google.protobuf.IDuration|null} [duration] RunAssetDiscoveryResponse duration + */ + + /** + * Constructs a new RunAssetDiscoveryResponse. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a RunAssetDiscoveryResponse. + * @implements IRunAssetDiscoveryResponse + * @constructor + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set + */ + function RunAssetDiscoveryResponse(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]]; + } + + /** + * RunAssetDiscoveryResponse state. + * @member {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State} state + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @instance + */ + RunAssetDiscoveryResponse.prototype.state = 0; + + /** + * RunAssetDiscoveryResponse duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @instance + */ + RunAssetDiscoveryResponse.prototype.duration = null; + + /** + * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse instance + */ + RunAssetDiscoveryResponse.create = function create(properties) { + return new RunAssetDiscoveryResponse(properties); + }; + + /** + * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAssetDiscoveryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAssetDiscoveryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAssetDiscoveryResponse.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.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAssetDiscoveryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAssetDiscoveryResponse message. + * @function verify + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAssetDiscoveryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + return null; + }; + + /** + * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + */ + RunAssetDiscoveryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse) + return object; + var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "COMPLETED": + case 1: + message.state = 1; + break; + case "SUPERSEDED": + case 2: + message.state = 2; + break; + case "TERMINATED": + case 3: + message.state = 3; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + return message; + }; + + /** + * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} message RunAssetDiscoveryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAssetDiscoveryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.duration = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] : message.state; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + return object; + }; + + /** + * Converts this RunAssetDiscoveryResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @instance + * @returns {Object.} JSON object + */ + RunAssetDiscoveryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunAssetDiscoveryResponse + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAssetDiscoveryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.RunAssetDiscoveryResponse"; + }; + + /** + * State enum. + * @name google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} COMPLETED=1 COMPLETED value + * @property {number} SUPERSEDED=2 SUPERSEDED value + * @property {number} TERMINATED=3 TERMINATED value + */ + RunAssetDiscoveryResponse.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPLETED"] = 1; + values[valuesById[2] = "SUPERSEDED"] = 2; + values[valuesById[3] = "TERMINATED"] = 3; + return values; + })(); + + return RunAssetDiscoveryResponse; + })(); + + v1.SecurityHealthAnalyticsCustomModule = (function() { + + /** + * Properties of a SecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycenter.v1 + * @interface ISecurityHealthAnalyticsCustomModule + * @property {string|null} [name] SecurityHealthAnalyticsCustomModule name + * @property {string|null} [displayName] SecurityHealthAnalyticsCustomModule displayName + * @property {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] SecurityHealthAnalyticsCustomModule enablementState + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityHealthAnalyticsCustomModule updateTime + * @property {string|null} [lastEditor] SecurityHealthAnalyticsCustomModule lastEditor + * @property {string|null} [ancestorModule] SecurityHealthAnalyticsCustomModule ancestorModule + * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] SecurityHealthAnalyticsCustomModule customConfig + */ + + /** + * Constructs a new SecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityHealthAnalyticsCustomModule. + * @implements ISecurityHealthAnalyticsCustomModule + * @constructor + * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set + */ + function SecurityHealthAnalyticsCustomModule(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]]; + } + + /** + * SecurityHealthAnalyticsCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.name = ""; + + /** + * SecurityHealthAnalyticsCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.displayName = ""; + + /** + * SecurityHealthAnalyticsCustomModule enablementState. + * @member {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; + + /** + * SecurityHealthAnalyticsCustomModule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.updateTime = null; + + /** + * SecurityHealthAnalyticsCustomModule lastEditor. + * @member {string} lastEditor + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.lastEditor = ""; + + /** + * SecurityHealthAnalyticsCustomModule ancestorModule. + * @member {string} ancestorModule + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.ancestorModule = ""; + + /** + * SecurityHealthAnalyticsCustomModule customConfig. + * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.customConfig = null; + + /** + * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule instance + */ + SecurityHealthAnalyticsCustomModule.create = function create(properties) { + return new SecurityHealthAnalyticsCustomModule(properties); + }; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityHealthAnalyticsCustomModule.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.enablementState); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lastEditor); + if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.ancestorModule); + if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityHealthAnalyticsCustomModule.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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 4: { + message.enablementState = reader.int32(); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.lastEditor = reader.string(); + break; + } + case 7: { + message.ancestorModule = reader.string(); + break; + } + case 8: { + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityHealthAnalyticsCustomModule message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityHealthAnalyticsCustomModule.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.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + if (!$util.isString(message.lastEditor)) + return "lastEditor: string expected"; + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + if (!$util.isString(message.ancestorModule)) + return "ancestorModule: string expected"; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); + if (error) + return "customConfig." + error; + } + return null; + }; + + /** + * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + */ + SecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) + return object; + var message = new $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; + case "INHERITED": + case 3: + message.enablementState = 3; + break; + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastEditor != null) + message.lastEditor = String(object.lastEditor); + if (object.ancestorModule != null) + message.ancestorModule = String(object.ancestorModule); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); + } + return message; + }; + + /** + * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.updateTime = null; + object.lastEditor = ""; + object.ancestorModule = ""; + object.customConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + object.lastEditor = message.lastEditor; + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + object.ancestorModule = message.ancestorModule; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); + return object; + }; + + /** + * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @instance + * @returns {Object.} JSON object + */ + SecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityHealthAnalyticsCustomModule + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule"; + }; + + /** + * EnablementState enum. + * @name google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} INHERITED=3 INHERITED value + */ + SecurityHealthAnalyticsCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "INHERITED"] = 3; + return values; + })(); + + return SecurityHealthAnalyticsCustomModule; + })(); + + v1.SecurityCenter = (function() { + + /** + * Constructs a new SecurityCenter service. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a SecurityCenter + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; + + /** + * Creates new SecurityCenter service using the specified rpc implementation. + * @function create + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. + */ + SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|bulkMuteFindings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef BulkMuteFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BulkMuteFindings. + * @function bulkMuteFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} request BulkMuteFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindingsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.bulkMuteFindings = function bulkMuteFindings(request, callback) { + return this.rpcCall(bulkMuteFindings, $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BulkMuteFindings" }); + + /** + * Calls BulkMuteFindings. + * @function bulkMuteFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} request BulkMuteFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @function createSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.createSecurityHealthAnalyticsCustomModule = function createSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(createSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "CreateSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @function createSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source + */ + + /** + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { + return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1.CreateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "CreateSource" }); + + /** + * Calls CreateSource. + * @function createSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createFinding}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + */ + + /** + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { + return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1.CreateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "CreateFinding" }); + + /** + * Calls CreateFinding. + * @function createFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createMuteConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateMuteConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + */ + + /** + * Calls CreateMuteConfig. + * @function createMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} request CreateMuteConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.createMuteConfig = function createMuteConfig(request, callback) { + return this.rpcCall(createMuteConfig, $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); + }, "name", { value: "CreateMuteConfig" }); + + /** + * Calls CreateMuteConfig. + * @function createMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} request CreateMuteConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createNotificationConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateNotificationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + */ + + /** + * Calls CreateNotificationConfig. + * @function createNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} request CreateNotificationConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.createNotificationConfig = function createNotificationConfig(request, callback) { + return this.rpcCall(createNotificationConfig, $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); + }, "name", { value: "CreateNotificationConfig" }); + + /** + * Calls CreateNotificationConfig. + * @function createNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} request CreateNotificationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteMuteConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteMuteConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMuteConfig. + * @function deleteMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} request DeleteMuteConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.deleteMuteConfig = function deleteMuteConfig(request, callback) { + return this.rpcCall(deleteMuteConfig, $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMuteConfig" }); + + /** + * Calls DeleteMuteConfig. + * @function deleteMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} request DeleteMuteConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteNotificationConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteNotificationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteNotificationConfig. + * @function deleteNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} request DeleteNotificationConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.deleteNotificationConfig = function deleteNotificationConfig(request, callback) { + return this.rpcCall(deleteNotificationConfig, $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteNotificationConfig" }); + + /** + * Calls DeleteNotificationConfig. + * @function deleteNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} request DeleteNotificationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @function deleteSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.deleteSecurityHealthAnalyticsCustomModule = function deleteSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(deleteSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @function deleteSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSimulation}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetSimulationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Simulation} [response] Simulation + */ + + /** + * Calls GetSimulation. + * @function getSimulation + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest} request GetSimulationRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSimulationCallback} callback Node-style callback called with the error, if any, and Simulation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getSimulation = function getSimulation(request, callback) { + return this.rpcCall(getSimulation, $root.google.cloud.securitycenter.v1.GetSimulationRequest, $root.google.cloud.securitycenter.v1.Simulation, request, callback); + }, "name", { value: "GetSimulation" }); + + /** + * Calls GetSimulation. + * @function getSimulation + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest} request GetSimulationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getValuedResource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetValuedResourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ValuedResource} [response] ValuedResource + */ + + /** + * Calls GetValuedResource. + * @function getValuedResource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest} request GetValuedResourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetValuedResourceCallback} callback Node-style callback called with the error, if any, and ValuedResource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getValuedResource = function getValuedResource(request, callback) { + return this.rpcCall(getValuedResource, $root.google.cloud.securitycenter.v1.GetValuedResourceRequest, $root.google.cloud.securitycenter.v1.ValuedResource, request, callback); + }, "name", { value: "GetValuedResource" }); + + /** + * Calls GetValuedResource. + * @function getValuedResource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest} request GetValuedResourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getBigQueryExport}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetBigQueryExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport + */ + + /** + * Calls GetBigQueryExport. + * @function getBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} request GetBigQueryExportRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getBigQueryExport = function getBigQueryExport(request, callback) { + return this.rpcCall(getBigQueryExport, $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); + }, "name", { value: "GetBigQueryExport" }); + + /** + * Calls GetBigQueryExport. + * @function getBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} request GetBigQueryExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getIamPolicy}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getMuteConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetMuteConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + */ + + /** + * Calls GetMuteConfig. + * @function getMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} request GetMuteConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getMuteConfig = function getMuteConfig(request, callback) { + return this.rpcCall(getMuteConfig, $root.google.cloud.securitycenter.v1.GetMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); + }, "name", { value: "GetMuteConfig" }); + + /** + * Calls GetMuteConfig. + * @function getMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} request GetMuteConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getNotificationConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetNotificationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + */ + + /** + * Calls GetNotificationConfig. + * @function getNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} request GetNotificationConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getNotificationConfig = function getNotificationConfig(request, callback) { + return this.rpcCall(getNotificationConfig, $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); + }, "name", { value: "GetNotificationConfig" }); + + /** + * Calls GetNotificationConfig. + * @function getNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} request GetNotificationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + */ + + /** + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { + return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); + }, "name", { value: "GetOrganizationSettings" }); + + /** + * Calls GetOrganizationSettings. + * @function getOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetEffectiveSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} [response] EffectiveSecurityHealthAnalyticsCustomModule + */ + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @function getEffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getEffectiveSecurityHealthAnalyticsCustomModule = function getEffectiveSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(getEffectiveSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "GetEffectiveSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @function getEffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @function getSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getSecurityHealthAnalyticsCustomModule = function getSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(getSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "GetSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @function getSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source + */ + + /** + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { + return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1.GetSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "GetSource" }); + + /** + * Calls GetSource. + * @function getSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupAssets}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GroupAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} [response] GroupAssetsResponse + */ + + /** + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { + return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1.GroupAssetsResponse, request, callback); + }, "name", { value: "GroupAssets" }); + + /** + * Calls GroupAssets. + * @function groupAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupFindings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GroupFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} [response] GroupFindingsResponse + */ + + /** + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { + return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1.GroupFindingsResponse, request, callback); + }, "name", { value: "GroupFindings" }); + + /** + * Calls GroupFindings. + * @function groupFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAssets}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListAssetsResponse} [response] ListAssetsResponse + */ + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1.ListAssetsRequest, $root.google.cloud.securitycenter.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListDescendantSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @function listDescendantSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listDescendantSecurityHealthAnalyticsCustomModules = function listDescendantSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listDescendantSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListDescendantSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @function listDescendantSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listFindings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListFindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListFindingsResponse} [response] ListFindingsResponse + */ + + /** + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { + return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1.ListFindingsRequest, $root.google.cloud.securitycenter.v1.ListFindingsResponse, request, callback); + }, "name", { value: "ListFindings" }); + + /** + * Calls ListFindings. + * @function listFindings + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listMuteConfigs}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListMuteConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListMuteConfigsResponse} [response] ListMuteConfigsResponse + */ + + /** + * Calls ListMuteConfigs. + * @function listMuteConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} request ListMuteConfigsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigsCallback} callback Node-style callback called with the error, if any, and ListMuteConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listMuteConfigs = function listMuteConfigs(request, callback) { + return this.rpcCall(listMuteConfigs, $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest, $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse, request, callback); + }, "name", { value: "ListMuteConfigs" }); + + /** + * Calls ListMuteConfigs. + * @function listMuteConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} request ListMuteConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Creates a plain object from a MitreAttack message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.MitreAttack - * @static - * @param {google.cloud.securitycenter.v1.MitreAttack} message MitreAttack - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listNotificationConfigs}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListNotificationConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} [response] ListNotificationConfigsResponse */ - MitreAttack.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.primaryTechniques = []; - object.additionalTactics = []; - object.additionalTechniques = []; - } - if (options.defaults) { - object.primaryTactic = options.enums === String ? "TACTIC_UNSPECIFIED" : 0; - object.version = ""; - } - if (message.primaryTactic != null && message.hasOwnProperty("primaryTactic")) - object.primaryTactic = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.primaryTactic] === undefined ? message.primaryTactic : $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.primaryTactic] : message.primaryTactic; - if (message.primaryTechniques && message.primaryTechniques.length) { - object.primaryTechniques = []; - for (var j = 0; j < message.primaryTechniques.length; ++j) - object.primaryTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.primaryTechniques[j]] === undefined ? message.primaryTechniques[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.primaryTechniques[j]] : message.primaryTechniques[j]; - } - if (message.additionalTactics && message.additionalTactics.length) { - object.additionalTactics = []; - for (var j = 0; j < message.additionalTactics.length; ++j) - object.additionalTactics[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.additionalTactics[j]] === undefined ? message.additionalTactics[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Tactic[message.additionalTactics[j]] : message.additionalTactics[j]; - } - if (message.additionalTechniques && message.additionalTechniques.length) { - object.additionalTechniques = []; - for (var j = 0; j < message.additionalTechniques.length; ++j) - object.additionalTechniques[j] = options.enums === String ? $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.additionalTechniques[j]] === undefined ? message.additionalTechniques[j] : $root.google.cloud.securitycenter.v1.MitreAttack.Technique[message.additionalTechniques[j]] : message.additionalTechniques[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; /** - * Converts this MitreAttack to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.MitreAttack + * Calls ListNotificationConfigs. + * @function listNotificationConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} request ListNotificationConfigsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigsCallback} callback Node-style callback called with the error, if any, and ListNotificationConfigsResponse + * @returns {undefined} + * @variation 1 */ - MitreAttack.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(SecurityCenter.prototype.listNotificationConfigs = function listNotificationConfigs(request, callback) { + return this.rpcCall(listNotificationConfigs, $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest, $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse, request, callback); + }, "name", { value: "ListNotificationConfigs" }); /** - * Gets the default type url for MitreAttack - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.MitreAttack - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListNotificationConfigs. + * @function listNotificationConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} request ListNotificationConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - MitreAttack.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.MitreAttack"; - }; /** - * Tactic enum. - * @name google.cloud.securitycenter.v1.MitreAttack.Tactic - * @enum {number} - * @property {number} TACTIC_UNSPECIFIED=0 TACTIC_UNSPECIFIED value - * @property {number} RECONNAISSANCE=1 RECONNAISSANCE value - * @property {number} RESOURCE_DEVELOPMENT=2 RESOURCE_DEVELOPMENT value - * @property {number} INITIAL_ACCESS=5 INITIAL_ACCESS value - * @property {number} EXECUTION=3 EXECUTION value - * @property {number} PERSISTENCE=6 PERSISTENCE value - * @property {number} PRIVILEGE_ESCALATION=8 PRIVILEGE_ESCALATION value - * @property {number} DEFENSE_EVASION=7 DEFENSE_EVASION value - * @property {number} CREDENTIAL_ACCESS=9 CREDENTIAL_ACCESS value - * @property {number} DISCOVERY=10 DISCOVERY value - * @property {number} LATERAL_MOVEMENT=11 LATERAL_MOVEMENT value - * @property {number} COLLECTION=12 COLLECTION value - * @property {number} COMMAND_AND_CONTROL=4 COMMAND_AND_CONTROL value - * @property {number} EXFILTRATION=13 EXFILTRATION value - * @property {number} IMPACT=14 IMPACT value + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListEffectiveSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse */ - MitreAttack.Tactic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TACTIC_UNSPECIFIED"] = 0; - values[valuesById[1] = "RECONNAISSANCE"] = 1; - values[valuesById[2] = "RESOURCE_DEVELOPMENT"] = 2; - values[valuesById[5] = "INITIAL_ACCESS"] = 5; - values[valuesById[3] = "EXECUTION"] = 3; - values[valuesById[6] = "PERSISTENCE"] = 6; - values[valuesById[8] = "PRIVILEGE_ESCALATION"] = 8; - values[valuesById[7] = "DEFENSE_EVASION"] = 7; - values[valuesById[9] = "CREDENTIAL_ACCESS"] = 9; - values[valuesById[10] = "DISCOVERY"] = 10; - values[valuesById[11] = "LATERAL_MOVEMENT"] = 11; - values[valuesById[12] = "COLLECTION"] = 12; - values[valuesById[4] = "COMMAND_AND_CONTROL"] = 4; - values[valuesById[13] = "EXFILTRATION"] = 13; - values[valuesById[14] = "IMPACT"] = 14; - return values; - })(); /** - * Technique enum. - * @name google.cloud.securitycenter.v1.MitreAttack.Technique - * @enum {number} - * @property {number} TECHNIQUE_UNSPECIFIED=0 TECHNIQUE_UNSPECIFIED value - * @property {number} MASQUERADING=49 MASQUERADING value - * @property {number} MATCH_LEGITIMATE_NAME_OR_LOCATION=50 MATCH_LEGITIMATE_NAME_OR_LOCATION value - * @property {number} BOOT_OR_LOGON_INITIALIZATION_SCRIPTS=37 BOOT_OR_LOGON_INITIALIZATION_SCRIPTS value - * @property {number} STARTUP_ITEMS=38 STARTUP_ITEMS value - * @property {number} NETWORK_SERVICE_DISCOVERY=32 NETWORK_SERVICE_DISCOVERY value - * @property {number} PROCESS_DISCOVERY=56 PROCESS_DISCOVERY value - * @property {number} COMMAND_AND_SCRIPTING_INTERPRETER=6 COMMAND_AND_SCRIPTING_INTERPRETER value - * @property {number} UNIX_SHELL=7 UNIX_SHELL value - * @property {number} PERMISSION_GROUPS_DISCOVERY=18 PERMISSION_GROUPS_DISCOVERY value - * @property {number} CLOUD_GROUPS=19 CLOUD_GROUPS value - * @property {number} APPLICATION_LAYER_PROTOCOL=45 APPLICATION_LAYER_PROTOCOL value - * @property {number} DNS=46 DNS value - * @property {number} SOFTWARE_DEPLOYMENT_TOOLS=47 SOFTWARE_DEPLOYMENT_TOOLS value - * @property {number} VALID_ACCOUNTS=14 VALID_ACCOUNTS value - * @property {number} DEFAULT_ACCOUNTS=35 DEFAULT_ACCOUNTS value - * @property {number} LOCAL_ACCOUNTS=15 LOCAL_ACCOUNTS value - * @property {number} CLOUD_ACCOUNTS=16 CLOUD_ACCOUNTS value - * @property {number} PROXY=9 PROXY value - * @property {number} EXTERNAL_PROXY=10 EXTERNAL_PROXY value - * @property {number} MULTI_HOP_PROXY=11 MULTI_HOP_PROXY value - * @property {number} ACCOUNT_MANIPULATION=22 ACCOUNT_MANIPULATION value - * @property {number} ADDITIONAL_CLOUD_CREDENTIALS=40 ADDITIONAL_CLOUD_CREDENTIALS value - * @property {number} SSH_AUTHORIZED_KEYS=23 SSH_AUTHORIZED_KEYS value - * @property {number} ADDITIONAL_CONTAINER_CLUSTER_ROLES=58 ADDITIONAL_CONTAINER_CLUSTER_ROLES value - * @property {number} INGRESS_TOOL_TRANSFER=3 INGRESS_TOOL_TRANSFER value - * @property {number} NATIVE_API=4 NATIVE_API value - * @property {number} BRUTE_FORCE=44 BRUTE_FORCE value - * @property {number} SHARED_MODULES=5 SHARED_MODULES value - * @property {number} ACCESS_TOKEN_MANIPULATION=33 ACCESS_TOKEN_MANIPULATION value - * @property {number} TOKEN_IMPERSONATION_OR_THEFT=39 TOKEN_IMPERSONATION_OR_THEFT value - * @property {number} EXPLOIT_PUBLIC_FACING_APPLICATION=27 EXPLOIT_PUBLIC_FACING_APPLICATION value - * @property {number} DOMAIN_POLICY_MODIFICATION=30 DOMAIN_POLICY_MODIFICATION value - * @property {number} DATA_DESTRUCTION=29 DATA_DESTRUCTION value - * @property {number} SERVICE_STOP=52 SERVICE_STOP value - * @property {number} INHIBIT_SYSTEM_RECOVERY=36 INHIBIT_SYSTEM_RECOVERY value - * @property {number} RESOURCE_HIJACKING=8 RESOURCE_HIJACKING value - * @property {number} NETWORK_DENIAL_OF_SERVICE=17 NETWORK_DENIAL_OF_SERVICE value - * @property {number} CLOUD_SERVICE_DISCOVERY=48 CLOUD_SERVICE_DISCOVERY value - * @property {number} STEAL_APPLICATION_ACCESS_TOKEN=42 STEAL_APPLICATION_ACCESS_TOKEN value - * @property {number} ACCOUNT_ACCESS_REMOVAL=51 ACCOUNT_ACCESS_REMOVAL value - * @property {number} STEAL_WEB_SESSION_COOKIE=25 STEAL_WEB_SESSION_COOKIE value - * @property {number} CREATE_OR_MODIFY_SYSTEM_PROCESS=24 CREATE_OR_MODIFY_SYSTEM_PROCESS value - * @property {number} ABUSE_ELEVATION_CONTROL_MECHANISM=34 ABUSE_ELEVATION_CONTROL_MECHANISM value - * @property {number} UNSECURED_CREDENTIALS=13 UNSECURED_CREDENTIALS value - * @property {number} MODIFY_AUTHENTICATION_PROCESS=28 MODIFY_AUTHENTICATION_PROCESS value - * @property {number} IMPAIR_DEFENSES=31 IMPAIR_DEFENSES value - * @property {number} DISABLE_OR_MODIFY_TOOLS=55 DISABLE_OR_MODIFY_TOOLS value - * @property {number} EXFILTRATION_OVER_WEB_SERVICE=20 EXFILTRATION_OVER_WEB_SERVICE value - * @property {number} EXFILTRATION_TO_CLOUD_STORAGE=21 EXFILTRATION_TO_CLOUD_STORAGE value - * @property {number} DYNAMIC_RESOLUTION=12 DYNAMIC_RESOLUTION value - * @property {number} LATERAL_TOOL_TRANSFER=41 LATERAL_TOOL_TRANSFER value - * @property {number} MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE=26 MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE value - * @property {number} CREATE_SNAPSHOT=54 CREATE_SNAPSHOT value - * @property {number} CLOUD_INFRASTRUCTURE_DISCOVERY=53 CLOUD_INFRASTRUCTURE_DISCOVERY value - * @property {number} OBTAIN_CAPABILITIES=43 OBTAIN_CAPABILITIES value - * @property {number} ACTIVE_SCANNING=1 ACTIVE_SCANNING value - * @property {number} SCANNING_IP_BLOCKS=2 SCANNING_IP_BLOCKS value - * @property {number} CONTAINER_AND_RESOURCE_DISCOVERY=57 CONTAINER_AND_RESOURCE_DISCOVERY value + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @function listEffectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listEffectiveSecurityHealthAnalyticsCustomModules = function listEffectiveSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listEffectiveSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListEffectiveSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @function listEffectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} [response] ListSecurityHealthAnalyticsCustomModulesResponse + */ + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @function listSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listSecurityHealthAnalyticsCustomModules = function listSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @function listSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSources}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListSourcesResponse} [response] ListSourcesResponse + */ + + /** + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { + return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1.ListSourcesRequest, $root.google.cloud.securitycenter.v1.ListSourcesResponse, request, callback); + }, "name", { value: "ListSources" }); + + /** + * Calls ListSources. + * @function listSources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|runAssetDiscovery}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef RunAssetDiscoveryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { + return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunAssetDiscovery" }); + + /** + * Calls RunAssetDiscovery. + * @function runAssetDiscovery + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setFindingState}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SetFindingStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + */ + + /** + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { + return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "SetFindingState" }); + + /** + * Calls SetFindingState. + * @function setFindingState + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setMute}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SetMuteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + */ + + /** + * Calls SetMute. + * @function setMute + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISetMuteRequest} request SetMuteRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SetMuteCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.setMute = function setMute(request, callback) { + return this.rpcCall(setMute, $root.google.cloud.securitycenter.v1.SetMuteRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "SetMute" }); + + /** + * Calls SetMute. + * @function setMute + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISetMuteRequest} request SetMuteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setIamPolicy}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|testIamPermissions}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|simulateSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef SimulateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} [response] SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @function simulateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.simulateSecurityHealthAnalyticsCustomModule = function simulateSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(simulateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, request, callback); + }, "name", { value: "SimulateSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @function simulateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateExternalSystem}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateExternalSystemCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ExternalSystem} [response] ExternalSystem + */ + + /** + * Calls UpdateExternalSystem. + * @function updateExternalSystem + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} request UpdateExternalSystemRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystemCallback} callback Node-style callback called with the error, if any, and ExternalSystem + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateExternalSystem = function updateExternalSystem(request, callback) { + return this.rpcCall(updateExternalSystem, $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest, $root.google.cloud.securitycenter.v1.ExternalSystem, request, callback); + }, "name", { value: "UpdateExternalSystem" }); + + /** + * Calls UpdateExternalSystem. + * @function updateExternalSystem + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} request UpdateExternalSystemRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateFinding}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateFindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + */ + + /** + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { + return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); + }, "name", { value: "UpdateFinding" }); + + /** + * Calls UpdateFinding. + * @function updateFinding + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateMuteConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateMuteConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + */ + + /** + * Calls UpdateMuteConfig. + * @function updateMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} request UpdateMuteConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateMuteConfig = function updateMuteConfig(request, callback) { + return this.rpcCall(updateMuteConfig, $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); + }, "name", { value: "UpdateMuteConfig" }); + + /** + * Calls UpdateMuteConfig. + * @function updateMuteConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} request UpdateMuteConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - MitreAttack.Technique = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TECHNIQUE_UNSPECIFIED"] = 0; - values[valuesById[49] = "MASQUERADING"] = 49; - values[valuesById[50] = "MATCH_LEGITIMATE_NAME_OR_LOCATION"] = 50; - values[valuesById[37] = "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS"] = 37; - values[valuesById[38] = "STARTUP_ITEMS"] = 38; - values[valuesById[32] = "NETWORK_SERVICE_DISCOVERY"] = 32; - values[valuesById[56] = "PROCESS_DISCOVERY"] = 56; - values[valuesById[6] = "COMMAND_AND_SCRIPTING_INTERPRETER"] = 6; - values[valuesById[7] = "UNIX_SHELL"] = 7; - values[valuesById[18] = "PERMISSION_GROUPS_DISCOVERY"] = 18; - values[valuesById[19] = "CLOUD_GROUPS"] = 19; - values[valuesById[45] = "APPLICATION_LAYER_PROTOCOL"] = 45; - values[valuesById[46] = "DNS"] = 46; - values[valuesById[47] = "SOFTWARE_DEPLOYMENT_TOOLS"] = 47; - values[valuesById[14] = "VALID_ACCOUNTS"] = 14; - values[valuesById[35] = "DEFAULT_ACCOUNTS"] = 35; - values[valuesById[15] = "LOCAL_ACCOUNTS"] = 15; - values[valuesById[16] = "CLOUD_ACCOUNTS"] = 16; - values[valuesById[9] = "PROXY"] = 9; - values[valuesById[10] = "EXTERNAL_PROXY"] = 10; - values[valuesById[11] = "MULTI_HOP_PROXY"] = 11; - values[valuesById[22] = "ACCOUNT_MANIPULATION"] = 22; - values[valuesById[40] = "ADDITIONAL_CLOUD_CREDENTIALS"] = 40; - values[valuesById[23] = "SSH_AUTHORIZED_KEYS"] = 23; - values[valuesById[58] = "ADDITIONAL_CONTAINER_CLUSTER_ROLES"] = 58; - values[valuesById[3] = "INGRESS_TOOL_TRANSFER"] = 3; - values[valuesById[4] = "NATIVE_API"] = 4; - values[valuesById[44] = "BRUTE_FORCE"] = 44; - values[valuesById[5] = "SHARED_MODULES"] = 5; - values[valuesById[33] = "ACCESS_TOKEN_MANIPULATION"] = 33; - values[valuesById[39] = "TOKEN_IMPERSONATION_OR_THEFT"] = 39; - values[valuesById[27] = "EXPLOIT_PUBLIC_FACING_APPLICATION"] = 27; - values[valuesById[30] = "DOMAIN_POLICY_MODIFICATION"] = 30; - values[valuesById[29] = "DATA_DESTRUCTION"] = 29; - values[valuesById[52] = "SERVICE_STOP"] = 52; - values[valuesById[36] = "INHIBIT_SYSTEM_RECOVERY"] = 36; - values[valuesById[8] = "RESOURCE_HIJACKING"] = 8; - values[valuesById[17] = "NETWORK_DENIAL_OF_SERVICE"] = 17; - values[valuesById[48] = "CLOUD_SERVICE_DISCOVERY"] = 48; - values[valuesById[42] = "STEAL_APPLICATION_ACCESS_TOKEN"] = 42; - values[valuesById[51] = "ACCOUNT_ACCESS_REMOVAL"] = 51; - values[valuesById[25] = "STEAL_WEB_SESSION_COOKIE"] = 25; - values[valuesById[24] = "CREATE_OR_MODIFY_SYSTEM_PROCESS"] = 24; - values[valuesById[34] = "ABUSE_ELEVATION_CONTROL_MECHANISM"] = 34; - values[valuesById[13] = "UNSECURED_CREDENTIALS"] = 13; - values[valuesById[28] = "MODIFY_AUTHENTICATION_PROCESS"] = 28; - values[valuesById[31] = "IMPAIR_DEFENSES"] = 31; - values[valuesById[55] = "DISABLE_OR_MODIFY_TOOLS"] = 55; - values[valuesById[20] = "EXFILTRATION_OVER_WEB_SERVICE"] = 20; - values[valuesById[21] = "EXFILTRATION_TO_CLOUD_STORAGE"] = 21; - values[valuesById[12] = "DYNAMIC_RESOLUTION"] = 12; - values[valuesById[41] = "LATERAL_TOOL_TRANSFER"] = 41; - values[valuesById[26] = "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE"] = 26; - values[valuesById[54] = "CREATE_SNAPSHOT"] = 54; - values[valuesById[53] = "CLOUD_INFRASTRUCTURE_DISCOVERY"] = 53; - values[valuesById[43] = "OBTAIN_CAPABILITIES"] = 43; - values[valuesById[1] = "ACTIVE_SCANNING"] = 1; - values[valuesById[2] = "SCANNING_IP_BLOCKS"] = 2; - values[valuesById[57] = "CONTAINER_AND_RESOURCE_DISCOVERY"] = 57; - return values; - })(); - return MitreAttack; - })(); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateNotificationConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateNotificationConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + */ - v1.Notebook = (function() { + /** + * Calls UpdateNotificationConfig. + * @function updateNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} request UpdateNotificationConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.updateNotificationConfig = function updateNotificationConfig(request, callback) { + return this.rpcCall(updateNotificationConfig, $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); + }, "name", { value: "UpdateNotificationConfig" }); /** - * Properties of a Notebook. - * @memberof google.cloud.securitycenter.v1 - * @interface INotebook - * @property {string|null} [name] Notebook name - * @property {string|null} [service] Notebook service - * @property {string|null} [lastAuthor] Notebook lastAuthor - * @property {google.protobuf.ITimestamp|null} [notebookUpdateTime] Notebook notebookUpdateTime + * Calls UpdateNotificationConfig. + * @function updateNotificationConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} request UpdateNotificationConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new Notebook. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Notebook. - * @implements INotebook - * @constructor - * @param {google.cloud.securitycenter.v1.INotebook=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateOrganizationSettings}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateOrganizationSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings */ - function Notebook(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]]; - } /** - * Notebook name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Notebook + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings + * @returns {undefined} + * @variation 1 */ - Notebook.prototype.name = ""; + Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { + return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); + }, "name", { value: "UpdateOrganizationSettings" }); /** - * Notebook service. - * @member {string} service - * @memberof google.cloud.securitycenter.v1.Notebook + * Calls UpdateOrganizationSettings. + * @function updateOrganizationSettings + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.prototype.service = ""; /** - * Notebook lastAuthor. - * @member {string} lastAuthor - * @memberof google.cloud.securitycenter.v1.Notebook + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @function updateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 */ - Notebook.prototype.lastAuthor = ""; + Object.defineProperty(SecurityCenter.prototype.updateSecurityHealthAnalyticsCustomModule = function updateSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(updateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "UpdateSecurityHealthAnalyticsCustomModule" }); /** - * Notebook notebookUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} notebookUpdateTime - * @memberof google.cloud.securitycenter.v1.Notebook + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @function updateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.prototype.notebookUpdateTime = null; /** - * Creates a new Notebook instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {google.cloud.securitycenter.v1.INotebook=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Notebook} Notebook instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSource}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.Source} [response] Source */ - Notebook.create = function create(properties) { - return new Notebook(properties); - }; /** - * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {google.cloud.securitycenter.v1.INotebook} message Notebook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source + * @returns {undefined} + * @variation 1 */ - Notebook.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.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.lastAuthor != null && Object.hasOwnProperty.call(message, "lastAuthor")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.lastAuthor); - if (message.notebookUpdateTime != null && Object.hasOwnProperty.call(message, "notebookUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.notebookUpdateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { + return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); + }, "name", { value: "UpdateSource" }); /** - * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Notebook.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {google.cloud.securitycenter.v1.INotebook} message Notebook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateSource. + * @function updateSource + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a Notebook message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Notebook} Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityMarks}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateSecurityMarksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.SecurityMarks} [response] SecurityMarks */ - Notebook.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.cloud.securitycenter.v1.Notebook(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.lastAuthor = reader.string(); - break; - } - case 4: { - message.notebookUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a Notebook message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Notebook} Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks + * @returns {undefined} + * @variation 1 */ - Notebook.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { + return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1.SecurityMarks, request, callback); + }, "name", { value: "UpdateSecurityMarks" }); /** - * Verifies a Notebook message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateSecurityMarks. + * @function updateSecurityMarks + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.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.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) - if (!$util.isString(message.lastAuthor)) - return "lastAuthor: string expected"; - if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.notebookUpdateTime); - if (error) - return "notebookUpdateTime." + error; - } - return null; - }; /** - * Creates a Notebook message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Notebook} Notebook + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createBigQueryExport}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateBigQueryExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport */ - Notebook.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Notebook) - return object; - var message = new $root.google.cloud.securitycenter.v1.Notebook(); - if (object.name != null) - message.name = String(object.name); - if (object.service != null) - message.service = String(object.service); - if (object.lastAuthor != null) - message.lastAuthor = String(object.lastAuthor); - if (object.notebookUpdateTime != null) { - if (typeof object.notebookUpdateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Notebook.notebookUpdateTime: object expected"); - message.notebookUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.notebookUpdateTime); - } - return message; - }; /** - * Creates a plain object from a Notebook message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {google.cloud.securitycenter.v1.Notebook} message Notebook - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls CreateBigQueryExport. + * @function createBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} request CreateBigQueryExportRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport + * @returns {undefined} + * @variation 1 */ - Notebook.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.service = ""; - object.lastAuthor = ""; - object.notebookUpdateTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.lastAuthor != null && message.hasOwnProperty("lastAuthor")) - object.lastAuthor = message.lastAuthor; - if (message.notebookUpdateTime != null && message.hasOwnProperty("notebookUpdateTime")) - object.notebookUpdateTime = $root.google.protobuf.Timestamp.toObject(message.notebookUpdateTime, options); - return object; - }; + Object.defineProperty(SecurityCenter.prototype.createBigQueryExport = function createBigQueryExport(request, callback) { + return this.rpcCall(createBigQueryExport, $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); + }, "name", { value: "CreateBigQueryExport" }); /** - * Converts this Notebook to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Notebook + * Calls CreateBigQueryExport. + * @function createBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} request CreateBigQueryExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for Notebook - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Notebook - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteBigQueryExport}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteBigQueryExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteBigQueryExport. + * @function deleteBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} request DeleteBigQueryExportRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExportCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.deleteBigQueryExport = function deleteBigQueryExport(request, callback) { + return this.rpcCall(deleteBigQueryExport, $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteBigQueryExport" }); + + /** + * Calls DeleteBigQueryExport. + * @function deleteBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} request DeleteBigQueryExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Notebook"; - }; - - return Notebook; - })(); - - v1.OrgPolicy = (function() { /** - * Properties of an OrgPolicy. - * @memberof google.cloud.securitycenter.v1 - * @interface IOrgPolicy - * @property {string|null} [name] OrgPolicy name + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateBigQueryExport}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateBigQueryExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport */ /** - * Constructs a new OrgPolicy. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an OrgPolicy. - * @implements IOrgPolicy - * @constructor - * @param {google.cloud.securitycenter.v1.IOrgPolicy=} [properties] Properties to set + * Calls UpdateBigQueryExport. + * @function updateBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} request UpdateBigQueryExportRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport + * @returns {undefined} + * @variation 1 */ - function OrgPolicy(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]]; - } + Object.defineProperty(SecurityCenter.prototype.updateBigQueryExport = function updateBigQueryExport(request, callback) { + return this.rpcCall(updateBigQueryExport, $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); + }, "name", { value: "UpdateBigQueryExport" }); /** - * OrgPolicy name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.OrgPolicy + * Calls UpdateBigQueryExport. + * @function updateBigQueryExport + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} request UpdateBigQueryExportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OrgPolicy.prototype.name = ""; /** - * Creates a new OrgPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {google.cloud.securitycenter.v1.IOrgPolicy=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listBigQueryExports}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListBigQueryExportsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} [response] ListBigQueryExportsResponse */ - OrgPolicy.create = function create(properties) { - return new OrgPolicy(properties); - }; /** - * Encodes the specified OrgPolicy message. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {google.cloud.securitycenter.v1.IOrgPolicy} message OrgPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListBigQueryExports. + * @function listBigQueryExports + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} request ListBigQueryExportsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExportsCallback} callback Node-style callback called with the error, if any, and ListBigQueryExportsResponse + * @returns {undefined} + * @variation 1 */ - OrgPolicy.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); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.listBigQueryExports = function listBigQueryExports(request, callback) { + return this.rpcCall(listBigQueryExports, $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest, $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse, request, callback); + }, "name", { value: "ListBigQueryExports" }); /** - * Encodes the specified OrgPolicy message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrgPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {google.cloud.securitycenter.v1.IOrgPolicy} message OrgPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListBigQueryExports. + * @function listBigQueryExports + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} request ListBigQueryExportsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OrgPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an OrgPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef CreateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule */ - OrgPolicy.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.cloud.securitycenter.v1.OrgPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an OrgPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateEventThreatDetectionCustomModule. + * @function createEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 */ - OrgPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.createEventThreatDetectionCustomModule = function createEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(createEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "CreateEventThreatDetectionCustomModule" }); /** - * Verifies an OrgPolicy message. - * @function verify - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateEventThreatDetectionCustomModule. + * @function createEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OrgPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; /** - * Creates an OrgPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.OrgPolicy} OrgPolicy + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - OrgPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.OrgPolicy) - return object; - var message = new $root.google.cloud.securitycenter.v1.OrgPolicy(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from an OrgPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {google.cloud.securitycenter.v1.OrgPolicy} message OrgPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteEventThreatDetectionCustomModule. + * @function deleteEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - OrgPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Object.defineProperty(SecurityCenter.prototype.deleteEventThreatDetectionCustomModule = function deleteEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(deleteEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEventThreatDetectionCustomModule" }); /** - * Converts this OrgPolicy to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.OrgPolicy + * Calls DeleteEventThreatDetectionCustomModule. + * @function deleteEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OrgPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for OrgPolicy - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.OrgPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule */ - OrgPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrgPolicy"; - }; - return OrgPolicy; - })(); - - v1.Process = (function() { + /** + * Calls GetEventThreatDetectionCustomModule. + * @function getEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.getEventThreatDetectionCustomModule = function getEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(getEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "GetEventThreatDetectionCustomModule" }); /** - * Properties of a Process. - * @memberof google.cloud.securitycenter.v1 - * @interface IProcess - * @property {string|null} [name] Process name - * @property {google.cloud.securitycenter.v1.IFile|null} [binary] Process binary - * @property {Array.|null} [libraries] Process libraries - * @property {google.cloud.securitycenter.v1.IFile|null} [script] Process script - * @property {Array.|null} [args] Process args - * @property {boolean|null} [argumentsTruncated] Process argumentsTruncated - * @property {Array.|null} [envVariables] Process envVariables - * @property {boolean|null} [envVariablesTruncated] Process envVariablesTruncated - * @property {number|Long|null} [pid] Process pid - * @property {number|Long|null} [parentPid] Process parentPid + * Calls GetEventThreatDetectionCustomModule. + * @function getEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new Process. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Process. - * @implements IProcess - * @constructor - * @param {google.cloud.securitycenter.v1.IProcess=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListDescendantEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} [response] ListDescendantEventThreatDetectionCustomModulesResponse */ - function Process(properties) { - this.libraries = []; - this.args = []; - this.envVariables = []; - 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]]; - } /** - * Process name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Process + * Calls ListDescendantEventThreatDetectionCustomModules. + * @function listDescendantEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 */ - Process.prototype.name = ""; + Object.defineProperty(SecurityCenter.prototype.listDescendantEventThreatDetectionCustomModules = function listDescendantEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listDescendantEventThreatDetectionCustomModules, $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListDescendantEventThreatDetectionCustomModules" }); /** - * Process binary. - * @member {google.cloud.securitycenter.v1.IFile|null|undefined} binary - * @memberof google.cloud.securitycenter.v1.Process + * Calls ListDescendantEventThreatDetectionCustomModules. + * @function listDescendantEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.prototype.binary = null; /** - * Process libraries. - * @member {Array.} libraries - * @memberof google.cloud.securitycenter.v1.Process - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} [response] ListEventThreatDetectionCustomModulesResponse */ - Process.prototype.libraries = $util.emptyArray; /** - * Process script. - * @member {google.cloud.securitycenter.v1.IFile|null|undefined} script - * @memberof google.cloud.securitycenter.v1.Process + * Calls ListEventThreatDetectionCustomModules. + * @function listEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 */ - Process.prototype.script = null; + Object.defineProperty(SecurityCenter.prototype.listEventThreatDetectionCustomModules = function listEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listEventThreatDetectionCustomModules, $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListEventThreatDetectionCustomModules" }); /** - * Process args. - * @member {Array.} args - * @memberof google.cloud.securitycenter.v1.Process + * Calls ListEventThreatDetectionCustomModules. + * @function listEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.prototype.args = $util.emptyArray; /** - * Process argumentsTruncated. - * @member {boolean} argumentsTruncated - * @memberof google.cloud.securitycenter.v1.Process - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule */ - Process.prototype.argumentsTruncated = false; /** - * Process envVariables. - * @member {Array.} envVariables - * @memberof google.cloud.securitycenter.v1.Process + * Calls UpdateEventThreatDetectionCustomModule. + * @function updateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 */ - Process.prototype.envVariables = $util.emptyArray; + Object.defineProperty(SecurityCenter.prototype.updateEventThreatDetectionCustomModule = function updateEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(updateEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "UpdateEventThreatDetectionCustomModule" }); /** - * Process envVariablesTruncated. - * @member {boolean} envVariablesTruncated - * @memberof google.cloud.securitycenter.v1.Process + * Calls UpdateEventThreatDetectionCustomModule. + * @function updateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.prototype.envVariablesTruncated = false; /** - * Process pid. - * @member {number|Long} pid - * @memberof google.cloud.securitycenter.v1.Process - * @instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|validateEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ValidateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} [response] ValidateEventThreatDetectionCustomModuleResponse */ - Process.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Process parentPid. - * @member {number|Long} parentPid - * @memberof google.cloud.securitycenter.v1.Process + * Calls ValidateEventThreatDetectionCustomModule. + * @function validateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse + * @returns {undefined} + * @variation 1 */ - Process.prototype.parentPid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(SecurityCenter.prototype.validateEventThreatDetectionCustomModule = function validateEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(validateEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse, request, callback); + }, "name", { value: "ValidateEventThreatDetectionCustomModule" }); /** - * Creates a new Process instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {google.cloud.securitycenter.v1.IProcess=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Process} Process instance + * Calls ValidateEventThreatDetectionCustomModule. + * @function validateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.create = function create(properties) { - return new Process(properties); - }; /** - * Encodes the specified Process message. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {google.cloud.securitycenter.v1.IProcess} message Process message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetEffectiveEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule} [response] EffectiveEventThreatDetectionCustomModule */ - Process.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binary != null && Object.hasOwnProperty.call(message, "binary")) - $root.google.cloud.securitycenter.v1.File.encode(message.binary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.libraries != null && message.libraries.length) - for (var i = 0; i < message.libraries.length; ++i) - $root.google.cloud.securitycenter.v1.File.encode(message.libraries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.script != null && Object.hasOwnProperty.call(message, "script")) - $root.google.cloud.securitycenter.v1.File.encode(message.script, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.args[i]); - if (message.argumentsTruncated != null && Object.hasOwnProperty.call(message, "argumentsTruncated")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.argumentsTruncated); - if (message.envVariables != null && message.envVariables.length) - for (var i = 0; i < message.envVariables.length; ++i) - $root.google.cloud.securitycenter.v1.EnvironmentVariable.encode(message.envVariables[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.envVariablesTruncated != null && Object.hasOwnProperty.call(message, "envVariablesTruncated")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.envVariablesTruncated); - if (message.pid != null && Object.hasOwnProperty.call(message, "pid")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.pid); - if (message.parentPid != null && Object.hasOwnProperty.call(message, "parentPid")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.parentPid); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); - return writer; - }; /** - * Encodes the specified Process message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Process.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {google.cloud.securitycenter.v1.IProcess} message Process message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @function getEffectiveEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 */ - Process.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(SecurityCenter.prototype.getEffectiveEventThreatDetectionCustomModule = function getEffectiveEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(getEffectiveEventThreatDetectionCustomModule, $root.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule, request, callback); + }, "name", { value: "GetEffectiveEventThreatDetectionCustomModule" }); /** - * Decodes a Process message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Process} Process - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @function getEffectiveEventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.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.cloud.securitycenter.v1.Process(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 12: { - message.name = reader.string(); - break; - } - case 3: { - message.binary = $root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.libraries && message.libraries.length)) - message.libraries = []; - message.libraries.push($root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32())); - break; - } - case 5: { - message.script = $root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - } - case 7: { - message.argumentsTruncated = reader.bool(); - break; - } - case 8: { - if (!(message.envVariables && message.envVariables.length)) - message.envVariables = []; - message.envVariables.push($root.google.cloud.securitycenter.v1.EnvironmentVariable.decode(reader, reader.uint32())); - break; - } - case 9: { - message.envVariablesTruncated = reader.bool(); - break; - } - case 10: { - message.pid = reader.int64(); - break; - } - case 11: { - message.parentPid = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a Process message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Process} Process - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListEffectiveEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} [response] ListEffectiveEventThreatDetectionCustomModulesResponse */ - Process.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a Process message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @function listEffectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 */ - Process.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.binary != null && message.hasOwnProperty("binary")) { - var error = $root.google.cloud.securitycenter.v1.File.verify(message.binary); - if (error) - return "binary." + error; - } - if (message.libraries != null && message.hasOwnProperty("libraries")) { - if (!Array.isArray(message.libraries)) - return "libraries: array expected"; - for (var i = 0; i < message.libraries.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.File.verify(message.libraries[i]); - if (error) - return "libraries." + error; - } - } - if (message.script != null && message.hasOwnProperty("script")) { - var error = $root.google.cloud.securitycenter.v1.File.verify(message.script); - if (error) - return "script." + error; - } - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; - } - if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) - if (typeof message.argumentsTruncated !== "boolean") - return "argumentsTruncated: boolean expected"; - if (message.envVariables != null && message.hasOwnProperty("envVariables")) { - if (!Array.isArray(message.envVariables)) - return "envVariables: array expected"; - for (var i = 0; i < message.envVariables.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.EnvironmentVariable.verify(message.envVariables[i]); - if (error) - return "envVariables." + error; - } - } - if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) - if (typeof message.envVariablesTruncated !== "boolean") - return "envVariablesTruncated: boolean expected"; - if (message.pid != null && message.hasOwnProperty("pid")) - if (!$util.isInteger(message.pid) && !(message.pid && $util.isInteger(message.pid.low) && $util.isInteger(message.pid.high))) - return "pid: integer|Long expected"; - if (message.parentPid != null && message.hasOwnProperty("parentPid")) - if (!$util.isInteger(message.parentPid) && !(message.parentPid && $util.isInteger(message.parentPid.low) && $util.isInteger(message.parentPid.high))) - return "parentPid: integer|Long expected"; - return null; - }; + Object.defineProperty(SecurityCenter.prototype.listEffectiveEventThreatDetectionCustomModules = function listEffectiveEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listEffectiveEventThreatDetectionCustomModules, $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListEffectiveEventThreatDetectionCustomModules" }); /** - * Creates a Process message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Process} Process + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @function listEffectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Process) - return object; - var message = new $root.google.cloud.securitycenter.v1.Process(); - if (object.name != null) - message.name = String(object.name); - if (object.binary != null) { - if (typeof object.binary !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Process.binary: object expected"); - message.binary = $root.google.cloud.securitycenter.v1.File.fromObject(object.binary); - } - if (object.libraries) { - if (!Array.isArray(object.libraries)) - throw TypeError(".google.cloud.securitycenter.v1.Process.libraries: array expected"); - message.libraries = []; - for (var i = 0; i < object.libraries.length; ++i) { - if (typeof object.libraries[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Process.libraries: object expected"); - message.libraries[i] = $root.google.cloud.securitycenter.v1.File.fromObject(object.libraries[i]); - } - } - if (object.script != null) { - if (typeof object.script !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Process.script: object expected"); - message.script = $root.google.cloud.securitycenter.v1.File.fromObject(object.script); - } - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".google.cloud.securitycenter.v1.Process.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); - } - if (object.argumentsTruncated != null) - message.argumentsTruncated = Boolean(object.argumentsTruncated); - if (object.envVariables) { - if (!Array.isArray(object.envVariables)) - throw TypeError(".google.cloud.securitycenter.v1.Process.envVariables: array expected"); - message.envVariables = []; - for (var i = 0; i < object.envVariables.length; ++i) { - if (typeof object.envVariables[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Process.envVariables: object expected"); - message.envVariables[i] = $root.google.cloud.securitycenter.v1.EnvironmentVariable.fromObject(object.envVariables[i]); - } - } - if (object.envVariablesTruncated != null) - message.envVariablesTruncated = Boolean(object.envVariablesTruncated); - if (object.pid != null) - if ($util.Long) - (message.pid = $util.Long.fromValue(object.pid)).unsigned = false; - else if (typeof object.pid === "string") - message.pid = parseInt(object.pid, 10); - else if (typeof object.pid === "number") - message.pid = object.pid; - else if (typeof object.pid === "object") - message.pid = new $util.LongBits(object.pid.low >>> 0, object.pid.high >>> 0).toNumber(); - if (object.parentPid != null) - if ($util.Long) - (message.parentPid = $util.Long.fromValue(object.parentPid)).unsigned = false; - else if (typeof object.parentPid === "string") - message.parentPid = parseInt(object.parentPid, 10); - else if (typeof object.parentPid === "number") - message.parentPid = object.parentPid; - else if (typeof object.parentPid === "object") - message.parentPid = new $util.LongBits(object.parentPid.low >>> 0, object.parentPid.high >>> 0).toNumber(); - return message; - }; /** - * Creates a plain object from a Process message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {google.cloud.securitycenter.v1.Process} message Process - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|batchCreateResourceValueConfigs}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef BatchCreateResourceValueConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} [response] BatchCreateResourceValueConfigsResponse */ - Process.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.libraries = []; - object.args = []; - object.envVariables = []; - } - if (options.defaults) { - object.binary = null; - object.script = null; - object.argumentsTruncated = false; - object.envVariablesTruncated = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.pid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pid = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.parentPid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.parentPid = options.longs === String ? "0" : 0; - object.name = ""; - } - if (message.binary != null && message.hasOwnProperty("binary")) - object.binary = $root.google.cloud.securitycenter.v1.File.toObject(message.binary, options); - if (message.libraries && message.libraries.length) { - object.libraries = []; - for (var j = 0; j < message.libraries.length; ++j) - object.libraries[j] = $root.google.cloud.securitycenter.v1.File.toObject(message.libraries[j], options); - } - if (message.script != null && message.hasOwnProperty("script")) - object.script = $root.google.cloud.securitycenter.v1.File.toObject(message.script, options); - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; - } - if (message.argumentsTruncated != null && message.hasOwnProperty("argumentsTruncated")) - object.argumentsTruncated = message.argumentsTruncated; - if (message.envVariables && message.envVariables.length) { - object.envVariables = []; - for (var j = 0; j < message.envVariables.length; ++j) - object.envVariables[j] = $root.google.cloud.securitycenter.v1.EnvironmentVariable.toObject(message.envVariables[j], options); - } - if (message.envVariablesTruncated != null && message.hasOwnProperty("envVariablesTruncated")) - object.envVariablesTruncated = message.envVariablesTruncated; - if (message.pid != null && message.hasOwnProperty("pid")) - if (typeof message.pid === "number") - object.pid = options.longs === String ? String(message.pid) : message.pid; - else - object.pid = options.longs === String ? $util.Long.prototype.toString.call(message.pid) : options.longs === Number ? new $util.LongBits(message.pid.low >>> 0, message.pid.high >>> 0).toNumber() : message.pid; - if (message.parentPid != null && message.hasOwnProperty("parentPid")) - if (typeof message.parentPid === "number") - object.parentPid = options.longs === String ? String(message.parentPid) : message.parentPid; - else - object.parentPid = options.longs === String ? $util.Long.prototype.toString.call(message.parentPid) : options.longs === Number ? new $util.LongBits(message.parentPid.low >>> 0, message.parentPid.high >>> 0).toNumber() : message.parentPid; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; /** - * Converts this Process to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.Process + * Calls BatchCreateResourceValueConfigs. + * @function batchCreateResourceValueConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest} request BatchCreateResourceValueConfigsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigsCallback} callback Node-style callback called with the error, if any, and BatchCreateResourceValueConfigsResponse + * @returns {undefined} + * @variation 1 */ - Process.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(SecurityCenter.prototype.batchCreateResourceValueConfigs = function batchCreateResourceValueConfigs(request, callback) { + return this.rpcCall(batchCreateResourceValueConfigs, $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest, $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse, request, callback); + }, "name", { value: "BatchCreateResourceValueConfigs" }); /** - * Gets the default type url for Process - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Process - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls BatchCreateResourceValueConfigs. + * @function batchCreateResourceValueConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest} request BatchCreateResourceValueConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Process.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Process"; - }; - return Process; - })(); + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteResourceValueConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef DeleteResourceValueConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - v1.EnvironmentVariable = (function() { + /** + * Calls DeleteResourceValueConfig. + * @function deleteResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest} request DeleteResourceValueConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.deleteResourceValueConfig = function deleteResourceValueConfig(request, callback) { + return this.rpcCall(deleteResourceValueConfig, $root.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteResourceValueConfig" }); /** - * Properties of an EnvironmentVariable. - * @memberof google.cloud.securitycenter.v1 - * @interface IEnvironmentVariable - * @property {string|null} [name] EnvironmentVariable name - * @property {string|null} [val] EnvironmentVariable val + * Calls DeleteResourceValueConfig. + * @function deleteResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest} request DeleteResourceValueConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new EnvironmentVariable. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an EnvironmentVariable. - * @implements IEnvironmentVariable - * @constructor - * @param {google.cloud.securitycenter.v1.IEnvironmentVariable=} [properties] Properties to set + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getResourceValueConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef GetResourceValueConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ResourceValueConfig} [response] ResourceValueConfig */ - function EnvironmentVariable(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]]; - } /** - * EnvironmentVariable name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * Calls GetResourceValueConfig. + * @function getResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest} request GetResourceValueConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfigCallback} callback Node-style callback called with the error, if any, and ResourceValueConfig + * @returns {undefined} + * @variation 1 */ - EnvironmentVariable.prototype.name = ""; + Object.defineProperty(SecurityCenter.prototype.getResourceValueConfig = function getResourceValueConfig(request, callback) { + return this.rpcCall(getResourceValueConfig, $root.google.cloud.securitycenter.v1.GetResourceValueConfigRequest, $root.google.cloud.securitycenter.v1.ResourceValueConfig, request, callback); + }, "name", { value: "GetResourceValueConfig" }); /** - * EnvironmentVariable val. - * @member {string} val - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * Calls GetResourceValueConfig. + * @function getResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest} request GetResourceValueConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EnvironmentVariable.prototype.val = ""; /** - * Creates a new EnvironmentVariable instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {google.cloud.securitycenter.v1.IEnvironmentVariable=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable instance + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listResourceValueConfigs}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListResourceValueConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} [response] ListResourceValueConfigsResponse */ - EnvironmentVariable.create = function create(properties) { - return new EnvironmentVariable(properties); - }; /** - * Encodes the specified EnvironmentVariable message. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {google.cloud.securitycenter.v1.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListResourceValueConfigs. + * @function listResourceValueConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest} request ListResourceValueConfigsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigsCallback} callback Node-style callback called with the error, if any, and ListResourceValueConfigsResponse + * @returns {undefined} + * @variation 1 */ - EnvironmentVariable.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.val != null && Object.hasOwnProperty.call(message, "val")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.val); - return writer; - }; + Object.defineProperty(SecurityCenter.prototype.listResourceValueConfigs = function listResourceValueConfigs(request, callback) { + return this.rpcCall(listResourceValueConfigs, $root.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest, $root.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse, request, callback); + }, "name", { value: "ListResourceValueConfigs" }); /** - * Encodes the specified EnvironmentVariable message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.EnvironmentVariable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {google.cloud.securitycenter.v1.IEnvironmentVariable} message EnvironmentVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListResourceValueConfigs. + * @function listResourceValueConfigs + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest} request ListResourceValueConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EnvironmentVariable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateResourceValueConfig}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef UpdateResourceValueConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ResourceValueConfig} [response] ResourceValueConfig */ - EnvironmentVariable.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.cloud.securitycenter.v1.EnvironmentVariable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.val = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an EnvironmentVariable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateResourceValueConfig. + * @function updateResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest} request UpdateResourceValueConfigRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfigCallback} callback Node-style callback called with the error, if any, and ResourceValueConfig + * @returns {undefined} + * @variation 1 */ - EnvironmentVariable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(SecurityCenter.prototype.updateResourceValueConfig = function updateResourceValueConfig(request, callback) { + return this.rpcCall(updateResourceValueConfig, $root.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest, $root.google.cloud.securitycenter.v1.ResourceValueConfig, request, callback); + }, "name", { value: "UpdateResourceValueConfig" }); /** - * Verifies an EnvironmentVariable message. - * @function verify - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateResourceValueConfig. + * @function updateResourceValueConfig + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest} request UpdateResourceValueConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EnvironmentVariable.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.val != null && message.hasOwnProperty("val")) - if (!$util.isString(message.val)) - return "val: string expected"; - return null; - }; /** - * Creates an EnvironmentVariable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.EnvironmentVariable} EnvironmentVariable + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listValuedResources}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListValuedResourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListValuedResourcesResponse} [response] ListValuedResourcesResponse */ - EnvironmentVariable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.EnvironmentVariable) - return object; - var message = new $root.google.cloud.securitycenter.v1.EnvironmentVariable(); - if (object.name != null) - message.name = String(object.name); - if (object.val != null) - message.val = String(object.val); - return message; - }; /** - * Creates a plain object from an EnvironmentVariable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {google.cloud.securitycenter.v1.EnvironmentVariable} message EnvironmentVariable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListValuedResources. + * @function listValuedResources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest} request ListValuedResourcesRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListValuedResourcesCallback} callback Node-style callback called with the error, if any, and ListValuedResourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenter.prototype.listValuedResources = function listValuedResources(request, callback) { + return this.rpcCall(listValuedResources, $root.google.cloud.securitycenter.v1.ListValuedResourcesRequest, $root.google.cloud.securitycenter.v1.ListValuedResourcesResponse, request, callback); + }, "name", { value: "ListValuedResources" }); + + /** + * Calls ListValuedResources. + * @function listValuedResources + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest} request ListValuedResourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAttackPaths}. + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @typedef ListAttackPathsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycenter.v1.ListAttackPathsResponse} [response] ListAttackPathsResponse */ - EnvironmentVariable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.val = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.val != null && message.hasOwnProperty("val")) - object.val = message.val; - return object; - }; /** - * Converts this EnvironmentVariable to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable + * Calls ListAttackPaths. + * @function listAttackPaths + * @memberof google.cloud.securitycenter.v1.SecurityCenter * @instance - * @returns {Object.} JSON object + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest} request ListAttackPathsRequest message or plain object + * @param {google.cloud.securitycenter.v1.SecurityCenter.ListAttackPathsCallback} callback Node-style callback called with the error, if any, and ListAttackPathsResponse + * @returns {undefined} + * @variation 1 */ - EnvironmentVariable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(SecurityCenter.prototype.listAttackPaths = function listAttackPaths(request, callback) { + return this.rpcCall(listAttackPaths, $root.google.cloud.securitycenter.v1.ListAttackPathsRequest, $root.google.cloud.securitycenter.v1.ListAttackPathsResponse, request, callback); + }, "name", { value: "ListAttackPaths" }); /** - * Gets the default type url for EnvironmentVariable - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.EnvironmentVariable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListAttackPaths. + * @function listAttackPaths + * @memberof google.cloud.securitycenter.v1.SecurityCenter + * @instance + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest} request ListAttackPathsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - EnvironmentVariable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.EnvironmentVariable"; - }; - return EnvironmentVariable; + return SecurityCenter; })(); - v1.SecurityPosture = (function() { + v1.BulkMuteFindingsRequest = (function() { /** - * Properties of a SecurityPosture. + * Properties of a BulkMuteFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISecurityPosture - * @property {string|null} [name] SecurityPosture name - * @property {string|null} [revisionId] SecurityPosture revisionId - * @property {string|null} [postureDeploymentResource] SecurityPosture postureDeploymentResource - * @property {string|null} [postureDeployment] SecurityPosture postureDeployment - * @property {string|null} [changedPolicy] SecurityPosture changedPolicy - * @property {string|null} [policySet] SecurityPosture policySet - * @property {string|null} [policy] SecurityPosture policy - * @property {Array.|null} [policyDriftDetails] SecurityPosture policyDriftDetails + * @interface IBulkMuteFindingsRequest + * @property {string|null} [parent] BulkMuteFindingsRequest parent + * @property {string|null} [filter] BulkMuteFindingsRequest filter + * @property {string|null} [muteAnnotation] BulkMuteFindingsRequest muteAnnotation */ /** - * Constructs a new SecurityPosture. + * Constructs a new BulkMuteFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityPosture. - * @implements ISecurityPosture + * @classdesc Represents a BulkMuteFindingsRequest. + * @implements IBulkMuteFindingsRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISecurityPosture=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest=} [properties] Properties to set */ - function SecurityPosture(properties) { - this.policyDriftDetails = []; + function BulkMuteFindingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21044,176 +36255,103 @@ } /** - * SecurityPosture name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @instance - */ - SecurityPosture.prototype.name = ""; - - /** - * SecurityPosture revisionId. - * @member {string} revisionId - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @instance - */ - SecurityPosture.prototype.revisionId = ""; - - /** - * SecurityPosture postureDeploymentResource. - * @member {string} postureDeploymentResource - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @instance - */ - SecurityPosture.prototype.postureDeploymentResource = ""; - - /** - * SecurityPosture postureDeployment. - * @member {string} postureDeployment - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @instance - */ - SecurityPosture.prototype.postureDeployment = ""; - - /** - * SecurityPosture changedPolicy. - * @member {string} changedPolicy - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @instance - */ - SecurityPosture.prototype.changedPolicy = ""; - - /** - * SecurityPosture policySet. - * @member {string} policySet - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * BulkMuteFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @instance */ - SecurityPosture.prototype.policySet = ""; + BulkMuteFindingsRequest.prototype.parent = ""; /** - * SecurityPosture policy. - * @member {string} policy - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * BulkMuteFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @instance */ - SecurityPosture.prototype.policy = ""; + BulkMuteFindingsRequest.prototype.filter = ""; /** - * SecurityPosture policyDriftDetails. - * @member {Array.} policyDriftDetails - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * BulkMuteFindingsRequest muteAnnotation. + * @member {string} muteAnnotation + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @instance */ - SecurityPosture.prototype.policyDriftDetails = $util.emptyArray; + BulkMuteFindingsRequest.prototype.muteAnnotation = ""; /** - * Creates a new SecurityPosture instance using the specified properties. + * Creates a new BulkMuteFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityPosture=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture instance + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest instance */ - SecurityPosture.create = function create(properties) { - return new SecurityPosture(properties); + BulkMuteFindingsRequest.create = function create(properties) { + return new BulkMuteFindingsRequest(properties); }; /** - * Encodes the specified SecurityPosture message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * Encodes the specified BulkMuteFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} message BulkMuteFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPosture.encode = function encode(message, writer) { + BulkMuteFindingsRequest.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - if (message.postureDeploymentResource != null && Object.hasOwnProperty.call(message, "postureDeploymentResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.postureDeploymentResource); - if (message.postureDeployment != null && Object.hasOwnProperty.call(message, "postureDeployment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.postureDeployment); - if (message.changedPolicy != null && Object.hasOwnProperty.call(message, "changedPolicy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.changedPolicy); - if (message.policySet != null && Object.hasOwnProperty.call(message, "policySet")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.policySet); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.policy); - if (message.policyDriftDetails != null && message.policyDriftDetails.length) - for (var i = 0; i < message.policyDriftDetails.length; ++i) - $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.encode(message.policyDriftDetails[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.muteAnnotation != null && Object.hasOwnProperty.call(message, "muteAnnotation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.muteAnnotation); return writer; }; /** - * Encodes the specified SecurityPosture message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.verify|verify} messages. + * Encodes the specified BulkMuteFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityPosture} message SecurityPosture message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} message BulkMuteFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPosture.encodeDelimited = function encodeDelimited(message, writer) { + BulkMuteFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityPosture message from the specified reader or buffer. + * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityPosture.decode = function decode(reader, length) { + BulkMuteFindingsRequest.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.cloud.securitycenter.v1.SecurityPosture(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.revisionId = reader.string(); + message.filter = reader.string(); break; } case 3: { - message.postureDeploymentResource = reader.string(); - break; - } - case 4: { - message.postureDeployment = reader.string(); - break; - } - case 5: { - message.changedPolicy = reader.string(); - break; - } - case 6: { - message.policySet = reader.string(); - break; - } - case 7: { - message.policy = reader.string(); - break; - } - case 8: { - if (!(message.policyDriftDetails && message.policyDriftDetails.length)) - message.policyDriftDetails = []; - message.policyDriftDetails.push($root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.decode(reader, reader.uint32())); + message.muteAnnotation = reader.string(); break; } default: @@ -21225,449 +36363,316 @@ }; /** - * Decodes a SecurityPosture message from the specified reader or buffer, length delimited. + * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityPosture.decodeDelimited = function decodeDelimited(reader) { + BulkMuteFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityPosture message. + * Verifies a BulkMuteFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityPosture.verify = function verify(message) { + BulkMuteFindingsRequest.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.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) - if (!$util.isString(message.postureDeploymentResource)) - return "postureDeploymentResource: string expected"; - if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) - if (!$util.isString(message.postureDeployment)) - return "postureDeployment: string expected"; - if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) - if (!$util.isString(message.changedPolicy)) - return "changedPolicy: string expected"; - if (message.policySet != null && message.hasOwnProperty("policySet")) - if (!$util.isString(message.policySet)) - return "policySet: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyDriftDetails != null && message.hasOwnProperty("policyDriftDetails")) { - if (!Array.isArray(message.policyDriftDetails)) - return "policyDriftDetails: array expected"; - for (var i = 0; i < message.policyDriftDetails.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify(message.policyDriftDetails[i]); - if (error) - return "policyDriftDetails." + error; - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.muteAnnotation != null && message.hasOwnProperty("muteAnnotation")) + if (!$util.isString(message.muteAnnotation)) + return "muteAnnotation: string expected"; return null; }; /** - * Creates a SecurityPosture message from a plain object. Also converts values to their respective internal types. + * Creates a BulkMuteFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityPosture} SecurityPosture + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest */ - SecurityPosture.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPosture) + BulkMuteFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityPosture(); - if (object.name != null) - message.name = String(object.name); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.postureDeploymentResource != null) - message.postureDeploymentResource = String(object.postureDeploymentResource); - if (object.postureDeployment != null) - message.postureDeployment = String(object.postureDeployment); - if (object.changedPolicy != null) - message.changedPolicy = String(object.changedPolicy); - if (object.policySet != null) - message.policySet = String(object.policySet); - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyDriftDetails) { - if (!Array.isArray(object.policyDriftDetails)) - throw TypeError(".google.cloud.securitycenter.v1.SecurityPosture.policyDriftDetails: array expected"); - message.policyDriftDetails = []; - for (var i = 0; i < object.policyDriftDetails.length; ++i) { - if (typeof object.policyDriftDetails[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SecurityPosture.policyDriftDetails: object expected"); - message.policyDriftDetails[i] = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.fromObject(object.policyDriftDetails[i]); - } - } + var message = new $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.muteAnnotation != null) + message.muteAnnotation = String(object.muteAnnotation); return message; }; /** - * Creates a plain object from a SecurityPosture message. Also converts values to other types if specified. + * Creates a plain object from a BulkMuteFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.SecurityPosture} message SecurityPosture + * @param {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} message BulkMuteFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityPosture.toObject = function toObject(message, options) { + BulkMuteFindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.policyDriftDetails = []; if (options.defaults) { - object.name = ""; - object.revisionId = ""; - object.postureDeploymentResource = ""; - object.postureDeployment = ""; - object.changedPolicy = ""; - object.policySet = ""; - object.policy = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - if (message.postureDeploymentResource != null && message.hasOwnProperty("postureDeploymentResource")) - object.postureDeploymentResource = message.postureDeploymentResource; - if (message.postureDeployment != null && message.hasOwnProperty("postureDeployment")) - object.postureDeployment = message.postureDeployment; - if (message.changedPolicy != null && message.hasOwnProperty("changedPolicy")) - object.changedPolicy = message.changedPolicy; - if (message.policySet != null && message.hasOwnProperty("policySet")) - object.policySet = message.policySet; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.policyDriftDetails && message.policyDriftDetails.length) { - object.policyDriftDetails = []; - for (var j = 0; j < message.policyDriftDetails.length; ++j) - object.policyDriftDetails[j] = $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.toObject(message.policyDriftDetails[j], options); + object.parent = ""; + object.filter = ""; + object.muteAnnotation = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.muteAnnotation != null && message.hasOwnProperty("muteAnnotation")) + object.muteAnnotation = message.muteAnnotation; return object; }; /** - * Converts this SecurityPosture to JSON. + * Converts this BulkMuteFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @instance * @returns {Object.} JSON object */ - SecurityPosture.prototype.toJSON = function toJSON() { + BulkMuteFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityPosture + * Gets the default type url for BulkMuteFindingsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SecurityPosture + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityPosture.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BulkMuteFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPosture"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BulkMuteFindingsRequest"; }; - SecurityPosture.PolicyDriftDetails = (function() { - - /** - * Properties of a PolicyDriftDetails. - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @interface IPolicyDriftDetails - * @property {string|null} [field] PolicyDriftDetails field - * @property {string|null} [expectedValue] PolicyDriftDetails expectedValue - * @property {string|null} [detectedValue] PolicyDriftDetails detectedValue - */ - - /** - * Constructs a new PolicyDriftDetails. - * @memberof google.cloud.securitycenter.v1.SecurityPosture - * @classdesc Represents a PolicyDriftDetails. - * @implements IPolicyDriftDetails - * @constructor - * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set - */ - function PolicyDriftDetails(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]]; - } - - /** - * PolicyDriftDetails field. - * @member {string} field - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.field = ""; - - /** - * PolicyDriftDetails expectedValue. - * @member {string} expectedValue - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.expectedValue = ""; - - /** - * PolicyDriftDetails detectedValue. - * @member {string} detectedValue - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @instance - */ - PolicyDriftDetails.prototype.detectedValue = ""; - - /** - * Creates a new PolicyDriftDetails instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails instance - */ - PolicyDriftDetails.create = function create(properties) { - return new PolicyDriftDetails(properties); - }; + return BulkMuteFindingsRequest; + })(); - /** - * Encodes the specified PolicyDriftDetails message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDriftDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.expectedValue != null && Object.hasOwnProperty.call(message, "expectedValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedValue); - if (message.detectedValue != null && Object.hasOwnProperty.call(message, "detectedValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.detectedValue); - return writer; - }; + v1.BulkMuteFindingsResponse = (function() { - /** - * Encodes the specified PolicyDriftDetails message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v1.SecurityPosture.IPolicyDriftDetails} message PolicyDriftDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDriftDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a BulkMuteFindingsResponse. + * @memberof google.cloud.securitycenter.v1 + * @interface IBulkMuteFindingsResponse + */ - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDriftDetails.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.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.expectedValue = reader.string(); - break; - } - case 3: { - message.detectedValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new BulkMuteFindingsResponse. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a BulkMuteFindingsResponse. + * @implements IBulkMuteFindingsResponse + * @constructor + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse=} [properties] Properties to set + */ + function BulkMuteFindingsResponse(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]]; + } - /** - * Decodes a PolicyDriftDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDriftDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new BulkMuteFindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse instance + */ + BulkMuteFindingsResponse.create = function create(properties) { + return new BulkMuteFindingsResponse(properties); + }; - /** - * Verifies a PolicyDriftDetails message. - * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDriftDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - if (!$util.isString(message.expectedValue)) - return "expectedValue: string expected"; - if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) - if (!$util.isString(message.detectedValue)) - return "detectedValue: string expected"; - return null; - }; + /** + * Encodes the specified BulkMuteFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse} message BulkMuteFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkMuteFindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a PolicyDriftDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} PolicyDriftDetails - */ - PolicyDriftDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails) - return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails(); - if (object.field != null) - message.field = String(object.field); - if (object.expectedValue != null) - message.expectedValue = String(object.expectedValue); - if (object.detectedValue != null) - message.detectedValue = String(object.detectedValue); - return message; - }; + /** + * Encodes the specified BulkMuteFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse} message BulkMuteFindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkMuteFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a PolicyDriftDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails} message PolicyDriftDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDriftDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = ""; - object.expectedValue = ""; - object.detectedValue = ""; + /** + * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkMuteFindingsResponse.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.cloud.securitycenter.v1.BulkMuteFindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.expectedValue != null && message.hasOwnProperty("expectedValue")) - object.expectedValue = message.expectedValue; - if (message.detectedValue != null && message.hasOwnProperty("detectedValue")) - object.detectedValue = message.detectedValue; + } + return message; + }; + + /** + * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkMuteFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkMuteFindingsResponse message. + * @function verify + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkMuteFindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BulkMuteFindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + */ + BulkMuteFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) return object; - }; + return new $root.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(); + }; - /** - * Converts this PolicyDriftDetails to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @instance - * @returns {Object.} JSON object - */ - PolicyDriftDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BulkMuteFindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} message BulkMuteFindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkMuteFindingsResponse.toObject = function toObject() { + return {}; + }; - /** - * Gets the default type url for PolicyDriftDetails - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDriftDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityPosture.PolicyDriftDetails"; - }; + /** + * Converts this BulkMuteFindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkMuteFindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PolicyDriftDetails; - })(); + /** + * Gets the default type url for BulkMuteFindingsResponse + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkMuteFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BulkMuteFindingsResponse"; + }; - return SecurityPosture; + return BulkMuteFindingsResponse; })(); - v1.ToxicCombination = (function() { + v1.CreateFindingRequest = (function() { /** - * Properties of a ToxicCombination. + * Properties of a CreateFindingRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IToxicCombination - * @property {number|null} [attackExposureScore] ToxicCombination attackExposureScore - * @property {Array.|null} [relatedFindings] ToxicCombination relatedFindings + * @interface ICreateFindingRequest + * @property {string|null} [parent] CreateFindingRequest parent + * @property {string|null} [findingId] CreateFindingRequest findingId + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] CreateFindingRequest finding */ /** - * Constructs a new ToxicCombination. + * Constructs a new CreateFindingRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ToxicCombination. - * @implements IToxicCombination + * @classdesc Represents a CreateFindingRequest. + * @implements ICreateFindingRequest * @constructor - * @param {google.cloud.securitycenter.v1.IToxicCombination=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set */ - function ToxicCombination(properties) { - this.relatedFindings = []; + function CreateFindingRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21675,92 +36680,103 @@ } /** - * ToxicCombination attackExposureScore. - * @member {number} attackExposureScore - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * CreateFindingRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @instance */ - ToxicCombination.prototype.attackExposureScore = 0; + CreateFindingRequest.prototype.parent = ""; /** - * ToxicCombination relatedFindings. - * @member {Array.} relatedFindings - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * CreateFindingRequest findingId. + * @member {string} findingId + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @instance */ - ToxicCombination.prototype.relatedFindings = $util.emptyArray; + CreateFindingRequest.prototype.findingId = ""; /** - * Creates a new ToxicCombination instance using the specified properties. + * CreateFindingRequest finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @instance + */ + CreateFindingRequest.prototype.finding = null; + + /** + * Creates a new CreateFindingRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IToxicCombination=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination instance + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest instance */ - ToxicCombination.create = function create(properties) { - return new ToxicCombination(properties); + CreateFindingRequest.create = function create(properties) { + return new CreateFindingRequest(properties); }; /** - * Encodes the specified ToxicCombination message. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToxicCombination.encode = function encode(message, writer) { + CreateFindingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.attackExposureScore != null && Object.hasOwnProperty.call(message, "attackExposureScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.attackExposureScore); - if (message.relatedFindings != null && message.relatedFindings.length) - for (var i = 0; i < message.relatedFindings.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relatedFindings[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ToxicCombination message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ToxicCombination.verify|verify} messages. + * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IToxicCombination} message ToxicCombination message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToxicCombination.encodeDelimited = function encodeDelimited(message, writer) { + CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ToxicCombination message from the specified reader or buffer. + * Decodes a CreateFindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToxicCombination.decode = function decode(reader, length) { + CreateFindingRequest.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.cloud.securitycenter.v1.ToxicCombination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.attackExposureScore = reader.double(); + message.parent = reader.string(); break; } case 2: { - if (!(message.relatedFindings && message.relatedFindings.length)) - message.relatedFindings = []; - message.relatedFindings.push(reader.string()); + message.findingId = reader.string(); + break; + } + case 3: { + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); break; } default: @@ -21772,146 +36788,146 @@ }; /** - * Decodes a ToxicCombination message from the specified reader or buffer, length delimited. + * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToxicCombination.decodeDelimited = function decodeDelimited(reader) { + CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ToxicCombination message. + * Verifies a CreateFindingRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ToxicCombination.verify = function verify(message) { + CreateFindingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) - if (typeof message.attackExposureScore !== "number") - return "attackExposureScore: number expected"; - if (message.relatedFindings != null && message.hasOwnProperty("relatedFindings")) { - if (!Array.isArray(message.relatedFindings)) - return "relatedFindings: array expected"; - for (var i = 0; i < message.relatedFindings.length; ++i) - if (!$util.isString(message.relatedFindings[i])) - return "relatedFindings: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.findingId != null && message.hasOwnProperty("findingId")) + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; } return null; }; /** - * Creates a ToxicCombination message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ToxicCombination} ToxicCombination + * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest */ - ToxicCombination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ToxicCombination) + CreateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateFindingRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ToxicCombination(); - if (object.attackExposureScore != null) - message.attackExposureScore = Number(object.attackExposureScore); - if (object.relatedFindings) { - if (!Array.isArray(object.relatedFindings)) - throw TypeError(".google.cloud.securitycenter.v1.ToxicCombination.relatedFindings: array expected"); - message.relatedFindings = []; - for (var i = 0; i < object.relatedFindings.length; ++i) - message.relatedFindings[i] = String(object.relatedFindings[i]); + var message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.findingId != null) + message.findingId = String(object.findingId); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); } return message; }; /** - * Creates a plain object from a ToxicCombination message. Also converts values to other types if specified. + * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.ToxicCombination} message ToxicCombination + * @param {google.cloud.securitycenter.v1.CreateFindingRequest} message CreateFindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ToxicCombination.toObject = function toObject(message, options) { + CreateFindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.relatedFindings = []; - if (options.defaults) - object.attackExposureScore = 0; - if (message.attackExposureScore != null && message.hasOwnProperty("attackExposureScore")) - object.attackExposureScore = options.json && !isFinite(message.attackExposureScore) ? String(message.attackExposureScore) : message.attackExposureScore; - if (message.relatedFindings && message.relatedFindings.length) { - object.relatedFindings = []; - for (var j = 0; j < message.relatedFindings.length; ++j) - object.relatedFindings[j] = message.relatedFindings[j]; + if (options.defaults) { + object.parent = ""; + object.findingId = ""; + object.finding = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.findingId != null && message.hasOwnProperty("findingId")) + object.findingId = message.findingId; + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); return object; }; /** - * Converts this ToxicCombination to JSON. + * Converts this CreateFindingRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @instance * @returns {Object.} JSON object */ - ToxicCombination.prototype.toJSON = function toJSON() { + CreateFindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ToxicCombination + * Gets the default type url for CreateFindingRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ToxicCombination + * @memberof google.cloud.securitycenter.v1.CreateFindingRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ToxicCombination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateFindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ToxicCombination"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateFindingRequest"; }; - return ToxicCombination; + return CreateFindingRequest; })(); - v1.Vulnerability = (function() { + v1.CreateMuteConfigRequest = (function() { /** - * Properties of a Vulnerability. + * Properties of a CreateMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IVulnerability - * @property {google.cloud.securitycenter.v1.ICve|null} [cve] Vulnerability cve - * @property {google.cloud.securitycenter.v1.IPackage|null} [offendingPackage] Vulnerability offendingPackage - * @property {google.cloud.securitycenter.v1.IPackage|null} [fixedPackage] Vulnerability fixedPackage - * @property {google.cloud.securitycenter.v1.ISecurityBulletin|null} [securityBulletin] Vulnerability securityBulletin + * @interface ICreateMuteConfigRequest + * @property {string|null} [parent] CreateMuteConfigRequest parent + * @property {google.cloud.securitycenter.v1.IMuteConfig|null} [muteConfig] CreateMuteConfigRequest muteConfig + * @property {string|null} [muteConfigId] CreateMuteConfigRequest muteConfigId */ /** - * Constructs a new Vulnerability. + * Constructs a new CreateMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Vulnerability. - * @implements IVulnerability + * @classdesc Represents a CreateMuteConfigRequest. + * @implements ICreateMuteConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.IVulnerability=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest=} [properties] Properties to set */ - function Vulnerability(properties) { + function CreateMuteConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21919,117 +36935,103 @@ } /** - * Vulnerability cve. - * @member {google.cloud.securitycenter.v1.ICve|null|undefined} cve - * @memberof google.cloud.securitycenter.v1.Vulnerability - * @instance - */ - Vulnerability.prototype.cve = null; - - /** - * Vulnerability offendingPackage. - * @member {google.cloud.securitycenter.v1.IPackage|null|undefined} offendingPackage - * @memberof google.cloud.securitycenter.v1.Vulnerability + * CreateMuteConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @instance */ - Vulnerability.prototype.offendingPackage = null; + CreateMuteConfigRequest.prototype.parent = ""; /** - * Vulnerability fixedPackage. - * @member {google.cloud.securitycenter.v1.IPackage|null|undefined} fixedPackage - * @memberof google.cloud.securitycenter.v1.Vulnerability + * CreateMuteConfigRequest muteConfig. + * @member {google.cloud.securitycenter.v1.IMuteConfig|null|undefined} muteConfig + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @instance */ - Vulnerability.prototype.fixedPackage = null; + CreateMuteConfigRequest.prototype.muteConfig = null; /** - * Vulnerability securityBulletin. - * @member {google.cloud.securitycenter.v1.ISecurityBulletin|null|undefined} securityBulletin - * @memberof google.cloud.securitycenter.v1.Vulnerability + * CreateMuteConfigRequest muteConfigId. + * @member {string} muteConfigId + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @instance */ - Vulnerability.prototype.securityBulletin = null; + CreateMuteConfigRequest.prototype.muteConfigId = ""; /** - * Creates a new Vulnerability instance using the specified properties. + * Creates a new CreateMuteConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IVulnerability=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability instance + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest instance */ - Vulnerability.create = function create(properties) { - return new Vulnerability(properties); + CreateMuteConfigRequest.create = function create(properties) { + return new CreateMuteConfigRequest(properties); }; /** - * Encodes the specified Vulnerability message. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * Encodes the specified CreateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IVulnerability} message Vulnerability message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} message CreateMuteConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vulnerability.encode = function encode(message, writer) { + CreateMuteConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cve != null && Object.hasOwnProperty.call(message, "cve")) - $root.google.cloud.securitycenter.v1.Cve.encode(message.cve, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.offendingPackage != null && Object.hasOwnProperty.call(message, "offendingPackage")) - $root.google.cloud.securitycenter.v1.Package.encode(message.offendingPackage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.fixedPackage != null && Object.hasOwnProperty.call(message, "fixedPackage")) - $root.google.cloud.securitycenter.v1.Package.encode(message.fixedPackage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.securityBulletin != null && Object.hasOwnProperty.call(message, "securityBulletin")) - $root.google.cloud.securitycenter.v1.SecurityBulletin.encode(message.securityBulletin, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.muteConfig != null && Object.hasOwnProperty.call(message, "muteConfig")) + $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.muteConfigId != null && Object.hasOwnProperty.call(message, "muteConfigId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.muteConfigId); return writer; }; /** - * Encodes the specified Vulnerability message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Vulnerability.verify|verify} messages. + * Encodes the specified CreateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IVulnerability} message Vulnerability message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} message CreateMuteConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vulnerability.encodeDelimited = function encodeDelimited(message, writer) { + CreateMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Vulnerability message from the specified reader or buffer. + * Decodes a CreateMuteConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vulnerability.decode = function decode(reader, length) { + CreateMuteConfigRequest.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.cloud.securitycenter.v1.Vulnerability(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cve = $root.google.cloud.securitycenter.v1.Cve.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.offendingPackage = $root.google.cloud.securitycenter.v1.Package.decode(reader, reader.uint32()); + message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32()); break; } case 3: { - message.fixedPackage = $root.google.cloud.securitycenter.v1.Package.decode(reader, reader.uint32()); - break; - } - case 4: { - message.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.decode(reader, reader.uint32()); + message.muteConfigId = reader.string(); break; } default: @@ -22041,175 +37043,145 @@ }; /** - * Decodes a Vulnerability message from the specified reader or buffer, length delimited. + * Decodes a CreateMuteConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vulnerability.decodeDelimited = function decodeDelimited(reader) { + CreateMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Vulnerability message. + * Verifies a CreateMuteConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Vulnerability.verify = function verify(message) { + CreateMuteConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cve != null && message.hasOwnProperty("cve")) { - var error = $root.google.cloud.securitycenter.v1.Cve.verify(message.cve); - if (error) - return "cve." + error; - } - if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) { - var error = $root.google.cloud.securitycenter.v1.Package.verify(message.offendingPackage); - if (error) - return "offendingPackage." + error; - } - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) { - var error = $root.google.cloud.securitycenter.v1.Package.verify(message.fixedPackage); - if (error) - return "fixedPackage." + error; - } - if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) { - var error = $root.google.cloud.securitycenter.v1.SecurityBulletin.verify(message.securityBulletin); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) { + var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfig); if (error) - return "securityBulletin." + error; + return "muteConfig." + error; } + if (message.muteConfigId != null && message.hasOwnProperty("muteConfigId")) + if (!$util.isString(message.muteConfigId)) + return "muteConfigId: string expected"; return null; }; /** - * Creates a Vulnerability message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Vulnerability} Vulnerability + * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest */ - Vulnerability.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Vulnerability) + CreateMuteConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.Vulnerability(); - if (object.cve != null) { - if (typeof object.cve !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.cve: object expected"); - message.cve = $root.google.cloud.securitycenter.v1.Cve.fromObject(object.cve); - } - if (object.offendingPackage != null) { - if (typeof object.offendingPackage !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.offendingPackage: object expected"); - message.offendingPackage = $root.google.cloud.securitycenter.v1.Package.fromObject(object.offendingPackage); - } - if (object.fixedPackage != null) { - if (typeof object.fixedPackage !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.fixedPackage: object expected"); - message.fixedPackage = $root.google.cloud.securitycenter.v1.Package.fromObject(object.fixedPackage); - } - if (object.securityBulletin != null) { - if (typeof object.securityBulletin !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Vulnerability.securityBulletin: object expected"); - message.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.fromObject(object.securityBulletin); + var message = new $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.muteConfig != null) { + if (typeof object.muteConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateMuteConfigRequest.muteConfig: object expected"); + message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfig); } + if (object.muteConfigId != null) + message.muteConfigId = String(object.muteConfigId); return message; }; /** - * Creates a plain object from a Vulnerability message. Also converts values to other types if specified. + * Creates a plain object from a CreateMuteConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.Vulnerability} message Vulnerability + * @param {google.cloud.securitycenter.v1.CreateMuteConfigRequest} message CreateMuteConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Vulnerability.toObject = function toObject(message, options) { + CreateMuteConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.cve = null; - object.offendingPackage = null; - object.fixedPackage = null; - object.securityBulletin = null; + object.parent = ""; + object.muteConfig = null; + object.muteConfigId = ""; } - if (message.cve != null && message.hasOwnProperty("cve")) - object.cve = $root.google.cloud.securitycenter.v1.Cve.toObject(message.cve, options); - if (message.offendingPackage != null && message.hasOwnProperty("offendingPackage")) - object.offendingPackage = $root.google.cloud.securitycenter.v1.Package.toObject(message.offendingPackage, options); - if (message.fixedPackage != null && message.hasOwnProperty("fixedPackage")) - object.fixedPackage = $root.google.cloud.securitycenter.v1.Package.toObject(message.fixedPackage, options); - if (message.securityBulletin != null && message.hasOwnProperty("securityBulletin")) - object.securityBulletin = $root.google.cloud.securitycenter.v1.SecurityBulletin.toObject(message.securityBulletin, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) + object.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfig, options); + if (message.muteConfigId != null && message.hasOwnProperty("muteConfigId")) + object.muteConfigId = message.muteConfigId; return object; }; /** - * Converts this Vulnerability to JSON. + * Converts this CreateMuteConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @instance * @returns {Object.} JSON object */ - Vulnerability.prototype.toJSON = function toJSON() { + CreateMuteConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Vulnerability + * Gets the default type url for CreateMuteConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Vulnerability + * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Vulnerability.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Vulnerability"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateMuteConfigRequest"; }; - return Vulnerability; + return CreateMuteConfigRequest; })(); - v1.Cve = (function() { + v1.CreateResourceValueConfigRequest = (function() { /** - * Properties of a Cve. + * Properties of a CreateResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ICve - * @property {string|null} [id] Cve id - * @property {Array.|null} [references] Cve references - * @property {google.cloud.securitycenter.v1.ICvssv3|null} [cvssv3] Cve cvssv3 - * @property {boolean|null} [upstreamFixAvailable] Cve upstreamFixAvailable - * @property {google.cloud.securitycenter.v1.Cve.RiskRating|null} [impact] Cve impact - * @property {google.cloud.securitycenter.v1.Cve.ExploitationActivity|null} [exploitationActivity] Cve exploitationActivity - * @property {boolean|null} [observedInTheWild] Cve observedInTheWild - * @property {boolean|null} [zeroDay] Cve zeroDay + * @interface ICreateResourceValueConfigRequest + * @property {string|null} [parent] CreateResourceValueConfigRequest parent + * @property {google.cloud.securitycenter.v1.IResourceValueConfig|null} [resourceValueConfig] CreateResourceValueConfigRequest resourceValueConfig */ /** - * Constructs a new Cve. + * Constructs a new CreateResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Cve. - * @implements ICve + * @classdesc Represents a CreateResourceValueConfigRequest. + * @implements ICreateResourceValueConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.ICve=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest=} [properties] Properties to set */ - function Cve(properties) { - this.references = []; + function CreateResourceValueConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22217,499 +37189,232 @@ } /** - * Cve id. - * @member {string} id - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.id = ""; - - /** - * Cve references. - * @member {Array.} references - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.references = $util.emptyArray; - - /** - * Cve cvssv3. - * @member {google.cloud.securitycenter.v1.ICvssv3|null|undefined} cvssv3 - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.cvssv3 = null; - - /** - * Cve upstreamFixAvailable. - * @member {boolean} upstreamFixAvailable - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.upstreamFixAvailable = false; - - /** - * Cve impact. - * @member {google.cloud.securitycenter.v1.Cve.RiskRating} impact - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.impact = 0; - - /** - * Cve exploitationActivity. - * @member {google.cloud.securitycenter.v1.Cve.ExploitationActivity} exploitationActivity - * @memberof google.cloud.securitycenter.v1.Cve - * @instance - */ - Cve.prototype.exploitationActivity = 0; - - /** - * Cve observedInTheWild. - * @member {boolean} observedInTheWild - * @memberof google.cloud.securitycenter.v1.Cve + * CreateResourceValueConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @instance */ - Cve.prototype.observedInTheWild = false; + CreateResourceValueConfigRequest.prototype.parent = ""; /** - * Cve zeroDay. - * @member {boolean} zeroDay - * @memberof google.cloud.securitycenter.v1.Cve + * CreateResourceValueConfigRequest resourceValueConfig. + * @member {google.cloud.securitycenter.v1.IResourceValueConfig|null|undefined} resourceValueConfig + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @instance */ - Cve.prototype.zeroDay = false; + CreateResourceValueConfigRequest.prototype.resourceValueConfig = null; /** - * Creates a new Cve instance using the specified properties. + * Creates a new CreateResourceValueConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ICve=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Cve} Cve instance + * @param {google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateResourceValueConfigRequest} CreateResourceValueConfigRequest instance */ - Cve.create = function create(properties) { - return new Cve(properties); + CreateResourceValueConfigRequest.create = function create(properties) { + return new CreateResourceValueConfigRequest(properties); }; /** - * Encodes the specified Cve message. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * Encodes the specified CreateResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ICve} message Cve message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest} message CreateResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cve.encode = function encode(message, writer) { + CreateResourceValueConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.references != null && message.references.length) - for (var i = 0; i < message.references.length; ++i) - $root.google.cloud.securitycenter.v1.Reference.encode(message.references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cvssv3 != null && Object.hasOwnProperty.call(message, "cvssv3")) - $root.google.cloud.securitycenter.v1.Cvssv3.encode(message.cvssv3, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.upstreamFixAvailable != null && Object.hasOwnProperty.call(message, "upstreamFixAvailable")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.upstreamFixAvailable); - if (message.impact != null && Object.hasOwnProperty.call(message, "impact")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.impact); - if (message.exploitationActivity != null && Object.hasOwnProperty.call(message, "exploitationActivity")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.exploitationActivity); - if (message.observedInTheWild != null && Object.hasOwnProperty.call(message, "observedInTheWild")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.observedInTheWild); - if (message.zeroDay != null && Object.hasOwnProperty.call(message, "zeroDay")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.zeroDay); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.resourceValueConfig != null && Object.hasOwnProperty.call(message, "resourceValueConfig")) + $root.google.cloud.securitycenter.v1.ResourceValueConfig.encode(message.resourceValueConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Cve message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cve.verify|verify} messages. + * Encodes the specified CreateResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ICve} message Cve message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateResourceValueConfigRequest} message CreateResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cve.encodeDelimited = function encodeDelimited(message, writer) { + CreateResourceValueConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cve message from the specified reader or buffer. + * Decodes a CreateResourceValueConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Cve} Cve + * @returns {google.cloud.securitycenter.v1.CreateResourceValueConfigRequest} CreateResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cve.decode = function decode(reader, length) { + CreateResourceValueConfigRequest.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.cloud.securitycenter.v1.Cve(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); - break; - } - case 2: { - if (!(message.references && message.references.length)) - message.references = []; - message.references.push($root.google.cloud.securitycenter.v1.Reference.decode(reader, reader.uint32())); - break; - } - case 3: { - message.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.decode(reader, reader.uint32()); - break; - } - case 4: { - message.upstreamFixAvailable = reader.bool(); - break; - } - case 5: { - message.impact = reader.int32(); - break; - } - case 6: { - message.exploitationActivity = reader.int32(); - break; - } - case 7: { - message.observedInTheWild = reader.bool(); - break; - } - case 8: { - message.zeroDay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Cve message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Cve - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Cve} Cve - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cve.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cve message. - * @function verify - * @memberof google.cloud.securitycenter.v1.Cve - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cve.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.references != null && message.hasOwnProperty("references")) { - if (!Array.isArray(message.references)) - return "references: array expected"; - for (var i = 0; i < message.references.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Reference.verify(message.references[i]); - if (error) - return "references." + error; - } - } - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) { - var error = $root.google.cloud.securitycenter.v1.Cvssv3.verify(message.cvssv3); - if (error) - return "cvssv3." + error; - } - if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) - if (typeof message.upstreamFixAvailable !== "boolean") - return "upstreamFixAvailable: boolean expected"; - if (message.impact != null && message.hasOwnProperty("impact")) - switch (message.impact) { - default: - return "impact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) - switch (message.exploitationActivity) { - default: - return "exploitationActivity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) - if (typeof message.observedInTheWild !== "boolean") - return "observedInTheWild: boolean expected"; - if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) - if (typeof message.zeroDay !== "boolean") - return "zeroDay: boolean expected"; - return null; - }; - - /** - * Creates a Cve message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.Cve - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Cve} Cve - */ - Cve.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Cve) - return object; - var message = new $root.google.cloud.securitycenter.v1.Cve(); - if (object.id != null) - message.id = String(object.id); - if (object.references) { - if (!Array.isArray(object.references)) - throw TypeError(".google.cloud.securitycenter.v1.Cve.references: array expected"); - message.references = []; - for (var i = 0; i < object.references.length; ++i) { - if (typeof object.references[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Cve.references: object expected"); - message.references[i] = $root.google.cloud.securitycenter.v1.Reference.fromObject(object.references[i]); - } - } - if (object.cvssv3 != null) { - if (typeof object.cvssv3 !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Cve.cvssv3: object expected"); - message.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.fromObject(object.cvssv3); - } - if (object.upstreamFixAvailable != null) - message.upstreamFixAvailable = Boolean(object.upstreamFixAvailable); - switch (object.impact) { - default: - if (typeof object.impact === "number") { - message.impact = object.impact; - break; - } - break; - case "RISK_RATING_UNSPECIFIED": - case 0: - message.impact = 0; - break; - case "LOW": - case 1: - message.impact = 1; - break; - case "MEDIUM": - case 2: - message.impact = 2; - break; - case "HIGH": - case 3: - message.impact = 3; - break; - case "CRITICAL": - case 4: - message.impact = 4; - break; - } - switch (object.exploitationActivity) { - default: - if (typeof object.exploitationActivity === "number") { - message.exploitationActivity = object.exploitationActivity; + message.parent = reader.string(); + break; + } + case 2: { + message.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "EXPLOITATION_ACTIVITY_UNSPECIFIED": - case 0: - message.exploitationActivity = 0; - break; - case "WIDE": - case 1: - message.exploitationActivity = 1; - break; - case "CONFIRMED": - case 2: - message.exploitationActivity = 2; - break; - case "AVAILABLE": - case 3: - message.exploitationActivity = 3; - break; - case "ANTICIPATED": - case 4: - message.exploitationActivity = 4; - break; - case "NO_KNOWN": - case 5: - message.exploitationActivity = 5; - break; } - if (object.observedInTheWild != null) - message.observedInTheWild = Boolean(object.observedInTheWild); - if (object.zeroDay != null) - message.zeroDay = Boolean(object.zeroDay); return message; }; /** - * Creates a plain object from a Cve message. Also converts values to other types if specified. + * Decodes a CreateResourceValueConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CreateResourceValueConfigRequest} CreateResourceValueConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateResourceValueConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateResourceValueConfigRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateResourceValueConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceValueConfig != null && message.hasOwnProperty("resourceValueConfig")) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfig.verify(message.resourceValueConfig); + if (error) + return "resourceValueConfig." + error; + } + return null; + }; + + /** + * Creates a CreateResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CreateResourceValueConfigRequest} CreateResourceValueConfigRequest + */ + CreateResourceValueConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceValueConfig != null) { + if (typeof object.resourceValueConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.resourceValueConfig: object expected"); + message.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.fromObject(object.resourceValueConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateResourceValueConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.Cve} message Cve + * @param {google.cloud.securitycenter.v1.CreateResourceValueConfigRequest} message CreateResourceValueConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cve.toObject = function toObject(message, options) { + CreateResourceValueConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.references = []; if (options.defaults) { - object.id = ""; - object.cvssv3 = null; - object.upstreamFixAvailable = false; - object.impact = options.enums === String ? "RISK_RATING_UNSPECIFIED" : 0; - object.exploitationActivity = options.enums === String ? "EXPLOITATION_ACTIVITY_UNSPECIFIED" : 0; - object.observedInTheWild = false; - object.zeroDay = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.references && message.references.length) { - object.references = []; - for (var j = 0; j < message.references.length; ++j) - object.references[j] = $root.google.cloud.securitycenter.v1.Reference.toObject(message.references[j], options); + object.parent = ""; + object.resourceValueConfig = null; } - if (message.cvssv3 != null && message.hasOwnProperty("cvssv3")) - object.cvssv3 = $root.google.cloud.securitycenter.v1.Cvssv3.toObject(message.cvssv3, options); - if (message.upstreamFixAvailable != null && message.hasOwnProperty("upstreamFixAvailable")) - object.upstreamFixAvailable = message.upstreamFixAvailable; - if (message.impact != null && message.hasOwnProperty("impact")) - object.impact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cve.RiskRating[message.impact] === undefined ? message.impact : $root.google.cloud.securitycenter.v1.Cve.RiskRating[message.impact] : message.impact; - if (message.exploitationActivity != null && message.hasOwnProperty("exploitationActivity")) - object.exploitationActivity = options.enums === String ? $root.google.cloud.securitycenter.v1.Cve.ExploitationActivity[message.exploitationActivity] === undefined ? message.exploitationActivity : $root.google.cloud.securitycenter.v1.Cve.ExploitationActivity[message.exploitationActivity] : message.exploitationActivity; - if (message.observedInTheWild != null && message.hasOwnProperty("observedInTheWild")) - object.observedInTheWild = message.observedInTheWild; - if (message.zeroDay != null && message.hasOwnProperty("zeroDay")) - object.zeroDay = message.zeroDay; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceValueConfig != null && message.hasOwnProperty("resourceValueConfig")) + object.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.toObject(message.resourceValueConfig, options); return object; }; /** - * Converts this Cve to JSON. + * Converts this CreateResourceValueConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @instance * @returns {Object.} JSON object */ - Cve.prototype.toJSON = function toJSON() { + CreateResourceValueConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Cve + * Gets the default type url for CreateResourceValueConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Cve + * @memberof google.cloud.securitycenter.v1.CreateResourceValueConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Cve.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateResourceValueConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Cve"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateResourceValueConfigRequest"; }; - /** - * RiskRating enum. - * @name google.cloud.securitycenter.v1.Cve.RiskRating - * @enum {number} - * @property {number} RISK_RATING_UNSPECIFIED=0 RISK_RATING_UNSPECIFIED value - * @property {number} LOW=1 LOW value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} HIGH=3 HIGH value - * @property {number} CRITICAL=4 CRITICAL value - */ - Cve.RiskRating = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RISK_RATING_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "HIGH"] = 3; - values[valuesById[4] = "CRITICAL"] = 4; - return values; - })(); - - /** - * ExploitationActivity enum. - * @name google.cloud.securitycenter.v1.Cve.ExploitationActivity - * @enum {number} - * @property {number} EXPLOITATION_ACTIVITY_UNSPECIFIED=0 EXPLOITATION_ACTIVITY_UNSPECIFIED value - * @property {number} WIDE=1 WIDE value - * @property {number} CONFIRMED=2 CONFIRMED value - * @property {number} AVAILABLE=3 AVAILABLE value - * @property {number} ANTICIPATED=4 ANTICIPATED value - * @property {number} NO_KNOWN=5 NO_KNOWN value - */ - Cve.ExploitationActivity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EXPLOITATION_ACTIVITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "WIDE"] = 1; - values[valuesById[2] = "CONFIRMED"] = 2; - values[valuesById[3] = "AVAILABLE"] = 3; - values[valuesById[4] = "ANTICIPATED"] = 4; - values[valuesById[5] = "NO_KNOWN"] = 5; - return values; - })(); - - return Cve; + return CreateResourceValueConfigRequest; })(); - v1.Reference = (function() { + v1.BatchCreateResourceValueConfigsRequest = (function() { /** - * Properties of a Reference. + * Properties of a BatchCreateResourceValueConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IReference - * @property {string|null} [source] Reference source - * @property {string|null} [uri] Reference uri + * @interface IBatchCreateResourceValueConfigsRequest + * @property {string|null} [parent] BatchCreateResourceValueConfigsRequest parent + * @property {Array.|null} [requests] BatchCreateResourceValueConfigsRequest requests */ /** - * Constructs a new Reference. + * Constructs a new BatchCreateResourceValueConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Reference. - * @implements IReference + * @classdesc Represents a BatchCreateResourceValueConfigsRequest. + * @implements IBatchCreateResourceValueConfigsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IReference=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest=} [properties] Properties to set */ - function Reference(properties) { + function BatchCreateResourceValueConfigsRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22717,89 +37422,92 @@ } /** - * Reference source. - * @member {string} source - * @memberof google.cloud.securitycenter.v1.Reference + * BatchCreateResourceValueConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @instance */ - Reference.prototype.source = ""; + BatchCreateResourceValueConfigsRequest.prototype.parent = ""; /** - * Reference uri. - * @member {string} uri - * @memberof google.cloud.securitycenter.v1.Reference + * BatchCreateResourceValueConfigsRequest requests. + * @member {Array.} requests + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @instance */ - Reference.prototype.uri = ""; + BatchCreateResourceValueConfigsRequest.prototype.requests = $util.emptyArray; /** - * Creates a new Reference instance using the specified properties. + * Creates a new BatchCreateResourceValueConfigsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IReference=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Reference} Reference instance + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest} BatchCreateResourceValueConfigsRequest instance */ - Reference.create = function create(properties) { - return new Reference(properties); + BatchCreateResourceValueConfigsRequest.create = function create(properties) { + return new BatchCreateResourceValueConfigsRequest(properties); }; /** - * Encodes the specified Reference message. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * Encodes the specified BatchCreateResourceValueConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IReference} message Reference message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest} message BatchCreateResourceValueConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Reference.encode = function encode(message, writer) { + BatchCreateResourceValueConfigsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Reference message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Reference.verify|verify} messages. + * Encodes the specified BatchCreateResourceValueConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IReference} message Reference message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest} message BatchCreateResourceValueConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Reference.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateResourceValueConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Reference message from the specified reader or buffer. + * Decodes a BatchCreateResourceValueConfigsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Reference} Reference + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest} BatchCreateResourceValueConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Reference.decode = function decode(reader, length) { + BatchCreateResourceValueConfigsRequest.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.cloud.securitycenter.v1.Reference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.source = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.uri = reader.string(); + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.decode(reader, reader.uint32())); break; } default: @@ -22811,139 +37519,149 @@ }; /** - * Decodes a Reference message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateResourceValueConfigsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Reference} Reference + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest} BatchCreateResourceValueConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Reference.decodeDelimited = function decodeDelimited(reader) { + BatchCreateResourceValueConfigsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Reference message. + * Verifies a BatchCreateResourceValueConfigsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Reference.verify = function verify(message) { + BatchCreateResourceValueConfigsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } return null; }; /** - * Creates a Reference message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateResourceValueConfigsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Reference} Reference + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest} BatchCreateResourceValueConfigsRequest */ - Reference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Reference) + BatchCreateResourceValueConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.Reference(); - if (object.source != null) - message.source = String(object.source); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.fromObject(object.requests[i]); + } + } return message; }; /** - * Creates a plain object from a Reference message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateResourceValueConfigsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.Reference} message Reference + * @param {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest} message BatchCreateResourceValueConfigsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Reference.toObject = function toObject(message, options) { + BatchCreateResourceValueConfigsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.source = ""; - object.uri = ""; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.securitycenter.v1.CreateResourceValueConfigRequest.toObject(message.requests[j], options); } - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; return object; }; /** - * Converts this Reference to JSON. + * Converts this BatchCreateResourceValueConfigsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @instance * @returns {Object.} JSON object */ - Reference.prototype.toJSON = function toJSON() { + BatchCreateResourceValueConfigsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Reference + * Gets the default type url for BatchCreateResourceValueConfigsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Reference + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Reference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateResourceValueConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Reference"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest"; }; - return Reference; + return BatchCreateResourceValueConfigsRequest; })(); - v1.Cvssv3 = (function() { + v1.BatchCreateResourceValueConfigsResponse = (function() { /** - * Properties of a Cvssv3. + * Properties of a BatchCreateResourceValueConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface ICvssv3 - * @property {number|null} [baseScore] Cvssv3 baseScore - * @property {google.cloud.securitycenter.v1.Cvssv3.AttackVector|null} [attackVector] Cvssv3 attackVector - * @property {google.cloud.securitycenter.v1.Cvssv3.AttackComplexity|null} [attackComplexity] Cvssv3 attackComplexity - * @property {google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired|null} [privilegesRequired] Cvssv3 privilegesRequired - * @property {google.cloud.securitycenter.v1.Cvssv3.UserInteraction|null} [userInteraction] Cvssv3 userInteraction - * @property {google.cloud.securitycenter.v1.Cvssv3.Scope|null} [scope] Cvssv3 scope - * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [confidentialityImpact] Cvssv3 confidentialityImpact - * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [integrityImpact] Cvssv3 integrityImpact - * @property {google.cloud.securitycenter.v1.Cvssv3.Impact|null} [availabilityImpact] Cvssv3 availabilityImpact + * @interface IBatchCreateResourceValueConfigsResponse + * @property {Array.|null} [resourceValueConfigs] BatchCreateResourceValueConfigsResponse resourceValueConfigs */ /** - * Constructs a new Cvssv3. + * Constructs a new BatchCreateResourceValueConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Cvssv3. - * @implements ICvssv3 + * @classdesc Represents a BatchCreateResourceValueConfigsResponse. + * @implements IBatchCreateResourceValueConfigsResponse * @constructor - * @param {google.cloud.securitycenter.v1.ICvssv3=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse=} [properties] Properties to set */ - function Cvssv3(properties) { + function BatchCreateResourceValueConfigsResponse(properties) { + this.resourceValueConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22951,187 +37669,78 @@ } /** - * Cvssv3 baseScore. - * @member {number} baseScore - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.baseScore = 0; - - /** - * Cvssv3 attackVector. - * @member {google.cloud.securitycenter.v1.Cvssv3.AttackVector} attackVector - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.attackVector = 0; - - /** - * Cvssv3 attackComplexity. - * @member {google.cloud.securitycenter.v1.Cvssv3.AttackComplexity} attackComplexity - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.attackComplexity = 0; - - /** - * Cvssv3 privilegesRequired. - * @member {google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired} privilegesRequired - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.privilegesRequired = 0; - - /** - * Cvssv3 userInteraction. - * @member {google.cloud.securitycenter.v1.Cvssv3.UserInteraction} userInteraction - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.userInteraction = 0; - - /** - * Cvssv3 scope. - * @member {google.cloud.securitycenter.v1.Cvssv3.Scope} scope - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.scope = 0; - - /** - * Cvssv3 confidentialityImpact. - * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} confidentialityImpact - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.confidentialityImpact = 0; - - /** - * Cvssv3 integrityImpact. - * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} integrityImpact - * @memberof google.cloud.securitycenter.v1.Cvssv3 - * @instance - */ - Cvssv3.prototype.integrityImpact = 0; - - /** - * Cvssv3 availabilityImpact. - * @member {google.cloud.securitycenter.v1.Cvssv3.Impact} availabilityImpact - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * BatchCreateResourceValueConfigsResponse resourceValueConfigs. + * @member {Array.} resourceValueConfigs + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @instance */ - Cvssv3.prototype.availabilityImpact = 0; + BatchCreateResourceValueConfigsResponse.prototype.resourceValueConfigs = $util.emptyArray; /** - * Creates a new Cvssv3 instance using the specified properties. + * Creates a new BatchCreateResourceValueConfigsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.ICvssv3=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 instance + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} BatchCreateResourceValueConfigsResponse instance */ - Cvssv3.create = function create(properties) { - return new Cvssv3(properties); + BatchCreateResourceValueConfigsResponse.create = function create(properties) { + return new BatchCreateResourceValueConfigsResponse(properties); }; /** - * Encodes the specified Cvssv3 message. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * Encodes the specified BatchCreateResourceValueConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.ICvssv3} message Cvssv3 message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse} message BatchCreateResourceValueConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cvssv3.encode = function encode(message, writer) { + BatchCreateResourceValueConfigsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.baseScore != null && Object.hasOwnProperty.call(message, "baseScore")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.baseScore); - if (message.attackVector != null && Object.hasOwnProperty.call(message, "attackVector")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.attackVector); - if (message.attackComplexity != null && Object.hasOwnProperty.call(message, "attackComplexity")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.attackComplexity); - if (message.privilegesRequired != null && Object.hasOwnProperty.call(message, "privilegesRequired")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.privilegesRequired); - if (message.userInteraction != null && Object.hasOwnProperty.call(message, "userInteraction")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.userInteraction); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scope); - if (message.confidentialityImpact != null && Object.hasOwnProperty.call(message, "confidentialityImpact")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.confidentialityImpact); - if (message.integrityImpact != null && Object.hasOwnProperty.call(message, "integrityImpact")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.integrityImpact); - if (message.availabilityImpact != null && Object.hasOwnProperty.call(message, "availabilityImpact")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.availabilityImpact); + if (message.resourceValueConfigs != null && message.resourceValueConfigs.length) + for (var i = 0; i < message.resourceValueConfigs.length; ++i) + $root.google.cloud.securitycenter.v1.ResourceValueConfig.encode(message.resourceValueConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Cvssv3 message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Cvssv3.verify|verify} messages. + * Encodes the specified BatchCreateResourceValueConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.ICvssv3} message Cvssv3 message or plain object to encode + * @param {google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse} message BatchCreateResourceValueConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cvssv3.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateResourceValueConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cvssv3 message from the specified reader or buffer. + * Decodes a BatchCreateResourceValueConfigsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} BatchCreateResourceValueConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cvssv3.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.cloud.securitycenter.v1.Cvssv3(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.baseScore = reader.double(); - break; - } - case 5: { - message.attackVector = reader.int32(); - break; - } - case 6: { - message.attackComplexity = reader.int32(); - break; - } - case 7: { - message.privilegesRequired = reader.int32(); - break; - } - case 8: { - message.userInteraction = reader.int32(); - break; - } - case 9: { - message.scope = reader.int32(); - break; - } - case 10: { - message.confidentialityImpact = reader.int32(); - break; - } - case 11: { - message.integrityImpact = reader.int32(); - break; - } - case 12: { - message.availabilityImpact = reader.int32(); + BatchCreateResourceValueConfigsResponse.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.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceValueConfigs && message.resourceValueConfigs.length)) + message.resourceValueConfigs = []; + message.resourceValueConfigs.push($root.google.cloud.securitycenter.v1.ResourceValueConfig.decode(reader, reader.uint32())); break; } default: @@ -23143,516 +37752,139 @@ }; /** - * Decodes a Cvssv3 message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateResourceValueConfigsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} BatchCreateResourceValueConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cvssv3.decodeDelimited = function decodeDelimited(reader) { + BatchCreateResourceValueConfigsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Cvssv3 message. + * Verifies a BatchCreateResourceValueConfigsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Cvssv3.verify = function verify(message) { + BatchCreateResourceValueConfigsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - if (typeof message.baseScore !== "number") - return "baseScore: number expected"; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - switch (message.attackVector) { - default: - return "attackVector: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - switch (message.attackComplexity) { - default: - return "attackComplexity: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - switch (message.privilegesRequired) { - default: - return "privilegesRequired: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - switch (message.userInteraction) { - default: - return "userInteraction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - switch (message.confidentialityImpact) { - default: - return "confidentialityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - switch (message.integrityImpact) { - default: - return "integrityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - switch (message.availabilityImpact) { - default: - return "availabilityImpact: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.resourceValueConfigs != null && message.hasOwnProperty("resourceValueConfigs")) { + if (!Array.isArray(message.resourceValueConfigs)) + return "resourceValueConfigs: array expected"; + for (var i = 0; i < message.resourceValueConfigs.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfig.verify(message.resourceValueConfigs[i]); + if (error) + return "resourceValueConfigs." + error; } + } return null; }; /** - * Creates a Cvssv3 message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateResourceValueConfigsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Cvssv3} Cvssv3 + * @returns {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} BatchCreateResourceValueConfigsResponse */ - Cvssv3.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Cvssv3) + BatchCreateResourceValueConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.Cvssv3(); - if (object.baseScore != null) - message.baseScore = Number(object.baseScore); - switch (object.attackVector) { - default: - if (typeof object.attackVector === "number") { - message.attackVector = object.attackVector; - break; - } - break; - case "ATTACK_VECTOR_UNSPECIFIED": - case 0: - message.attackVector = 0; - break; - case "ATTACK_VECTOR_NETWORK": - case 1: - message.attackVector = 1; - break; - case "ATTACK_VECTOR_ADJACENT": - case 2: - message.attackVector = 2; - break; - case "ATTACK_VECTOR_LOCAL": - case 3: - message.attackVector = 3; - break; - case "ATTACK_VECTOR_PHYSICAL": - case 4: - message.attackVector = 4; - break; - } - switch (object.attackComplexity) { - default: - if (typeof object.attackComplexity === "number") { - message.attackComplexity = object.attackComplexity; - break; - } - break; - case "ATTACK_COMPLEXITY_UNSPECIFIED": - case 0: - message.attackComplexity = 0; - break; - case "ATTACK_COMPLEXITY_LOW": - case 1: - message.attackComplexity = 1; - break; - case "ATTACK_COMPLEXITY_HIGH": - case 2: - message.attackComplexity = 2; - break; - } - switch (object.privilegesRequired) { - default: - if (typeof object.privilegesRequired === "number") { - message.privilegesRequired = object.privilegesRequired; - break; - } - break; - case "PRIVILEGES_REQUIRED_UNSPECIFIED": - case 0: - message.privilegesRequired = 0; - break; - case "PRIVILEGES_REQUIRED_NONE": - case 1: - message.privilegesRequired = 1; - break; - case "PRIVILEGES_REQUIRED_LOW": - case 2: - message.privilegesRequired = 2; - break; - case "PRIVILEGES_REQUIRED_HIGH": - case 3: - message.privilegesRequired = 3; - break; - } - switch (object.userInteraction) { - default: - if (typeof object.userInteraction === "number") { - message.userInteraction = object.userInteraction; - break; - } - break; - case "USER_INTERACTION_UNSPECIFIED": - case 0: - message.userInteraction = 0; - break; - case "USER_INTERACTION_NONE": - case 1: - message.userInteraction = 1; - break; - case "USER_INTERACTION_REQUIRED": - case 2: - message.userInteraction = 2; - break; - } - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "SCOPE_UNCHANGED": - case 1: - message.scope = 1; - break; - case "SCOPE_CHANGED": - case 2: - message.scope = 2; - break; - } - switch (object.confidentialityImpact) { - default: - if (typeof object.confidentialityImpact === "number") { - message.confidentialityImpact = object.confidentialityImpact; - break; - } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.confidentialityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.confidentialityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.confidentialityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.confidentialityImpact = 3; - break; - } - switch (object.integrityImpact) { - default: - if (typeof object.integrityImpact === "number") { - message.integrityImpact = object.integrityImpact; - break; - } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.integrityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.integrityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.integrityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.integrityImpact = 3; - break; - } - switch (object.availabilityImpact) { - default: - if (typeof object.availabilityImpact === "number") { - message.availabilityImpact = object.availabilityImpact; - break; + var message = new $root.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse(); + if (object.resourceValueConfigs) { + if (!Array.isArray(object.resourceValueConfigs)) + throw TypeError(".google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.resourceValueConfigs: array expected"); + message.resourceValueConfigs = []; + for (var i = 0; i < object.resourceValueConfigs.length; ++i) { + if (typeof object.resourceValueConfigs[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse.resourceValueConfigs: object expected"); + message.resourceValueConfigs[i] = $root.google.cloud.securitycenter.v1.ResourceValueConfig.fromObject(object.resourceValueConfigs[i]); } - break; - case "IMPACT_UNSPECIFIED": - case 0: - message.availabilityImpact = 0; - break; - case "IMPACT_HIGH": - case 1: - message.availabilityImpact = 1; - break; - case "IMPACT_LOW": - case 2: - message.availabilityImpact = 2; - break; - case "IMPACT_NONE": - case 3: - message.availabilityImpact = 3; - break; } return message; }; /** - * Creates a plain object from a Cvssv3 message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateResourceValueConfigsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.Cvssv3} message Cvssv3 + * @param {google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse} message BatchCreateResourceValueConfigsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cvssv3.toObject = function toObject(message, options) { + BatchCreateResourceValueConfigsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.baseScore = 0; - object.attackVector = options.enums === String ? "ATTACK_VECTOR_UNSPECIFIED" : 0; - object.attackComplexity = options.enums === String ? "ATTACK_COMPLEXITY_UNSPECIFIED" : 0; - object.privilegesRequired = options.enums === String ? "PRIVILEGES_REQUIRED_UNSPECIFIED" : 0; - object.userInteraction = options.enums === String ? "USER_INTERACTION_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - object.confidentialityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.integrityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; - object.availabilityImpact = options.enums === String ? "IMPACT_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.resourceValueConfigs = []; + if (message.resourceValueConfigs && message.resourceValueConfigs.length) { + object.resourceValueConfigs = []; + for (var j = 0; j < message.resourceValueConfigs.length; ++j) + object.resourceValueConfigs[j] = $root.google.cloud.securitycenter.v1.ResourceValueConfig.toObject(message.resourceValueConfigs[j], options); } - if (message.baseScore != null && message.hasOwnProperty("baseScore")) - object.baseScore = options.json && !isFinite(message.baseScore) ? String(message.baseScore) : message.baseScore; - if (message.attackVector != null && message.hasOwnProperty("attackVector")) - object.attackVector = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.AttackVector[message.attackVector] === undefined ? message.attackVector : $root.google.cloud.securitycenter.v1.Cvssv3.AttackVector[message.attackVector] : message.attackVector; - if (message.attackComplexity != null && message.hasOwnProperty("attackComplexity")) - object.attackComplexity = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity[message.attackComplexity] === undefined ? message.attackComplexity : $root.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity[message.attackComplexity] : message.attackComplexity; - if (message.privilegesRequired != null && message.hasOwnProperty("privilegesRequired")) - object.privilegesRequired = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired[message.privilegesRequired] === undefined ? message.privilegesRequired : $root.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired[message.privilegesRequired] : message.privilegesRequired; - if (message.userInteraction != null && message.hasOwnProperty("userInteraction")) - object.userInteraction = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.UserInteraction[message.userInteraction] === undefined ? message.userInteraction : $root.google.cloud.securitycenter.v1.Cvssv3.UserInteraction[message.userInteraction] : message.userInteraction; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.securitycenter.v1.Cvssv3.Scope[message.scope] : message.scope; - if (message.confidentialityImpact != null && message.hasOwnProperty("confidentialityImpact")) - object.confidentialityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.confidentialityImpact] === undefined ? message.confidentialityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.confidentialityImpact] : message.confidentialityImpact; - if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) - object.integrityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.integrityImpact] === undefined ? message.integrityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.integrityImpact] : message.integrityImpact; - if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) - object.availabilityImpact = options.enums === String ? $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.availabilityImpact] === undefined ? message.availabilityImpact : $root.google.cloud.securitycenter.v1.Cvssv3.Impact[message.availabilityImpact] : message.availabilityImpact; return object; }; /** - * Converts this Cvssv3 to JSON. + * Converts this BatchCreateResourceValueConfigsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @instance * @returns {Object.} JSON object */ - Cvssv3.prototype.toJSON = function toJSON() { + BatchCreateResourceValueConfigsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Cvssv3 + * Gets the default type url for BatchCreateResourceValueConfigsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Cvssv3 + * @memberof google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Cvssv3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BatchCreateResourceValueConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Cvssv3"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse"; }; - /** - * AttackVector enum. - * @name google.cloud.securitycenter.v1.Cvssv3.AttackVector - * @enum {number} - * @property {number} ATTACK_VECTOR_UNSPECIFIED=0 ATTACK_VECTOR_UNSPECIFIED value - * @property {number} ATTACK_VECTOR_NETWORK=1 ATTACK_VECTOR_NETWORK value - * @property {number} ATTACK_VECTOR_ADJACENT=2 ATTACK_VECTOR_ADJACENT value - * @property {number} ATTACK_VECTOR_LOCAL=3 ATTACK_VECTOR_LOCAL value - * @property {number} ATTACK_VECTOR_PHYSICAL=4 ATTACK_VECTOR_PHYSICAL value - */ - Cvssv3.AttackVector = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_VECTOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_VECTOR_NETWORK"] = 1; - values[valuesById[2] = "ATTACK_VECTOR_ADJACENT"] = 2; - values[valuesById[3] = "ATTACK_VECTOR_LOCAL"] = 3; - values[valuesById[4] = "ATTACK_VECTOR_PHYSICAL"] = 4; - return values; - })(); - - /** - * AttackComplexity enum. - * @name google.cloud.securitycenter.v1.Cvssv3.AttackComplexity - * @enum {number} - * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value - * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value - * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value - */ - Cvssv3.AttackComplexity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; - values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; - return values; - })(); - - /** - * PrivilegesRequired enum. - * @name google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired - * @enum {number} - * @property {number} PRIVILEGES_REQUIRED_UNSPECIFIED=0 PRIVILEGES_REQUIRED_UNSPECIFIED value - * @property {number} PRIVILEGES_REQUIRED_NONE=1 PRIVILEGES_REQUIRED_NONE value - * @property {number} PRIVILEGES_REQUIRED_LOW=2 PRIVILEGES_REQUIRED_LOW value - * @property {number} PRIVILEGES_REQUIRED_HIGH=3 PRIVILEGES_REQUIRED_HIGH value - */ - Cvssv3.PrivilegesRequired = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIVILEGES_REQUIRED_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVILEGES_REQUIRED_NONE"] = 1; - values[valuesById[2] = "PRIVILEGES_REQUIRED_LOW"] = 2; - values[valuesById[3] = "PRIVILEGES_REQUIRED_HIGH"] = 3; - return values; - })(); - - /** - * UserInteraction enum. - * @name google.cloud.securitycenter.v1.Cvssv3.UserInteraction - * @enum {number} - * @property {number} USER_INTERACTION_UNSPECIFIED=0 USER_INTERACTION_UNSPECIFIED value - * @property {number} USER_INTERACTION_NONE=1 USER_INTERACTION_NONE value - * @property {number} USER_INTERACTION_REQUIRED=2 USER_INTERACTION_REQUIRED value - */ - Cvssv3.UserInteraction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "USER_INTERACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USER_INTERACTION_NONE"] = 1; - values[valuesById[2] = "USER_INTERACTION_REQUIRED"] = 2; - return values; - })(); - - /** - * Scope enum. - * @name google.cloud.securitycenter.v1.Cvssv3.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} SCOPE_UNCHANGED=1 SCOPE_UNCHANGED value - * @property {number} SCOPE_CHANGED=2 SCOPE_CHANGED value - */ - Cvssv3.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCOPE_UNCHANGED"] = 1; - values[valuesById[2] = "SCOPE_CHANGED"] = 2; - return values; - })(); - - /** - * Impact enum. - * @name google.cloud.securitycenter.v1.Cvssv3.Impact - * @enum {number} - * @property {number} IMPACT_UNSPECIFIED=0 IMPACT_UNSPECIFIED value - * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value - * @property {number} IMPACT_LOW=2 IMPACT_LOW value - * @property {number} IMPACT_NONE=3 IMPACT_NONE value - */ - Cvssv3.Impact = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMPACT_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPACT_HIGH"] = 1; - values[valuesById[2] = "IMPACT_LOW"] = 2; - values[valuesById[3] = "IMPACT_NONE"] = 3; - return values; - })(); - - return Cvssv3; + return BatchCreateResourceValueConfigsResponse; })(); - v1.Package = (function() { + v1.DeleteResourceValueConfigRequest = (function() { /** - * Properties of a Package. + * Properties of a DeleteResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IPackage - * @property {string|null} [packageName] Package packageName - * @property {string|null} [cpeUri] Package cpeUri - * @property {string|null} [packageType] Package packageType - * @property {string|null} [packageVersion] Package packageVersion + * @interface IDeleteResourceValueConfigRequest + * @property {string|null} [name] DeleteResourceValueConfigRequest name */ /** - * Constructs a new Package. + * Constructs a new DeleteResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Package. - * @implements IPackage + * @classdesc Represents a DeleteResourceValueConfigRequest. + * @implements IDeleteResourceValueConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.IPackage=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest=} [properties] Properties to set */ - function Package(properties) { + function DeleteResourceValueConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23660,117 +37892,75 @@ } /** - * Package packageName. - * @member {string} packageName - * @memberof google.cloud.securitycenter.v1.Package - * @instance - */ - Package.prototype.packageName = ""; - - /** - * Package cpeUri. - * @member {string} cpeUri - * @memberof google.cloud.securitycenter.v1.Package - * @instance - */ - Package.prototype.cpeUri = ""; - - /** - * Package packageType. - * @member {string} packageType - * @memberof google.cloud.securitycenter.v1.Package - * @instance - */ - Package.prototype.packageType = ""; - - /** - * Package packageVersion. - * @member {string} packageVersion - * @memberof google.cloud.securitycenter.v1.Package + * DeleteResourceValueConfigRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @instance */ - Package.prototype.packageVersion = ""; + DeleteResourceValueConfigRequest.prototype.name = ""; /** - * Creates a new Package instance using the specified properties. + * Creates a new DeleteResourceValueConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IPackage=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Package} Package instance + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest} DeleteResourceValueConfigRequest instance */ - Package.create = function create(properties) { - return new Package(properties); + DeleteResourceValueConfigRequest.create = function create(properties) { + return new DeleteResourceValueConfigRequest(properties); }; /** - * Encodes the specified Package message. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * Encodes the specified DeleteResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IPackage} message Package message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest} message DeleteResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encode = function encode(message, writer) { + DeleteResourceValueConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageName); - if (message.cpeUri != null && Object.hasOwnProperty.call(message, "cpeUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cpeUri); - if (message.packageType != null && Object.hasOwnProperty.call(message, "packageType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.packageType); - if (message.packageVersion != null && Object.hasOwnProperty.call(message, "packageVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.packageVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Package message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Package.verify|verify} messages. + * Encodes the specified DeleteResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IPackage} message Package message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest} message DeleteResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Package.encodeDelimited = function encodeDelimited(message, writer) { + DeleteResourceValueConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Package message from the specified reader or buffer. + * Decodes a DeleteResourceValueConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Package} Package + * @returns {google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest} DeleteResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Package.decode = function decode(reader, length) { + DeleteResourceValueConfigRequest.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.cloud.securitycenter.v1.Package(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.packageName = reader.string(); - break; - } - case 2: { - message.cpeUri = reader.string(); - break; - } - case 3: { - message.packageType = reader.string(); - break; - } - case 4: { - message.packageVersion = reader.string(); + message.name = reader.string(); break; } default: @@ -23782,149 +37972,122 @@ }; /** - * Decodes a Package message from the specified reader or buffer, length delimited. + * Decodes a DeleteResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Package} Package + * @returns {google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest} DeleteResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Package.decodeDelimited = function decodeDelimited(reader) { + DeleteResourceValueConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Package message. + * Verifies a DeleteResourceValueConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Package.verify = function verify(message) { + DeleteResourceValueConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.packageName != null && message.hasOwnProperty("packageName")) - if (!$util.isString(message.packageName)) - return "packageName: string expected"; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - if (!$util.isString(message.cpeUri)) - return "cpeUri: string expected"; - if (message.packageType != null && message.hasOwnProperty("packageType")) - if (!$util.isString(message.packageType)) - return "packageType: string expected"; - if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) - if (!$util.isString(message.packageVersion)) - return "packageVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Package message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Package} Package + * @returns {google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest} DeleteResourceValueConfigRequest */ - Package.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Package) + DeleteResourceValueConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.Package(); - if (object.packageName != null) - message.packageName = String(object.packageName); - if (object.cpeUri != null) - message.cpeUri = String(object.cpeUri); - if (object.packageType != null) - message.packageType = String(object.packageType); - if (object.packageVersion != null) - message.packageVersion = String(object.packageVersion); + var message = new $root.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Package message. Also converts values to other types if specified. + * Creates a plain object from a DeleteResourceValueConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.Package} message Package + * @param {google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest} message DeleteResourceValueConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Package.toObject = function toObject(message, options) { + DeleteResourceValueConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.packageName = ""; - object.cpeUri = ""; - object.packageType = ""; - object.packageVersion = ""; - } - if (message.packageName != null && message.hasOwnProperty("packageName")) - object.packageName = message.packageName; - if (message.cpeUri != null && message.hasOwnProperty("cpeUri")) - object.cpeUri = message.cpeUri; - if (message.packageType != null && message.hasOwnProperty("packageType")) - object.packageType = message.packageType; - if (message.packageVersion != null && message.hasOwnProperty("packageVersion")) - object.packageVersion = message.packageVersion; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Package to JSON. + * Converts this DeleteResourceValueConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @instance * @returns {Object.} JSON object */ - Package.prototype.toJSON = function toJSON() { + DeleteResourceValueConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Package + * Gets the default type url for DeleteResourceValueConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Package + * @memberof google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Package.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteResourceValueConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Package"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest"; }; - return Package; + return DeleteResourceValueConfigRequest; })(); - v1.SecurityBulletin = (function() { + v1.GetResourceValueConfigRequest = (function() { /** - * Properties of a SecurityBulletin. + * Properties of a GetResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISecurityBulletin - * @property {string|null} [bulletinId] SecurityBulletin bulletinId - * @property {google.protobuf.ITimestamp|null} [submissionTime] SecurityBulletin submissionTime - * @property {string|null} [suggestedUpgradeVersion] SecurityBulletin suggestedUpgradeVersion + * @interface IGetResourceValueConfigRequest + * @property {string|null} [name] GetResourceValueConfigRequest name */ /** - * Constructs a new SecurityBulletin. + * Constructs a new GetResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityBulletin. - * @implements ISecurityBulletin + * @classdesc Represents a GetResourceValueConfigRequest. + * @implements IGetResourceValueConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISecurityBulletin=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest=} [properties] Properties to set */ - function SecurityBulletin(properties) { + function GetResourceValueConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23932,103 +38095,75 @@ } /** - * SecurityBulletin bulletinId. - * @member {string} bulletinId - * @memberof google.cloud.securitycenter.v1.SecurityBulletin - * @instance - */ - SecurityBulletin.prototype.bulletinId = ""; - - /** - * SecurityBulletin submissionTime. - * @member {google.protobuf.ITimestamp|null|undefined} submissionTime - * @memberof google.cloud.securitycenter.v1.SecurityBulletin - * @instance - */ - SecurityBulletin.prototype.submissionTime = null; - - /** - * SecurityBulletin suggestedUpgradeVersion. - * @member {string} suggestedUpgradeVersion - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * GetResourceValueConfigRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @instance */ - SecurityBulletin.prototype.suggestedUpgradeVersion = ""; + GetResourceValueConfigRequest.prototype.name = ""; /** - * Creates a new SecurityBulletin instance using the specified properties. + * Creates a new GetResourceValueConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityBulletin=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin instance + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetResourceValueConfigRequest} GetResourceValueConfigRequest instance */ - SecurityBulletin.create = function create(properties) { - return new SecurityBulletin(properties); + GetResourceValueConfigRequest.create = function create(properties) { + return new GetResourceValueConfigRequest(properties); }; /** - * Encodes the specified SecurityBulletin message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * Encodes the specified GetResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetResourceValueConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest} message GetResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityBulletin.encode = function encode(message, writer) { + GetResourceValueConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bulletinId != null && Object.hasOwnProperty.call(message, "bulletinId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bulletinId); - if (message.submissionTime != null && Object.hasOwnProperty.call(message, "submissionTime")) - $root.google.protobuf.Timestamp.encode(message.submissionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.suggestedUpgradeVersion != null && Object.hasOwnProperty.call(message, "suggestedUpgradeVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.suggestedUpgradeVersion); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SecurityBulletin message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityBulletin.verify|verify} messages. + * Encodes the specified GetResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetResourceValueConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityBulletin} message SecurityBulletin message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetResourceValueConfigRequest} message GetResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityBulletin.encodeDelimited = function encodeDelimited(message, writer) { + GetResourceValueConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityBulletin message from the specified reader or buffer. + * Decodes a GetResourceValueConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v1.GetResourceValueConfigRequest} GetResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityBulletin.decode = function decode(reader, length) { + GetResourceValueConfigRequest.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.cloud.securitycenter.v1.SecurityBulletin(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetResourceValueConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bulletinId = reader.string(); - break; - } - case 2: { - message.submissionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.suggestedUpgradeVersion = reader.string(); + message.name = reader.string(); break; } default: @@ -24040,150 +38175,124 @@ }; /** - * Decodes a SecurityBulletin message from the specified reader or buffer, length delimited. + * Decodes a GetResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v1.GetResourceValueConfigRequest} GetResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityBulletin.decodeDelimited = function decodeDelimited(reader) { + GetResourceValueConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityBulletin message. + * Verifies a GetResourceValueConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityBulletin.verify = function verify(message) { + GetResourceValueConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - if (!$util.isString(message.bulletinId)) - return "bulletinId: string expected"; - if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.submissionTime); - if (error) - return "submissionTime." + error; - } - if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) - if (!$util.isString(message.suggestedUpgradeVersion)) - return "suggestedUpgradeVersion: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a SecurityBulletin message from a plain object. Also converts values to their respective internal types. + * Creates a GetResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityBulletin} SecurityBulletin + * @returns {google.cloud.securitycenter.v1.GetResourceValueConfigRequest} GetResourceValueConfigRequest */ - SecurityBulletin.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityBulletin) + GetResourceValueConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetResourceValueConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityBulletin(); - if (object.bulletinId != null) - message.bulletinId = String(object.bulletinId); - if (object.submissionTime != null) { - if (typeof object.submissionTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SecurityBulletin.submissionTime: object expected"); - message.submissionTime = $root.google.protobuf.Timestamp.fromObject(object.submissionTime); - } - if (object.suggestedUpgradeVersion != null) - message.suggestedUpgradeVersion = String(object.suggestedUpgradeVersion); + var message = new $root.google.cloud.securitycenter.v1.GetResourceValueConfigRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a SecurityBulletin message. Also converts values to other types if specified. + * Creates a plain object from a GetResourceValueConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.SecurityBulletin} message SecurityBulletin + * @param {google.cloud.securitycenter.v1.GetResourceValueConfigRequest} message GetResourceValueConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityBulletin.toObject = function toObject(message, options) { + GetResourceValueConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.bulletinId = ""; - object.submissionTime = null; - object.suggestedUpgradeVersion = ""; - } - if (message.bulletinId != null && message.hasOwnProperty("bulletinId")) - object.bulletinId = message.bulletinId; - if (message.submissionTime != null && message.hasOwnProperty("submissionTime")) - object.submissionTime = $root.google.protobuf.Timestamp.toObject(message.submissionTime, options); - if (message.suggestedUpgradeVersion != null && message.hasOwnProperty("suggestedUpgradeVersion")) - object.suggestedUpgradeVersion = message.suggestedUpgradeVersion; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SecurityBulletin to JSON. + * Converts this GetResourceValueConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @instance * @returns {Object.} JSON object */ - SecurityBulletin.prototype.toJSON = function toJSON() { + GetResourceValueConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityBulletin + * Gets the default type url for GetResourceValueConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SecurityBulletin + * @memberof google.cloud.securitycenter.v1.GetResourceValueConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityBulletin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetResourceValueConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityBulletin"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetResourceValueConfigRequest"; }; - return SecurityBulletin; + return GetResourceValueConfigRequest; })(); - v1.MuteConfig = (function() { + v1.ListResourceValueConfigsRequest = (function() { /** - * Properties of a MuteConfig. + * Properties of a ListResourceValueConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IMuteConfig - * @property {string|null} [name] MuteConfig name - * @property {string|null} [displayName] MuteConfig displayName - * @property {string|null} [description] MuteConfig description - * @property {string|null} [filter] MuteConfig filter - * @property {google.protobuf.ITimestamp|null} [createTime] MuteConfig createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MuteConfig updateTime - * @property {string|null} [mostRecentEditor] MuteConfig mostRecentEditor + * @interface IListResourceValueConfigsRequest + * @property {string|null} [parent] ListResourceValueConfigsRequest parent + * @property {number|null} [pageSize] ListResourceValueConfigsRequest pageSize + * @property {string|null} [pageToken] ListResourceValueConfigsRequest pageToken */ /** - * Constructs a new MuteConfig. + * Constructs a new ListResourceValueConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a MuteConfig. - * @implements IMuteConfig + * @classdesc Represents a ListResourceValueConfigsRequest. + * @implements IListResourceValueConfigsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IMuteConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest=} [properties] Properties to set */ - function MuteConfig(properties) { + function ListResourceValueConfigsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24191,159 +38300,103 @@ } /** - * MuteConfig name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.MuteConfig - * @instance - */ - MuteConfig.prototype.name = ""; - - /** - * MuteConfig displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.MuteConfig - * @instance - */ - MuteConfig.prototype.displayName = ""; - - /** - * MuteConfig description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.MuteConfig - * @instance - */ - MuteConfig.prototype.description = ""; - - /** - * MuteConfig filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.MuteConfig - * @instance - */ - MuteConfig.prototype.filter = ""; - - /** - * MuteConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.securitycenter.v1.MuteConfig + * ListResourceValueConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @instance */ - MuteConfig.prototype.createTime = null; + ListResourceValueConfigsRequest.prototype.parent = ""; /** - * MuteConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1.MuteConfig + * ListResourceValueConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @instance */ - MuteConfig.prototype.updateTime = null; + ListResourceValueConfigsRequest.prototype.pageSize = 0; /** - * MuteConfig mostRecentEditor. - * @member {string} mostRecentEditor - * @memberof google.cloud.securitycenter.v1.MuteConfig + * ListResourceValueConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @instance */ - MuteConfig.prototype.mostRecentEditor = ""; + ListResourceValueConfigsRequest.prototype.pageToken = ""; /** - * Creates a new MuteConfig instance using the specified properties. + * Creates a new ListResourceValueConfigsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IMuteConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig instance + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsRequest} ListResourceValueConfigsRequest instance */ - MuteConfig.create = function create(properties) { - return new MuteConfig(properties); + ListResourceValueConfigsRequest.create = function create(properties) { + return new ListResourceValueConfigsRequest(properties); }; /** - * Encodes the specified MuteConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * Encodes the specified ListResourceValueConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IMuteConfig} message MuteConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest} message ListResourceValueConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MuteConfig.encode = function encode(message, writer) { + ListResourceValueConfigsRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.mostRecentEditor != null && Object.hasOwnProperty.call(message, "mostRecentEditor")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.mostRecentEditor); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified MuteConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.MuteConfig.verify|verify} messages. + * Encodes the specified ListResourceValueConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IMuteConfig} message MuteConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsRequest} message ListResourceValueConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MuteConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListResourceValueConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MuteConfig message from the specified reader or buffer. + * Decodes a ListResourceValueConfigsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsRequest} ListResourceValueConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MuteConfig.decode = function decode(reader, length) { + ListResourceValueConfigsRequest.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.cloud.securitycenter.v1.MuteConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.mostRecentEditor = reader.string(); + message.pageToken = reader.string(); break; } default: @@ -24355,185 +38408,141 @@ }; /** - * Decodes a MuteConfig message from the specified reader or buffer, length delimited. + * Decodes a ListResourceValueConfigsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsRequest} ListResourceValueConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MuteConfig.decodeDelimited = function decodeDelimited(reader) { + ListResourceValueConfigsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MuteConfig message. + * Verifies a ListResourceValueConfigsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MuteConfig.verify = function verify(message) { + ListResourceValueConfigsRequest.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - if (!$util.isString(message.mostRecentEditor)) - return "mostRecentEditor: string expected"; - return null; - }; - - /** - * Creates a MuteConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.MuteConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.MuteConfig} MuteConfig - */ - MuteConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.MuteConfig) - return object; - var message = new $root.google.cloud.securitycenter.v1.MuteConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.filter != null) - message.filter = String(object.filter); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.MuteConfig.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.MuteConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.mostRecentEditor != null) - message.mostRecentEditor = String(object.mostRecentEditor); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListResourceValueConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsRequest} ListResourceValueConfigsRequest + */ + ListResourceValueConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a MuteConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListResourceValueConfigsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.MuteConfig} message MuteConfig + * @param {google.cloud.securitycenter.v1.ListResourceValueConfigsRequest} message ListResourceValueConfigsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MuteConfig.toObject = function toObject(message, options) { + ListResourceValueConfigsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.filter = ""; - object.createTime = null; - object.updateTime = null; - object.mostRecentEditor = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - 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.mostRecentEditor != null && message.hasOwnProperty("mostRecentEditor")) - object.mostRecentEditor = message.mostRecentEditor; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this MuteConfig to JSON. + * Converts this ListResourceValueConfigsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @instance * @returns {Object.} JSON object */ - MuteConfig.prototype.toJSON = function toJSON() { + ListResourceValueConfigsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MuteConfig + * Gets the default type url for ListResourceValueConfigsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.MuteConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MuteConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListResourceValueConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.MuteConfig"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListResourceValueConfigsRequest"; }; - return MuteConfig; + return ListResourceValueConfigsRequest; })(); - v1.NotificationConfig = (function() { + v1.ListResourceValueConfigsResponse = (function() { /** - * Properties of a NotificationConfig. + * Properties of a ListResourceValueConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface INotificationConfig - * @property {string|null} [name] NotificationConfig name - * @property {string|null} [description] NotificationConfig description - * @property {string|null} [pubsubTopic] NotificationConfig pubsubTopic - * @property {string|null} [serviceAccount] NotificationConfig serviceAccount - * @property {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null} [streamingConfig] NotificationConfig streamingConfig + * @interface IListResourceValueConfigsResponse + * @property {Array.|null} [resourceValueConfigs] ListResourceValueConfigsResponse resourceValueConfigs + * @property {string|null} [nextPageToken] ListResourceValueConfigsResponse nextPageToken */ /** - * Constructs a new NotificationConfig. + * Constructs a new ListResourceValueConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig + * @classdesc Represents a ListResourceValueConfigsResponse. + * @implements IListResourceValueConfigsResponse * @constructor - * @param {google.cloud.securitycenter.v1.INotificationConfig=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsResponse=} [properties] Properties to set */ - function NotificationConfig(properties) { + function ListResourceValueConfigsResponse(properties) { + this.resourceValueConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24541,145 +38550,92 @@ } /** - * NotificationConfig name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.name = ""; - - /** - * NotificationConfig description. - * @member {string} description - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.description = ""; - - /** - * NotificationConfig pubsubTopic. - * @member {string} pubsubTopic - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.pubsubTopic = ""; - - /** - * NotificationConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @instance - */ - NotificationConfig.prototype.serviceAccount = ""; - - /** - * NotificationConfig streamingConfig. - * @member {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig|null|undefined} streamingConfig - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * ListResourceValueConfigsResponse resourceValueConfigs. + * @member {Array.} resourceValueConfigs + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @instance */ - NotificationConfig.prototype.streamingConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListResourceValueConfigsResponse.prototype.resourceValueConfigs = $util.emptyArray; /** - * NotificationConfig notifyConfig. - * @member {"streamingConfig"|undefined} notifyConfig - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * ListResourceValueConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @instance */ - Object.defineProperty(NotificationConfig.prototype, "notifyConfig", { - get: $util.oneOfGetter($oneOfFields = ["streamingConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListResourceValueConfigsResponse.prototype.nextPageToken = ""; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new ListResourceValueConfigsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.INotificationConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig instance + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} ListResourceValueConfigsResponse instance */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); + ListResourceValueConfigsResponse.create = function create(properties) { + return new ListResourceValueConfigsResponse(properties); }; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * Encodes the specified ListResourceValueConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsResponse} message ListResourceValueConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encode = function encode(message, writer) { + ListResourceValueConfigsResponse.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.pubsubTopic != null && Object.hasOwnProperty.call(message, "pubsubTopic")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pubsubTopic); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceAccount); - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.encode(message.streamingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.resourceValueConfigs != null && message.resourceValueConfigs.length) + for (var i = 0; i < message.resourceValueConfigs.length; ++i) + $root.google.cloud.securitycenter.v1.ResourceValueConfig.encode(message.resourceValueConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.verify|verify} messages. + * Encodes the specified ListResourceValueConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListResourceValueConfigsResponse} message ListResourceValueConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListResourceValueConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes a ListResourceValueConfigsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} ListResourceValueConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decode = function decode(reader, length) { + ListResourceValueConfigsResponse.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.cloud.securitycenter.v1.NotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.resourceValueConfigs && message.resourceValueConfigs.length)) + message.resourceValueConfigs = []; + message.resourceValueConfigs.push($root.google.cloud.securitycenter.v1.ResourceValueConfig.decode(reader, reader.uint32())); break; } case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.pubsubTopic = reader.string(); - break; - } - case 4: { - message.serviceAccount = reader.string(); - break; - } - case 5: { - message.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -24691,371 +38647,149 @@ }; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListResourceValueConfigsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} ListResourceValueConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + ListResourceValueConfigsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationConfig message. + * Verifies a ListResourceValueConfigsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationConfig.verify = function verify(message) { + ListResourceValueConfigsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) - if (!$util.isString(message.pubsubTopic)) - return "pubsubTopic: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - properties.notifyConfig = 1; - { - var error = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify(message.streamingConfig); + if (message.resourceValueConfigs != null && message.hasOwnProperty("resourceValueConfigs")) { + if (!Array.isArray(message.resourceValueConfigs)) + return "resourceValueConfigs: array expected"; + for (var i = 0; i < message.resourceValueConfigs.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfig.verify(message.resourceValueConfigs[i]); if (error) - return "streamingConfig." + error; + return "resourceValueConfigs." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListResourceValueConfigsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.NotificationConfig} NotificationConfig + * @returns {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} ListResourceValueConfigsResponse */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.NotificationConfig) + ListResourceValueConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.NotificationConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.pubsubTopic != null) - message.pubsubTopic = String(object.pubsubTopic); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.streamingConfig != null) { - if (typeof object.streamingConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.NotificationConfig.streamingConfig: object expected"); - message.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.fromObject(object.streamingConfig); + var message = new $root.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse(); + if (object.resourceValueConfigs) { + if (!Array.isArray(object.resourceValueConfigs)) + throw TypeError(".google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.resourceValueConfigs: array expected"); + message.resourceValueConfigs = []; + for (var i = 0; i < object.resourceValueConfigs.length; ++i) { + if (typeof object.resourceValueConfigs[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListResourceValueConfigsResponse.resourceValueConfigs: object expected"); + message.resourceValueConfigs[i] = $root.google.cloud.securitycenter.v1.ResourceValueConfig.fromObject(object.resourceValueConfigs[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListResourceValueConfigsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.NotificationConfig} message NotificationConfig + * @param {google.cloud.securitycenter.v1.ListResourceValueConfigsResponse} message ListResourceValueConfigsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationConfig.toObject = function toObject(message, options) { + ListResourceValueConfigsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.pubsubTopic = ""; - object.serviceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.pubsubTopic != null && message.hasOwnProperty("pubsubTopic")) - object.pubsubTopic = message.pubsubTopic; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - object.streamingConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.toObject(message.streamingConfig, options); - if (options.oneofs) - object.notifyConfig = "streamingConfig"; + if (options.arrays || options.defaults) + object.resourceValueConfigs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceValueConfigs && message.resourceValueConfigs.length) { + object.resourceValueConfigs = []; + for (var j = 0; j < message.resourceValueConfigs.length; ++j) + object.resourceValueConfigs[j] = $root.google.cloud.securitycenter.v1.ResourceValueConfig.toObject(message.resourceValueConfigs[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this NotificationConfig to JSON. + * Converts this ListResourceValueConfigsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @instance * @returns {Object.} JSON object */ - NotificationConfig.prototype.toJSON = function toJSON() { + ListResourceValueConfigsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NotificationConfig + * Gets the default type url for ListResourceValueConfigsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.NotificationConfig + * @memberof google.cloud.securitycenter.v1.ListResourceValueConfigsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListResourceValueConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationConfig"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListResourceValueConfigsResponse"; }; - NotificationConfig.StreamingConfig = (function() { - - /** - * Properties of a StreamingConfig. - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @interface IStreamingConfig - * @property {string|null} [filter] StreamingConfig filter - */ - - /** - * Constructs a new StreamingConfig. - * @memberof google.cloud.securitycenter.v1.NotificationConfig - * @classdesc Represents a StreamingConfig. - * @implements IStreamingConfig - * @constructor - * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig=} [properties] Properties to set - */ - function StreamingConfig(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]]; - } - - /** - * StreamingConfig filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @instance - */ - StreamingConfig.prototype.filter = ""; - - /** - * Creates a new StreamingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig instance - */ - StreamingConfig.create = function create(properties) { - return new StreamingConfig(properties); - }; - - /** - * Encodes the specified StreamingConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - return writer; - }; - - /** - * Encodes the specified StreamingConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {google.cloud.securitycenter.v1.NotificationConfig.IStreamingConfig} message StreamingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingConfig.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.cloud.securitycenter.v1.NotificationConfig.StreamingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamingConfig message. - * @function verify - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a StreamingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} StreamingConfig - */ - StreamingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig) - return object; - var message = new $root.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig(); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a StreamingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig} message StreamingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.filter = ""; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this StreamingConfig to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @instance - * @returns {Object.} JSON object - */ - StreamingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamingConfig - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig"; - }; - - return StreamingConfig; - })(); - - return NotificationConfig; + return ListResourceValueConfigsResponse; })(); - v1.NotificationMessage = (function() { + v1.UpdateResourceValueConfigRequest = (function() { /** - * Properties of a NotificationMessage. + * Properties of an UpdateResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface INotificationMessage - * @property {string|null} [notificationConfigName] NotificationMessage notificationConfigName - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] NotificationMessage finding - * @property {google.cloud.securitycenter.v1.IResource|null} [resource] NotificationMessage resource + * @interface IUpdateResourceValueConfigRequest + * @property {google.cloud.securitycenter.v1.IResourceValueConfig|null} [resourceValueConfig] UpdateResourceValueConfigRequest resourceValueConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateResourceValueConfigRequest updateMask */ /** - * Constructs a new NotificationMessage. + * Constructs a new UpdateResourceValueConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a NotificationMessage. - * @implements INotificationMessage + * @classdesc Represents an UpdateResourceValueConfigRequest. + * @implements IUpdateResourceValueConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.INotificationMessage=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest=} [properties] Properties to set */ - function NotificationMessage(properties) { + function UpdateResourceValueConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25063,117 +38797,89 @@ } /** - * NotificationMessage notificationConfigName. - * @member {string} notificationConfigName - * @memberof google.cloud.securitycenter.v1.NotificationMessage - * @instance - */ - NotificationMessage.prototype.notificationConfigName = ""; - - /** - * NotificationMessage finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.NotificationMessage - * @instance - */ - NotificationMessage.prototype.finding = null; - - /** - * NotificationMessage resource. - * @member {google.cloud.securitycenter.v1.IResource|null|undefined} resource - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * UpdateResourceValueConfigRequest resourceValueConfig. + * @member {google.cloud.securitycenter.v1.IResourceValueConfig|null|undefined} resourceValueConfig + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @instance */ - NotificationMessage.prototype.resource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateResourceValueConfigRequest.prototype.resourceValueConfig = null; /** - * NotificationMessage event. - * @member {"finding"|undefined} event - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * UpdateResourceValueConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @instance */ - Object.defineProperty(NotificationMessage.prototype, "event", { - get: $util.oneOfGetter($oneOfFields = ["finding"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateResourceValueConfigRequest.prototype.updateMask = null; /** - * Creates a new NotificationMessage instance using the specified properties. + * Creates a new UpdateResourceValueConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.INotificationMessage=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage instance + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest} UpdateResourceValueConfigRequest instance */ - NotificationMessage.create = function create(properties) { - return new NotificationMessage(properties); + UpdateResourceValueConfigRequest.create = function create(properties) { + return new UpdateResourceValueConfigRequest(properties); }; /** - * Encodes the specified NotificationMessage message. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * Encodes the specified UpdateResourceValueConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.INotificationMessage} message NotificationMessage message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest} message UpdateResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationMessage.encode = function encode(message, writer) { + UpdateResourceValueConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationConfigName != null && Object.hasOwnProperty.call(message, "notificationConfigName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.notificationConfigName); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.securitycenter.v1.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceValueConfig != null && Object.hasOwnProperty.call(message, "resourceValueConfig")) + $root.google.cloud.securitycenter.v1.ResourceValueConfig.encode(message.resourceValueConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified NotificationMessage message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.NotificationMessage.verify|verify} messages. + * Encodes the specified UpdateResourceValueConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.INotificationMessage} message NotificationMessage message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest} message UpdateResourceValueConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationMessage.encodeDelimited = function encodeDelimited(message, writer) { + UpdateResourceValueConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationMessage message from the specified reader or buffer. + * Decodes an UpdateResourceValueConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + * @returns {google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest} UpdateResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationMessage.decode = function decode(reader, length) { + UpdateResourceValueConfigRequest.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.cloud.securitycenter.v1.NotificationMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.notificationConfigName = reader.string(); + message.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.decode(reader, reader.uint32()); break; } case 2: { - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.securitycenter.v1.Resource.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -25185,163 +38891,143 @@ }; /** - * Decodes a NotificationMessage message from the specified reader or buffer, length delimited. + * Decodes an UpdateResourceValueConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + * @returns {google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest} UpdateResourceValueConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationMessage.decodeDelimited = function decodeDelimited(reader) { + UpdateResourceValueConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationMessage message. + * Verifies an UpdateResourceValueConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationMessage.verify = function verify(message) { + UpdateResourceValueConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) - if (!$util.isString(message.notificationConfigName)) - return "notificationConfigName: string expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - properties.event = 1; - { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } + if (message.resourceValueConfig != null && message.hasOwnProperty("resourceValueConfig")) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfig.verify(message.resourceValueConfig); + if (error) + return "resourceValueConfig." + error; } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.securitycenter.v1.Resource.verify(message.resource); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "resource." + error; + return "updateMask." + error; } return null; }; /** - * Creates a NotificationMessage message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateResourceValueConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.NotificationMessage} NotificationMessage + * @returns {google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest} UpdateResourceValueConfigRequest */ - NotificationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.NotificationMessage) + UpdateResourceValueConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.NotificationMessage(); - if (object.notificationConfigName != null) - message.notificationConfigName = String(object.notificationConfigName); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + var message = new $root.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest(); + if (object.resourceValueConfig != null) { + if (typeof object.resourceValueConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.resourceValueConfig: object expected"); + message.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.fromObject(object.resourceValueConfig); } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.securitycenter.v1.NotificationMessage.resource: object expected"); - message.resource = $root.google.cloud.securitycenter.v1.Resource.fromObject(object.resource); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a NotificationMessage message. Also converts values to other types if specified. + * Creates a plain object from an UpdateResourceValueConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static - * @param {google.cloud.securitycenter.v1.NotificationMessage} message NotificationMessage + * @param {google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest} message UpdateResourceValueConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationMessage.toObject = function toObject(message, options) { + UpdateResourceValueConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.notificationConfigName = ""; - object.resource = null; - } - if (message.notificationConfigName != null && message.hasOwnProperty("notificationConfigName")) - object.notificationConfigName = message.notificationConfigName; - if (message.finding != null && message.hasOwnProperty("finding")) { - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (options.oneofs) - object.event = "finding"; + object.resourceValueConfig = null; + object.updateMask = null; } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.securitycenter.v1.Resource.toObject(message.resource, options); + if (message.resourceValueConfig != null && message.hasOwnProperty("resourceValueConfig")) + object.resourceValueConfig = $root.google.cloud.securitycenter.v1.ResourceValueConfig.toObject(message.resourceValueConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this NotificationMessage to JSON. + * Converts this UpdateResourceValueConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @instance * @returns {Object.} JSON object */ - NotificationMessage.prototype.toJSON = function toJSON() { + UpdateResourceValueConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NotificationMessage + * Gets the default type url for UpdateResourceValueConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.NotificationMessage + * @memberof google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateResourceValueConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.NotificationMessage"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest"; }; - return NotificationMessage; + return UpdateResourceValueConfigRequest; })(); - v1.Resource = (function() { + v1.CreateNotificationConfigRequest = (function() { /** - * Properties of a Resource. + * Properties of a CreateNotificationConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IResource - * @property {string|null} [name] Resource name - * @property {string|null} [displayName] Resource displayName - * @property {string|null} [type] Resource type - * @property {string|null} [project] Resource project - * @property {string|null} [projectDisplayName] Resource projectDisplayName - * @property {string|null} [parent] Resource parent - * @property {string|null} [parentDisplayName] Resource parentDisplayName - * @property {Array.|null} [folders] Resource folders + * @interface ICreateNotificationConfigRequest + * @property {string|null} [parent] CreateNotificationConfigRequest parent + * @property {string|null} [configId] CreateNotificationConfigRequest configId + * @property {google.cloud.securitycenter.v1.INotificationConfig|null} [notificationConfig] CreateNotificationConfigRequest notificationConfig */ /** - * Constructs a new Resource. + * Constructs a new CreateNotificationConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a Resource. - * @implements IResource + * @classdesc Represents a CreateNotificationConfigRequest. + * @implements ICreateNotificationConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest=} [properties] Properties to set */ - function Resource(properties) { - this.folders = []; + function CreateNotificationConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25349,176 +39035,103 @@ } /** - * Resource name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.Resource - * @instance - */ - Resource.prototype.name = ""; - - /** - * Resource displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.Resource - * @instance - */ - Resource.prototype.displayName = ""; - - /** - * Resource type. - * @member {string} type - * @memberof google.cloud.securitycenter.v1.Resource - * @instance - */ - Resource.prototype.type = ""; - - /** - * Resource project. - * @member {string} project - * @memberof google.cloud.securitycenter.v1.Resource - * @instance - */ - Resource.prototype.project = ""; - - /** - * Resource projectDisplayName. - * @member {string} projectDisplayName - * @memberof google.cloud.securitycenter.v1.Resource - * @instance - */ - Resource.prototype.projectDisplayName = ""; - - /** - * Resource parent. + * CreateNotificationConfigRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @instance */ - Resource.prototype.parent = ""; + CreateNotificationConfigRequest.prototype.parent = ""; /** - * Resource parentDisplayName. - * @member {string} parentDisplayName - * @memberof google.cloud.securitycenter.v1.Resource + * CreateNotificationConfigRequest configId. + * @member {string} configId + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @instance */ - Resource.prototype.parentDisplayName = ""; + CreateNotificationConfigRequest.prototype.configId = ""; /** - * Resource folders. - * @member {Array.} folders - * @memberof google.cloud.securitycenter.v1.Resource + * CreateNotificationConfigRequest notificationConfig. + * @member {google.cloud.securitycenter.v1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @instance */ - Resource.prototype.folders = $util.emptyArray; + CreateNotificationConfigRequest.prototype.notificationConfig = null; /** - * Creates a new Resource instance using the specified properties. + * Creates a new CreateNotificationConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.Resource} Resource instance + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest instance */ - Resource.create = function create(properties) { - return new Resource(properties); + CreateNotificationConfigRequest.create = function create(properties) { + return new CreateNotificationConfigRequest(properties); }; /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * Encodes the specified CreateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} message CreateNotificationConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encode = function encode(message, writer) { + CreateNotificationConfigRequest.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.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); - if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); - if (message.folders != null && message.folders.length) - for (var i = 0; i < message.folders.length; ++i) - $root.google.cloud.securitycenter.v1.Folder.encode(message.folders[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.configId != null && Object.hasOwnProperty.call(message, "configId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.configId); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Resource.verify|verify} messages. + * Encodes the specified CreateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IResource} message Resource message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} message CreateNotificationConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { + CreateNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Resource message from the specified reader or buffer. + * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decode = function decode(reader, length) { + CreateNotificationConfigRequest.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.cloud.securitycenter.v1.Resource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 8: { - message.displayName = reader.string(); - break; - } - case 6: { - message.type = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.project = reader.string(); + message.configId = reader.string(); break; } case 3: { - message.projectDisplayName = reader.string(); - break; - } - case 4: { - message.parent = reader.string(); - break; - } - case 5: { - message.parentDisplayName = reader.string(); - break; - } - case 7: { - if (!(message.folders && message.folders.length)) - message.folders = []; - message.folders.push($root.google.cloud.securitycenter.v1.Folder.decode(reader, reader.uint32())); + message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32()); break; } default: @@ -25530,199 +39143,145 @@ }; /** - * Decodes a Resource message from the specified reader or buffer, length delimited. + * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Resource.decodeDelimited = function decodeDelimited(reader) { + CreateNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Resource message. + * Verifies a CreateNotificationConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Resource.verify = function verify(message) { + CreateNotificationConfigRequest.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.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - if (!$util.isString(message.projectDisplayName)) - return "projectDisplayName: string expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - if (!$util.isString(message.parentDisplayName)) - return "parentDisplayName: string expected"; - if (message.folders != null && message.hasOwnProperty("folders")) { - if (!Array.isArray(message.folders)) - return "folders: array expected"; - for (var i = 0; i < message.folders.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Folder.verify(message.folders[i]); - if (error) - return "folders." + error; - } + if (message.configId != null && message.hasOwnProperty("configId")) + if (!$util.isString(message.configId)) + return "configId: string expected"; + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; } return null; }; /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * Creates a CreateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.Resource} Resource + * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.Resource) + CreateNotificationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.Resource(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) - message.type = String(object.type); - if (object.project != null) - message.project = String(object.project); - if (object.projectDisplayName != null) - message.projectDisplayName = String(object.projectDisplayName); + var message = new $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.parentDisplayName != null) - message.parentDisplayName = String(object.parentDisplayName); - if (object.folders) { - if (!Array.isArray(object.folders)) - throw TypeError(".google.cloud.securitycenter.v1.Resource.folders: array expected"); - message.folders = []; - for (var i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.Resource.folders: object expected"); - message.folders[i] = $root.google.cloud.securitycenter.v1.Folder.fromObject(object.folders[i]); - } + if (object.configId != null) + message.configId = String(object.configId); + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateNotificationConfigRequest.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfig); } return message; }; /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. + * Creates a plain object from a CreateNotificationConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.Resource} message Resource + * @param {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} message CreateNotificationConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Resource.toObject = function toObject(message, options) { + CreateNotificationConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.folders = []; if (options.defaults) { - object.name = ""; - object.project = ""; - object.projectDisplayName = ""; object.parent = ""; - object.parentDisplayName = ""; - object.type = ""; - object.displayName = ""; + object.configId = ""; + object.notificationConfig = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - object.projectDisplayName = message.projectDisplayName; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - object.parentDisplayName = message.parentDisplayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.folders && message.folders.length) { - object.folders = []; - for (var j = 0; j < message.folders.length; ++j) - object.folders[j] = $root.google.cloud.securitycenter.v1.Folder.toObject(message.folders[j], options); - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.configId != null && message.hasOwnProperty("configId")) + object.configId = message.configId; + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfig, options); return object; }; /** - * Converts this Resource to JSON. + * Converts this CreateNotificationConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @instance * @returns {Object.} JSON object */ - Resource.prototype.toJSON = function toJSON() { + CreateNotificationConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Resource + * Gets the default type url for CreateNotificationConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.Resource + * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.Resource"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateNotificationConfigRequest"; }; - return Resource; + return CreateNotificationConfigRequest; })(); - v1.OrganizationSettings = (function() { + v1.CreateSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Properties of an OrganizationSettings. + * Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IOrganizationSettings - * @property {string|null} [name] OrganizationSettings name - * @property {boolean|null} [enableAssetDiscovery] OrganizationSettings enableAssetDiscovery - * @property {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null} [assetDiscoveryConfig] OrganizationSettings assetDiscoveryConfig + * @interface ICreateSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [parent] CreateSecurityHealthAnalyticsCustomModuleRequest parent + * @property {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ /** - * Constructs a new OrganizationSettings. + * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an OrganizationSettings. - * @implements IOrganizationSettings + * @classdesc Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. + * @implements ICreateSecurityHealthAnalyticsCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ - function OrganizationSettings(properties) { + function CreateSecurityHealthAnalyticsCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25730,103 +39289,89 @@ } /** - * OrganizationSettings name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @instance - */ - OrganizationSettings.prototype.name = ""; - - /** - * OrganizationSettings enableAssetDiscovery. - * @member {boolean} enableAssetDiscovery - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * CreateSecurityHealthAnalyticsCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - OrganizationSettings.prototype.enableAssetDiscovery = false; + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; /** - * OrganizationSettings assetDiscoveryConfig. - * @member {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig|null|undefined} assetDiscoveryConfig - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. + * @member {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - OrganizationSettings.prototype.assetDiscoveryConfig = null; + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; /** - * Creates a new OrganizationSettings instance using the specified properties. + * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings instance + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest instance */ - OrganizationSettings.create = function create(properties) { - return new OrganizationSettings(properties); + CreateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new CreateSecurityHealthAnalyticsCustomModuleRequest(properties); }; /** - * Encodes the specified OrganizationSettings message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrganizationSettings.encode = function encode(message, writer) { + CreateSecurityHealthAnalyticsCustomModuleRequest.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.enableAssetDiscovery != null && Object.hasOwnProperty.call(message, "enableAssetDiscovery")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableAssetDiscovery); - if (message.assetDiscoveryConfig != null && Object.hasOwnProperty.call(message, "assetDiscoveryConfig")) - $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.encode(message.assetDiscoveryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) + $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified OrganizationSettings message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.verify|verify} messages. + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IOrganizationSettings} message OrganizationSettings message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrganizationSettings.encodeDelimited = function encodeDelimited(message, writer) { + CreateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OrganizationSettings message from the specified reader or buffer. + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrganizationSettings.decode = function decode(reader, length) { + CreateSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.OrganizationSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.enableAssetDiscovery = reader.bool(); - break; - } - case 3: { - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.decode(reader, reader.uint32()); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); break; } default: @@ -25838,468 +39383,137 @@ }; /** - * Decodes an OrganizationSettings message from the specified reader or buffer, length delimited. + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrganizationSettings.decodeDelimited = function decodeDelimited(reader) { + CreateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrganizationSettings message. + * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrganizationSettings.verify = function verify(message) { + CreateSecurityHealthAnalyticsCustomModuleRequest.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.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - if (typeof message.enableAssetDiscovery !== "boolean") - return "enableAssetDiscovery: boolean expected"; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) { - var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify(message.assetDiscoveryConfig); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { + var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); if (error) - return "assetDiscoveryConfig." + error; + return "securityHealthAnalyticsCustomModule." + error; } return null; }; /** - * Creates an OrganizationSettings message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.OrganizationSettings} OrganizationSettings + * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest */ - OrganizationSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings) + CreateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings(); - if (object.name != null) - message.name = String(object.name); - if (object.enableAssetDiscovery != null) - message.enableAssetDiscovery = Boolean(object.enableAssetDiscovery); - if (object.assetDiscoveryConfig != null) { - if (typeof object.assetDiscoveryConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.assetDiscoveryConfig: object expected"); - message.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.fromObject(object.assetDiscoveryConfig); + var message = new $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.securityHealthAnalyticsCustomModule != null) { + if (typeof object.securityHealthAnalyticsCustomModule !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); } return message; }; /** - * Creates a plain object from an OrganizationSettings message. Also converts values to other types if specified. + * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings} message OrganizationSettings + * @param {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrganizationSettings.toObject = function toObject(message, options) { + CreateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.enableAssetDiscovery = false; - object.assetDiscoveryConfig = null; + object.parent = ""; + object.securityHealthAnalyticsCustomModule = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.enableAssetDiscovery != null && message.hasOwnProperty("enableAssetDiscovery")) - object.enableAssetDiscovery = message.enableAssetDiscovery; - if (message.assetDiscoveryConfig != null && message.hasOwnProperty("assetDiscoveryConfig")) - object.assetDiscoveryConfig = $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.toObject(message.assetDiscoveryConfig, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) + object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); return object; }; /** - * Converts this OrganizationSettings to JSON. + * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.OrganizationSettings + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest * @instance * @returns {Object.} JSON object */ - OrganizationSettings.prototype.toJSON = function toJSON() { + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Gets the default type url for OrganizationSettings - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrganizationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrganizationSettings"; - }; - - OrganizationSettings.AssetDiscoveryConfig = (function() { - - /** - * Properties of an AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @interface IAssetDiscoveryConfig - * @property {Array.|null} [projectIds] AssetDiscoveryConfig projectIds - * @property {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode|null} [inclusionMode] AssetDiscoveryConfig inclusionMode - * @property {Array.|null} [folderIds] AssetDiscoveryConfig folderIds - */ - - /** - * Constructs a new AssetDiscoveryConfig. - * @memberof google.cloud.securitycenter.v1.OrganizationSettings - * @classdesc Represents an AssetDiscoveryConfig. - * @implements IAssetDiscoveryConfig - * @constructor - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - */ - function AssetDiscoveryConfig(properties) { - this.projectIds = []; - this.folderIds = []; - 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]]; - } - - /** - * AssetDiscoveryConfig projectIds. - * @member {Array.} projectIds - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.projectIds = $util.emptyArray; - - /** - * AssetDiscoveryConfig inclusionMode. - * @member {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode} inclusionMode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.inclusionMode = 0; - - /** - * AssetDiscoveryConfig folderIds. - * @member {Array.} folderIds - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - */ - AssetDiscoveryConfig.prototype.folderIds = $util.emptyArray; - - /** - * Creates a new AssetDiscoveryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig instance - */ - AssetDiscoveryConfig.create = function create(properties) { - return new AssetDiscoveryConfig(properties); - }; - - /** - * Encodes the specified AssetDiscoveryConfig message. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectIds != null && message.projectIds.length) - for (var i = 0; i < message.projectIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIds[i]); - if (message.inclusionMode != null && Object.hasOwnProperty.call(message, "inclusionMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.inclusionMode); - if (message.folderIds != null && message.folderIds.length) - for (var i = 0; i < message.folderIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.folderIds[i]); - return writer; - }; - - /** - * Encodes the specified AssetDiscoveryConfig message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.IAssetDiscoveryConfig} message AssetDiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetDiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetDiscoveryConfig.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.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.projectIds && message.projectIds.length)) - message.projectIds = []; - message.projectIds.push(reader.string()); - break; - } - case 2: { - message.inclusionMode = reader.int32(); - break; - } - case 3: { - if (!(message.folderIds && message.folderIds.length)) - message.folderIds = []; - message.folderIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssetDiscoveryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetDiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssetDiscoveryConfig message. - * @function verify - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssetDiscoveryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectIds != null && message.hasOwnProperty("projectIds")) { - if (!Array.isArray(message.projectIds)) - return "projectIds: array expected"; - for (var i = 0; i < message.projectIds.length; ++i) - if (!$util.isString(message.projectIds[i])) - return "projectIds: string[] expected"; - } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - switch (message.inclusionMode) { - default: - return "inclusionMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.folderIds != null && message.hasOwnProperty("folderIds")) { - if (!Array.isArray(message.folderIds)) - return "folderIds: array expected"; - for (var i = 0; i < message.folderIds.length; ++i) - if (!$util.isString(message.folderIds[i])) - return "folderIds: string[] expected"; - } - return null; - }; - - /** - * Creates an AssetDiscoveryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} AssetDiscoveryConfig - */ - AssetDiscoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig) - return object; - var message = new $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig(); - if (object.projectIds) { - if (!Array.isArray(object.projectIds)) - throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.projectIds: array expected"); - message.projectIds = []; - for (var i = 0; i < object.projectIds.length; ++i) - message.projectIds[i] = String(object.projectIds[i]); - } - switch (object.inclusionMode) { - default: - if (typeof object.inclusionMode === "number") { - message.inclusionMode = object.inclusionMode; - break; - } - break; - case "INCLUSION_MODE_UNSPECIFIED": - case 0: - message.inclusionMode = 0; - break; - case "INCLUDE_ONLY": - case 1: - message.inclusionMode = 1; - break; - case "EXCLUDE": - case 2: - message.inclusionMode = 2; - break; - } - if (object.folderIds) { - if (!Array.isArray(object.folderIds)) - throw TypeError(".google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.folderIds: array expected"); - message.folderIds = []; - for (var i = 0; i < object.folderIds.length; ++i) - message.folderIds[i] = String(object.folderIds[i]); - } - return message; - }; - - /** - * Creates a plain object from an AssetDiscoveryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig} message AssetDiscoveryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssetDiscoveryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.projectIds = []; - object.folderIds = []; - } - if (options.defaults) - object.inclusionMode = options.enums === String ? "INCLUSION_MODE_UNSPECIFIED" : 0; - if (message.projectIds && message.projectIds.length) { - object.projectIds = []; - for (var j = 0; j < message.projectIds.length; ++j) - object.projectIds[j] = message.projectIds[j]; - } - if (message.inclusionMode != null && message.hasOwnProperty("inclusionMode")) - object.inclusionMode = options.enums === String ? $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] === undefined ? message.inclusionMode : $root.google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode[message.inclusionMode] : message.inclusionMode; - if (message.folderIds && message.folderIds.length) { - object.folderIds = []; - for (var j = 0; j < message.folderIds.length; ++j) - object.folderIds[j] = message.folderIds[j]; - } - return object; - }; - - /** - * Converts this AssetDiscoveryConfig to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @instance - * @returns {Object.} JSON object - */ - AssetDiscoveryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssetDiscoveryConfig - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssetDiscoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig"; - }; - - /** - * InclusionMode enum. - * @name google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode - * @enum {number} - * @property {number} INCLUSION_MODE_UNSPECIFIED=0 INCLUSION_MODE_UNSPECIFIED value - * @property {number} INCLUDE_ONLY=1 INCLUDE_ONLY value - * @property {number} EXCLUDE=2 EXCLUDE value - */ - AssetDiscoveryConfig.InclusionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INCLUSION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE_ONLY"] = 1; - values[valuesById[2] = "EXCLUDE"] = 2; - return values; - })(); - - return AssetDiscoveryConfig; - })(); + /** + * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest"; + }; - return OrganizationSettings; + return CreateSecurityHealthAnalyticsCustomModuleRequest; })(); - v1.RunAssetDiscoveryResponse = (function() { + v1.CreateSourceRequest = (function() { /** - * Properties of a RunAssetDiscoveryResponse. + * Properties of a CreateSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IRunAssetDiscoveryResponse - * @property {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State|null} [state] RunAssetDiscoveryResponse state - * @property {google.protobuf.IDuration|null} [duration] RunAssetDiscoveryResponse duration + * @interface ICreateSourceRequest + * @property {string|null} [parent] CreateSourceRequest parent + * @property {google.cloud.securitycenter.v1.ISource|null} [source] CreateSourceRequest source */ /** - * Constructs a new RunAssetDiscoveryResponse. + * Constructs a new CreateSourceRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a RunAssetDiscoveryResponse. - * @implements IRunAssetDiscoveryResponse + * @classdesc Represents a CreateSourceRequest. + * @implements ICreateSourceRequest * @constructor - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set */ - function RunAssetDiscoveryResponse(properties) { + function CreateSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26307,89 +39521,89 @@ } /** - * RunAssetDiscoveryResponse state. - * @member {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State} state - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * CreateSourceRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance */ - RunAssetDiscoveryResponse.prototype.state = 0; + CreateSourceRequest.prototype.parent = ""; /** - * RunAssetDiscoveryResponse duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * CreateSourceRequest source. + * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance */ - RunAssetDiscoveryResponse.prototype.duration = null; + CreateSourceRequest.prototype.source = null; /** - * Creates a new RunAssetDiscoveryResponse instance using the specified properties. + * Creates a new CreateSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse instance + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest instance */ - RunAssetDiscoveryResponse.create = function create(properties) { - return new RunAssetDiscoveryResponse(properties); + CreateSourceRequest.create = function create(properties) { + return new CreateSourceRequest(properties); }; /** - * Encodes the specified RunAssetDiscoveryResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryResponse.encode = function encode(message, writer) { + CreateSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RunAssetDiscoveryResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.verify|verify} messages. + * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse} message RunAssetDiscoveryResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer. + * Decodes a CreateSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryResponse.decode = function decode(reader, length) { + CreateSourceRequest.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.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.state = reader.int32(); + message.parent = reader.string(); break; } case 2: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); break; } default: @@ -26401,189 +39615,136 @@ }; /** - * Decodes a RunAssetDiscoveryResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryResponse.decodeDelimited = function decodeDelimited(reader) { + CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunAssetDiscoveryResponse message. + * Verifies a CreateSourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunAssetDiscoveryResponse.verify = function verify(message) { + CreateSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); if (error) - return "duration." + error; + return "source." + error; } return null; }; /** - * Creates a RunAssetDiscoveryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} RunAssetDiscoveryResponse + * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest */ - RunAssetDiscoveryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse) + CreateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateSourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "COMPLETED": - case 1: - message.state = 1; - break; - case "SUPERSEDED": - case 2: - message.state = 2; - break; - case "TERMINATED": - case 3: - message.state = 3; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + var message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); } return message; }; /** - * Creates a plain object from a RunAssetDiscoveryResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static - * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryResponse} message RunAssetDiscoveryResponse + * @param {google.cloud.securitycenter.v1.CreateSourceRequest} message CreateSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunAssetDiscoveryResponse.toObject = function toObject(message, options) { + CreateSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.duration = null; + object.parent = ""; + object.source = null; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State[message.state] : message.state; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); return object; }; /** - * Converts this RunAssetDiscoveryResponse to JSON. + * Converts this CreateSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @instance * @returns {Object.} JSON object */ - RunAssetDiscoveryResponse.prototype.toJSON = function toJSON() { + CreateSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunAssetDiscoveryResponse + * Gets the default type url for CreateSourceRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + * @memberof google.cloud.securitycenter.v1.CreateSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunAssetDiscoveryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.RunAssetDiscoveryResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateSourceRequest"; }; - /** - * State enum. - * @name google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} COMPLETED=1 COMPLETED value - * @property {number} SUPERSEDED=2 SUPERSEDED value - * @property {number} TERMINATED=3 TERMINATED value - */ - RunAssetDiscoveryResponse.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPLETED"] = 1; - values[valuesById[2] = "SUPERSEDED"] = 2; - values[valuesById[3] = "TERMINATED"] = 3; - return values; - })(); - - return RunAssetDiscoveryResponse; + return CreateSourceRequest; })(); - v1.SecurityHealthAnalyticsCustomModule = (function() { + v1.DeleteMuteConfigRequest = (function() { /** - * Properties of a SecurityHealthAnalyticsCustomModule. + * Properties of a DeleteMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISecurityHealthAnalyticsCustomModule - * @property {string|null} [name] SecurityHealthAnalyticsCustomModule name - * @property {string|null} [displayName] SecurityHealthAnalyticsCustomModule displayName - * @property {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] SecurityHealthAnalyticsCustomModule enablementState - * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityHealthAnalyticsCustomModule updateTime - * @property {string|null} [lastEditor] SecurityHealthAnalyticsCustomModule lastEditor - * @property {string|null} [ancestorModule] SecurityHealthAnalyticsCustomModule ancestorModule - * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] SecurityHealthAnalyticsCustomModule customConfig + * @interface IDeleteMuteConfigRequest + * @property {string|null} [name] DeleteMuteConfigRequest name */ /** - * Constructs a new SecurityHealthAnalyticsCustomModule. + * Constructs a new DeleteMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityHealthAnalyticsCustomModule. - * @implements ISecurityHealthAnalyticsCustomModule + * @classdesc Represents a DeleteMuteConfigRequest. + * @implements IDeleteMuteConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest=} [properties] Properties to set */ - function SecurityHealthAnalyticsCustomModule(properties) { + function DeleteMuteConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26591,130 +39752,273 @@ } /** - * SecurityHealthAnalyticsCustomModule name. + * DeleteMuteConfigRequest name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest * @instance */ - SecurityHealthAnalyticsCustomModule.prototype.name = ""; + DeleteMuteConfigRequest.prototype.name = ""; /** - * SecurityHealthAnalyticsCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - * @instance + * Creates a new DeleteMuteConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest instance */ - SecurityHealthAnalyticsCustomModule.prototype.displayName = ""; + DeleteMuteConfigRequest.create = function create(properties) { + return new DeleteMuteConfigRequest(properties); + }; /** - * SecurityHealthAnalyticsCustomModule enablementState. - * @member {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - * @instance + * Encodes the specified DeleteMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} message DeleteMuteConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - SecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; + DeleteMuteConfigRequest.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); + return writer; + }; /** - * SecurityHealthAnalyticsCustomModule updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - * @instance + * Encodes the specified DeleteMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} message DeleteMuteConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - SecurityHealthAnalyticsCustomModule.prototype.updateTime = null; + DeleteMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * SecurityHealthAnalyticsCustomModule lastEditor. - * @member {string} lastEditor - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - * @instance + * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityHealthAnalyticsCustomModule.prototype.lastEditor = ""; + DeleteMuteConfigRequest.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.cloud.securitycenter.v1.DeleteMuteConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * SecurityHealthAnalyticsCustomModule ancestorModule. - * @member {string} ancestorModule - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMuteConfigRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMuteConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + */ + DeleteMuteConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMuteConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} message DeleteMuteConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMuteConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteMuteConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest * @instance + * @returns {Object.} JSON object */ - SecurityHealthAnalyticsCustomModule.prototype.ancestorModule = ""; + DeleteMuteConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * SecurityHealthAnalyticsCustomModule customConfig. - * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * Gets the default type url for DeleteMuteConfigRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteMuteConfigRequest"; + }; + + return DeleteMuteConfigRequest; + })(); + + v1.DeleteNotificationConfigRequest = (function() { + + /** + * Properties of a DeleteNotificationConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IDeleteNotificationConfigRequest + * @property {string|null} [name] DeleteNotificationConfigRequest name + */ + + /** + * Constructs a new DeleteNotificationConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a DeleteNotificationConfigRequest. + * @implements IDeleteNotificationConfigRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest=} [properties] Properties to set + */ + function DeleteNotificationConfigRequest(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]]; + } + + /** + * DeleteNotificationConfigRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @instance */ - SecurityHealthAnalyticsCustomModule.prototype.customConfig = null; + DeleteNotificationConfigRequest.prototype.name = ""; /** - * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * Creates a new DeleteNotificationConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule instance + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest instance */ - SecurityHealthAnalyticsCustomModule.create = function create(properties) { - return new SecurityHealthAnalyticsCustomModule(properties); + DeleteNotificationConfigRequest.create = function create(properties) { + return new DeleteNotificationConfigRequest(properties); }; /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * Encodes the specified DeleteNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} message DeleteNotificationConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { + DeleteNotificationConfigRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.enablementState); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.lastEditor); - if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.ancestorModule); - if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * Encodes the specified DeleteNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} message DeleteNotificationConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + DeleteNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { + DeleteNotificationConfigRequest.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.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -26722,30 +40026,6 @@ message.name = reader.string(); break; } - case 2: { - message.displayName = reader.string(); - break; - } - case 4: { - message.enablementState = reader.int32(); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.lastEditor = reader.string(); - break; - } - case 7: { - message.ancestorModule = reader.string(); - break; - } - case 8: { - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -26755,1750 +40035,2102 @@ }; /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { + DeleteNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityHealthAnalyticsCustomModule message. + * Verifies a DeleteNotificationConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityHealthAnalyticsCustomModule.verify = function verify(message) { + DeleteNotificationConfigRequest.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.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - if (!$util.isString(message.lastEditor)) - return "lastEditor: string expected"; - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - if (!$util.isString(message.ancestorModule)) - return "ancestorModule: string expected"; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } return null; }; /** - * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest */ - SecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule) + DeleteNotificationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule(); + var message = new $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "ENABLED": - case 1: - message.enablementState = 1; - break; - case "DISABLED": - case 2: - message.enablementState = 2; - break; - case "INHERITED": - case 3: - message.enablementState = 3; - break; - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastEditor != null) - message.lastEditor = String(object.lastEditor); - if (object.ancestorModule != null) - message.ancestorModule = String(object.ancestorModule); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); - } return message; }; /** - * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * Creates a plain object from a DeleteNotificationConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static - * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule + * @param {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} message DeleteNotificationConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { + DeleteNotificationConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.displayName = ""; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.updateTime = null; - object.lastEditor = ""; - object.ancestorModule = ""; - object.customConfig = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - object.lastEditor = message.lastEditor; - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - object.ancestorModule = message.ancestorModule; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); return object; }; /** - * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * Converts this DeleteNotificationConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @instance * @returns {Object.} JSON object */ - SecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { + DeleteNotificationConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityHealthAnalyticsCustomModule + * Gets the default type url for DeleteNotificationConfigRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteNotificationConfigRequest"; }; - /** - * EnablementState enum. - * @name google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - * @property {number} INHERITED=3 INHERITED value - */ - SecurityHealthAnalyticsCustomModule.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - values[valuesById[3] = "INHERITED"] = 3; - return values; - })(); - - return SecurityHealthAnalyticsCustomModule; + return DeleteNotificationConfigRequest; })(); - v1.SecurityCenter = (function() { + v1.DeleteSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Constructs a new SecurityCenter service. + * Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SecurityCenter - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SecurityCenter(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecurityCenter.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenter; - - /** - * Creates new SecurityCenter service using the specified rpc implementation. - * @function create - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SecurityCenter} RPC service. Useful where requests and/or responses are streamed. - */ - SecurityCenter.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|bulkMuteFindings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef BulkMuteFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls BulkMuteFindings. - * @function bulkMuteFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} request BulkMuteFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindingsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.bulkMuteFindings = function bulkMuteFindings(request, callback) { - return this.rpcCall(bulkMuteFindings, $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BulkMuteFindings" }); - - /** - * Calls BulkMuteFindings. - * @function bulkMuteFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} request BulkMuteFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule - */ - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @function createSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.createSecurityHealthAnalyticsCustomModule = function createSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(createSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "CreateSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @function createSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source - */ - - /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.createSource = function createSource(request, callback) { - return this.rpcCall(createSource, $root.google.cloud.securitycenter.v1.CreateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "CreateSource" }); - - /** - * Calls CreateSource. - * @function createSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} request CreateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface IDeleteSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] DeleteSecurityHealthAnalyticsCustomModuleRequest name */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createFinding}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @implements IDeleteSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ + function DeleteSecurityHealthAnalyticsCustomModuleRequest(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]]; + } /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * DeleteSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.createFinding = function createFinding(request, callback) { - return this.rpcCall(createFinding, $root.google.cloud.securitycenter.v1.CreateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "CreateFinding" }); + DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; /** - * Calls CreateFinding. - * @function createFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} request CreateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest instance */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new DeleteSecurityHealthAnalyticsCustomModuleRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createMuteConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateMuteConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.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); + return writer; + }; /** - * Calls CreateMuteConfig. - * @function createMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} request CreateMuteConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.createMuteConfig = function createMuteConfig(request, callback) { - return this.rpcCall(createMuteConfig, $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); - }, "name", { value: "CreateMuteConfig" }); + DeleteSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateMuteConfig. - * @function createMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} request CreateMuteConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createNotificationConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateNotificationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateNotificationConfig. - * @function createNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} request CreateNotificationConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig - * @returns {undefined} - * @variation 1 + * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.createNotificationConfig = function createNotificationConfig(request, callback) { - return this.rpcCall(createNotificationConfig, $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); - }, "name", { value: "CreateNotificationConfig" }); + DeleteSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls CreateNotificationConfig. - * @function createNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} request CreateNotificationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteMuteConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef DeleteMuteConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls DeleteMuteConfig. - * @function deleteMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} request DeleteMuteConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfigCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.deleteMuteConfig = function deleteMuteConfig(request, callback) { - return this.rpcCall(deleteMuteConfig, $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMuteConfig" }); + DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteMuteConfig. - * @function deleteMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} request DeleteMuteConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return DeleteSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.GetBigQueryExportRequest = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteNotificationConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef DeleteNotificationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Properties of a GetBigQueryExportRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetBigQueryExportRequest + * @property {string|null} [name] GetBigQueryExportRequest name */ /** - * Calls DeleteNotificationConfig. - * @function deleteNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} request DeleteNotificationConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfigCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Constructs a new GetBigQueryExportRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetBigQueryExportRequest. + * @implements IGetBigQueryExportRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.deleteNotificationConfig = function deleteNotificationConfig(request, callback) { - return this.rpcCall(deleteNotificationConfig, $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteNotificationConfig" }); + function GetBigQueryExportRequest(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]]; + } /** - * Calls DeleteNotificationConfig. - * @function deleteNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetBigQueryExportRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest * @instance - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} request DeleteNotificationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetBigQueryExportRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef DeleteSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new GetBigQueryExportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest instance */ + GetBigQueryExportRequest.create = function create(properties) { + return new GetBigQueryExportRequest(properties); + }; /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @function deleteSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified GetBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} message GetBigQueryExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.deleteSecurityHealthAnalyticsCustomModule = function deleteSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(deleteSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSecurityHealthAnalyticsCustomModule" }); + GetBigQueryExportRequest.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); + return writer; + }; /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @function deleteSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} message GetBigQueryExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getBigQueryExport}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetBigQueryExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport + * Decodes a GetBigQueryExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetBigQueryExportRequest.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.cloud.securitycenter.v1.GetBigQueryExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetBigQueryExport. - * @function getBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} request GetBigQueryExportRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport - * @returns {undefined} - * @variation 1 + * Decodes a GetBigQueryExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.getBigQueryExport = function getBigQueryExport(request, callback) { - return this.rpcCall(getBigQueryExport, $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); - }, "name", { value: "GetBigQueryExport" }); + GetBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetBigQueryExport. - * @function getBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} request GetBigQueryExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetBigQueryExportRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetBigQueryExportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getIamPolicy}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Creates a GetBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest */ + GetBigQueryExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetBigQueryExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.GetBigQueryExportRequest} message GetBigQueryExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(SecurityCenter.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); + GetBigQueryExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetBigQueryExportRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetBigQueryExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getMuteConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetMuteConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + * Gets the default type url for GetBigQueryExportRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetBigQueryExportRequest"; + }; - /** - * Calls GetMuteConfig. - * @function getMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} request GetMuteConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.getMuteConfig = function getMuteConfig(request, callback) { - return this.rpcCall(getMuteConfig, $root.google.cloud.securitycenter.v1.GetMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); - }, "name", { value: "GetMuteConfig" }); + return GetBigQueryExportRequest; + })(); + + v1.GetMuteConfigRequest = (function() { /** - * Calls GetMuteConfig. - * @function getMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} request GetMuteConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetMuteConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetMuteConfigRequest + * @property {string|null} [name] GetMuteConfigRequest name */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getNotificationConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetNotificationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + * Constructs a new GetMuteConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetMuteConfigRequest. + * @implements IGetMuteConfigRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest=} [properties] Properties to set */ + function GetMuteConfigRequest(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]]; + } /** - * Calls GetNotificationConfig. - * @function getNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetMuteConfigRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest * @instance - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} request GetNotificationConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.getNotificationConfig = function getNotificationConfig(request, callback) { - return this.rpcCall(getNotificationConfig, $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); - }, "name", { value: "GetNotificationConfig" }); + GetMuteConfigRequest.prototype.name = ""; /** - * Calls GetNotificationConfig. - * @function getNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} request GetNotificationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetMuteConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest instance */ + GetMuteConfigRequest.create = function create(properties) { + return new GetMuteConfigRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + * Encodes the specified GetMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} message GetMuteConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetMuteConfigRequest.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); + return writer; + }; /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 + * Encodes the specified GetMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} message GetMuteConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.getOrganizationSettings = function getOrganizationSettings(request, callback) { - return this.rpcCall(getOrganizationSettings, $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); - }, "name", { value: "GetOrganizationSettings" }); + GetMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetOrganizationSettings. - * @function getOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} request GetOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetMuteConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetMuteConfigRequest.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.cloud.securitycenter.v1.GetMuteConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getEffectiveSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetEffectiveSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule} [response] EffectiveSecurityHealthAnalyticsCustomModule + * Decodes a GetMuteConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @function getEffectiveSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 + * Verifies a GetMuteConfigRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.getEffectiveSecurityHealthAnalyticsCustomModule = function getEffectiveSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(getEffectiveSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "GetEffectiveSecurityHealthAnalyticsCustomModule" }); + GetMuteConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @function getEffectiveSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest */ + GetMuteConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetMuteConfigRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetMuteConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + * Creates a plain object from a GetMuteConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.GetMuteConfigRequest} message GetMuteConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetMuteConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @function getSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetMuteConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest * @instance - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.getSecurityHealthAnalyticsCustomModule = function getSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(getSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "GetSecurityHealthAnalyticsCustomModule" }); + GetMuteConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @function getSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetMuteConfigRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetMuteConfigRequest"; + }; + + return GetMuteConfigRequest; + })(); + + v1.GetNotificationConfigRequest = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|getSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GetSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source + * Properties of a GetNotificationConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetNotificationConfigRequest + * @property {string|null} [name] GetNotificationConfigRequest name */ /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GetSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 + * Constructs a new GetNotificationConfigRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetNotificationConfigRequest. + * @implements IGetNotificationConfigRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.getSource = function getSource(request, callback) { - return this.rpcCall(getSource, $root.google.cloud.securitycenter.v1.GetSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "GetSource" }); + function GetNotificationConfigRequest(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]]; + } /** - * Calls GetSource. - * @function getSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetNotificationConfigRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest * @instance - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} request GetSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetNotificationConfigRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupAssets}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GroupAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} [response] GroupAssetsResponse + * Creates a new GetNotificationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest instance */ + GetNotificationConfigRequest.create = function create(properties) { + return new GetNotificationConfigRequest(properties); + }; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupAssetsCallback} callback Node-style callback called with the error, if any, and GroupAssetsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} message GetNotificationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.groupAssets = function groupAssets(request, callback) { - return this.rpcCall(groupAssets, $root.google.cloud.securitycenter.v1.GroupAssetsRequest, $root.google.cloud.securitycenter.v1.GroupAssetsResponse, request, callback); - }, "name", { value: "GroupAssets" }); + GetNotificationConfigRequest.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); + return writer; + }; /** - * Calls GroupAssets. - * @function groupAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} request GroupAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} message GetNotificationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|groupFindings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef GroupFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} [response] GroupFindingsResponse + * Decodes a GetNotificationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetNotificationConfigRequest.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.cloud.securitycenter.v1.GetNotificationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.GroupFindingsCallback} callback Node-style callback called with the error, if any, and GroupFindingsResponse - * @returns {undefined} - * @variation 1 + * Decodes a GetNotificationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.groupFindings = function groupFindings(request, callback) { - return this.rpcCall(groupFindings, $root.google.cloud.securitycenter.v1.GroupFindingsRequest, $root.google.cloud.securitycenter.v1.GroupFindingsResponse, request, callback); - }, "name", { value: "GroupFindings" }); + GetNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GroupFindings. - * @function groupFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} request GroupFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetNotificationConfigRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetNotificationConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listAssets}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListAssetsResponse} [response] ListAssetsResponse + * Creates a GetNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest */ + GetNotificationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetNotificationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.GetNotificationConfigRequest} message GetNotificationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(SecurityCenter.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.securitycenter.v1.ListAssetsRequest, $root.google.cloud.securitycenter.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); + GetNotificationConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetNotificationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest * @instance - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetNotificationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listDescendantSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListDescendantSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * Gets the default type url for GetNotificationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetNotificationConfigRequest"; + }; - /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @function listDescendantSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.listDescendantSecurityHealthAnalyticsCustomModules = function listDescendantSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listDescendantSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListDescendantSecurityHealthAnalyticsCustomModules" }); + return GetNotificationConfigRequest; + })(); + + v1.GetOrganizationSettingsRequest = (function() { /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @function listDescendantSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetOrganizationSettingsRequest + * @property {string|null} [name] GetOrganizationSettingsRequest name */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listFindings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListFindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListFindingsResponse} [response] ListFindingsResponse + * Constructs a new GetOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetOrganizationSettingsRequest. + * @implements IGetOrganizationSettingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set */ + function GetOrganizationSettingsRequest(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]]; + } /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetOrganizationSettingsRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @instance - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListFindingsCallback} callback Node-style callback called with the error, if any, and ListFindingsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.listFindings = function listFindings(request, callback) { - return this.rpcCall(listFindings, $root.google.cloud.securitycenter.v1.ListFindingsRequest, $root.google.cloud.securitycenter.v1.ListFindingsResponse, request, callback); - }, "name", { value: "ListFindings" }); + GetOrganizationSettingsRequest.prototype.name = ""; /** - * Calls ListFindings. - * @function listFindings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} request ListFindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance */ + GetOrganizationSettingsRequest.create = function create(properties) { + return new GetOrganizationSettingsRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listMuteConfigs}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListMuteConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListMuteConfigsResponse} [response] ListMuteConfigsResponse + * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetOrganizationSettingsRequest.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); + return writer; + }; /** - * Calls ListMuteConfigs. - * @function listMuteConfigs - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} request ListMuteConfigsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigsCallback} callback Node-style callback called with the error, if any, and ListMuteConfigsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.listMuteConfigs = function listMuteConfigs(request, callback) { - return this.rpcCall(listMuteConfigs, $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest, $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse, request, callback); - }, "name", { value: "ListMuteConfigs" }); + GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListMuteConfigs. - * @function listMuteConfigs - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} request ListMuteConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetOrganizationSettingsRequest.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.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listNotificationConfigs}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListNotificationConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} [response] ListNotificationConfigsResponse + * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListNotificationConfigs. - * @function listNotificationConfigs - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} request ListNotificationConfigsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigsCallback} callback Node-style callback called with the error, if any, and ListNotificationConfigsResponse - * @returns {undefined} - * @variation 1 + * Verifies a GetOrganizationSettingsRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.listNotificationConfigs = function listNotificationConfigs(request, callback) { - return this.rpcCall(listNotificationConfigs, $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest, $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse, request, callback); - }, "name", { value: "ListNotificationConfigs" }); + GetOrganizationSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls ListNotificationConfigs. - * @function listNotificationConfigs - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} request ListNotificationConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest */ + GetOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listEffectiveSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListEffectiveSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetOrganizationSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @function listEffectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetOrganizationSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest * @instance - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.listEffectiveSecurityHealthAnalyticsCustomModules = function listEffectiveSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listEffectiveSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListEffectiveSecurityHealthAnalyticsCustomModules" }); + GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @function listEffectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetOrganizationSettingsRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetOrganizationSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetOrganizationSettingsRequest"; + }; + + return GetOrganizationSettingsRequest; + })(); + + v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} [response] ListSecurityHealthAnalyticsCustomModulesResponse + * Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name */ /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @function listSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 + * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.listSecurityHealthAnalyticsCustomModules = function listSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListSecurityHealthAnalyticsCustomModules" }); + function GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(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]]; + } /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @function listSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listSources}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListSourcesResponse} [response] ListSourcesResponse + * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties); + }; /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListSourcesCallback} callback Node-style callback called with the error, if any, and ListSourcesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.listSources = function listSources(request, callback) { - return this.rpcCall(listSources, $root.google.cloud.securitycenter.v1.ListSourcesRequest, $root.google.cloud.securitycenter.v1.ListSourcesResponse, request, callback); - }, "name", { value: "ListSources" }); + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.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); + return writer; + }; /** - * Calls ListSources. - * @function listSources - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} request ListSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|runAssetDiscovery}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef RunAssetDiscoveryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscoveryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.runAssetDiscovery = function runAssetDiscovery(request, callback) { - return this.rpcCall(runAssetDiscovery, $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RunAssetDiscovery" }); + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls RunAssetDiscovery. - * @function runAssetDiscovery - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} request RunAssetDiscoveryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setFindingState}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SetFindingStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Creates a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SetFindingStateCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(SecurityCenter.prototype.setFindingState = function setFindingState(request, callback) { - return this.rpcCall(setFindingState, $root.google.cloud.securitycenter.v1.SetFindingStateRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "SetFindingState" }); + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls SetFindingState. - * @function setFindingState - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} request SetFindingStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setMute}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SetMuteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding + * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest"; + }; - /** - * Calls SetMute. - * @function setMute - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISetMuteRequest} request SetMuteRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SetMuteCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.setMute = function setMute(request, callback) { - return this.rpcCall(setMute, $root.google.cloud.securitycenter.v1.SetMuteRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "SetMute" }); + return GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.GetSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Calls SetMute. - * @function setMute - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISetMuteRequest} request SetMuteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] GetSecurityHealthAnalyticsCustomModuleRequest name */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|setIamPolicy}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetSecurityHealthAnalyticsCustomModuleRequest. + * @implements IGetSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ + function GetSecurityHealthAnalyticsCustomModuleRequest(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]]; + } /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); + GetSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest instance */ + GetSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new GetSecurityHealthAnalyticsCustomModuleRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|testIamPermissions}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetSecurityHealthAnalyticsCustomModuleRequest.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); + return writer; + }; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); + GetSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|simulateSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef SimulateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} [response] SimulateSecurityHealthAnalyticsCustomModuleResponse + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @function simulateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse - * @returns {undefined} - * @variation 1 + * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.simulateSecurityHealthAnalyticsCustomModule = function simulateSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(simulateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, request, callback); - }, "name", { value: "SimulateSecurityHealthAnalyticsCustomModule" }); + GetSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @function simulateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest */ + GetSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateExternalSystem}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateExternalSystemCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ExternalSystem} [response] ExternalSystem + * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls UpdateExternalSystem. - * @function updateExternalSystem - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} request UpdateExternalSystemRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystemCallback} callback Node-style callback called with the error, if any, and ExternalSystem - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.updateExternalSystem = function updateExternalSystem(request, callback) { - return this.rpcCall(updateExternalSystem, $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest, $root.google.cloud.securitycenter.v1.ExternalSystem, request, callback); - }, "name", { value: "UpdateExternalSystem" }); + GetSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateExternalSystem. - * @function updateExternalSystem - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} request UpdateExternalSystemRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest"; + }; - /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateFinding}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateFindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Finding} [response] Finding - */ + return GetSecurityHealthAnalyticsCustomModuleRequest; + })(); - /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateFindingCallback} callback Node-style callback called with the error, if any, and Finding - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenter.prototype.updateFinding = function updateFinding(request, callback) { - return this.rpcCall(updateFinding, $root.google.cloud.securitycenter.v1.UpdateFindingRequest, $root.google.cloud.securitycenter.v1.Finding, request, callback); - }, "name", { value: "UpdateFinding" }); + v1.GetSourceRequest = (function() { /** - * Calls UpdateFinding. - * @function updateFinding - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} request UpdateFindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetSourceRequest + * @property {string|null} [name] GetSourceRequest name */ /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateMuteConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateMuteConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.MuteConfig} [response] MuteConfig + * Constructs a new GetSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetSourceRequest. + * @implements IGetSourceRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set */ + function GetSourceRequest(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]]; + } /** - * Calls UpdateMuteConfig. - * @function updateMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GetSourceRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} request UpdateMuteConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfigCallback} callback Node-style callback called with the error, if any, and MuteConfig - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.updateMuteConfig = function updateMuteConfig(request, callback) { - return this.rpcCall(updateMuteConfig, $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest, $root.google.cloud.securitycenter.v1.MuteConfig, request, callback); - }, "name", { value: "UpdateMuteConfig" }); + GetSourceRequest.prototype.name = ""; /** - * Calls UpdateMuteConfig. - * @function updateMuteConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} request UpdateMuteConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest instance */ + GetSourceRequest.create = function create(properties) { + return new GetSourceRequest(properties); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateNotificationConfig}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateNotificationConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.NotificationConfig} [response] NotificationConfig + * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetSourceRequest.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); + return writer; + }; /** - * Calls UpdateNotificationConfig. - * @function updateNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} request UpdateNotificationConfigRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfigCallback} callback Node-style callback called with the error, if any, and NotificationConfig - * @returns {undefined} - * @variation 1 + * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.updateNotificationConfig = function updateNotificationConfig(request, callback) { - return this.rpcCall(updateNotificationConfig, $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest, $root.google.cloud.securitycenter.v1.NotificationConfig, request, callback); - }, "name", { value: "UpdateNotificationConfig" }); + GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateNotificationConfig. - * @function updateNotificationConfig - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} request UpdateNotificationConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSourceRequest.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.cloud.securitycenter.v1.GetSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateOrganizationSettings}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateOrganizationSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.OrganizationSettings} [response] OrganizationSettings + * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettingsCallback} callback Node-style callback called with the error, if any, and OrganizationSettings - * @returns {undefined} - * @variation 1 + * Verifies a GetSourceRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(SecurityCenter.prototype.updateOrganizationSettings = function updateOrganizationSettings(request, callback) { - return this.rpcCall(updateOrganizationSettings, $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest, $root.google.cloud.securitycenter.v1.OrganizationSettings, request, callback); - }, "name", { value: "UpdateOrganizationSettings" }); + GetSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls UpdateOrganizationSettings. - * @function updateOrganizationSettings - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} request UpdateOrganizationSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest */ + GetSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetSourceRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.GetSourceRequest} message GetSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @function updateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GetSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GetSourceRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.updateSecurityHealthAnalyticsCustomModule = function updateSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(updateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "UpdateSecurityHealthAnalyticsCustomModule" }); + GetSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @function updateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetSourceRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetSourceRequest"; + }; + + return GetSourceRequest; + })(); + + v1.GroupAssetsRequest = (function() { /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSource}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.Source} [response] Source + * Properties of a GroupAssetsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGroupAssetsRequest + * @property {string|null} [parent] GroupAssetsRequest parent + * @property {string|null} [filter] GroupAssetsRequest filter + * @property {string|null} [groupBy] GroupAssetsRequest groupBy + * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime + * @property {string|null} [pageToken] GroupAssetsRequest pageToken + * @property {number|null} [pageSize] GroupAssetsRequest pageSize */ /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSourceCallback} callback Node-style callback called with the error, if any, and Source - * @returns {undefined} - * @variation 1 + * Constructs a new GroupAssetsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GroupAssetsRequest. + * @implements IGroupAssetsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set */ - Object.defineProperty(SecurityCenter.prototype.updateSource = function updateSource(request, callback) { - return this.rpcCall(updateSource, $root.google.cloud.securitycenter.v1.UpdateSourceRequest, $root.google.cloud.securitycenter.v1.Source, request, callback); - }, "name", { value: "UpdateSource" }); + function GroupAssetsRequest(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]]; + } /** - * Calls UpdateSource. - * @function updateSource - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GroupAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} request UpdateSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GroupAssetsRequest.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateSecurityMarks}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateSecurityMarksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.SecurityMarks} [response] SecurityMarks + * GroupAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance */ + GroupAssetsRequest.prototype.filter = ""; /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GroupAssetsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarksCallback} callback Node-style callback called with the error, if any, and SecurityMarks - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.updateSecurityMarks = function updateSecurityMarks(request, callback) { - return this.rpcCall(updateSecurityMarks, $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest, $root.google.cloud.securitycenter.v1.SecurityMarks, request, callback); - }, "name", { value: "UpdateSecurityMarks" }); + GroupAssetsRequest.prototype.groupBy = ""; /** - * Calls UpdateSecurityMarks. - * @function updateSecurityMarks - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GroupAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} request UpdateSecurityMarksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GroupAssetsRequest.prototype.compareDuration = null; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|createBigQueryExport}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef CreateBigQueryExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport + * GroupAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @instance */ + GroupAssetsRequest.prototype.readTime = null; /** - * Calls CreateBigQueryExport. - * @function createBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GroupAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} request CreateBigQueryExportRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(SecurityCenter.prototype.createBigQueryExport = function createBigQueryExport(request, callback) { - return this.rpcCall(createBigQueryExport, $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); - }, "name", { value: "CreateBigQueryExport" }); + GroupAssetsRequest.prototype.pageToken = ""; /** - * Calls CreateBigQueryExport. - * @function createBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * GroupAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} request CreateBigQueryExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GroupAssetsRequest.prototype.pageSize = 0; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|deleteBigQueryExport}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef DeleteBigQueryExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a new GroupAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest instance */ + GroupAssetsRequest.create = function create(properties) { + return new GroupAssetsRequest(properties); + }; /** - * Calls DeleteBigQueryExport. - * @function deleteBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} request DeleteBigQueryExportRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExportCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(SecurityCenter.prototype.deleteBigQueryExport = function deleteBigQueryExport(request, callback) { - return this.rpcCall(deleteBigQueryExport, $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteBigQueryExport" }); + GroupAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.groupBy != null && Object.hasOwnProperty.call(message, "groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); + if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + return writer; + }; /** - * Calls DeleteBigQueryExport. - * @function deleteBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} request DeleteBigQueryExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|updateBigQueryExport}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef UpdateBigQueryExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.BigQueryExport} [response] BigQueryExport + * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GroupAssetsRequest.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.cloud.securitycenter.v1.GroupAssetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.groupBy = reader.string(); + break; + } + case 4: { + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.pageToken = reader.string(); + break; + } + case 8: { + message.pageSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateBigQueryExport. - * @function updateBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} request UpdateBigQueryExportRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExportCallback} callback Node-style callback called with the error, if any, and BigQueryExport - * @returns {undefined} - * @variation 1 + * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(SecurityCenter.prototype.updateBigQueryExport = function updateBigQueryExport(request, callback) { - return this.rpcCall(updateBigQueryExport, $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest, $root.google.cloud.securitycenter.v1.BigQueryExport, request, callback); - }, "name", { value: "UpdateBigQueryExport" }); + GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateBigQueryExport. - * @function updateBigQueryExport - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} request UpdateBigQueryExportRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GroupAssetsRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GroupAssetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.securitycenter.v1.SecurityCenter|listBigQueryExports}. - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @typedef ListBigQueryExportsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} [response] ListBigQueryExportsResponse + * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + */ + GroupAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.groupBy != null) + message.groupBy = String(object.groupBy); + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {google.cloud.securitycenter.v1.GroupAssetsRequest} message GroupAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GroupAssetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.groupBy = ""; + object.compareDuration = null; + object.readTime = null; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; /** - * Calls ListBigQueryExports. - * @function listBigQueryExports - * @memberof google.cloud.securitycenter.v1.SecurityCenter + * Converts this GroupAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest * @instance - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} request ListBigQueryExportsRequest message or plain object - * @param {google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExportsCallback} callback Node-style callback called with the error, if any, and ListBigQueryExportsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(SecurityCenter.prototype.listBigQueryExports = function listBigQueryExports(request, callback) { - return this.rpcCall(listBigQueryExports, $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest, $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse, request, callback); - }, "name", { value: "ListBigQueryExports" }); + GroupAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListBigQueryExports. - * @function listBigQueryExports - * @memberof google.cloud.securitycenter.v1.SecurityCenter - * @instance - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} request ListBigQueryExportsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GroupAssetsRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GroupAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupAssetsRequest"; + }; - return SecurityCenter; + return GroupAssetsRequest; })(); - v1.BulkMuteFindingsRequest = (function() { + v1.GroupAssetsResponse = (function() { /** - * Properties of a BulkMuteFindingsRequest. + * Properties of a GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IBulkMuteFindingsRequest - * @property {string|null} [parent] BulkMuteFindingsRequest parent - * @property {string|null} [filter] BulkMuteFindingsRequest filter - * @property {string|null} [muteAnnotation] BulkMuteFindingsRequest muteAnnotation + * @interface IGroupAssetsResponse + * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime + * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken + * @property {number|null} [totalSize] GroupAssetsResponse totalSize */ /** - * Constructs a new BulkMuteFindingsRequest. + * Constructs a new GroupAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a BulkMuteFindingsRequest. - * @implements IBulkMuteFindingsRequest + * @classdesc Represents a GroupAssetsResponse. + * @implements IGroupAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set */ - function BulkMuteFindingsRequest(properties) { + function GroupAssetsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28506,103 +42138,120 @@ } /** - * BulkMuteFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * GroupAssetsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - BulkMuteFindingsRequest.prototype.parent = ""; + GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; /** - * BulkMuteFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * GroupAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - BulkMuteFindingsRequest.prototype.filter = ""; + GroupAssetsResponse.prototype.readTime = null; /** - * BulkMuteFindingsRequest muteAnnotation. - * @member {string} muteAnnotation - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * GroupAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance */ - BulkMuteFindingsRequest.prototype.muteAnnotation = ""; + GroupAssetsResponse.prototype.nextPageToken = ""; /** - * Creates a new BulkMuteFindingsRequest instance using the specified properties. + * GroupAssetsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @instance + */ + GroupAssetsResponse.prototype.totalSize = 0; + + /** + * Creates a new GroupAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest instance + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse instance */ - BulkMuteFindingsRequest.create = function create(properties) { - return new BulkMuteFindingsRequest(properties); + GroupAssetsResponse.create = function create(properties) { + return new GroupAssetsResponse(properties); }; /** - * Encodes the specified BulkMuteFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} message BulkMuteFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BulkMuteFindingsRequest.encode = function encode(message, writer) { + GroupAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.muteAnnotation != null && Object.hasOwnProperty.call(message, "muteAnnotation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.muteAnnotation); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified BulkMuteFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsRequest.verify|verify} messages. + * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsRequest} message BulkMuteFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BulkMuteFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer. + * Decodes a GroupAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BulkMuteFindingsRequest.decode = function decode(reader, length) { + GroupAssetsResponse.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.cloud.securitycenter.v1.BulkMuteFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); break; } case 2: { - message.filter = reader.string(); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.muteAnnotation = reader.string(); + message.nextPageToken = reader.string(); + break; + } + case 4: { + message.totalSize = reader.int32(); break; } default: @@ -28614,138 +42263,176 @@ }; /** - * Decodes a BulkMuteFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BulkMuteFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BulkMuteFindingsRequest message. + * Verifies a GroupAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BulkMuteFindingsRequest.verify = function verify(message) { + GroupAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.muteAnnotation != null && message.hasOwnProperty("muteAnnotation")) - if (!$util.isString(message.muteAnnotation)) - return "muteAnnotation: string expected"; + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); + if (error) + return "groupByResults." + error; + } + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a BulkMuteFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} BulkMuteFindingsRequest + * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse */ - BulkMuteFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest) + GroupAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.BulkMuteFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.muteAnnotation != null) - message.muteAnnotation = String(object.muteAnnotation); + var message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a BulkMuteFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.BulkMuteFindingsRequest} message BulkMuteFindingsRequest + * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} message GroupAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BulkMuteFindingsRequest.toObject = function toObject(message, options) { + GroupAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.groupByResults = []; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.muteAnnotation = ""; + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.muteAnnotation != null && message.hasOwnProperty("muteAnnotation")) - object.muteAnnotation = message.muteAnnotation; + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this BulkMuteFindingsRequest to JSON. + * Converts this GroupAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @instance * @returns {Object.} JSON object */ - BulkMuteFindingsRequest.prototype.toJSON = function toJSON() { + GroupAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BulkMuteFindingsRequest + * Gets the default type url for GroupAssetsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsRequest + * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BulkMuteFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.BulkMuteFindingsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupAssetsResponse"; }; - return BulkMuteFindingsRequest; + return GroupAssetsResponse; })(); - v1.BulkMuteFindingsResponse = (function() { + v1.GroupFindingsRequest = (function() { /** - * Properties of a BulkMuteFindingsResponse. + * Properties of a GroupFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IBulkMuteFindingsResponse + * @interface IGroupFindingsRequest + * @property {string|null} [parent] GroupFindingsRequest parent + * @property {string|null} [filter] GroupFindingsRequest filter + * @property {string|null} [groupBy] GroupFindingsRequest groupBy + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] GroupFindingsRequest compareDuration + * @property {string|null} [pageToken] GroupFindingsRequest pageToken + * @property {number|null} [pageSize] GroupFindingsRequest pageSize */ /** - * Constructs a new BulkMuteFindingsResponse. + * Constructs a new GroupFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a BulkMuteFindingsResponse. - * @implements IBulkMuteFindingsResponse + * @classdesc Represents a GroupFindingsRequest. + * @implements IGroupFindingsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set */ - function BulkMuteFindingsResponse(properties) { + function GroupFindingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28753,63 +42440,161 @@ } /** - * Creates a new BulkMuteFindingsResponse instance using the specified properties. + * GroupFindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.parent = ""; + + /** + * GroupFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.filter = ""; + + /** + * GroupFindingsRequest groupBy. + * @member {string} groupBy + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.groupBy = ""; + + /** + * GroupFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.readTime = null; + + /** + * GroupFindingsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.compareDuration = null; + + /** + * GroupFindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageToken = ""; + + /** + * GroupFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @instance + */ + GroupFindingsRequest.prototype.pageSize = 0; + + /** + * Creates a new GroupFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest instance */ - BulkMuteFindingsResponse.create = function create(properties) { - return new BulkMuteFindingsResponse(properties); + GroupFindingsRequest.create = function create(properties) { + return new GroupFindingsRequest(properties); }; /** - * Encodes the specified BulkMuteFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse} message BulkMuteFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BulkMuteFindingsResponse.encode = function encode(message, writer) { + GroupFindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.groupBy != null && Object.hasOwnProperty.call(message, "groupBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); return writer; }; /** - * Encodes the specified BulkMuteFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.BulkMuteFindingsResponse.verify|verify} messages. + * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IBulkMuteFindingsResponse} message BulkMuteFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BulkMuteFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer. + * Decodes a GroupFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BulkMuteFindingsResponse.decode = function decode(reader, length) { + GroupFindingsRequest.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.cloud.securitycenter.v1.BulkMuteFindingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.groupBy = reader.string(); + break; + } + case 4: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.pageToken = reader.string(); + break; + } + case 8: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -28819,111 +42604,185 @@ }; /** - * Decodes a BulkMuteFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BulkMuteFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BulkMuteFindingsResponse message. + * Verifies a GroupFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BulkMuteFindingsResponse.verify = function verify(message) { + GroupFindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + if (!$util.isString(message.groupBy)) + return "groupBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a BulkMuteFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} BulkMuteFindingsResponse + * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest */ - BulkMuteFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.BulkMuteFindingsResponse) + GroupFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsRequest) return object; - return new $root.google.cloud.securitycenter.v1.BulkMuteFindingsResponse(); + var message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.groupBy != null) + message.groupBy = String(object.groupBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; }; /** - * Creates a plain object from a BulkMuteFindingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.BulkMuteFindingsResponse} message BulkMuteFindingsResponse + * @param {google.cloud.securitycenter.v1.GroupFindingsRequest} message GroupFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BulkMuteFindingsResponse.toObject = function toObject() { - return {}; + GroupFindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.groupBy = ""; + object.readTime = null; + object.compareDuration = null; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.groupBy != null && message.hasOwnProperty("groupBy")) + object.groupBy = message.groupBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; }; /** - * Converts this BulkMuteFindingsResponse to JSON. + * Converts this GroupFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @instance * @returns {Object.} JSON object */ - BulkMuteFindingsResponse.prototype.toJSON = function toJSON() { + GroupFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BulkMuteFindingsResponse + * Gets the default type url for GroupFindingsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.BulkMuteFindingsResponse + * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BulkMuteFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.BulkMuteFindingsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupFindingsRequest"; }; - return BulkMuteFindingsResponse; + return GroupFindingsRequest; })(); - v1.CreateFindingRequest = (function() { + v1.GroupFindingsResponse = (function() { /** - * Properties of a CreateFindingRequest. + * Properties of a GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateFindingRequest - * @property {string|null} [parent] CreateFindingRequest parent - * @property {string|null} [findingId] CreateFindingRequest findingId - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] CreateFindingRequest finding + * @interface IGroupFindingsResponse + * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults + * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime + * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken + * @property {number|null} [totalSize] GroupFindingsResponse totalSize */ /** - * Constructs a new CreateFindingRequest. + * Constructs a new GroupFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateFindingRequest. - * @implements ICreateFindingRequest + * @classdesc Represents a GroupFindingsResponse. + * @implements IGroupFindingsResponse * @constructor - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set */ - function CreateFindingRequest(properties) { + function GroupFindingsResponse(properties) { + this.groupByResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28931,103 +42790,120 @@ } /** - * CreateFindingRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * GroupFindingsResponse groupByResults. + * @member {Array.} groupByResults + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance */ - CreateFindingRequest.prototype.parent = ""; + GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; /** - * CreateFindingRequest findingId. - * @member {string} findingId - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * GroupFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance */ - CreateFindingRequest.prototype.findingId = ""; + GroupFindingsResponse.prototype.readTime = null; /** - * CreateFindingRequest finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * GroupFindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance */ - CreateFindingRequest.prototype.finding = null; + GroupFindingsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateFindingRequest instance using the specified properties. + * GroupFindingsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @instance + */ + GroupFindingsResponse.prototype.totalSize = 0; + + /** + * Creates a new GroupFindingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest instance + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse instance */ - CreateFindingRequest.create = function create(properties) { - return new CreateFindingRequest(properties); + GroupFindingsResponse.create = function create(properties) { + return new GroupFindingsResponse(properties); }; /** - * Encodes the specified CreateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFindingRequest.encode = function encode(message, writer) { + GroupFindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.findingId); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.groupByResults != null && message.groupByResults.length) + for (var i = 0; i < message.groupByResults.length; ++i) + $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified CreateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateFindingRequest.verify|verify} messages. + * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateFindingRequest} message CreateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer. + * Decodes a GroupFindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decode = function decode(reader, length) { + GroupFindingsResponse.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.cloud.securitycenter.v1.CreateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.groupByResults && message.groupByResults.length)) + message.groupByResults = []; + message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); break; } case 2: { - message.findingId = reader.string(); + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); + break; + } + case 4: { + message.totalSize = reader.int32(); break; } default: @@ -29039,146 +42915,172 @@ }; /** - * Decodes a CreateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFindingRequest message. + * Verifies a GroupFindingsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateFindingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.findingId != null && message.hasOwnProperty("findingId")) - if (!$util.isString(message.findingId)) - return "findingId: string expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupFindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { + if (!Array.isArray(message.groupByResults)) + return "groupByResults: array expected"; + for (var i = 0; i < message.groupByResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); + if (error) + return "groupByResults." + error; + } + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); if (error) - return "finding." + error; + return "readTime." + error; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a CreateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateFindingRequest} CreateFindingRequest + * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse */ - CreateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateFindingRequest) + GroupFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateFindingRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.findingId != null) - message.findingId = String(object.findingId); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + var message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); + if (object.groupByResults) { + if (!Array.isArray(object.groupByResults)) + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: array expected"); + message.groupByResults = []; + for (var i = 0; i < object.groupByResults.length; ++i) { + if (typeof object.groupByResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: object expected"); + message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a CreateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.CreateFindingRequest} message CreateFindingRequest + * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} message GroupFindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFindingRequest.toObject = function toObject(message, options) { + GroupFindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.groupByResults = []; if (options.defaults) { - object.parent = ""; - object.findingId = ""; - object.finding = null; + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.findingId != null && message.hasOwnProperty("findingId")) - object.findingId = message.findingId; - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.groupByResults && message.groupByResults.length) { + object.groupByResults = []; + for (var j = 0; j < message.groupByResults.length; ++j) + object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this CreateFindingRequest to JSON. + * Converts this GroupFindingsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @instance * @returns {Object.} JSON object */ - CreateFindingRequest.prototype.toJSON = function toJSON() { + GroupFindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateFindingRequest + * Gets the default type url for GroupFindingsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateFindingRequest + * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateFindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateFindingRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupFindingsResponse"; }; - return CreateFindingRequest; + return GroupFindingsResponse; })(); - v1.CreateMuteConfigRequest = (function() { + v1.GroupResult = (function() { /** - * Properties of a CreateMuteConfigRequest. + * Properties of a GroupResult. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateMuteConfigRequest - * @property {string|null} [parent] CreateMuteConfigRequest parent - * @property {google.cloud.securitycenter.v1.IMuteConfig|null} [muteConfig] CreateMuteConfigRequest muteConfig - * @property {string|null} [muteConfigId] CreateMuteConfigRequest muteConfigId + * @interface IGroupResult + * @property {Object.|null} [properties] GroupResult properties + * @property {number|Long|null} [count] GroupResult count */ /** - * Constructs a new CreateMuteConfigRequest. + * Constructs a new GroupResult. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateMuteConfigRequest. - * @implements ICreateMuteConfigRequest + * @classdesc Represents a GroupResult. + * @implements IGroupResult * @constructor - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set */ - function CreateMuteConfigRequest(properties) { + function GroupResult(properties) { + this.properties = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29186,103 +43088,111 @@ } /** - * CreateMuteConfigRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest - * @instance - */ - CreateMuteConfigRequest.prototype.parent = ""; - - /** - * CreateMuteConfigRequest muteConfig. - * @member {google.cloud.securitycenter.v1.IMuteConfig|null|undefined} muteConfig - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * GroupResult properties. + * @member {Object.} properties + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance */ - CreateMuteConfigRequest.prototype.muteConfig = null; + GroupResult.prototype.properties = $util.emptyObject; /** - * CreateMuteConfigRequest muteConfigId. - * @member {string} muteConfigId - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * GroupResult count. + * @member {number|Long} count + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance */ - CreateMuteConfigRequest.prototype.muteConfigId = ""; + GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new CreateMuteConfigRequest instance using the specified properties. + * Creates a new GroupResult instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest instance + * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult instance */ - CreateMuteConfigRequest.create = function create(properties) { - return new CreateMuteConfigRequest(properties); + GroupResult.create = function create(properties) { + return new GroupResult(properties); }; /** - * Encodes the specified CreateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. + * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} message CreateMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMuteConfigRequest.encode = function encode(message, writer) { + GroupResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.muteConfig != null && Object.hasOwnProperty.call(message, "muteConfig")) - $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.muteConfigId != null && Object.hasOwnProperty.call(message, "muteConfigId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.muteConfigId); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); return writer; }; /** - * Encodes the specified CreateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateMuteConfigRequest.verify|verify} messages. + * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.ICreateMuteConfigRequest} message CreateMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + GroupResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMuteConfigRequest message from the specified reader or buffer. + * Decodes a GroupResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMuteConfigRequest.decode = function decode(reader, length) { + GroupResult.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.cloud.securitycenter.v1.CreateMuteConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GroupResult(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (message.properties === $util.emptyObject) + message.properties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.properties[key] = value; break; } case 2: { - message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.muteConfigId = reader.string(); + message.count = reader.int64(); break; } default: @@ -29294,146 +43204,166 @@ }; /** - * Decodes a CreateMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GroupResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + GroupResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMuteConfigRequest message. + * Verifies a GroupResult message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMuteConfigRequest.verify = function verify(message) { + GroupResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) { - var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfig); - if (error) - return "muteConfig." + error; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); + if (error) + return "properties." + error; + } } - if (message.muteConfigId != null && message.hasOwnProperty("muteConfigId")) - if (!$util.isString(message.muteConfigId)) - return "muteConfigId: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; return null; }; /** - * Creates a CreateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateMuteConfigRequest} CreateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult */ - CreateMuteConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest) + GroupResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GroupResult) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateMuteConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.muteConfig != null) { - if (typeof object.muteConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateMuteConfigRequest.muteConfig: object expected"); - message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfig); + var message = new $root.google.cloud.securitycenter.v1.GroupResult(); + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { + if (typeof object.properties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); + message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); + } } - if (object.muteConfigId != null) - message.muteConfigId = String(object.muteConfigId); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a CreateMuteConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a GroupResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static - * @param {google.cloud.securitycenter.v1.CreateMuteConfigRequest} message CreateMuteConfigRequest + * @param {google.cloud.securitycenter.v1.GroupResult} message GroupResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMuteConfigRequest.toObject = function toObject(message, options) { + GroupResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.muteConfig = null; - object.muteConfigId = ""; + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) - object.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfig, options); - if (message.muteConfigId != null && message.hasOwnProperty("muteConfigId")) - object.muteConfigId = message.muteConfigId; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; return object; }; /** - * Converts this CreateMuteConfigRequest to JSON. + * Converts this GroupResult to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @instance * @returns {Object.} JSON object */ - CreateMuteConfigRequest.prototype.toJSON = function toJSON() { + GroupResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateMuteConfigRequest + * Gets the default type url for GroupResult * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GroupResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateMuteConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupResult"; }; - return CreateMuteConfigRequest; + return GroupResult; })(); - v1.CreateNotificationConfigRequest = (function() { + v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest = (function() { /** - * Properties of a CreateNotificationConfigRequest. + * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateNotificationConfigRequest - * @property {string|null} [parent] CreateNotificationConfigRequest parent - * @property {string|null} [configId] CreateNotificationConfigRequest configId - * @property {google.cloud.securitycenter.v1.INotificationConfig|null} [notificationConfig] CreateNotificationConfigRequest notificationConfig + * @interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken */ /** - * Constructs a new CreateNotificationConfigRequest. + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateNotificationConfigRequest. - * @implements ICreateNotificationConfigRequest + * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set */ - function CreateNotificationConfigRequest(properties) { + function ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29441,90 +43371,90 @@ } /** - * CreateNotificationConfigRequest parent. + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @instance */ - CreateNotificationConfigRequest.prototype.parent = ""; + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; /** - * CreateNotificationConfigRequest configId. - * @member {string} configId - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @instance */ - CreateNotificationConfigRequest.prototype.configId = ""; + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; /** - * CreateNotificationConfigRequest notificationConfig. - * @member {google.cloud.securitycenter.v1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @instance */ - CreateNotificationConfigRequest.prototype.notificationConfig = null; + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; /** - * Creates a new CreateNotificationConfigRequest instance using the specified properties. + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance */ - CreateNotificationConfigRequest.create = function create(properties) { - return new CreateNotificationConfigRequest(properties); + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties); }; /** - * Encodes the specified CreateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} message CreateNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNotificationConfigRequest.encode = function encode(message, writer) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.configId != null && Object.hasOwnProperty.call(message, "configId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.configId); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateNotificationConfigRequest} message CreateNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNotificationConfigRequest.decode = function decode(reader, length) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.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.cloud.securitycenter.v1.CreateNotificationConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -29533,11 +43463,11 @@ break; } case 2: { - message.configId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } default: @@ -29549,145 +43479,141 @@ }; /** - * Decodes a CreateNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateNotificationConfigRequest message. + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateNotificationConfigRequest.verify = function verify(message) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.configId != null && message.hasOwnProperty("configId")) - if (!$util.isString(message.configId)) - return "configId: string expected"; - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} CreateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest */ - CreateNotificationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest) + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateNotificationConfigRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.configId != null) - message.configId = String(object.configId); - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateNotificationConfigRequest.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfig); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateNotificationConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.CreateNotificationConfigRequest} message CreateNotificationConfigRequest + * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateNotificationConfigRequest.toObject = function toObject(message, options) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.configId = ""; - object.notificationConfig = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.configId != null && message.hasOwnProperty("configId")) - object.configId = message.configId; - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateNotificationConfigRequest to JSON. + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @instance * @returns {Object.} JSON object */ - CreateNotificationConfigRequest.prototype.toJSON = function toJSON() { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateNotificationConfigRequest + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateNotificationConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest"; }; - return CreateNotificationConfigRequest; + return ListDescendantSecurityHealthAnalyticsCustomModulesRequest; })(); - v1.CreateSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse = (function() { /** - * Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [parent] CreateSecurityHealthAnalyticsCustomModuleRequest parent - * @property {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule + * @interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ /** - * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. - * @implements ICreateSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse * @constructor - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set */ - function CreateSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.securityHealthAnalyticsCustomModules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29695,89 +43621,92 @@ } /** - * CreateSecurityHealthAnalyticsCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. + * @member {Array.} securityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @instance */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; /** - * CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. - * @member {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @instance */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance */ - CreateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new CreateSecurityHealthAnalyticsCustomModuleRequest(properties); + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties); }; /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) - $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.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.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) + message.securityHealthAnalyticsCustomModules = []; + message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -29789,137 +43718,152 @@ }; /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { - var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); - if (error) - return "securityHealthAnalyticsCustomModule." + error; + if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) + return "securityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); + if (error) + return "securityHealthAnalyticsCustomModules." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse */ - CreateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest) + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.securityHealthAnalyticsCustomModule != null) { - if (typeof object.securityHealthAnalyticsCustomModule !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); + var message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); + if (object.securityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); + message.securityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); + message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.securityHealthAnalyticsCustomModule = null; + if (options.arrays || options.defaults) + object.securityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { + object.securityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) + object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) - object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @instance * @returns {Object.} JSON object */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse"; }; - return CreateSecurityHealthAnalyticsCustomModuleRequest; + return ListDescendantSecurityHealthAnalyticsCustomModulesResponse; })(); - v1.CreateSourceRequest = (function() { + v1.ListValuedResourcesRequest = (function() { /** - * Properties of a CreateSourceRequest. + * Properties of a ListValuedResourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateSourceRequest - * @property {string|null} [parent] CreateSourceRequest parent - * @property {google.cloud.securitycenter.v1.ISource|null} [source] CreateSourceRequest source + * @interface IListValuedResourcesRequest + * @property {string|null} [parent] ListValuedResourcesRequest parent + * @property {string|null} [filter] ListValuedResourcesRequest filter + * @property {string|null} [pageToken] ListValuedResourcesRequest pageToken + * @property {number|null} [pageSize] ListValuedResourcesRequest pageSize + * @property {string|null} [orderBy] ListValuedResourcesRequest orderBy */ /** - * Constructs a new CreateSourceRequest. + * Constructs a new ListValuedResourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateSourceRequest. - * @implements ICreateSourceRequest + * @classdesc Represents a ListValuedResourcesRequest. + * @implements IListValuedResourcesRequest * @constructor - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest=} [properties] Properties to set */ - function CreateSourceRequest(properties) { + function ListValuedResourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29927,80 +43871,110 @@ } /** - * CreateSourceRequest parent. + * ListValuedResourcesRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @instance */ - CreateSourceRequest.prototype.parent = ""; + ListValuedResourcesRequest.prototype.parent = ""; /** - * CreateSourceRequest source. - * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * ListValuedResourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @instance */ - CreateSourceRequest.prototype.source = null; + ListValuedResourcesRequest.prototype.filter = ""; /** - * Creates a new CreateSourceRequest instance using the specified properties. + * ListValuedResourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest + * @instance + */ + ListValuedResourcesRequest.prototype.pageToken = ""; + + /** + * ListValuedResourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest + * @instance + */ + ListValuedResourcesRequest.prototype.pageSize = 0; + + /** + * ListValuedResourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest + * @instance + */ + ListValuedResourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListValuedResourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest instance + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesRequest} ListValuedResourcesRequest instance */ - CreateSourceRequest.create = function create(properties) { - return new CreateSourceRequest(properties); + ListValuedResourcesRequest.create = function create(properties) { + return new ListValuedResourcesRequest(properties); }; /** - * Encodes the specified CreateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * Encodes the specified ListValuedResourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest} message ListValuedResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSourceRequest.encode = function encode(message, writer) { + ListValuedResourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateSourceRequest.verify|verify} messages. + * Encodes the specified ListValuedResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateSourceRequest} message CreateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListValuedResourcesRequest} message ListValuedResourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListValuedResourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer. + * Decodes a ListValuedResourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesRequest} ListValuedResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSourceRequest.decode = function decode(reader, length) { + ListValuedResourcesRequest.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.cloud.securitycenter.v1.CreateSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListValuedResourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -30009,7 +43983,19 @@ break; } case 2: { - message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); + message.filter = reader.string(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -30021,136 +44007,158 @@ }; /** - * Decodes a CreateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListValuedResourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesRequest} ListValuedResourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListValuedResourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSourceRequest message. + * Verifies a ListValuedResourcesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSourceRequest.verify = function verify(message) { + ListValuedResourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); - if (error) - return "source." + error; - } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListValuedResourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateSourceRequest} CreateSourceRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesRequest} ListValuedResourcesRequest */ - CreateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateSourceRequest) + ListValuedResourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListValuedResourcesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateSourceRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListValuedResourcesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); - } + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListValuedResourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static - * @param {google.cloud.securitycenter.v1.CreateSourceRequest} message CreateSourceRequest + * @param {google.cloud.securitycenter.v1.ListValuedResourcesRequest} message ListValuedResourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSourceRequest.toObject = function toObject(message, options) { + ListValuedResourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.source = null; + object.filter = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateSourceRequest to JSON. + * Converts this ListValuedResourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @instance * @returns {Object.} JSON object */ - CreateSourceRequest.prototype.toJSON = function toJSON() { + ListValuedResourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSourceRequest + * Gets the default type url for ListValuedResourcesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateSourceRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListValuedResourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateSourceRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListValuedResourcesRequest"; }; - return CreateSourceRequest; + return ListValuedResourcesRequest; })(); - v1.DeleteMuteConfigRequest = (function() { + v1.ListValuedResourcesResponse = (function() { /** - * Properties of a DeleteMuteConfigRequest. + * Properties of a ListValuedResourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IDeleteMuteConfigRequest - * @property {string|null} [name] DeleteMuteConfigRequest name + * @interface IListValuedResourcesResponse + * @property {Array.|null} [valuedResources] ListValuedResourcesResponse valuedResources + * @property {string|null} [nextPageToken] ListValuedResourcesResponse nextPageToken + * @property {number|null} [totalSize] ListValuedResourcesResponse totalSize */ /** - * Constructs a new DeleteMuteConfigRequest. + * Constructs a new ListValuedResourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a DeleteMuteConfigRequest. - * @implements IDeleteMuteConfigRequest + * @classdesc Represents a ListValuedResourcesResponse. + * @implements IListValuedResourcesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListValuedResourcesResponse=} [properties] Properties to set */ - function DeleteMuteConfigRequest(properties) { + function ListValuedResourcesResponse(properties) { + this.valuedResources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30158,75 +44166,106 @@ } /** - * DeleteMuteConfigRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * ListValuedResourcesResponse valuedResources. + * @member {Array.} valuedResources + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @instance */ - DeleteMuteConfigRequest.prototype.name = ""; + ListValuedResourcesResponse.prototype.valuedResources = $util.emptyArray; /** - * Creates a new DeleteMuteConfigRequest instance using the specified properties. + * ListValuedResourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse + * @instance + */ + ListValuedResourcesResponse.prototype.nextPageToken = ""; + + /** + * ListValuedResourcesResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse + * @instance + */ + ListValuedResourcesResponse.prototype.totalSize = 0; + + /** + * Creates a new ListValuedResourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListValuedResourcesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesResponse} ListValuedResourcesResponse instance */ - DeleteMuteConfigRequest.create = function create(properties) { - return new DeleteMuteConfigRequest(properties); + ListValuedResourcesResponse.create = function create(properties) { + return new ListValuedResourcesResponse(properties); }; /** - * Encodes the specified DeleteMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * Encodes the specified ListValuedResourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} message DeleteMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListValuedResourcesResponse} message ListValuedResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMuteConfigRequest.encode = function encode(message, writer) { + ListValuedResourcesResponse.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.valuedResources != null && message.valuedResources.length) + for (var i = 0; i < message.valuedResources.length; ++i) + $root.google.cloud.securitycenter.v1.ValuedResource.encode(message.valuedResources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified DeleteMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteMuteConfigRequest.verify|verify} messages. + * Encodes the specified ListValuedResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListValuedResourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteMuteConfigRequest} message DeleteMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListValuedResourcesResponse} message ListValuedResourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListValuedResourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListValuedResourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesResponse} ListValuedResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMuteConfigRequest.decode = function decode(reader, length) { + ListValuedResourcesResponse.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.cloud.securitycenter.v1.DeleteMuteConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListValuedResourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.valuedResources && message.valuedResources.length)) + message.valuedResources = []; + message.valuedResources.push($root.google.cloud.securitycenter.v1.ValuedResource.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); break; } default: @@ -30238,122 +44277,160 @@ }; /** - * Decodes a DeleteMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListValuedResourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesResponse} ListValuedResourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListValuedResourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteMuteConfigRequest message. + * Verifies a ListValuedResourcesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteMuteConfigRequest.verify = function verify(message) { + ListValuedResourcesResponse.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.valuedResources != null && message.hasOwnProperty("valuedResources")) { + if (!Array.isArray(message.valuedResources)) + return "valuedResources: array expected"; + for (var i = 0; i < message.valuedResources.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ValuedResource.verify(message.valuedResources[i]); + if (error) + return "valuedResources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a DeleteMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListValuedResourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} DeleteMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListValuedResourcesResponse} ListValuedResourcesResponse */ - DeleteMuteConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest) + ListValuedResourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListValuedResourcesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.DeleteMuteConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListValuedResourcesResponse(); + if (object.valuedResources) { + if (!Array.isArray(object.valuedResources)) + throw TypeError(".google.cloud.securitycenter.v1.ListValuedResourcesResponse.valuedResources: array expected"); + message.valuedResources = []; + for (var i = 0; i < object.valuedResources.length; ++i) { + if (typeof object.valuedResources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListValuedResourcesResponse.valuedResources: object expected"); + message.valuedResources[i] = $root.google.cloud.securitycenter.v1.ValuedResource.fromObject(object.valuedResources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a DeleteMuteConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListValuedResourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static - * @param {google.cloud.securitycenter.v1.DeleteMuteConfigRequest} message DeleteMuteConfigRequest + * @param {google.cloud.securitycenter.v1.ListValuedResourcesResponse} message ListValuedResourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMuteConfigRequest.toObject = function toObject(message, options) { + ListValuedResourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.valuedResources = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.valuedResources && message.valuedResources.length) { + object.valuedResources = []; + for (var j = 0; j < message.valuedResources.length; ++j) + object.valuedResources[j] = $root.google.cloud.securitycenter.v1.ValuedResource.toObject(message.valuedResources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this DeleteMuteConfigRequest to JSON. + * Converts this ListValuedResourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @instance * @returns {Object.} JSON object */ - DeleteMuteConfigRequest.prototype.toJSON = function toJSON() { + ListValuedResourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteMuteConfigRequest + * Gets the default type url for ListValuedResourcesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.DeleteMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListValuedResourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListValuedResourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteMuteConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListValuedResourcesResponse"; }; - return DeleteMuteConfigRequest; + return ListValuedResourcesResponse; })(); - v1.DeleteNotificationConfigRequest = (function() { + v1.ListAttackPathsRequest = (function() { /** - * Properties of a DeleteNotificationConfigRequest. + * Properties of a ListAttackPathsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IDeleteNotificationConfigRequest - * @property {string|null} [name] DeleteNotificationConfigRequest name + * @interface IListAttackPathsRequest + * @property {string|null} [parent] ListAttackPathsRequest parent + * @property {string|null} [filter] ListAttackPathsRequest filter + * @property {string|null} [pageToken] ListAttackPathsRequest pageToken + * @property {number|null} [pageSize] ListAttackPathsRequest pageSize */ /** - * Constructs a new DeleteNotificationConfigRequest. + * Constructs a new ListAttackPathsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a DeleteNotificationConfigRequest. - * @implements IDeleteNotificationConfigRequest + * @classdesc Represents a ListAttackPathsRequest. + * @implements IListAttackPathsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest=} [properties] Properties to set */ - function DeleteNotificationConfigRequest(properties) { + function ListAttackPathsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30361,75 +44438,117 @@ } /** - * DeleteNotificationConfigRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * ListAttackPathsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @instance */ - DeleteNotificationConfigRequest.prototype.name = ""; + ListAttackPathsRequest.prototype.parent = ""; /** - * Creates a new DeleteNotificationConfigRequest instance using the specified properties. + * ListAttackPathsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest + * @instance + */ + ListAttackPathsRequest.prototype.filter = ""; + + /** + * ListAttackPathsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest + * @instance + */ + ListAttackPathsRequest.prototype.pageToken = ""; + + /** + * ListAttackPathsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest + * @instance + */ + ListAttackPathsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListAttackPathsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAttackPathsRequest} ListAttackPathsRequest instance */ - DeleteNotificationConfigRequest.create = function create(properties) { - return new DeleteNotificationConfigRequest(properties); + ListAttackPathsRequest.create = function create(properties) { + return new ListAttackPathsRequest(properties); }; /** - * Encodes the specified DeleteNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListAttackPathsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} message DeleteNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest} message ListAttackPathsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNotificationConfigRequest.encode = function encode(message, writer) { + ListAttackPathsRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); return writer; }; /** - * Encodes the specified DeleteNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListAttackPathsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static - * @param {google.cloud.securitycenter.v1.IDeleteNotificationConfigRequest} message DeleteNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAttackPathsRequest} message ListAttackPathsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAttackPathsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListAttackPathsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsRequest} ListAttackPathsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNotificationConfigRequest.decode = function decode(reader, length) { + ListAttackPathsRequest.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.cloud.securitycenter.v1.DeleteNotificationConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAttackPathsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.pageSize = reader.int32(); break; } default: @@ -30441,122 +44560,149 @@ }; /** - * Decodes a DeleteNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAttackPathsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsRequest} ListAttackPathsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListAttackPathsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteNotificationConfigRequest message. + * Verifies a ListAttackPathsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteNotificationConfigRequest.verify = function verify(message) { + ListAttackPathsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a DeleteNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttackPathsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} DeleteNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsRequest} ListAttackPathsRequest */ - DeleteNotificationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest) + ListAttackPathsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAttackPathsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListAttackPathsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a DeleteNotificationConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAttackPathsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static - * @param {google.cloud.securitycenter.v1.DeleteNotificationConfigRequest} message DeleteNotificationConfigRequest + * @param {google.cloud.securitycenter.v1.ListAttackPathsRequest} message ListAttackPathsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteNotificationConfigRequest.toObject = function toObject(message, options) { + ListAttackPathsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this DeleteNotificationConfigRequest to JSON. + * Converts this ListAttackPathsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @instance * @returns {Object.} JSON object */ - DeleteNotificationConfigRequest.prototype.toJSON = function toJSON() { + ListAttackPathsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteNotificationConfigRequest + * Gets the default type url for ListAttackPathsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAttackPathsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteNotificationConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAttackPathsRequest"; }; - return DeleteNotificationConfigRequest; + return ListAttackPathsRequest; })(); - v1.DeleteSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListAttackPathsResponse = (function() { /** - * Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListAttackPathsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IDeleteSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] DeleteSecurityHealthAnalyticsCustomModuleRequest name + * @interface IListAttackPathsResponse + * @property {Array.|null} [attackPaths] ListAttackPathsResponse attackPaths + * @property {string|null} [nextPageToken] ListAttackPathsResponse nextPageToken */ /** - * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListAttackPathsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. - * @implements IDeleteSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListAttackPathsResponse. + * @implements IListAttackPathsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAttackPathsResponse=} [properties] Properties to set */ - function DeleteSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListAttackPathsResponse(properties) { + this.attackPaths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30564,75 +44710,92 @@ } /** - * DeleteSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * ListAttackPathsResponse attackPaths. + * @member {Array.} attackPaths + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @instance */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + ListAttackPathsResponse.prototype.attackPaths = $util.emptyArray; /** - * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * ListAttackPathsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse + * @instance + */ + ListAttackPathsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAttackPathsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListAttackPathsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAttackPathsResponse} ListAttackPathsResponse instance */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new DeleteSecurityHealthAnalyticsCustomModuleRequest(properties); + ListAttackPathsResponse.create = function create(properties) { + return new ListAttackPathsResponse(properties); }; /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListAttackPathsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAttackPathsResponse} message ListAttackPathsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListAttackPathsResponse.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.attackPaths != null && message.attackPaths.length) + for (var i = 0; i < message.attackPaths.length; ++i) + $root.google.cloud.securitycenter.v1.AttackPath.encode(message.attackPaths[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListAttackPathsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAttackPathsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static - * @param {google.cloud.securitycenter.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAttackPathsResponse} message ListAttackPathsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAttackPathsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListAttackPathsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsResponse} ListAttackPathsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListAttackPathsResponse.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.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAttackPathsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.attackPaths && message.attackPaths.length)) + message.attackPaths = []; + message.attackPaths.push($root.google.cloud.securitycenter.v1.AttackPath.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -30644,122 +44807,148 @@ }; /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAttackPathsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsResponse} ListAttackPathsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListAttackPathsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListAttackPathsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListAttackPathsResponse.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.attackPaths != null && message.hasOwnProperty("attackPaths")) { + if (!Array.isArray(message.attackPaths)) + return "attackPaths: array expected"; + for (var i = 0; i < message.attackPaths.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.AttackPath.verify(message.attackPaths[i]); + if (error) + return "attackPaths." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttackPathsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListAttackPathsResponse} ListAttackPathsResponse */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest) + ListAttackPathsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAttackPathsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListAttackPathsResponse(); + if (object.attackPaths) { + if (!Array.isArray(object.attackPaths)) + throw TypeError(".google.cloud.securitycenter.v1.ListAttackPathsResponse.attackPaths: array expected"); + message.attackPaths = []; + for (var i = 0; i < object.attackPaths.length; ++i) { + if (typeof object.attackPaths[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAttackPathsResponse.attackPaths: object expected"); + message.attackPaths[i] = $root.google.cloud.securitycenter.v1.AttackPath.fromObject(object.attackPaths[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAttackPathsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static - * @param {google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListAttackPathsResponse} message ListAttackPathsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListAttackPathsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.attackPaths = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.attackPaths && message.attackPaths.length) { + object.attackPaths = []; + for (var j = 0; j < message.attackPaths.length; ++j) + object.attackPaths[j] = $root.google.cloud.securitycenter.v1.AttackPath.toObject(message.attackPaths[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListAttackPathsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @instance * @returns {Object.} JSON object */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListAttackPathsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListAttackPathsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListAttackPathsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAttackPathsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAttackPathsResponse"; }; - return DeleteSecurityHealthAnalyticsCustomModuleRequest; + return ListAttackPathsResponse; })(); - v1.GetBigQueryExportRequest = (function() { + v1.GetSimulationRequest = (function() { /** - * Properties of a GetBigQueryExportRequest. + * Properties of a GetSimulationRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGetBigQueryExportRequest - * @property {string|null} [name] GetBigQueryExportRequest name + * @interface IGetSimulationRequest + * @property {string|null} [name] GetSimulationRequest name */ /** - * Constructs a new GetBigQueryExportRequest. + * Constructs a new GetSimulationRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetBigQueryExportRequest. - * @implements IGetBigQueryExportRequest + * @classdesc Represents a GetSimulationRequest. + * @implements IGetSimulationRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest=} [properties] Properties to set */ - function GetBigQueryExportRequest(properties) { + function GetSimulationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30767,35 +44956,35 @@ } /** - * GetBigQueryExportRequest name. + * GetSimulationRequest name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @instance */ - GetBigQueryExportRequest.prototype.name = ""; + GetSimulationRequest.prototype.name = ""; /** - * Creates a new GetBigQueryExportRequest instance using the specified properties. + * Creates a new GetSimulationRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest instance + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetSimulationRequest} GetSimulationRequest instance */ - GetBigQueryExportRequest.create = function create(properties) { - return new GetBigQueryExportRequest(properties); + GetSimulationRequest.create = function create(properties) { + return new GetSimulationRequest(properties); }; /** - * Encodes the specified GetBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * Encodes the specified GetSimulationRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSimulationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} message GetBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest} message GetSimulationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryExportRequest.encode = function encode(message, writer) { + GetSimulationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -30804,33 +44993,33 @@ }; /** - * Encodes the specified GetBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetBigQueryExportRequest.verify|verify} messages. + * Encodes the specified GetSimulationRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSimulationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static - * @param {google.cloud.securitycenter.v1.IGetBigQueryExportRequest} message GetBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetSimulationRequest} message GetSimulationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSimulationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBigQueryExportRequest message from the specified reader or buffer. + * Decodes a GetSimulationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.GetSimulationRequest} GetSimulationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryExportRequest.decode = function decode(reader, length) { + GetSimulationRequest.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.cloud.securitycenter.v1.GetBigQueryExportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetSimulationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -30847,30 +45036,30 @@ }; /** - * Decodes a GetBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSimulationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.GetSimulationRequest} GetSimulationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + GetSimulationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBigQueryExportRequest message. + * Verifies a GetSimulationRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBigQueryExportRequest.verify = function verify(message) { + GetSimulationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -30880,32 +45069,32 @@ }; /** - * Creates a GetBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSimulationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetBigQueryExportRequest} GetBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.GetSimulationRequest} GetSimulationRequest */ - GetBigQueryExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest) + GetSimulationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetSimulationRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GetBigQueryExportRequest(); + var message = new $root.google.cloud.securitycenter.v1.GetSimulationRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetBigQueryExportRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSimulationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static - * @param {google.cloud.securitycenter.v1.GetBigQueryExportRequest} message GetBigQueryExportRequest + * @param {google.cloud.securitycenter.v1.GetSimulationRequest} message GetSimulationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBigQueryExportRequest.toObject = function toObject(message, options) { + GetSimulationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -30917,52 +45106,52 @@ }; /** - * Converts this GetBigQueryExportRequest to JSON. + * Converts this GetSimulationRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @instance * @returns {Object.} JSON object */ - GetBigQueryExportRequest.prototype.toJSON = function toJSON() { + GetSimulationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBigQueryExportRequest + * Gets the default type url for GetSimulationRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.GetSimulationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSimulationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetBigQueryExportRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetSimulationRequest"; }; - return GetBigQueryExportRequest; + return GetSimulationRequest; })(); - v1.GetMuteConfigRequest = (function() { + v1.GetValuedResourceRequest = (function() { /** - * Properties of a GetMuteConfigRequest. + * Properties of a GetValuedResourceRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGetMuteConfigRequest - * @property {string|null} [name] GetMuteConfigRequest name + * @interface IGetValuedResourceRequest + * @property {string|null} [name] GetValuedResourceRequest name */ /** - * Constructs a new GetMuteConfigRequest. + * Constructs a new GetValuedResourceRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetMuteConfigRequest. - * @implements IGetMuteConfigRequest + * @classdesc Represents a GetValuedResourceRequest. + * @implements IGetValuedResourceRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest=} [properties] Properties to set */ - function GetMuteConfigRequest(properties) { + function GetValuedResourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30970,35 +45159,35 @@ } /** - * GetMuteConfigRequest name. + * GetValuedResourceRequest name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @instance */ - GetMuteConfigRequest.prototype.name = ""; + GetValuedResourceRequest.prototype.name = ""; /** - * Creates a new GetMuteConfigRequest instance using the specified properties. + * Creates a new GetValuedResourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest instance + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetValuedResourceRequest} GetValuedResourceRequest instance */ - GetMuteConfigRequest.create = function create(properties) { - return new GetMuteConfigRequest(properties); + GetValuedResourceRequest.create = function create(properties) { + return new GetValuedResourceRequest(properties); }; /** - * Encodes the specified GetMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * Encodes the specified GetValuedResourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetValuedResourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} message GetMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest} message GetValuedResourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMuteConfigRequest.encode = function encode(message, writer) { + GetValuedResourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -31007,33 +45196,33 @@ }; /** - * Encodes the specified GetMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetMuteConfigRequest.verify|verify} messages. + * Encodes the specified GetValuedResourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetValuedResourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static - * @param {google.cloud.securitycenter.v1.IGetMuteConfigRequest} message GetMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetValuedResourceRequest} message GetValuedResourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetValuedResourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMuteConfigRequest message from the specified reader or buffer. + * Decodes a GetValuedResourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GetValuedResourceRequest} GetValuedResourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMuteConfigRequest.decode = function decode(reader, length) { + GetValuedResourceRequest.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.cloud.securitycenter.v1.GetMuteConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetValuedResourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -31050,30 +45239,30 @@ }; /** - * Decodes a GetMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GetValuedResourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GetValuedResourceRequest} GetValuedResourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + GetValuedResourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMuteConfigRequest message. + * Verifies a GetValuedResourceRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMuteConfigRequest.verify = function verify(message) { + GetValuedResourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -31083,32 +45272,32 @@ }; /** - * Creates a GetMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetValuedResourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetMuteConfigRequest} GetMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.GetValuedResourceRequest} GetValuedResourceRequest */ - GetMuteConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetMuteConfigRequest) + GetValuedResourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetValuedResourceRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GetMuteConfigRequest(); + var message = new $root.google.cloud.securitycenter.v1.GetValuedResourceRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetMuteConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetValuedResourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static - * @param {google.cloud.securitycenter.v1.GetMuteConfigRequest} message GetMuteConfigRequest + * @param {google.cloud.securitycenter.v1.GetValuedResourceRequest} message GetValuedResourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMuteConfigRequest.toObject = function toObject(message, options) { + GetValuedResourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -31120,52 +45309,54 @@ }; /** - * Converts this GetMuteConfigRequest to JSON. + * Converts this GetValuedResourceRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @instance * @returns {Object.} JSON object */ - GetMuteConfigRequest.prototype.toJSON = function toJSON() { + GetValuedResourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetMuteConfigRequest + * Gets the default type url for GetValuedResourceRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.GetValuedResourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetValuedResourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetMuteConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetValuedResourceRequest"; }; - return GetMuteConfigRequest; + return GetValuedResourceRequest; })(); - v1.GetNotificationConfigRequest = (function() { + v1.ListMuteConfigsRequest = (function() { /** - * Properties of a GetNotificationConfigRequest. + * Properties of a ListMuteConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGetNotificationConfigRequest - * @property {string|null} [name] GetNotificationConfigRequest name + * @interface IListMuteConfigsRequest + * @property {string|null} [parent] ListMuteConfigsRequest parent + * @property {number|null} [pageSize] ListMuteConfigsRequest pageSize + * @property {string|null} [pageToken] ListMuteConfigsRequest pageToken */ /** - * Constructs a new GetNotificationConfigRequest. + * Constructs a new ListMuteConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetNotificationConfigRequest. - * @implements IGetNotificationConfigRequest + * @classdesc Represents a ListMuteConfigsRequest. + * @implements IListMuteConfigsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest=} [properties] Properties to set */ - function GetNotificationConfigRequest(properties) { + function ListMuteConfigsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31173,75 +45364,103 @@ } /** - * GetNotificationConfigRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * ListMuteConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @instance */ - GetNotificationConfigRequest.prototype.name = ""; + ListMuteConfigsRequest.prototype.parent = ""; /** - * Creates a new GetNotificationConfigRequest instance using the specified properties. + * ListMuteConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @instance + */ + ListMuteConfigsRequest.prototype.pageSize = 0; + + /** + * ListMuteConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @instance + */ + ListMuteConfigsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMuteConfigsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest instance */ - GetNotificationConfigRequest.create = function create(properties) { - return new GetNotificationConfigRequest(properties); + ListMuteConfigsRequest.create = function create(properties) { + return new ListMuteConfigsRequest(properties); }; /** - * Encodes the specified GetNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListMuteConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} message GetNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} message ListMuteConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationConfigRequest.encode = function encode(message, writer) { + ListMuteConfigsRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GetNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListMuteConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetNotificationConfigRequest} message GetNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} message ListMuteConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMuteConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListMuteConfigsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationConfigRequest.decode = function decode(reader, length) { + ListMuteConfigsRequest.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.cloud.securitycenter.v1.GetNotificationConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -31253,122 +45472,141 @@ }; /** - * Decodes a GetNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMuteConfigsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListMuteConfigsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNotificationConfigRequest message. + * Verifies a ListMuteConfigsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNotificationConfigRequest.verify = function verify(message) { + ListMuteConfigsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMuteConfigsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetNotificationConfigRequest} GetNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest */ - GetNotificationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest) + ListMuteConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GetNotificationConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetNotificationConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMuteConfigsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.GetNotificationConfigRequest} message GetNotificationConfigRequest + * @param {google.cloud.securitycenter.v1.ListMuteConfigsRequest} message ListMuteConfigsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNotificationConfigRequest.toObject = function toObject(message, options) { + ListMuteConfigsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetNotificationConfigRequest to JSON. + * Converts this ListMuteConfigsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @instance * @returns {Object.} JSON object */ - GetNotificationConfigRequest.prototype.toJSON = function toJSON() { + ListMuteConfigsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetNotificationConfigRequest + * Gets the default type url for ListMuteConfigsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMuteConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetNotificationConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListMuteConfigsRequest"; }; - return GetNotificationConfigRequest; + return ListMuteConfigsRequest; })(); - v1.GetOrganizationSettingsRequest = (function() { + v1.ListMuteConfigsResponse = (function() { /** - * Properties of a GetOrganizationSettingsRequest. + * Properties of a ListMuteConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IGetOrganizationSettingsRequest - * @property {string|null} [name] GetOrganizationSettingsRequest name + * @interface IListMuteConfigsResponse + * @property {Array.|null} [muteConfigs] ListMuteConfigsResponse muteConfigs + * @property {string|null} [nextPageToken] ListMuteConfigsResponse nextPageToken */ /** - * Constructs a new GetOrganizationSettingsRequest. + * Constructs a new ListMuteConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetOrganizationSettingsRequest. - * @implements IGetOrganizationSettingsRequest + * @classdesc Represents a ListMuteConfigsResponse. + * @implements IListMuteConfigsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse=} [properties] Properties to set */ - function GetOrganizationSettingsRequest(properties) { + function ListMuteConfigsResponse(properties) { + this.muteConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31376,75 +45614,92 @@ } /** - * GetOrganizationSettingsRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * ListMuteConfigsResponse muteConfigs. + * @member {Array.} muteConfigs + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @instance */ - GetOrganizationSettingsRequest.prototype.name = ""; + ListMuteConfigsResponse.prototype.muteConfigs = $util.emptyArray; /** - * Creates a new GetOrganizationSettingsRequest instance using the specified properties. + * ListMuteConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @instance + */ + ListMuteConfigsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMuteConfigsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest instance + * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse instance */ - GetOrganizationSettingsRequest.create = function create(properties) { - return new GetOrganizationSettingsRequest(properties); + ListMuteConfigsResponse.create = function create(properties) { + return new ListMuteConfigsResponse(properties); }; /** - * Encodes the specified GetOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListMuteConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse} message ListMuteConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrganizationSettingsRequest.encode = function encode(message, writer) { + ListMuteConfigsResponse.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.muteConfigs != null && message.muteConfigs.length) + for (var i = 0; i < message.muteConfigs.length; ++i) + $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GetOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListMuteConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetOrganizationSettingsRequest} message GetOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse} message ListMuteConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMuteConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListMuteConfigsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrganizationSettingsRequest.decode = function decode(reader, length) { + ListMuteConfigsResponse.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.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.muteConfigs && message.muteConfigs.length)) + message.muteConfigs = []; + message.muteConfigs.push($root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -31456,122 +45711,150 @@ }; /** - * Decodes a GetOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMuteConfigsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListMuteConfigsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOrganizationSettingsRequest message. + * Verifies a ListMuteConfigsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOrganizationSettingsRequest.verify = function verify(message) { + ListMuteConfigsResponse.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.muteConfigs != null && message.hasOwnProperty("muteConfigs")) { + if (!Array.isArray(message.muteConfigs)) + return "muteConfigs: array expected"; + for (var i = 0; i < message.muteConfigs.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfigs[i]); + if (error) + return "muteConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMuteConfigsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} GetOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse */ - GetOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest) + ListMuteConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse(); + if (object.muteConfigs) { + if (!Array.isArray(object.muteConfigs)) + throw TypeError(".google.cloud.securitycenter.v1.ListMuteConfigsResponse.muteConfigs: array expected"); + message.muteConfigs = []; + for (var i = 0; i < object.muteConfigs.length; ++i) { + if (typeof object.muteConfigs[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListMuteConfigsResponse.muteConfigs: object expected"); + message.muteConfigs[i] = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetOrganizationSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMuteConfigsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.GetOrganizationSettingsRequest} message GetOrganizationSettingsRequest + * @param {google.cloud.securitycenter.v1.ListMuteConfigsResponse} message ListMuteConfigsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOrganizationSettingsRequest.toObject = function toObject(message, options) { + ListMuteConfigsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.muteConfigs = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.muteConfigs && message.muteConfigs.length) { + object.muteConfigs = []; + for (var j = 0; j < message.muteConfigs.length; ++j) + object.muteConfigs[j] = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetOrganizationSettingsRequest to JSON. + * Converts this ListMuteConfigsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @instance * @returns {Object.} JSON object */ - GetOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + ListMuteConfigsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOrganizationSettingsRequest + * Gets the default type url for ListMuteConfigsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOrganizationSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMuteConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetOrganizationSettingsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListMuteConfigsResponse"; }; - return GetOrganizationSettingsRequest; + return ListMuteConfigsResponse; })(); - v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListNotificationConfigsRequest = (function() { /** - * Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListNotificationConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name + * @interface IListNotificationConfigsRequest + * @property {string|null} [parent] ListNotificationConfigsRequest parent + * @property {string|null} [pageToken] ListNotificationConfigsRequest pageToken + * @property {number|null} [pageSize] ListNotificationConfigsRequest pageSize */ /** - * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListNotificationConfigsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. - * @implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListNotificationConfigsRequest. + * @implements IListNotificationConfigsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest=} [properties] Properties to set */ - function GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListNotificationConfigsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31579,75 +45862,103 @@ } /** - * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * ListNotificationConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @instance */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + ListNotificationConfigsRequest.prototype.parent = ""; /** - * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * ListNotificationConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest + * @instance + */ + ListNotificationConfigsRequest.prototype.pageToken = ""; + + /** + * ListNotificationConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest + * @instance + */ + ListNotificationConfigsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListNotificationConfigsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest instance */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties); + ListNotificationConfigsRequest.create = function create(properties) { + return new ListNotificationConfigsRequest(properties); }; /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListNotificationConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} message ListNotificationConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListNotificationConfigsRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListNotificationConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} message ListNotificationConfigsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListNotificationConfigsRequest.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.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } default: @@ -31659,122 +45970,141 @@ }; /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListNotificationConfigsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListNotificationConfigsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListNotificationConfigsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationConfigsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) + ListNotificationConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationConfigsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static - * @param {google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} message ListNotificationConfigsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListNotificationConfigsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListNotificationConfigsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @instance * @returns {Object.} JSON object */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListNotificationConfigsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListNotificationConfigsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListNotificationConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListNotificationConfigsRequest"; }; - return GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + return ListNotificationConfigsRequest; })(); - v1.GetSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListNotificationConfigsResponse = (function() { /** - * Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListNotificationConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IGetSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] GetSecurityHealthAnalyticsCustomModuleRequest name + * @interface IListNotificationConfigsResponse + * @property {Array.|null} [notificationConfigs] ListNotificationConfigsResponse notificationConfigs + * @property {string|null} [nextPageToken] ListNotificationConfigsResponse nextPageToken */ /** - * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListNotificationConfigsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetSecurityHealthAnalyticsCustomModuleRequest. - * @implements IGetSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListNotificationConfigsResponse. + * @implements IListNotificationConfigsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse=} [properties] Properties to set */ - function GetSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListNotificationConfigsResponse(properties) { + this.notificationConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31782,75 +46112,92 @@ } /** - * GetSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * ListNotificationConfigsResponse notificationConfigs. + * @member {Array.} notificationConfigs + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @instance */ - GetSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + ListNotificationConfigsResponse.prototype.notificationConfigs = $util.emptyArray; /** - * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * ListNotificationConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse + * @instance + */ + ListNotificationConfigsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListNotificationConfigsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse instance */ - GetSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new GetSecurityHealthAnalyticsCustomModuleRequest(properties); + ListNotificationConfigsResponse.create = function create(properties) { + return new ListNotificationConfigsResponse(properties); }; /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListNotificationConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse} message ListNotificationConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListNotificationConfigsResponse.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.notificationConfigs != null && message.notificationConfigs.length) + for (var i = 0; i < message.notificationConfigs.length; ++i) + $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListNotificationConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse} message ListNotificationConfigsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListNotificationConfigsResponse.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.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.notificationConfigs && message.notificationConfigs.length)) + message.notificationConfigs = []; + message.notificationConfigs.push($root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -31862,122 +46209,150 @@ }; /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListNotificationConfigsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListNotificationConfigsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListNotificationConfigsResponse.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.notificationConfigs != null && message.hasOwnProperty("notificationConfigs")) { + if (!Array.isArray(message.notificationConfigs)) + return "notificationConfigs: array expected"; + for (var i = 0; i < message.notificationConfigs.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfigs[i]); + if (error) + return "notificationConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationConfigsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse */ - GetSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest) + ListNotificationConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse(); + if (object.notificationConfigs) { + if (!Array.isArray(object.notificationConfigs)) + throw TypeError(".google.cloud.securitycenter.v1.ListNotificationConfigsResponse.notificationConfigs: array expected"); + message.notificationConfigs = []; + for (var i = 0; i < object.notificationConfigs.length; ++i) { + if (typeof object.notificationConfigs[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListNotificationConfigsResponse.notificationConfigs: object expected"); + message.notificationConfigs[i] = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationConfigsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static - * @param {google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} message ListNotificationConfigsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListNotificationConfigsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.notificationConfigs = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.notificationConfigs && message.notificationConfigs.length) { + object.notificationConfigs = []; + for (var j = 0; j < message.notificationConfigs.length; ++j) + object.notificationConfigs[j] = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListNotificationConfigsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @instance * @returns {Object.} JSON object */ - GetSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListNotificationConfigsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListNotificationConfigsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListNotificationConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListNotificationConfigsResponse"; }; - return GetSecurityHealthAnalyticsCustomModuleRequest; + return ListNotificationConfigsResponse; })(); - v1.GetSourceRequest = (function() { + v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = (function() { /** - * Properties of a GetSourceRequest. + * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGetSourceRequest - * @property {string|null} [name] GetSourceRequest name + * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken */ /** - * Constructs a new GetSourceRequest. + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GetSourceRequest. - * @implements IGetSourceRequest + * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set */ - function GetSourceRequest(properties) { + function ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31985,75 +46360,103 @@ } /** - * GetSourceRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @instance */ - GetSourceRequest.prototype.name = ""; + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; /** - * Creates a new GetSourceRequest instance using the specified properties. + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest instance + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance */ - GetSourceRequest.create = function create(properties) { - return new GetSourceRequest(properties); + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties); }; /** - * Encodes the specified GetSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encode = function encode(message, writer) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GetSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetSourceRequest.verify|verify} messages. + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGetSourceRequest} message GetSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decode = function decode(reader, length) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.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.cloud.securitycenter.v1.GetSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -32065,288 +46468,234 @@ }; /** - * Decodes a GetSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSourceRequest message. + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSourceRequest.verify = function verify(message) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GetSourceRequest} GetSourceRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest */ - GetSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GetSourceRequest) + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GetSourceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GetSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.GetSourceRequest} message GetSourceRequest + * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSourceRequest.toObject = function toObject(message, options) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GetSourceRequest to JSON. + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @instance * @returns {Object.} JSON object */ - GetSourceRequest.prototype.toJSON = function toJSON() { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSourceRequest + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GetSourceRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetSourceRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest"; }; - return GetSourceRequest; + return ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; })(); - v1.GroupAssetsRequest = (function() { - - /** - * Properties of a GroupAssetsRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IGroupAssetsRequest - * @property {string|null} [parent] GroupAssetsRequest parent - * @property {string|null} [filter] GroupAssetsRequest filter - * @property {string|null} [groupBy] GroupAssetsRequest groupBy - * @property {google.protobuf.IDuration|null} [compareDuration] GroupAssetsRequest compareDuration - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsRequest readTime - * @property {string|null} [pageToken] GroupAssetsRequest pageToken - * @property {number|null} [pageSize] GroupAssetsRequest pageSize - */ + v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = (function() { /** - * Constructs a new GroupAssetsRequest. + * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupAssetsRequest. - * @implements IGroupAssetsRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set - */ - function GroupAssetsRequest(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]]; - } - - /** - * GroupAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.parent = ""; - - /** - * GroupAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.filter = ""; - - /** - * GroupAssetsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance - */ - GroupAssetsRequest.prototype.groupBy = ""; - - /** - * GroupAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance + * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [effectiveSecurityHealthAnalyticsCustomModules] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - GroupAssetsRequest.prototype.compareDuration = null; /** - * GroupAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest - * @instance + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @constructor + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set */ - GroupAssetsRequest.prototype.readTime = null; + function ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.effectiveSecurityHealthAnalyticsCustomModules = []; + 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]]; + } /** - * GroupAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. + * @member {Array.} effectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @instance */ - GroupAssetsRequest.prototype.pageToken = ""; + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.effectiveSecurityHealthAnalyticsCustomModules = $util.emptyArray; /** - * GroupAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @instance */ - GroupAssetsRequest.prototype.pageSize = 0; + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new GroupAssetsRequest instance using the specified properties. + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest instance + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance */ - GroupAssetsRequest.create = function create(properties) { - return new GroupAssetsRequest(properties); + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties); }; /** - * Encodes the specified GroupAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encode = function encode(message, writer) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && Object.hasOwnProperty.call(message, "groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.effectiveSecurityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.encode(message.effectiveSecurityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GroupAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsRequest.verify|verify} messages. + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsRequest} message GroupAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decode = function decode(reader, length) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.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.cloud.securitycenter.v1.GroupAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length)) + message.effectiveSecurityHealthAnalyticsCustomModules = []; + message.effectiveSecurityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.groupBy = reader.string(); - break; - } - case 4: { - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.pageToken = reader.string(); - break; - } - case 8: { - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -32358,185 +46707,150 @@ }; /** - * Decodes a GroupAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsRequest message. + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsRequest.verify = function verify(message) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; + if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.hasOwnProperty("effectiveSecurityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.effectiveSecurityHealthAnalyticsCustomModules)) + return "effectiveSecurityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify(message.effectiveSecurityHealthAnalyticsCustomModules[i]); + if (error) + return "effectiveSecurityHealthAnalyticsCustomModules." + error; + } } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GroupAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupAssetsRequest} GroupAssetsRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse */ - GroupAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsRequest) + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + var message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); + if (object.effectiveSecurityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.effectiveSecurityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: array expected"); + message.effectiveSecurityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.effectiveSecurityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: object expected"); + message.effectiveSecurityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.fromObject(object.effectiveSecurityHealthAnalyticsCustomModules[i]); + } } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GroupAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.GroupAssetsRequest} message GroupAssetsRequest + * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsRequest.toObject = function toObject(message, options) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.compareDuration = null; - object.readTime = null; - object.pageToken = ""; - object.pageSize = 0; + if (options.arrays || options.defaults) + object.effectiveSecurityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length) { + object.effectiveSecurityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++j) + object.effectiveSecurityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.toObject(message.effectiveSecurityHealthAnalyticsCustomModules[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GroupAssetsRequest to JSON. + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @instance * @returns {Object.} JSON object */ - GroupAssetsRequest.prototype.toJSON = function toJSON() { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupAssetsRequest + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupAssetsRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupAssetsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse"; }; - return GroupAssetsRequest; + return ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; })(); - v1.GroupAssetsResponse = (function() { + v1.ListSecurityHealthAnalyticsCustomModulesRequest = (function() { /** - * Properties of a GroupAssetsResponse. + * Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupAssetsResponse - * @property {Array.|null} [groupByResults] GroupAssetsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupAssetsResponse readTime - * @property {string|null} [nextPageToken] GroupAssetsResponse nextPageToken - * @property {number|null} [totalSize] GroupAssetsResponse totalSize + * @interface IListSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListSecurityHealthAnalyticsCustomModulesRequest pageToken */ /** - * Constructs a new GroupAssetsResponse. + * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupAssetsResponse. - * @implements IGroupAssetsResponse + * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListSecurityHealthAnalyticsCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set */ - function GroupAssetsResponse(properties) { - this.groupByResults = []; + function ListSecurityHealthAnalyticsCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32544,120 +46858,103 @@ } /** - * GroupAssetsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse - * @instance - */ - GroupAssetsResponse.prototype.groupByResults = $util.emptyArray; - - /** - * GroupAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * ListSecurityHealthAnalyticsCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @instance */ - GroupAssetsResponse.prototype.readTime = null; + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; /** - * GroupAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * ListSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @instance */ - GroupAssetsResponse.prototype.nextPageToken = ""; + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; /** - * GroupAssetsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * ListSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @instance */ - GroupAssetsResponse.prototype.totalSize = 0; + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; /** - * Creates a new GroupAssetsResponse instance using the specified properties. + * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse instance + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest instance */ - GroupAssetsResponse.create = function create(properties) { - return new GroupAssetsResponse(properties); + ListSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListSecurityHealthAnalyticsCustomModulesRequest(properties); }; /** - * Encodes the specified GroupAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encode = function encode(message, writer) { + ListSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GroupAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupAssetsResponse.verify|verify} messages. + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupAssetsResponse} message GroupAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer. + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decode = function decode(reader, length) { + ListSecurityHealthAnalyticsCustomModulesRequest.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.cloud.securitycenter.v1.GroupAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.nextPageToken = reader.string(); - break; - } - case 4: { - message.totalSize = reader.int32(); + message.pageToken = reader.string(); break; } default: @@ -32669,176 +46966,141 @@ }; /** - * Decodes a GroupAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + ListSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupAssetsResponse message. + * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupAssetsResponse.verify = function verify(message) { + ListSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GroupAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupAssetsResponse} GroupAssetsResponse + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest */ - GroupAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupAssetsResponse) + ListSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupAssetsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + var message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a GroupAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.GroupAssetsResponse} message GroupAssetsResponse + * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupAssetsResponse.toObject = function toObject(message, options) { + ListSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this GroupAssetsResponse to JSON. + * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @instance * @returns {Object.} JSON object */ - GroupAssetsResponse.prototype.toJSON = function toJSON() { + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupAssetsResponse + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupAssetsResponse + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupAssetsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest"; }; - return GroupAssetsResponse; + return ListSecurityHealthAnalyticsCustomModulesRequest; })(); - v1.GroupFindingsRequest = (function() { + v1.ListSecurityHealthAnalyticsCustomModulesResponse = (function() { /** - * Properties of a GroupFindingsRequest. + * Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupFindingsRequest - * @property {string|null} [parent] GroupFindingsRequest parent - * @property {string|null} [filter] GroupFindingsRequest filter - * @property {string|null} [groupBy] GroupFindingsRequest groupBy - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] GroupFindingsRequest compareDuration - * @property {string|null} [pageToken] GroupFindingsRequest pageToken - * @property {number|null} [pageSize] GroupFindingsRequest pageSize + * @interface IListSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ /** - * Constructs a new GroupFindingsRequest. + * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupFindingsRequest. - * @implements IGroupFindingsRequest + * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListSecurityHealthAnalyticsCustomModulesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set */ - function GroupFindingsRequest(properties) { + function ListSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.securityHealthAnalyticsCustomModules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32846,159 +47108,92 @@ } /** - * GroupFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.parent = ""; - - /** - * GroupFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.filter = ""; - - /** - * GroupFindingsRequest groupBy. - * @member {string} groupBy - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.groupBy = ""; - - /** - * GroupFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.readTime = null; - - /** - * GroupFindingsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest - * @instance - */ - GroupFindingsRequest.prototype.compareDuration = null; - - /** - * GroupFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. + * @member {Array.} securityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @instance */ - GroupFindingsRequest.prototype.pageToken = ""; + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; /** - * GroupFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @instance */ - GroupFindingsRequest.prototype.pageSize = 0; + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new GroupFindingsRequest instance using the specified properties. + * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest instance + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse instance */ - GroupFindingsRequest.create = function create(properties) { - return new GroupFindingsRequest(properties); + ListSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListSecurityHealthAnalyticsCustomModulesResponse(properties); }; /** - * Encodes the specified GroupFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsRequest.encode = function encode(message, writer) { + ListSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.groupBy != null && Object.hasOwnProperty.call(message, "groupBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupBy); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GroupFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsRequest.verify|verify} messages. + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsRequest} message GroupFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer. + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsRequest.decode = function decode(reader, length) { + ListSecurityHealthAnalyticsCustomModulesResponse.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.cloud.securitycenter.v1.GroupFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) + message.securityHealthAnalyticsCustomModules = []; + message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.groupBy = reader.string(); - break; - } - case 4: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - message.pageToken = reader.string(); - break; - } - case 8: { - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -33010,185 +47205,150 @@ }; /** - * Decodes a GroupFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupFindingsRequest message. + * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupFindingsRequest.verify = function verify(message) { + ListSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - if (!$util.isString(message.groupBy)) - return "groupBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); - if (error) - return "compareDuration." + error; + if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) + return "securityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); + if (error) + return "securityHealthAnalyticsCustomModules." + error; + } } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GroupFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupFindingsRequest} GroupFindingsRequest + * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse */ - GroupFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsRequest) + ListSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.groupBy != null) - message.groupBy = String(object.groupBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + var message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); + if (object.securityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); + message.securityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); + message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); + } } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GroupFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.GroupFindingsRequest} message GroupFindingsRequest + * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupFindingsRequest.toObject = function toObject(message, options) { + ListSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.groupBy = ""; - object.readTime = null; - object.compareDuration = null; - object.pageToken = ""; - object.pageSize = 0; + if (options.arrays || options.defaults) + object.securityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { + object.securityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) + object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.groupBy != null && message.hasOwnProperty("groupBy")) - object.groupBy = message.groupBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GroupFindingsRequest to JSON. + * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @instance * @returns {Object.} JSON object */ - GroupFindingsRequest.prototype.toJSON = function toJSON() { + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupFindingsRequest + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupFindingsRequest + * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupFindingsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse"; }; - return GroupFindingsRequest; + return ListSecurityHealthAnalyticsCustomModulesResponse; })(); - v1.GroupFindingsResponse = (function() { + v1.ListSourcesRequest = (function() { /** - * Properties of a GroupFindingsResponse. + * Properties of a ListSourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupFindingsResponse - * @property {Array.|null} [groupByResults] GroupFindingsResponse groupByResults - * @property {google.protobuf.ITimestamp|null} [readTime] GroupFindingsResponse readTime - * @property {string|null} [nextPageToken] GroupFindingsResponse nextPageToken - * @property {number|null} [totalSize] GroupFindingsResponse totalSize + * @interface IListSourcesRequest + * @property {string|null} [parent] ListSourcesRequest parent + * @property {string|null} [pageToken] ListSourcesRequest pageToken + * @property {number|null} [pageSize] ListSourcesRequest pageSize */ /** - * Constructs a new GroupFindingsResponse. + * Constructs a new ListSourcesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupFindingsResponse. - * @implements IGroupFindingsResponse + * @classdesc Represents a ListSourcesRequest. + * @implements IListSourcesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set */ - function GroupFindingsResponse(properties) { - this.groupByResults = []; + function ListSourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33196,120 +47356,103 @@ } /** - * GroupFindingsResponse groupByResults. - * @member {Array.} groupByResults - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse - * @instance - */ - GroupFindingsResponse.prototype.groupByResults = $util.emptyArray; - - /** - * GroupFindingsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * ListSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance */ - GroupFindingsResponse.prototype.readTime = null; + ListSourcesRequest.prototype.parent = ""; /** - * GroupFindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * ListSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance */ - GroupFindingsResponse.prototype.nextPageToken = ""; + ListSourcesRequest.prototype.pageToken = ""; /** - * GroupFindingsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * ListSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance */ - GroupFindingsResponse.prototype.totalSize = 0; + ListSourcesRequest.prototype.pageSize = 0; /** - * Creates a new GroupFindingsResponse instance using the specified properties. + * Creates a new ListSourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse instance + * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest instance */ - GroupFindingsResponse.create = function create(properties) { - return new GroupFindingsResponse(properties); + ListSourcesRequest.create = function create(properties) { + return new ListSourcesRequest(properties); }; /** - * Encodes the specified GroupFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsResponse.encode = function encode(message, writer) { + ListSourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupByResults != null && message.groupByResults.length) - for (var i = 0; i < message.groupByResults.length; ++i) - $root.google.cloud.securitycenter.v1.GroupResult.encode(message.groupByResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); return writer; }; /** - * Encodes the specified GroupFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupFindingsResponse.verify|verify} messages. + * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.IGroupFindingsResponse} message GroupFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer. + * Decodes a ListSourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsResponse.decode = function decode(reader, length) { + ListSourcesRequest.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.cloud.securitycenter.v1.GroupFindingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.groupByResults && message.groupByResults.length)) - message.groupByResults = []; - message.groupByResults.push($root.google.cloud.securitycenter.v1.GroupResult.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nextPageToken = reader.string(); + message.pageToken = reader.string(); break; } - case 4: { - message.totalSize = reader.int32(); + case 7: { + message.pageSize = reader.int32(); break; } default: @@ -33321,172 +47464,141 @@ }; /** - * Decodes a GroupFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupFindingsResponse message. + * Verifies a ListSourcesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupFindingsResponse.verify = function verify(message) { + ListSourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupByResults != null && message.hasOwnProperty("groupByResults")) { - if (!Array.isArray(message.groupByResults)) - return "groupByResults: array expected"; - for (var i = 0; i < message.groupByResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.GroupResult.verify(message.groupByResults[i]); - if (error) - return "groupByResults." + error; - } - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a GroupFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupFindingsResponse} GroupFindingsResponse + * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest */ - GroupFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupFindingsResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1.GroupFindingsResponse(); - if (object.groupByResults) { - if (!Array.isArray(object.groupByResults)) - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: array expected"); - message.groupByResults = []; - for (var i = 0; i < object.groupByResults.length; ++i) { - if (typeof object.groupByResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.groupByResults: object expected"); - message.groupByResults[i] = $root.google.cloud.securitycenter.v1.GroupResult.fromObject(object.groupByResults[i]); - } - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupFindingsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + ListSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a GroupFindingsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static - * @param {google.cloud.securitycenter.v1.GroupFindingsResponse} message GroupFindingsResponse + * @param {google.cloud.securitycenter.v1.ListSourcesRequest} message ListSourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupFindingsResponse.toObject = function toObject(message, options) { + ListSourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.groupByResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.groupByResults && message.groupByResults.length) { - object.groupByResults = []; - for (var j = 0; j < message.groupByResults.length; ++j) - object.groupByResults[j] = $root.google.cloud.securitycenter.v1.GroupResult.toObject(message.groupByResults[j], options); + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this GroupFindingsResponse to JSON. + * Converts this ListSourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @instance * @returns {Object.} JSON object */ - GroupFindingsResponse.prototype.toJSON = function toJSON() { + ListSourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupFindingsResponse + * Gets the default type url for ListSourcesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupFindingsResponse + * @memberof google.cloud.securitycenter.v1.ListSourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupFindingsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSourcesRequest"; }; - return GroupFindingsResponse; + return ListSourcesRequest; })(); - v1.GroupResult = (function() { + v1.ListSourcesResponse = (function() { /** - * Properties of a GroupResult. + * Properties of a ListSourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IGroupResult - * @property {Object.|null} [properties] GroupResult properties - * @property {number|Long|null} [count] GroupResult count + * @interface IListSourcesResponse + * @property {Array.|null} [sources] ListSourcesResponse sources + * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken */ /** - * Constructs a new GroupResult. + * Constructs a new ListSourcesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a GroupResult. - * @implements IGroupResult + * @classdesc Represents a ListSourcesResponse. + * @implements IListSourcesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set */ - function GroupResult(properties) { - this.properties = {}; + function ListSourcesResponse(properties) { + this.sources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33494,111 +47606,92 @@ } /** - * GroupResult properties. - * @member {Object.} properties - * @memberof google.cloud.securitycenter.v1.GroupResult + * ListSourcesResponse sources. + * @member {Array.} sources + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @instance */ - GroupResult.prototype.properties = $util.emptyObject; + ListSourcesResponse.prototype.sources = $util.emptyArray; /** - * GroupResult count. - * @member {number|Long} count - * @memberof google.cloud.securitycenter.v1.GroupResult + * ListSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @instance */ - GroupResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListSourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new GroupResult instance using the specified properties. + * Creates a new ListSourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult instance + * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse instance */ - GroupResult.create = function create(properties) { - return new GroupResult(properties); + ListSourcesResponse.create = function create(properties) { + return new ListSourcesResponse(properties); }; /** - * Encodes the specified GroupResult message. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupResult.encode = function encode(message, writer) { + ListSourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.securitycenter.v1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified GroupResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GroupResult.verify|verify} messages. + * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.IGroupResult} message GroupResult message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GroupResult.encodeDelimited = function encodeDelimited(message, writer) { + ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GroupResult message from the specified reader or buffer. + * Decodes a ListSourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupResult.decode = function decode(reader, length) { + ListSourcesResponse.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.cloud.securitycenter.v1.GroupResult(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (message.properties === $util.emptyObject) - message.properties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.properties[key] = value; + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32())); break; } case 2: { - message.count = reader.int64(); + message.nextPageToken = reader.string(); break; } default: @@ -33610,166 +47703,155 @@ }; /** - * Decodes a GroupResult message from the specified reader or buffer, length delimited. + * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GroupResult.decodeDelimited = function decodeDelimited(reader) { + ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GroupResult message. + * Verifies a ListSourcesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GroupResult.verify = function verify(message) { + ListSourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.properties[key[i]]); + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.sources[i]); if (error) - return "properties." + error; + return "sources." + error; } } - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GroupResult message from a plain object. Also converts values to their respective internal types. + * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.GroupResult} GroupResult + * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse */ - GroupResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.GroupResult) + ListSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.GroupResult(); - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) { - if (typeof object.properties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.GroupResult.properties: object expected"); - message.properties[keys[i]] = $root.google.protobuf.Value.fromObject(object.properties[keys[i]]); + var message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: object expected"); + message.sources[i] = $root.google.cloud.securitycenter.v1.Source.fromObject(object.sources[i]); } } - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GroupResult message. Also converts values to other types if specified. + * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static - * @param {google.cloud.securitycenter.v1.GroupResult} message GroupResult + * @param {google.cloud.securitycenter.v1.ListSourcesResponse} message ListSourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GroupResult.toObject = function toObject(message, options) { + ListSourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.properties = {}; + if (options.arrays || options.defaults) + object.sources = []; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = $root.google.protobuf.Value.toObject(message.properties[keys2[j]], options); + object.nextPageToken = ""; + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.securitycenter.v1.Source.toObject(message.sources[j], options); } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GroupResult to JSON. + * Converts this ListSourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @instance * @returns {Object.} JSON object */ - GroupResult.prototype.toJSON = function toJSON() { + ListSourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GroupResult + * Gets the default type url for ListSourcesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.GroupResult + * @memberof google.cloud.securitycenter.v1.ListSourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GroupResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.GroupResult"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSourcesResponse"; }; - return GroupResult; + return ListSourcesResponse; })(); - v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest = (function() { + v1.ListAssetsRequest = (function() { /** - * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * Properties of a ListAssetsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {number|null} [pageSize] ListAssetsRequest pageSize */ /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * Constructs a new ListAssetsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set */ - function ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties) { + function ListAssetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33777,90 +47859,140 @@ } /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. + * ListAssetsRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; + ListAssetsRequest.prototype.parent = ""; /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + ListAssetsRequest.prototype.filter = ""; /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * ListAssetsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.readTime = null; + + /** + * ListAssetsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.compareDuration = null; + + /** + * ListAssetsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.fieldMask = null; + + /** + * ListAssetsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + ListAssetsRequest.prototype.pageToken = ""; /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance + * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties); + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); }; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + ListAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + ListAssetsRequest.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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -33869,13 +48001,33 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.filter = reader.string(); break; } case 3: { + message.orderBy = reader.string(); + break; + } + case 4: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 8: { message.pageToken = reader.string(); break; } + case 9: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -33885,141 +48037,198 @@ }; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + ListAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest) + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static - * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param {google.cloud.securitycenter.v1.ListAssetsRequest} message ListAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + ListAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.compareDuration = null; + object.fieldMask = null; object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @instance * @returns {Object.} JSON object */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + ListAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * Gets the default type url for ListAssetsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.ListAssetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsRequest"; }; - return ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + return ListAssetsRequest; })(); - v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse = (function() { + v1.ListAssetsResponse = (function() { /** - * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * Properties of a ListAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken + * @interface IListAssetsResponse + * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults + * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @property {number|null} [totalSize] ListAssetsResponse totalSize */ /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * Constructs a new ListAssetsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set */ - function ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.securityHealthAnalyticsCustomModules = []; + function ListAssetsResponse(properties) { + this.listAssetsResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34027,94 +48236,122 @@ } /** - * ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. - * @member {Array.} securityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * ListAssetsResponse listAssetsResults. + * @member {Array.} listAssetsResults + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; + ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; /** - * ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * ListAssetsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.readTime = null; + + /** + * ListAssetsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + ListAssetsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * ListAssetsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance + * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse instance */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties); + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); }; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + ListAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.listAssetsResults != null && message.listAssetsResults.length) + for (var i = 0; i < message.listAssetsResults.length; ++i) + $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static - * @param {google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + ListAssetsResponse.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.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) - message.securityHealthAnalyticsCustomModules = []; - message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + if (!(message.listAssetsResults && message.listAssetsResults.length)) + message.listAssetsResults = []; + message.listAssetsResults.push($root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); break; } case 2: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { message.nextPageToken = reader.string(); break; } + case 4: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -34124,150 +48361,456 @@ }; /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. + * Verifies a ListAssetsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + ListAssetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) - return "securityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); + if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { + if (!Array.isArray(message.listAssetsResults)) + return "listAssetsResults: array expected"; + for (var i = 0; i < message.listAssetsResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); if (error) - return "securityHealthAnalyticsCustomModules." + error; + return "listAssetsResults." + error; } } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; - /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); - if (object.securityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); - message.securityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); - message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + */ + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); + if (object.listAssetsResults) { + if (!Array.isArray(object.listAssetsResults)) + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: array expected"); + message.listAssetsResults = []; + for (var i = 0; i < object.listAssetsResults.length; ++i) { + if (typeof object.listAssetsResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: object expected"); + message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); + } + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @static + * @param {google.cloud.securitycenter.v1.ListAssetsResponse} message ListAssetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.listAssetsResults = []; + if (options.defaults) { + object.readTime = null; + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.listAssetsResults && message.listAssetsResults.length) { + object.listAssetsResults = []; + for (var j = 0; j < message.listAssetsResults.length; ++j) + object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); + } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListAssetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAssetsResponse + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsResponse"; + }; + + ListAssetsResponse.ListAssetsResult = (function() { + + /** + * Properties of a ListAssetsResult. + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @interface IListAssetsResult + * @property {google.cloud.securitycenter.v1.IAsset|null} [asset] ListAssetsResult asset + * @property {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null} [stateChange] ListAssetsResult stateChange + */ + + /** + * Constructs a new ListAssetsResult. + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @classdesc Represents a ListAssetsResult. + * @implements IListAssetsResult + * @constructor + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set + */ + function ListAssetsResult(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]]; + } + + /** + * ListAssetsResult asset. + * @member {google.cloud.securitycenter.v1.IAsset|null|undefined} asset + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @instance + */ + ListAssetsResult.prototype.asset = null; + + /** + * ListAssetsResult stateChange. + * @member {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange} stateChange + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @instance + */ + ListAssetsResult.prototype.stateChange = 0; + + /** + * Creates a new ListAssetsResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance + */ + ListAssetsResult.create = function create(properties) { + return new ListAssetsResult(properties); + }; + + /** + * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.securitycenter.v1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.stateChange != null && Object.hasOwnProperty.call(message, "stateChange")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); + return writer; + }; + + /** + * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResult.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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.asset = $root.google.cloud.securitycenter.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateChange = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsResult message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.securitycenter.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + switch (message.stateChange) { + default: + return "stateChange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult + */ + ListAssetsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.asset: object expected"); + message.asset = $root.google.cloud.securitycenter.v1.Asset.fromObject(object.asset); + } + switch (object.stateChange) { + default: + if (typeof object.stateChange === "number") { + message.stateChange = object.stateChange; + break; + } + break; + case "UNUSED": + case 0: + message.stateChange = 0; + break; + case "ADDED": + case 1: + message.stateChange = 1; + break; + case "REMOVED": + case 2: + message.stateChange = 2; + break; + case "ACTIVE": + case 3: + message.stateChange = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.asset = null; + object.stateChange = options.enums === String ? "UNUSED" : 0; } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.securitycenter.v1.Asset.toObject(message.asset, options); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] === undefined ? message.stateChange : $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] : message.stateChange; + return object; + }; - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.securityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { - object.securityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) - object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this ListAssetsResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ListAssetsResult + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult"; + }; - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse"; - }; + /** + * StateChange enum. + * @name google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange + * @enum {number} + * @property {number} UNUSED=0 UNUSED value + * @property {number} ADDED=1 ADDED value + * @property {number} REMOVED=2 REMOVED value + * @property {number} ACTIVE=3 ACTIVE value + */ + ListAssetsResult.StateChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNUSED"] = 0; + values[valuesById[1] = "ADDED"] = 1; + values[valuesById[2] = "REMOVED"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + return values; + })(); - return ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + return ListAssetsResult; + })(); + + return ListAssetsResponse; })(); - v1.ListMuteConfigsRequest = (function() { + v1.ListFindingsRequest = (function() { /** - * Properties of a ListMuteConfigsRequest. + * Properties of a ListFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListMuteConfigsRequest - * @property {string|null} [parent] ListMuteConfigsRequest parent - * @property {number|null} [pageSize] ListMuteConfigsRequest pageSize - * @property {string|null} [pageToken] ListMuteConfigsRequest pageToken + * @interface IListFindingsRequest + * @property {string|null} [parent] ListFindingsRequest parent + * @property {string|null} [filter] ListFindingsRequest filter + * @property {string|null} [orderBy] ListFindingsRequest orderBy + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime + * @property {google.protobuf.IDuration|null} [compareDuration] ListFindingsRequest compareDuration + * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask + * @property {string|null} [pageToken] ListFindingsRequest pageToken + * @property {number|null} [pageSize] ListFindingsRequest pageSize */ /** - * Constructs a new ListMuteConfigsRequest. + * Constructs a new ListFindingsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListMuteConfigsRequest. - * @implements IListMuteConfigsRequest + * @classdesc Represents a ListFindingsRequest. + * @implements IListFindingsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set */ - function ListMuteConfigsRequest(properties) { + function ListFindingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34275,90 +48818,140 @@ } /** - * ListMuteConfigsRequest parent. + * ListFindingsRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance */ - ListMuteConfigsRequest.prototype.parent = ""; + ListFindingsRequest.prototype.parent = ""; /** - * ListMuteConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * ListFindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance */ - ListMuteConfigsRequest.prototype.pageSize = 0; + ListFindingsRequest.prototype.filter = ""; /** - * ListMuteConfigsRequest pageToken. + * ListFindingsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.orderBy = ""; + + /** + * ListFindingsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.readTime = null; + + /** + * ListFindingsRequest compareDuration. + * @member {google.protobuf.IDuration|null|undefined} compareDuration + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.compareDuration = null; + + /** + * ListFindingsRequest fieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} fieldMask + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.fieldMask = null; + + /** + * ListFindingsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance */ - ListMuteConfigsRequest.prototype.pageToken = ""; + ListFindingsRequest.prototype.pageToken = ""; /** - * Creates a new ListMuteConfigsRequest instance using the specified properties. + * ListFindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @instance + */ + ListFindingsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListFindingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest instance + * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest instance */ - ListMuteConfigsRequest.create = function create(properties) { - return new ListMuteConfigsRequest(properties); + ListFindingsRequest.create = function create(properties) { + return new ListFindingsRequest(properties); }; /** - * Encodes the specified ListMuteConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. + * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} message ListMuteConfigsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMuteConfigsRequest.encode = function encode(message, writer) { + ListFindingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) + $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) + $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); return writer; }; /** - * Encodes the specified ListMuteConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsRequest.verify|verify} messages. + * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsRequest} message ListMuteConfigsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMuteConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMuteConfigsRequest message from the specified reader or buffer. + * Decodes a ListFindingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMuteConfigsRequest.decode = function decode(reader, length) { + ListFindingsRequest.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.cloud.securitycenter.v1.ListMuteConfigsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34367,13 +48960,33 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.filter = reader.string(); break; } case 3: { + message.orderBy = reader.string(); + break; + } + case 4: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 8: { message.pageToken = reader.string(); break; } + case 9: { + message.pageSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -34383,141 +48996,198 @@ }; /** - * Decodes a ListMuteConfigsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMuteConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMuteConfigsRequest message. + * Verifies a ListFindingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMuteConfigsRequest.verify = function verify(message) { + ListFindingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { + var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (error) + return "compareDuration." + error; + } + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (error) + return "fieldMask." + error; + } if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a ListMuteConfigsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsRequest} ListMuteConfigsRequest + * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest */ - ListMuteConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest) + ListFindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.compareDuration != null) { + if (typeof object.compareDuration !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.compareDuration: object expected"); + message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + } + if (object.fieldMask != null) { + if (typeof object.fieldMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.fieldMask: object expected"); + message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + } if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListMuteConfigsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static - * @param {google.cloud.securitycenter.v1.ListMuteConfigsRequest} message ListMuteConfigsRequest + * @param {google.cloud.securitycenter.v1.ListFindingsRequest} message ListFindingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMuteConfigsRequest.toObject = function toObject(message, options) { + ListFindingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; + object.filter = ""; + object.orderBy = ""; + object.readTime = null; + object.compareDuration = null; + object.fieldMask = null; object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) + object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); + if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) + object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this ListMuteConfigsRequest to JSON. + * Converts this ListFindingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @instance * @returns {Object.} JSON object */ - ListMuteConfigsRequest.prototype.toJSON = function toJSON() { + ListFindingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMuteConfigsRequest + * Gets the default type url for ListFindingsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsRequest + * @memberof google.cloud.securitycenter.v1.ListFindingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMuteConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListMuteConfigsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsRequest"; }; - return ListMuteConfigsRequest; + return ListFindingsRequest; })(); - v1.ListMuteConfigsResponse = (function() { + v1.ListFindingsResponse = (function() { /** - * Properties of a ListMuteConfigsResponse. + * Properties of a ListFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IListMuteConfigsResponse - * @property {Array.|null} [muteConfigs] ListMuteConfigsResponse muteConfigs - * @property {string|null} [nextPageToken] ListMuteConfigsResponse nextPageToken + * @interface IListFindingsResponse + * @property {Array.|null} [listFindingsResults] ListFindingsResponse listFindingsResults + * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime + * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken + * @property {number|null} [totalSize] ListFindingsResponse totalSize */ /** - * Constructs a new ListMuteConfigsResponse. + * Constructs a new ListFindingsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListMuteConfigsResponse. - * @implements IListMuteConfigsResponse + * @classdesc Represents a ListFindingsResponse. + * @implements IListFindingsResponse * @constructor - * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set */ - function ListMuteConfigsResponse(properties) { - this.muteConfigs = []; + function ListFindingsResponse(properties) { + this.listFindingsResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34525,94 +49195,122 @@ } /** - * ListMuteConfigsResponse muteConfigs. - * @member {Array.} muteConfigs - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * ListFindingsResponse listFindingsResults. + * @member {Array.} listFindingsResults + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - ListMuteConfigsResponse.prototype.muteConfigs = $util.emptyArray; + ListFindingsResponse.prototype.listFindingsResults = $util.emptyArray; /** - * ListMuteConfigsResponse nextPageToken. + * ListFindingsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.readTime = null; + + /** + * ListFindingsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance */ - ListMuteConfigsResponse.prototype.nextPageToken = ""; + ListFindingsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListMuteConfigsResponse instance using the specified properties. + * ListFindingsResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @instance + */ + ListFindingsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListFindingsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse instance + * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse instance */ - ListMuteConfigsResponse.create = function create(properties) { - return new ListMuteConfigsResponse(properties); + ListFindingsResponse.create = function create(properties) { + return new ListFindingsResponse(properties); }; /** - * Encodes the specified ListMuteConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. + * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse} message ListMuteConfigsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMuteConfigsResponse.encode = function encode(message, writer) { + ListFindingsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.muteConfigs != null && message.muteConfigs.length) - for (var i = 0; i < message.muteConfigs.length; ++i) - $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.listFindingsResults != null && message.listFindingsResults.length) + for (var i = 0; i < message.listFindingsResults.length; ++i) + $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.encode(message.listFindingsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) + $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListMuteConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListMuteConfigsResponse.verify|verify} messages. + * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.IListMuteConfigsResponse} message ListMuteConfigsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMuteConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMuteConfigsResponse message from the specified reader or buffer. + * Decodes a ListFindingsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMuteConfigsResponse.decode = function decode(reader, length) { + ListFindingsResponse.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.cloud.securitycenter.v1.ListMuteConfigsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.muteConfigs && message.muteConfigs.length)) - message.muteConfigs = []; - message.muteConfigs.push($root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32())); + if (!(message.listFindingsResults && message.listFindingsResults.length)) + message.listFindingsResults = []; + message.listFindingsResults.push($root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.decode(reader, reader.uint32())); break; } case 2: { + message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { message.nextPageToken = reader.string(); break; } + case 4: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -34622,648 +49320,1128 @@ }; /** - * Decodes a ListMuteConfigsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMuteConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMuteConfigsResponse message. + * Verifies a ListFindingsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMuteConfigsResponse.verify = function verify(message) { + ListFindingsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.muteConfigs != null && message.hasOwnProperty("muteConfigs")) { - if (!Array.isArray(message.muteConfigs)) - return "muteConfigs: array expected"; - for (var i = 0; i < message.muteConfigs.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfigs[i]); + if (message.listFindingsResults != null && message.hasOwnProperty("listFindingsResults")) { + if (!Array.isArray(message.listFindingsResults)) + return "listFindingsResults: array expected"; + for (var i = 0; i < message.listFindingsResults.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify(message.listFindingsResults[i]); if (error) - return "muteConfigs." + error; + return "listFindingsResults." + error; } } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (error) + return "readTime." + error; + } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a ListMuteConfigsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListMuteConfigsResponse} ListMuteConfigsResponse + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse */ - ListMuteConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse) + ListFindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.ListMuteConfigsResponse(); - if (object.muteConfigs) { - if (!Array.isArray(object.muteConfigs)) - throw TypeError(".google.cloud.securitycenter.v1.ListMuteConfigsResponse.muteConfigs: array expected"); - message.muteConfigs = []; - for (var i = 0; i < object.muteConfigs.length; ++i) { - if (typeof object.muteConfigs[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListMuteConfigsResponse.muteConfigs: object expected"); - message.muteConfigs[i] = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfigs[i]); + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); + if (object.listFindingsResults) { + if (!Array.isArray(object.listFindingsResults)) + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: array expected"); + message.listFindingsResults = []; + for (var i = 0; i < object.listFindingsResults.length; ++i) { + if (typeof object.listFindingsResults[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: object expected"); + message.listFindingsResults[i] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.fromObject(object.listFindingsResults[i]); } } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListMuteConfigsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static - * @param {google.cloud.securitycenter.v1.ListMuteConfigsResponse} message ListMuteConfigsResponse + * @param {google.cloud.securitycenter.v1.ListFindingsResponse} message ListFindingsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMuteConfigsResponse.toObject = function toObject(message, options) { + ListFindingsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.muteConfigs = []; - if (options.defaults) + object.listFindingsResults = []; + if (options.defaults) { + object.readTime = null; object.nextPageToken = ""; - if (message.muteConfigs && message.muteConfigs.length) { - object.muteConfigs = []; - for (var j = 0; j < message.muteConfigs.length; ++j) - object.muteConfigs[j] = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfigs[j], options); + object.totalSize = 0; + } + if (message.listFindingsResults && message.listFindingsResults.length) { + object.listFindingsResults = []; + for (var j = 0; j < message.listFindingsResults.length; ++j) + object.listFindingsResults[j] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.toObject(message.listFindingsResults[j], options); } + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this ListMuteConfigsResponse to JSON. + * Converts this ListFindingsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @instance * @returns {Object.} JSON object */ - ListMuteConfigsResponse.prototype.toJSON = function toJSON() { + ListFindingsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMuteConfigsResponse + * Gets the default type url for ListFindingsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListMuteConfigsResponse + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMuteConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListMuteConfigsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse"; }; - return ListMuteConfigsResponse; - })(); + ListFindingsResponse.ListFindingsResult = (function() { - v1.ListNotificationConfigsRequest = (function() { + /** + * Properties of a ListFindingsResult. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @interface IListFindingsResult + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] ListFindingsResult finding + * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null} [stateChange] ListFindingsResult stateChange + * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null} [resource] ListFindingsResult resource + */ - /** - * Properties of a ListNotificationConfigsRequest. - * @memberof google.cloud.securitycenter.v1 - * @interface IListNotificationConfigsRequest - * @property {string|null} [parent] ListNotificationConfigsRequest parent - * @property {string|null} [pageToken] ListNotificationConfigsRequest pageToken - * @property {number|null} [pageSize] ListNotificationConfigsRequest pageSize - */ + /** + * Constructs a new ListFindingsResult. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @classdesc Represents a ListFindingsResult. + * @implements IListFindingsResult + * @constructor + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set + */ + function ListFindingsResult(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]]; + } + + /** + * ListFindingsResult finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.finding = null; + + /** + * ListFindingsResult stateChange. + * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange} stateChange + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.stateChange = 0; + + /** + * ListFindingsResult resource. + * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + */ + ListFindingsResult.prototype.resource = null; + + /** + * Creates a new ListFindingsResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult instance + */ + ListFindingsResult.create = function create(properties) { + return new ListFindingsResult(properties); + }; + + /** + * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.stateChange != null && Object.hasOwnProperty.call(message, "stateChange")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFindingsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFindingsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsResult.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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateChange = reader.int32(); + break; + } + case 3: { + message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFindingsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFindingsResult message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFindingsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + switch (message.stateChange) { + default: + return "stateChange: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult + */ + ListFindingsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + } + switch (object.stateChange) { + default: + if (typeof object.stateChange === "number") { + message.stateChange = object.stateChange; + break; + } + break; + case "UNUSED": + case 0: + message.stateChange = 0; + break; + case "CHANGED": + case 1: + message.stateChange = 1; + break; + case "UNCHANGED": + case 2: + message.stateChange = 2; + break; + case "ADDED": + case 3: + message.stateChange = 3; + break; + case "REMOVED": + case 4: + message.stateChange = 4; + break; + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} message ListFindingsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFindingsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.finding = null; + object.stateChange = options.enums === String ? "UNUSED" : 0; + object.resource = null; + } + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.stateChange != null && message.hasOwnProperty("stateChange")) + object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] === undefined ? message.stateChange : $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] : message.stateChange; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.toObject(message.resource, options); + return object; + }; + + /** + * Converts this ListFindingsResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @instance + * @returns {Object.} JSON object + */ + ListFindingsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFindingsResult + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFindingsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult"; + }; + + /** + * StateChange enum. + * @name google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange + * @enum {number} + * @property {number} UNUSED=0 UNUSED value + * @property {number} CHANGED=1 CHANGED value + * @property {number} UNCHANGED=2 UNCHANGED value + * @property {number} ADDED=3 ADDED value + * @property {number} REMOVED=4 REMOVED value + */ + ListFindingsResult.StateChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNUSED"] = 0; + values[valuesById[1] = "CHANGED"] = 1; + values[valuesById[2] = "UNCHANGED"] = 2; + values[valuesById[3] = "ADDED"] = 3; + values[valuesById[4] = "REMOVED"] = 4; + return values; + })(); + + ListFindingsResult.Resource = (function() { + + /** + * Properties of a Resource. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @interface IResource + * @property {string|null} [name] Resource name + * @property {string|null} [displayName] Resource displayName + * @property {string|null} [type] Resource type + * @property {string|null} [projectName] Resource projectName + * @property {string|null} [projectDisplayName] Resource projectDisplayName + * @property {string|null} [parentName] Resource parentName + * @property {string|null} [parentDisplayName] Resource parentDisplayName + * @property {Array.|null} [folders] Resource folders + * @property {google.cloud.securitycenter.v1.CloudProvider|null} [cloudProvider] Resource cloudProvider + * @property {string|null} [organization] Resource organization + * @property {string|null} [service] Resource service + * @property {string|null} [location] Resource location + * @property {google.cloud.securitycenter.v1.IAwsMetadata|null} [awsMetadata] Resource awsMetadata + * @property {google.cloud.securitycenter.v1.IAzureMetadata|null} [azureMetadata] Resource azureMetadata + * @property {google.cloud.securitycenter.v1.IResourcePath|null} [resourcePath] Resource resourcePath + * @property {string|null} [resourcePathString] Resource resourcePathString + */ + + /** + * Constructs a new Resource. + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set + */ + function Resource(properties) { + this.folders = []; + 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]]; + } + + /** + * Resource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.name = ""; - /** - * Constructs a new ListNotificationConfigsRequest. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListNotificationConfigsRequest. - * @implements IListNotificationConfigsRequest - * @constructor - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest=} [properties] Properties to set - */ - function ListNotificationConfigsRequest(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]]; - } + /** + * Resource displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.displayName = ""; - /** - * ListNotificationConfigsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @instance - */ - ListNotificationConfigsRequest.prototype.parent = ""; + /** + * Resource type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.type = ""; - /** - * ListNotificationConfigsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @instance - */ - ListNotificationConfigsRequest.prototype.pageToken = ""; + /** + * Resource projectName. + * @member {string} projectName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.projectName = ""; - /** - * ListNotificationConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @instance - */ - ListNotificationConfigsRequest.prototype.pageSize = 0; + /** + * Resource projectDisplayName. + * @member {string} projectDisplayName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.projectDisplayName = ""; - /** - * Creates a new ListNotificationConfigsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest instance - */ - ListNotificationConfigsRequest.create = function create(properties) { - return new ListNotificationConfigsRequest(properties); - }; + /** + * Resource parentName. + * @member {string} parentName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.parentName = ""; - /** - * Encodes the specified ListNotificationConfigsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} message ListNotificationConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNotificationConfigsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - return writer; - }; + /** + * Resource parentDisplayName. + * @member {string} parentDisplayName + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.parentDisplayName = ""; - /** - * Encodes the specified ListNotificationConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsRequest} message ListNotificationConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNotificationConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Resource folders. + * @member {Array.} folders + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.folders = $util.emptyArray; - /** - * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNotificationConfigsRequest.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.cloud.securitycenter.v1.ListNotificationConfigsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Resource cloudProvider. + * @member {google.cloud.securitycenter.v1.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.cloudProvider = 0; - /** - * Decodes a ListNotificationConfigsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNotificationConfigsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Resource organization. + * @member {string} organization + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.organization = ""; - /** - * Verifies a ListNotificationConfigsRequest message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNotificationConfigsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - return null; - }; + /** + * Resource service. + * @member {string} service + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.service = ""; - /** - * Creates a ListNotificationConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} ListNotificationConfigsRequest - */ - ListNotificationConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - return message; - }; + /** + * Resource location. + * @member {string} location + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.location = ""; - /** - * Creates a plain object from a ListNotificationConfigsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {google.cloud.securitycenter.v1.ListNotificationConfigsRequest} message ListNotificationConfigsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNotificationConfigsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - return object; - }; + /** + * Resource awsMetadata. + * @member {google.cloud.securitycenter.v1.IAwsMetadata|null|undefined} awsMetadata + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.awsMetadata = null; - /** - * Converts this ListNotificationConfigsRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @instance - * @returns {Object.} JSON object - */ - ListNotificationConfigsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Resource azureMetadata. + * @member {google.cloud.securitycenter.v1.IAzureMetadata|null|undefined} azureMetadata + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.azureMetadata = null; - /** - * Gets the default type url for ListNotificationConfigsRequest - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNotificationConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListNotificationConfigsRequest"; - }; + /** + * Resource resourcePath. + * @member {google.cloud.securitycenter.v1.IResourcePath|null|undefined} resourcePath + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.resourcePath = null; - return ListNotificationConfigsRequest; - })(); + /** + * Resource resourcePathString. + * @member {string} resourcePathString + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Resource.prototype.resourcePathString = ""; - v1.ListNotificationConfigsResponse = (function() { + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Properties of a ListNotificationConfigsResponse. - * @memberof google.cloud.securitycenter.v1 - * @interface IListNotificationConfigsResponse - * @property {Array.|null} [notificationConfigs] ListNotificationConfigsResponse notificationConfigs - * @property {string|null} [nextPageToken] ListNotificationConfigsResponse nextPageToken - */ + /** + * Resource cloudProviderMetadata. + * @member {"awsMetadata"|"azureMetadata"|undefined} cloudProviderMetadata + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + */ + Object.defineProperty(Resource.prototype, "cloudProviderMetadata", { + get: $util.oneOfGetter($oneOfFields = ["awsMetadata", "azureMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Constructs a new ListNotificationConfigsResponse. - * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListNotificationConfigsResponse. - * @implements IListNotificationConfigsResponse - * @constructor - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse=} [properties] Properties to set - */ - function ListNotificationConfigsResponse(properties) { - this.notificationConfigs = []; - 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 Resource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; - /** - * ListNotificationConfigsResponse notificationConfigs. - * @member {Array.} notificationConfigs - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @instance - */ - ListNotificationConfigsResponse.prototype.notificationConfigs = $util.emptyArray; + /** + * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.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.projectName != null && Object.hasOwnProperty.call(message, "projectName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectName); + if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); + if (message.parentName != null && Object.hasOwnProperty.call(message, "parentName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentName); + if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); + if (message.folders != null && message.folders.length) + for (var i = 0; i < message.folders.length; ++i) + $root.google.cloud.securitycenter.v1.Folder.encode(message.folders[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.cloudProvider); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.organization); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.service); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.location); + if (message.awsMetadata != null && Object.hasOwnProperty.call(message, "awsMetadata")) + $root.google.cloud.securitycenter.v1.AwsMetadata.encode(message.awsMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.azureMetadata != null && Object.hasOwnProperty.call(message, "azureMetadata")) + $root.google.cloud.securitycenter.v1.AzureMetadata.encode(message.azureMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.resourcePath != null && Object.hasOwnProperty.call(message, "resourcePath")) + $root.google.cloud.securitycenter.v1.ResourcePath.encode(message.resourcePath, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.resourcePathString != null && Object.hasOwnProperty.call(message, "resourcePathString")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.resourcePathString); + return writer; + }; - /** - * ListNotificationConfigsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @instance - */ - ListNotificationConfigsResponse.prototype.nextPageToken = ""; + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ListNotificationConfigsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse instance - */ - ListNotificationConfigsResponse.create = function create(properties) { - return new ListNotificationConfigsResponse(properties); - }; + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 6: { + message.type = reader.string(); + break; + } + case 2: { + message.projectName = reader.string(); + break; + } + case 3: { + message.projectDisplayName = reader.string(); + break; + } + case 4: { + message.parentName = reader.string(); + break; + } + case 5: { + message.parentDisplayName = reader.string(); + break; + } + case 7: { + if (!(message.folders && message.folders.length)) + message.folders = []; + message.folders.push($root.google.cloud.securitycenter.v1.Folder.decode(reader, reader.uint32())); + break; + } + case 9: { + message.cloudProvider = reader.int32(); + break; + } + case 10: { + message.organization = reader.string(); + break; + } + case 11: { + message.service = reader.string(); + break; + } + case 12: { + message.location = reader.string(); + break; + } + case 16: { + message.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.decode(reader, reader.uint32()); + break; + } + case 17: { + message.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.decode(reader, reader.uint32()); + break; + } + case 18: { + message.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.decode(reader, reader.uint32()); + break; + } + case 19: { + message.resourcePathString = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListNotificationConfigsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse} message ListNotificationConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNotificationConfigsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.notificationConfigs != null && message.notificationConfigs.length) - for (var i = 0; i < message.notificationConfigs.length; ++i) - $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListNotificationConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListNotificationConfigsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {google.cloud.securitycenter.v1.IListNotificationConfigsResponse} message ListNotificationConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNotificationConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a Resource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.projectName != null && message.hasOwnProperty("projectName")) + if (!$util.isString(message.projectName)) + return "projectName: string expected"; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + if (!$util.isString(message.projectDisplayName)) + return "projectDisplayName: string expected"; + if (message.parentName != null && message.hasOwnProperty("parentName")) + if (!$util.isString(message.parentName)) + return "parentName: string expected"; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + if (!$util.isString(message.parentDisplayName)) + return "parentDisplayName: string expected"; + if (message.folders != null && message.hasOwnProperty("folders")) { + if (!Array.isArray(message.folders)) + return "folders: array expected"; + for (var i = 0; i < message.folders.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.Folder.verify(message.folders[i]); + if (error) + return "folders." + error; + } + } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.organization != null && message.hasOwnProperty("organization")) + if (!$util.isString(message.organization)) + return "organization: string expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v1.AwsMetadata.verify(message.awsMetadata); + if (error) + return "awsMetadata." + error; + } + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + if (properties.cloudProviderMetadata === 1) + return "cloudProviderMetadata: multiple values"; + properties.cloudProviderMetadata = 1; + { + var error = $root.google.cloud.securitycenter.v1.AzureMetadata.verify(message.azureMetadata); + if (error) + return "azureMetadata." + error; + } + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) { + var error = $root.google.cloud.securitycenter.v1.ResourcePath.verify(message.resourcePath); + if (error) + return "resourcePath." + error; + } + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + if (!$util.isString(message.resourcePathString)) + return "resourcePathString: string expected"; + return null; + }; - /** - * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNotificationConfigsResponse.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.cloud.securitycenter.v1.ListNotificationConfigsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.notificationConfigs && message.notificationConfigs.length)) - message.notificationConfigs = []; - message.notificationConfigs.push($root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32())); - break; + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource) + return object; + var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.type != null) + message.type = String(object.type); + if (object.projectName != null) + message.projectName = String(object.projectName); + if (object.projectDisplayName != null) + message.projectDisplayName = String(object.projectDisplayName); + if (object.parentName != null) + message.parentName = String(object.parentName); + if (object.parentDisplayName != null) + message.parentDisplayName = String(object.parentDisplayName); + if (object.folders) { + if (!Array.isArray(object.folders)) + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.folders: array expected"); + message.folders = []; + for (var i = 0; i < object.folders.length; ++i) { + if (typeof object.folders[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.folders: object expected"); + message.folders[i] = $root.google.cloud.securitycenter.v1.Folder.fromObject(object.folders[i]); + } } - case 2: { - message.nextPageToken = reader.string(); + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListNotificationConfigsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNotificationConfigsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (object.organization != null) + message.organization = String(object.organization); + if (object.service != null) + message.service = String(object.service); + if (object.location != null) + message.location = String(object.location); + if (object.awsMetadata != null) { + if (typeof object.awsMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.awsMetadata: object expected"); + message.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.fromObject(object.awsMetadata); + } + if (object.azureMetadata != null) { + if (typeof object.azureMetadata !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.azureMetadata: object expected"); + message.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.fromObject(object.azureMetadata); + } + if (object.resourcePath != null) { + if (typeof object.resourcePath !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.resourcePath: object expected"); + message.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.fromObject(object.resourcePath); + } + if (object.resourcePathString != null) + message.resourcePathString = String(object.resourcePathString); + return message; + }; - /** - * Verifies a ListNotificationConfigsResponse message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListNotificationConfigsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.notificationConfigs != null && message.hasOwnProperty("notificationConfigs")) { - if (!Array.isArray(message.notificationConfigs)) - return "notificationConfigs: array expected"; - for (var i = 0; i < message.notificationConfigs.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfigs[i]); - if (error) - return "notificationConfigs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.folders = []; + if (options.defaults) { + object.name = ""; + object.projectName = ""; + object.projectDisplayName = ""; + object.parentName = ""; + object.parentDisplayName = ""; + object.type = ""; + object.displayName = ""; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; + object.organization = ""; + object.service = ""; + object.location = ""; + object.resourcePath = null; + object.resourcePathString = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.projectName != null && message.hasOwnProperty("projectName")) + object.projectName = message.projectName; + if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) + object.projectDisplayName = message.projectDisplayName; + if (message.parentName != null && message.hasOwnProperty("parentName")) + object.parentName = message.parentName; + if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) + object.parentDisplayName = message.parentDisplayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.folders && message.folders.length) { + object.folders = []; + for (var j = 0; j < message.folders.length; ++j) + object.folders[j] = $root.google.cloud.securitycenter.v1.Folder.toObject(message.folders[j], options); + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] : message.cloudProvider; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = message.organization; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.awsMetadata != null && message.hasOwnProperty("awsMetadata")) { + object.awsMetadata = $root.google.cloud.securitycenter.v1.AwsMetadata.toObject(message.awsMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "awsMetadata"; + } + if (message.azureMetadata != null && message.hasOwnProperty("azureMetadata")) { + object.azureMetadata = $root.google.cloud.securitycenter.v1.AzureMetadata.toObject(message.azureMetadata, options); + if (options.oneofs) + object.cloudProviderMetadata = "azureMetadata"; + } + if (message.resourcePath != null && message.hasOwnProperty("resourcePath")) + object.resourcePath = $root.google.cloud.securitycenter.v1.ResourcePath.toObject(message.resourcePath, options); + if (message.resourcePathString != null && message.hasOwnProperty("resourcePathString")) + object.resourcePathString = message.resourcePathString; + return object; + }; - /** - * Creates a ListNotificationConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} ListNotificationConfigsResponse - */ - ListNotificationConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListNotificationConfigsResponse(); - if (object.notificationConfigs) { - if (!Array.isArray(object.notificationConfigs)) - throw TypeError(".google.cloud.securitycenter.v1.ListNotificationConfigsResponse.notificationConfigs: array expected"); - message.notificationConfigs = []; - for (var i = 0; i < object.notificationConfigs.length; ++i) { - if (typeof object.notificationConfigs[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListNotificationConfigsResponse.notificationConfigs: object expected"); - message.notificationConfigs[i] = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfigs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ListNotificationConfigsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {google.cloud.securitycenter.v1.ListNotificationConfigsResponse} message ListNotificationConfigsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListNotificationConfigsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.notificationConfigs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.notificationConfigs && message.notificationConfigs.length) { - object.notificationConfigs = []; - for (var j = 0; j < message.notificationConfigs.length; ++j) - object.notificationConfigs[j] = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfigs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource"; + }; - /** - * Converts this ListNotificationConfigsResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @instance - * @returns {Object.} JSON object - */ - ListNotificationConfigsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Resource; + })(); - /** - * Gets the default type url for ListNotificationConfigsResponse - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListNotificationConfigsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListNotificationConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListNotificationConfigsResponse"; - }; + return ListFindingsResult; + })(); - return ListNotificationConfigsResponse; + return ListFindingsResponse; })(); - v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = (function() { + v1.SetFindingStateRequest = (function() { /** - * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * Properties of a SetFindingStateRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken + * @interface ISetFindingStateRequest + * @property {string|null} [name] SetFindingStateRequest name + * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] SetFindingStateRequest state + * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime */ /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * Constructs a new SetFindingStateRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @classdesc Represents a SetFindingStateRequest. + * @implements ISetFindingStateRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set */ - function ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties) { + function SetFindingStateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35271,103 +50449,103 @@ } /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * SetFindingStateRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; + SetFindingStateRequest.prototype.name = ""; /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * SetFindingStateRequest state. + * @member {google.cloud.securitycenter.v1.Finding.State} state + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + SetFindingStateRequest.prototype.state = 0; /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * SetFindingStateRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + SetFindingStateRequest.prototype.startTime = null; /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * Creates a new SetFindingStateRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties); + SetFindingStateRequest.create = function create(properties) { + return new SetFindingStateRequest(properties); }; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + SetFindingStateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * Decodes a SetFindingStateRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + SetFindingStateRequest.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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.state = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -35379,141 +50557,169 @@ }; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. + * Verifies a SetFindingStateRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + SetFindingStateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } return null; }; /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) + SetFindingStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SetFindingStateRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SetFindingStateRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } return message; }; /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static - * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @param {google.cloud.securitycenter.v1.SetFindingStateRequest} message SetFindingStateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + SetFindingStateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.startTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. + * Converts this SetFindingStateRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @instance * @returns {Object.} JSON object */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + SetFindingStateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * Gets the default type url for SetFindingStateRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetFindingStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SetFindingStateRequest"; }; - return ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + return SetFindingStateRequest; })(); - v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = (function() { + v1.SetMuteRequest = (function() { /** - * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * Properties of a SetMuteRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [effectiveSecurityHealthAnalyticsCustomModules] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken + * @interface ISetMuteRequest + * @property {string|null} [name] SetMuteRequest name + * @property {google.cloud.securitycenter.v1.Finding.Mute|null} [mute] SetMuteRequest mute */ /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * Constructs a new SetMuteRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @classdesc Represents a SetMuteRequest. + * @implements ISetMuteRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISetMuteRequest=} [properties] Properties to set */ - function ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.effectiveSecurityHealthAnalyticsCustomModules = []; + function SetMuteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35521,92 +50727,89 @@ } /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. - * @member {Array.} effectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * SetMuteRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.effectiveSecurityHealthAnalyticsCustomModules = $util.emptyArray; + SetMuteRequest.prototype.name = ""; /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * SetMuteRequest mute. + * @member {google.cloud.securitycenter.v1.Finding.Mute} mute + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + SetMuteRequest.prototype.mute = 0; /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * Creates a new SetMuteRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance + * @param {google.cloud.securitycenter.v1.ISetMuteRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest instance */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties); + SetMuteRequest.create = function create(properties) { + return new SetMuteRequest(properties); }; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified SetMuteRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetMuteRequest} message SetMuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + SetMuteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.effectiveSecurityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.encode(message.effectiveSecurityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.mute != null && Object.hasOwnProperty.call(message, "mute")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mute); return writer; }; /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified SetMuteRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static - * @param {google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISetMuteRequest} message SetMuteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetMuteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * Decodes a SetMuteRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + SetMuteRequest.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.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SetMuteRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length)) - message.effectiveSecurityHealthAnalyticsCustomModules = []; - message.effectiveSecurityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.mute = reader.int32(); break; } default: @@ -35618,150 +50821,160 @@ }; /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * Decodes a SetMuteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + SetMuteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. + * Verifies a SetMuteRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + SetMuteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.hasOwnProperty("effectiveSecurityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.effectiveSecurityHealthAnalyticsCustomModules)) - return "effectiveSecurityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify(message.effectiveSecurityHealthAnalyticsCustomModules[i]); - if (error) - return "effectiveSecurityHealthAnalyticsCustomModules." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.mute != null && message.hasOwnProperty("mute")) + switch (message.mute) { + default: + return "mute: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetMuteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) + SetMuteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SetMuteRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); - if (object.effectiveSecurityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.effectiveSecurityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: array expected"); - message.effectiveSecurityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.effectiveSecurityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: object expected"); - message.effectiveSecurityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.fromObject(object.effectiveSecurityHealthAnalyticsCustomModules[i]); + var message = new $root.google.cloud.securitycenter.v1.SetMuteRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.mute) { + default: + if (typeof object.mute === "number") { + message.mute = object.mute; + break; } + break; + case "MUTE_UNSPECIFIED": + case 0: + message.mute = 0; + break; + case "MUTED": + case 1: + message.mute = 1; + break; + case "UNMUTED": + case 2: + message.mute = 2; + break; + case "UNDEFINED": + case 4: + message.mute = 4; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetMuteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static - * @param {google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @param {google.cloud.securitycenter.v1.SetMuteRequest} message SetMuteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { + SetMuteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.effectiveSecurityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length) { - object.effectiveSecurityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++j) - object.effectiveSecurityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.toObject(message.effectiveSecurityHealthAnalyticsCustomModules[j], options); + if (options.defaults) { + object.name = ""; + object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mute != null && message.hasOwnProperty("mute")) + object.mute = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] : message.mute; return object; }; /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. + * Converts this SetMuteRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @instance * @returns {Object.} JSON object */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { + SetMuteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * Gets the default type url for SetMuteRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SetMuteRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetMuteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SetMuteRequest"; }; - return ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + return SetMuteRequest; })(); - v1.ListSecurityHealthAnalyticsCustomModulesRequest = (function() { + v1.RunAssetDiscoveryRequest = (function() { /** - * Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. + * Properties of a RunAssetDiscoveryRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListSecurityHealthAnalyticsCustomModulesRequest pageToken + * @interface IRunAssetDiscoveryRequest + * @property {string|null} [parent] RunAssetDiscoveryRequest parent */ /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. + * Constructs a new RunAssetDiscoveryRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListSecurityHealthAnalyticsCustomModulesRequest + * @classdesc Represents a RunAssetDiscoveryRequest. + * @implements IRunAssetDiscoveryRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set */ - function ListSecurityHealthAnalyticsCustomModulesRequest(properties) { + function RunAssetDiscoveryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35769,90 +50982,70 @@ } /** - * ListSecurityHealthAnalyticsCustomModulesRequest parent. + * RunAssetDiscoveryRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; - - /** - * ListSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListSecurityHealthAnalyticsCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @instance */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + RunAssetDiscoveryRequest.prototype.parent = ""; /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * Creates a new RunAssetDiscoveryRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest instance + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance */ - ListSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListSecurityHealthAnalyticsCustomModulesRequest(properties); + RunAssetDiscoveryRequest.create = function create(properties) { + return new RunAssetDiscoveryRequest(properties); }; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + RunAssetDiscoveryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + RunAssetDiscoveryRequest.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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -35860,14 +51053,6 @@ message.parent = reader.string(); break; } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -35877,141 +51062,124 @@ }; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. + * Verifies a RunAssetDiscoveryRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + RunAssetDiscoveryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; return null; }; /** - * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest */ - ListSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest) + RunAssetDiscoveryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); + var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static - * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest + * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + RunAssetDiscoveryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. + * Converts this RunAssetDiscoveryRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @instance * @returns {Object.} JSON object */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest + * Gets the default type url for RunAssetDiscoveryRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunAssetDiscoveryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.RunAssetDiscoveryRequest"; }; - return ListSecurityHealthAnalyticsCustomModulesRequest; + return RunAssetDiscoveryRequest; })(); - v1.ListSecurityHealthAnalyticsCustomModulesResponse = (function() { + v1.SimulateSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. + * Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken + * @interface ISimulateSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [parent] SimulateSecurityHealthAnalyticsCustomModuleRequest parent + * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig + * @property {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null} [resource] SimulateSecurityHealthAnalyticsCustomModuleRequest resource */ /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListSecurityHealthAnalyticsCustomModulesResponse + * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. + * @implements ISimulateSecurityHealthAnalyticsCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ - function ListSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.securityHealthAnalyticsCustomModules = []; + function SimulateSecurityHealthAnalyticsCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36019,92 +51187,103 @@ } /** - * ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. - * @member {Array.} securityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * SimulateSecurityHealthAnalyticsCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; /** - * ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. + * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.customConfig = null; /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * SimulateSecurityHealthAnalyticsCustomModuleRequest resource. + * @member {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null|undefined} resource + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.resource = null; + + /** + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse instance + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest instance */ - ListSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListSecurityHealthAnalyticsCustomModulesResponse(properties); + SimulateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new SimulateSecurityHealthAnalyticsCustomModuleRequest(properties); }; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) - message.securityHealthAnalyticsCustomModules = []; - message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.decode(reader, reader.uint32()); break; } default: @@ -36116,150 +51295,409 @@ }; /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) - return "securityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); - if (error) - return "securityHealthAnalyticsCustomModules." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); + if (error) + return "customConfig." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify(message.resource); + if (error) + return "resource." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest */ - ListSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse) + SimulateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); - if (object.securityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); - message.securityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); - message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); - } + var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.resource: object expected"); + message.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.fromObject(object.resource); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.securityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { - object.securityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) - object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); + if (options.defaults) { + object.parent = ""; + object.customConfig = null; + object.resource = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.toObject(message.resource, options); return object; }; /** - * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. + * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @instance * @returns {Object.} JSON object */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SimulateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest"; }; - return ListSecurityHealthAnalyticsCustomModulesResponse; + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource = (function() { + + /** + * Properties of a SimulatedResource. + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @interface ISimulatedResource + * @property {string|null} [resourceType] SimulatedResource resourceType + * @property {google.protobuf.IStruct|null} [resourceData] SimulatedResource resourceData + * @property {google.iam.v1.IPolicy|null} [iamPolicyData] SimulatedResource iamPolicyData + */ + + /** + * Constructs a new SimulatedResource. + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a SimulatedResource. + * @implements ISimulatedResource + * @constructor + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set + */ + function SimulatedResource(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]]; + } + + /** + * SimulatedResource resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.resourceType = ""; + + /** + * SimulatedResource resourceData. + * @member {google.protobuf.IStruct|null|undefined} resourceData + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.resourceData = null; + + /** + * SimulatedResource iamPolicyData. + * @member {google.iam.v1.IPolicy|null|undefined} iamPolicyData + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.iamPolicyData = null; + + /** + * Creates a new SimulatedResource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource instance + */ + SimulatedResource.create = function create(properties) { + return new SimulatedResource(properties); + }; + + /** + * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.resourceData != null && Object.hasOwnProperty.call(message, "resourceData")) + $root.google.protobuf.Struct.encode(message.resourceData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.iamPolicyData != null && Object.hasOwnProperty.call(message, "iamPolicyData")) + $root.google.iam.v1.Policy.encode(message.iamPolicyData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResource.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.resourceData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.iamPolicyData = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulatedResource message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulatedResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceData != null && message.hasOwnProperty("resourceData")) { + var error = $root.google.protobuf.Struct.verify(message.resourceData); + if (error) + return "resourceData." + error; + } + if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) { + var error = $root.google.iam.v1.Policy.verify(message.iamPolicyData); + if (error) + return "iamPolicyData." + error; + } + return null; + }; + + /** + * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + */ + SimulatedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + return object; + var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceData != null) { + if (typeof object.resourceData !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.resourceData: object expected"); + message.resourceData = $root.google.protobuf.Struct.fromObject(object.resourceData); + } + if (object.iamPolicyData != null) { + if (typeof object.iamPolicyData !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.iamPolicyData: object expected"); + message.iamPolicyData = $root.google.iam.v1.Policy.fromObject(object.iamPolicyData); + } + return message; + }; + + /** + * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} message SimulatedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulatedResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = ""; + object.resourceData = null; + object.iamPolicyData = null; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resourceData != null && message.hasOwnProperty("resourceData")) + object.resourceData = $root.google.protobuf.Struct.toObject(message.resourceData, options); + if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) + object.iamPolicyData = $root.google.iam.v1.Policy.toObject(message.iamPolicyData, options); + return object; + }; + + /** + * Converts this SimulatedResource to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + * @returns {Object.} JSON object + */ + SimulatedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulatedResource + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulatedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource"; + }; + + return SimulatedResource; + })(); + + return SimulateSecurityHealthAnalyticsCustomModuleRequest; })(); - v1.ListSourcesRequest = (function() { + v1.SimulateSecurityHealthAnalyticsCustomModuleResponse = (function() { /** - * Properties of a ListSourcesRequest. + * Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IListSourcesRequest - * @property {string|null} [parent] ListSourcesRequest parent - * @property {string|null} [pageToken] ListSourcesRequest pageToken - * @property {number|null} [pageSize] ListSourcesRequest pageSize + * @interface ISimulateSecurityHealthAnalyticsCustomModuleResponse + * @property {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null} [result] SimulateSecurityHealthAnalyticsCustomModuleResponse result */ /** - * Constructs a new ListSourcesRequest. + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSourcesRequest. - * @implements IListSourcesRequest + * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. + * @implements ISimulateSecurityHealthAnalyticsCustomModuleResponse * @constructor - * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set */ - function ListSourcesRequest(properties) { + function SimulateSecurityHealthAnalyticsCustomModuleResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36267,103 +51705,75 @@ } /** - * ListSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest - * @instance - */ - ListSourcesRequest.prototype.parent = ""; - - /** - * ListSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest - * @instance - */ - ListSourcesRequest.prototype.pageToken = ""; - - /** - * ListSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * SimulateSecurityHealthAnalyticsCustomModuleResponse result. + * @member {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null|undefined} result + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @instance */ - ListSourcesRequest.prototype.pageSize = 0; + SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.result = null; /** - * Creates a new ListSourcesRequest instance using the specified properties. + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest instance + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse instance */ - ListSourcesRequest.create = function create(properties) { - return new ListSourcesRequest(properties); + SimulateSecurityHealthAnalyticsCustomModuleResponse.create = function create(properties) { + return new SimulateSecurityHealthAnalyticsCustomModuleResponse(properties); }; /** - * Encodes the specified ListSourcesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesRequest.encode = function encode(message, writer) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pageSize); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesRequest.verify|verify} messages. + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IListSourcesRequest} message ListSourcesRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesRequest.decode = function decode(reader, length) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.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.cloud.securitycenter.v1.ListSourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageToken = reader.string(); - break; - } - case 7: { - message.pageSize = reader.int32(); + message.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.decode(reader, reader.uint32()); break; } default: @@ -36375,141 +51785,425 @@ }; /** - * Decodes a ListSourcesRequest message from the specified reader or buffer, length delimited. + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSourcesRequest message. + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSourcesRequest.verify = function verify(message) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify(message.result); + if (error) + return "result." + error; + } return null; }; /** - * Creates a ListSourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSourcesRequest} ListSourcesRequest + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse */ - ListSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesRequest) + SimulateSecurityHealthAnalyticsCustomModuleResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSourcesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; + var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.result: object expected"); + message.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.fromObject(object.result); + } return message; }; /** - * Creates a plain object from a ListSourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.ListSourcesRequest} message ListSourcesRequest + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSourcesRequest.toObject = function toObject(message, options) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.toObject(message.result, options); return object; }; /** - * Converts this ListSourcesRequest to JSON. + * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @instance * @returns {Object.} JSON object */ - ListSourcesRequest.prototype.toJSON = function toJSON() { + SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSourcesRequest + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListSourcesRequest + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SimulateSecurityHealthAnalyticsCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSourcesRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse"; }; - return ListSourcesRequest; + SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult = (function() { + + /** + * Properties of a SimulatedResult. + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @interface ISimulatedResult + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] SimulatedResult finding + * @property {google.protobuf.IEmpty|null} [noViolation] SimulatedResult noViolation + * @property {google.rpc.IStatus|null} [error] SimulatedResult error + */ + + /** + * Constructs a new SimulatedResult. + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @classdesc Represents a SimulatedResult. + * @implements ISimulatedResult + * @constructor + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set + */ + function SimulatedResult(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]]; + } + + /** + * SimulatedResult finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.finding = null; + + /** + * SimulatedResult noViolation. + * @member {google.protobuf.IEmpty|null|undefined} noViolation + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.noViolation = null; + + /** + * SimulatedResult error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SimulatedResult result. + * @member {"finding"|"noViolation"|"error"|undefined} result + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + Object.defineProperty(SimulatedResult.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["finding", "noViolation", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SimulatedResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult instance + */ + SimulatedResult.create = function create(properties) { + return new SimulatedResult(properties); + }; + + /** + * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.noViolation != null && Object.hasOwnProperty.call(message, "noViolation")) + $root.google.protobuf.Empty.encode(message.noViolation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResult.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.noViolation = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulatedResult message. + * @function verify + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulatedResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.finding != null && message.hasOwnProperty("finding")) { + properties.result = 1; + { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); + if (error) + return "finding." + error; + } + } + if (message.noViolation != null && message.hasOwnProperty("noViolation")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Empty.verify(message.noViolation); + if (error) + return "noViolation." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + return null; + }; + + /** + * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + */ + SimulatedResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + return object; + var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); + } + if (object.noViolation != null) { + if (typeof object.noViolation !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.noViolation: object expected"); + message.noViolation = $root.google.protobuf.Empty.fromObject(object.noViolation); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} message SimulatedResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulatedResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.finding != null && message.hasOwnProperty("finding")) { + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (options.oneofs) + object.result = "finding"; + } + if (message.noViolation != null && message.hasOwnProperty("noViolation")) { + object.noViolation = $root.google.protobuf.Empty.toObject(message.noViolation, options); + if (options.oneofs) + object.result = "noViolation"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + return object; + }; + + /** + * Converts this SimulatedResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + * @returns {Object.} JSON object + */ + SimulatedResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulatedResult + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulatedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult"; + }; + + return SimulatedResult; + })(); + + return SimulateSecurityHealthAnalyticsCustomModuleResponse; })(); - v1.ListSourcesResponse = (function() { + v1.UpdateExternalSystemRequest = (function() { /** - * Properties of a ListSourcesResponse. + * Properties of an UpdateExternalSystemRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListSourcesResponse - * @property {Array.|null} [sources] ListSourcesResponse sources - * @property {string|null} [nextPageToken] ListSourcesResponse nextPageToken + * @interface IUpdateExternalSystemRequest + * @property {google.cloud.securitycenter.v1.IExternalSystem|null} [externalSystem] UpdateExternalSystemRequest externalSystem + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExternalSystemRequest updateMask */ /** - * Constructs a new ListSourcesResponse. + * Constructs a new UpdateExternalSystemRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListSourcesResponse. - * @implements IListSourcesResponse + * @classdesc Represents an UpdateExternalSystemRequest. + * @implements IUpdateExternalSystemRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest=} [properties] Properties to set */ - function ListSourcesResponse(properties) { - this.sources = []; + function UpdateExternalSystemRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36517,92 +52211,89 @@ } /** - * ListSourcesResponse sources. - * @member {Array.} sources - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * UpdateExternalSystemRequest externalSystem. + * @member {google.cloud.securitycenter.v1.IExternalSystem|null|undefined} externalSystem + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @instance */ - ListSourcesResponse.prototype.sources = $util.emptyArray; + UpdateExternalSystemRequest.prototype.externalSystem = null; /** - * ListSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * UpdateExternalSystemRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @instance */ - ListSourcesResponse.prototype.nextPageToken = ""; + UpdateExternalSystemRequest.prototype.updateMask = null; /** - * Creates a new ListSourcesResponse instance using the specified properties. + * Creates a new UpdateExternalSystemRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse instance + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest instance */ - ListSourcesResponse.create = function create(properties) { - return new ListSourcesResponse(properties); + UpdateExternalSystemRequest.create = function create(properties) { + return new UpdateExternalSystemRequest(properties); }; /** - * Encodes the specified ListSourcesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * Encodes the specified UpdateExternalSystemRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} message UpdateExternalSystemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesResponse.encode = function encode(message, writer) { + UpdateExternalSystemRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.securitycenter.v1.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.externalSystem != null && Object.hasOwnProperty.call(message, "externalSystem")) + $root.google.cloud.securitycenter.v1.ExternalSystem.encode(message.externalSystem, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListSourcesResponse.verify|verify} messages. + * Encodes the specified UpdateExternalSystemRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static - * @param {google.cloud.securitycenter.v1.IListSourcesResponse} message ListSourcesResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} message UpdateExternalSystemRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateExternalSystemRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer. + * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesResponse.decode = function decode(reader, length) { + UpdateExternalSystemRequest.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.cloud.securitycenter.v1.ListSourcesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32())); + message.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -36614,155 +52305,142 @@ }; /** - * Decodes a ListSourcesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateExternalSystemRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSourcesResponse message. + * Verifies an UpdateExternalSystemRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSourcesResponse.verify = function verify(message) { + UpdateExternalSystemRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.sources[i]); - if (error) - return "sources." + error; - } + if (message.externalSystem != null && message.hasOwnProperty("externalSystem")) { + var error = $root.google.cloud.securitycenter.v1.ExternalSystem.verify(message.externalSystem); + if (error) + return "externalSystem." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateExternalSystemRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListSourcesResponse} ListSourcesResponse + * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest */ - ListSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListSourcesResponse) + UpdateExternalSystemRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListSourcesResponse(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListSourcesResponse.sources: object expected"); - message.sources[i] = $root.google.cloud.securitycenter.v1.Source.fromObject(object.sources[i]); - } + var message = new $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest(); + if (object.externalSystem != null) { + if (typeof object.externalSystem !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateExternalSystemRequest.externalSystem: object expected"); + message.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.fromObject(object.externalSystem); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateExternalSystemRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSourcesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateExternalSystemRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static - * @param {google.cloud.securitycenter.v1.ListSourcesResponse} message ListSourcesResponse + * @param {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} message UpdateExternalSystemRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSourcesResponse.toObject = function toObject(message, options) { + UpdateExternalSystemRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sources = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.securitycenter.v1.Source.toObject(message.sources[j], options); + if (options.defaults) { + object.externalSystem = null; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.externalSystem != null && message.hasOwnProperty("externalSystem")) + object.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.toObject(message.externalSystem, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListSourcesResponse to JSON. + * Converts this UpdateExternalSystemRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @instance * @returns {Object.} JSON object */ - ListSourcesResponse.prototype.toJSON = function toJSON() { + UpdateExternalSystemRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSourcesResponse + * Gets the default type url for UpdateExternalSystemRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListSourcesResponse + * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateExternalSystemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListSourcesResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateExternalSystemRequest"; }; - return ListSourcesResponse; + return UpdateExternalSystemRequest; })(); - v1.ListAssetsRequest = (function() { + v1.UpdateFindingRequest = (function() { /** - * Properties of a ListAssetsRequest. + * Properties of an UpdateFindingRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] ListAssetsRequest compareDuration - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListAssetsRequest fieldMask - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @interface IUpdateFindingRequest + * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] UpdateFindingRequest finding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask */ /** - * Constructs a new ListAssetsRequest. + * Constructs a new UpdateFindingRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest + * @classdesc Represents an UpdateFindingRequest. + * @implements IUpdateFindingRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set */ - function ListAssetsRequest(properties) { + function UpdateFindingRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36770,173 +52448,89 @@ } /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.parent = ""; - - /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.filter = ""; - - /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.orderBy = ""; - - /** - * ListAssetsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.readTime = null; - - /** - * ListAssetsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.compareDuration = null; - - /** - * ListAssetsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.fieldMask = null; - - /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * UpdateFindingRequest finding. + * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @instance */ - ListAssetsRequest.prototype.pageToken = ""; + UpdateFindingRequest.prototype.finding = null; /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * UpdateFindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @instance */ - ListAssetsRequest.prototype.pageSize = 0; + UpdateFindingRequest.prototype.updateMask = null; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new UpdateFindingRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest instance + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest instance */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); + UpdateFindingRequest.create = function create(properties) { + return new UpdateFindingRequest(properties); }; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encode = function encode(message, writer) { + UpdateFindingRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes an UpdateFindingRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decode = function decode(reader, length) { + UpdateFindingRequest.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.cloud.securitycenter.v1.ListAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.orderBy = reader.string(); - break; - } - case 4: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 8: { - message.pageToken = reader.string(); - break; - } - case 9: { - message.pageSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -36948,198 +52542,142 @@ }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsRequest message. + * Verifies an UpdateFindingRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsRequest.verify = function verify(message) { + UpdateFindingRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (message.finding != null && message.hasOwnProperty("finding")) { + var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); if (error) - return "compareDuration." + error; + return "finding." + error; } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "fieldMask." + error; + return "updateMask." + error; } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsRequest) + UpdateFindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateFindingRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + var message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.finding: object expected"); + message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static - * @param {google.cloud.securitycenter.v1.ListAssetsRequest} message ListAssetsRequest + * @param {google.cloud.securitycenter.v1.UpdateFindingRequest} message UpdateFindingRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsRequest.toObject = function toObject(message, options) { + UpdateFindingRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.readTime = null; - object.compareDuration = null; - object.fieldMask = null; - object.pageToken = ""; - object.pageSize = 0; + object.finding = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.finding != null && message.hasOwnProperty("finding")) + object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this UpdateFindingRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @instance * @returns {Object.} JSON object */ - ListAssetsRequest.prototype.toJSON = function toJSON() { + UpdateFindingRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAssetsRequest + * Gets the default type url for UpdateFindingRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListAssetsRequest + * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateFindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateFindingRequest"; }; - return ListAssetsRequest; + return UpdateFindingRequest; })(); - v1.ListAssetsResponse = (function() { + v1.UpdateMuteConfigRequest = (function() { /** - * Properties of a ListAssetsResponse. + * Properties of an UpdateMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [listAssetsResults] ListAssetsResponse listAssetsResults - * @property {google.protobuf.ITimestamp|null} [readTime] ListAssetsResponse readTime - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken - * @property {number|null} [totalSize] ListAssetsResponse totalSize + * @interface IUpdateMuteConfigRequest + * @property {google.cloud.securitycenter.v1.IMuteConfig|null} [muteConfig] UpdateMuteConfigRequest muteConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMuteConfigRequest updateMask */ /** - * Constructs a new ListAssetsResponse. + * Constructs a new UpdateMuteConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse + * @classdesc Represents an UpdateMuteConfigRequest. + * @implements IUpdateMuteConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest=} [properties] Properties to set */ - function ListAssetsResponse(properties) { - this.listAssetsResults = []; + function UpdateMuteConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37147,120 +52685,89 @@ } /** - * ListAssetsResponse listAssetsResults. - * @member {Array.} listAssetsResults - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.listAssetsResults = $util.emptyArray; - - /** - * ListAssetsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.readTime = null; - - /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * UpdateMuteConfigRequest muteConfig. + * @member {google.cloud.securitycenter.v1.IMuteConfig|null|undefined} muteConfig + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @instance */ - ListAssetsResponse.prototype.nextPageToken = ""; + UpdateMuteConfigRequest.prototype.muteConfig = null; /** - * ListAssetsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * UpdateMuteConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @instance */ - ListAssetsResponse.prototype.totalSize = 0; + UpdateMuteConfigRequest.prototype.updateMask = null; /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new UpdateMuteConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse instance + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest instance */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); + UpdateMuteConfigRequest.create = function create(properties) { + return new UpdateMuteConfigRequest(properties); }; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified UpdateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} message UpdateMuteConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encode = function encode(message, writer) { + UpdateMuteConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.listAssetsResults != null && message.listAssetsResults.length) - for (var i = 0; i < message.listAssetsResults.length; ++i) - $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.encode(message.listAssetsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.muteConfig != null && Object.hasOwnProperty.call(message, "muteConfig")) + $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified UpdateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} message UpdateMuteConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decode = function decode(reader, length) { + UpdateMuteConfigRequest.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.cloud.securitycenter.v1.ListAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.listAssetsResults && message.listAssetsResults.length)) - message.listAssetsResults = []; - message.listAssetsResults.push($root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.decode(reader, reader.uint32())); + message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32()); break; } case 2: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nextPageToken = reader.string(); - break; - } - case 4: { - message.totalSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -37272,456 +52779,142 @@ }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsResponse message. + * Verifies an UpdateMuteConfigRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsResponse.verify = function verify(message) { + UpdateMuteConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.listAssetsResults != null && message.hasOwnProperty("listAssetsResults")) { - if (!Array.isArray(message.listAssetsResults)) - return "listAssetsResults: array expected"; - for (var i = 0; i < message.listAssetsResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify(message.listAssetsResults[i]); - if (error) - return "listAssetsResults." + error; - } + if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) { + var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfig); + if (error) + return "muteConfig." + error; } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "readTime." + error; + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse) + UpdateMuteConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse(); - if (object.listAssetsResults) { - if (!Array.isArray(object.listAssetsResults)) - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: array expected"); - message.listAssetsResults = []; - for (var i = 0; i < object.listAssetsResults.length; ++i) { - if (typeof object.listAssetsResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.listAssetsResults: object expected"); - message.listAssetsResults[i] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.fromObject(object.listAssetsResults[i]); - } + var message = new $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest(); + if (object.muteConfig != null) { + if (typeof object.muteConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateMuteConfigRequest.muteConfig: object expected"); + message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfig); } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateMuteConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateMuteConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse} message ListAssetsResponse + * @param {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} message UpdateMuteConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsResponse.toObject = function toObject(message, options) { + UpdateMuteConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.listAssetsResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.listAssetsResults && message.listAssetsResults.length) { - object.listAssetsResults = []; - for (var j = 0; j < message.listAssetsResults.length; ++j) - object.listAssetsResults[j] = $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.toObject(message.listAssetsResults[j], options); - } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; - return object; - }; - - /** - * Converts this ListAssetsResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAssetsResponse - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsResponse"; - }; - - ListAssetsResponse.ListAssetsResult = (function() { - - /** - * Properties of a ListAssetsResult. - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @interface IListAssetsResult - * @property {google.cloud.securitycenter.v1.IAsset|null} [asset] ListAssetsResult asset - * @property {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange|null} [stateChange] ListAssetsResult stateChange - */ - - /** - * Constructs a new ListAssetsResult. - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse - * @classdesc Represents a ListAssetsResult. - * @implements IListAssetsResult - * @constructor - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - */ - function ListAssetsResult(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]]; + object.muteConfig = null; + object.updateMask = null; } + if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) + object.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * ListAssetsResult asset. - * @member {google.cloud.securitycenter.v1.IAsset|null|undefined} asset - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.asset = null; - - /** - * ListAssetsResult stateChange. - * @member {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange} stateChange - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - */ - ListAssetsResult.prototype.stateChange = 0; - - /** - * Creates a new ListAssetsResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult instance - */ - ListAssetsResult.create = function create(properties) { - return new ListAssetsResult(properties); - }; - - /** - * Encodes the specified ListAssetsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.securitycenter.v1.Asset.encode(message.asset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stateChange != null && Object.hasOwnProperty.call(message, "stateChange")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); - return writer; - }; - - /** - * Encodes the specified ListAssetsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult} message ListAssetsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.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.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.asset = $root.google.cloud.securitycenter.v1.Asset.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stateChange = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAssetsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetsResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.securitycenter.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - switch (message.stateChange) { - default: - return "stateChange: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a ListAssetsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} ListAssetsResult - */ - ListAssetsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult(); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.asset: object expected"); - message.asset = $root.google.cloud.securitycenter.v1.Asset.fromObject(object.asset); - } - switch (object.stateChange) { - default: - if (typeof object.stateChange === "number") { - message.stateChange = object.stateChange; - break; - } - break; - case "UNUSED": - case 0: - message.stateChange = 0; - break; - case "ADDED": - case 1: - message.stateChange = 1; - break; - case "REMOVED": - case 2: - message.stateChange = 2; - break; - case "ACTIVE": - case 3: - message.stateChange = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListAssetsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult} message ListAssetsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.asset = null; - object.stateChange = options.enums === String ? "UNUSED" : 0; - } - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.securitycenter.v1.Asset.toObject(message.asset, options); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] === undefined ? message.stateChange : $root.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange[message.stateChange] : message.stateChange; - return object; - }; - - /** - * Converts this ListAssetsResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAssetsResult - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult"; - }; - - /** - * StateChange enum. - * @name google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange - * @enum {number} - * @property {number} UNUSED=0 UNUSED value - * @property {number} ADDED=1 ADDED value - * @property {number} REMOVED=2 REMOVED value - * @property {number} ACTIVE=3 ACTIVE value - */ - ListAssetsResult.StateChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNUSED"] = 0; - values[valuesById[1] = "ADDED"] = 1; - values[valuesById[2] = "REMOVED"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - return values; - })(); - - return ListAssetsResult; - })(); + /** + * Converts this UpdateMuteConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMuteConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListAssetsResponse; + /** + * Gets the default type url for UpdateMuteConfigRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateMuteConfigRequest"; + }; + + return UpdateMuteConfigRequest; })(); - v1.ListFindingsRequest = (function() { + v1.UpdateNotificationConfigRequest = (function() { /** - * Properties of a ListFindingsRequest. + * Properties of an UpdateNotificationConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListFindingsRequest - * @property {string|null} [parent] ListFindingsRequest parent - * @property {string|null} [filter] ListFindingsRequest filter - * @property {string|null} [orderBy] ListFindingsRequest orderBy - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsRequest readTime - * @property {google.protobuf.IDuration|null} [compareDuration] ListFindingsRequest compareDuration - * @property {google.protobuf.IFieldMask|null} [fieldMask] ListFindingsRequest fieldMask - * @property {string|null} [pageToken] ListFindingsRequest pageToken - * @property {number|null} [pageSize] ListFindingsRequest pageSize + * @interface IUpdateNotificationConfigRequest + * @property {google.cloud.securitycenter.v1.INotificationConfig|null} [notificationConfig] UpdateNotificationConfigRequest notificationConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNotificationConfigRequest updateMask */ /** - * Constructs a new ListFindingsRequest. + * Constructs a new UpdateNotificationConfigRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListFindingsRequest. - * @implements IListFindingsRequest + * @classdesc Represents an UpdateNotificationConfigRequest. + * @implements IUpdateNotificationConfigRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest=} [properties] Properties to set */ - function ListFindingsRequest(properties) { + function UpdateNotificationConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37729,173 +52922,326 @@ } /** - * ListFindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * UpdateNotificationConfigRequest notificationConfig. + * @member {google.cloud.securitycenter.v1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest * @instance */ - ListFindingsRequest.prototype.parent = ""; + UpdateNotificationConfigRequest.prototype.notificationConfig = null; /** - * ListFindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * UpdateNotificationConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest * @instance */ - ListFindingsRequest.prototype.filter = ""; + UpdateNotificationConfigRequest.prototype.updateMask = null; /** - * ListFindingsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance + * Creates a new UpdateNotificationConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest instance */ - ListFindingsRequest.prototype.orderBy = ""; + UpdateNotificationConfigRequest.create = function create(properties) { + return new UpdateNotificationConfigRequest(properties); + }; /** - * ListFindingsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance + * Encodes the specified UpdateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} message UpdateNotificationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.prototype.readTime = null; + UpdateNotificationConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * ListFindingsRequest compareDuration. - * @member {google.protobuf.IDuration|null|undefined} compareDuration - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest - * @instance + * Encodes the specified UpdateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} message UpdateNotificationConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.prototype.compareDuration = null; + UpdateNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ListFindingsRequest fieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} fieldMask - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNotificationConfigRequest.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.cloud.securitycenter.v1.UpdateNotificationConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateNotificationConfigRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateNotificationConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + */ + UpdateNotificationConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest(); + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfig); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateNotificationConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} message UpdateNotificationConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateNotificationConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notificationConfig = null; + object.updateMask = null; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateNotificationConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest * @instance + * @returns {Object.} JSON object */ - ListFindingsRequest.prototype.fieldMask = null; + UpdateNotificationConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ListFindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * Gets the default type url for UpdateNotificationConfigRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateNotificationConfigRequest"; + }; + + return UpdateNotificationConfigRequest; + })(); + + v1.UpdateOrganizationSettingsRequest = (function() { + + /** + * Properties of an UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateOrganizationSettingsRequest + * @property {google.cloud.securitycenter.v1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateOrganizationSettingsRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateOrganizationSettingsRequest. + * @implements IUpdateOrganizationSettingsRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + */ + function UpdateOrganizationSettingsRequest(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]]; + } + + /** + * UpdateOrganizationSettingsRequest organizationSettings. + * @member {google.cloud.securitycenter.v1.IOrganizationSettings|null|undefined} organizationSettings + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @instance */ - ListFindingsRequest.prototype.pageToken = ""; + UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; /** - * ListFindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * UpdateOrganizationSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @instance */ - ListFindingsRequest.prototype.pageSize = 0; + UpdateOrganizationSettingsRequest.prototype.updateMask = null; /** - * Creates a new ListFindingsRequest instance using the specified properties. + * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest instance + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance */ - ListFindingsRequest.create = function create(properties) { - return new ListFindingsRequest(properties); + UpdateOrganizationSettingsRequest.create = function create(properties) { + return new UpdateOrganizationSettingsRequest(properties); }; /** - * Encodes the specified ListFindingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encode = function encode(message, writer) { + UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.orderBy); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.compareDuration != null && Object.hasOwnProperty.call(message, "compareDuration")) - $root.google.protobuf.Duration.encode(message.compareDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.fieldMask != null && Object.hasOwnProperty.call(message, "fieldMask")) - $root.google.protobuf.FieldMask.encode(message.fieldMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pageToken); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + if (message.organizationSettings != null && Object.hasOwnProperty.call(message, "organizationSettings")) + $root.google.cloud.securitycenter.v1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFindingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsRequest.verify|verify} messages. + * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsRequest} message ListFindingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer. + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decode = function decode(reader, length) { + UpdateOrganizationSettingsRequest.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.cloud.securitycenter.v1.ListFindingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.decode(reader, reader.uint32()); break; } case 2: { - message.filter = reader.string(); - break; - } - case 3: { - message.orderBy = reader.string(); - break; - } - case 4: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.compareDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - message.fieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 8: { - message.pageToken = reader.string(); - break; - } - case 9: { - message.pageSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -37907,198 +53253,142 @@ }; /** - * Decodes a ListFindingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsRequest message. + * Verifies an UpdateOrganizationSettingsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsRequest.verify = function verify(message) { + UpdateOrganizationSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); - if (error) - return "readTime." + error; - } - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) { - var error = $root.google.protobuf.Duration.verify(message.compareDuration); + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { + var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.verify(message.organizationSettings); if (error) - return "compareDuration." + error; + return "organizationSettings." + error; } - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.fieldMask); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "fieldMask." + error; + return "updateMask." + error; } - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; return null; }; /** - * Creates a ListFindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsRequest} ListFindingsRequest + * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest */ - ListFindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsRequest) + UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.compareDuration != null) { - if (typeof object.compareDuration !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.compareDuration: object expected"); - message.compareDuration = $root.google.protobuf.Duration.fromObject(object.compareDuration); + var message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); + if (object.organizationSettings != null) { + if (typeof object.organizationSettings !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); + message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.fromObject(object.organizationSettings); } - if (object.fieldMask != null) { - if (typeof object.fieldMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsRequest.fieldMask: object expected"); - message.fieldMask = $root.google.protobuf.FieldMask.fromObject(object.fieldMask); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a ListFindingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static - * @param {google.cloud.securitycenter.v1.ListFindingsRequest} message ListFindingsRequest + * @param {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsRequest.toObject = function toObject(message, options) { + UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.orderBy = ""; - object.readTime = null; - object.compareDuration = null; - object.fieldMask = null; - object.pageToken = ""; - object.pageSize = 0; + object.organizationSettings = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.compareDuration != null && message.hasOwnProperty("compareDuration")) - object.compareDuration = $root.google.protobuf.Duration.toObject(message.compareDuration, options); - if (message.fieldMask != null && message.hasOwnProperty("fieldMask")) - object.fieldMask = $root.google.protobuf.FieldMask.toObject(message.fieldMask, options); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; + if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) + object.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.toObject(message.organizationSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListFindingsRequest to JSON. + * Converts this UpdateOrganizationSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @instance * @returns {Object.} JSON object */ - ListFindingsRequest.prototype.toJSON = function toJSON() { + UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFindingsRequest + * Gets the default type url for UpdateOrganizationSettingsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListFindingsRequest + * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateOrganizationSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest"; }; - return ListFindingsRequest; + return UpdateOrganizationSettingsRequest; })(); - v1.ListFindingsResponse = (function() { + v1.UpdateSecurityHealthAnalyticsCustomModuleRequest = (function() { /** - * Properties of a ListFindingsResponse. + * Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IListFindingsResponse - * @property {Array.|null} [listFindingsResults] ListFindingsResponse listFindingsResults - * @property {google.protobuf.ITimestamp|null} [readTime] ListFindingsResponse readTime - * @property {string|null} [nextPageToken] ListFindingsResponse nextPageToken - * @property {number|null} [totalSize] ListFindingsResponse totalSize + * @interface IUpdateSecurityHealthAnalyticsCustomModuleRequest + * @property {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask */ /** - * Constructs a new ListFindingsResponse. + * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListFindingsResponse. - * @implements IListFindingsResponse + * @classdesc Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. + * @implements IUpdateSecurityHealthAnalyticsCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set */ - function ListFindingsResponse(properties) { - this.listFindingsResults = []; + function UpdateSecurityHealthAnalyticsCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38106,120 +53396,89 @@ } /** - * ListFindingsResponse listFindingsResults. - * @member {Array.} listFindingsResults - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @instance - */ - ListFindingsResponse.prototype.listFindingsResults = $util.emptyArray; - - /** - * ListFindingsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @instance - */ - ListFindingsResponse.prototype.readTime = null; - - /** - * ListFindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. + * @member {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - ListFindingsResponse.prototype.nextPageToken = ""; + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; /** - * ListFindingsResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @instance */ - ListFindingsResponse.prototype.totalSize = 0; + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.updateMask = null; /** - * Creates a new ListFindingsResponse instance using the specified properties. + * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse instance + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest instance */ - ListFindingsResponse.create = function create(properties) { - return new ListFindingsResponse(properties); + UpdateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new UpdateSecurityHealthAnalyticsCustomModuleRequest(properties); }; /** - * Encodes the specified ListFindingsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encode = function encode(message, writer) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.listFindingsResults != null && message.listFindingsResults.length) - for (var i = 0; i < message.listFindingsResults.length; ++i) - $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.encode(message.listFindingsResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime")) - $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); + if (message.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) + $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListFindingsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.verify|verify} messages. + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IListFindingsResponse} message ListFindingsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer. + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decode = function decode(reader, length) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.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.cloud.securitycenter.v1.ListFindingsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.listFindingsResults && message.listFindingsResults.length)) - message.listFindingsResults = []; - message.listFindingsResults.push($root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.decode(reader, reader.uint32())); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); break; } case 2: { - message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nextPageToken = reader.string(); - break; - } - case 4: { - message.totalSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -38231,873 +53490,645 @@ }; /** - * Decodes a ListFindingsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFindingsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFindingsResponse message. + * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFindingsResponse.verify = function verify(message) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.listFindingsResults != null && message.hasOwnProperty("listFindingsResults")) { - if (!Array.isArray(message.listFindingsResults)) - return "listFindingsResults: array expected"; - for (var i = 0; i < message.listFindingsResults.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify(message.listFindingsResults[i]); - if (error) - return "listFindingsResults." + error; - } + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { + var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); + if (error) + return "securityHealthAnalyticsCustomModule." + error; } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "readTime." + error; + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListFindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse} ListFindingsResponse + * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest */ - ListFindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse) + UpdateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse(); - if (object.listFindingsResults) { - if (!Array.isArray(object.listFindingsResults)) - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: array expected"); - message.listFindingsResults = []; - for (var i = 0; i < object.listFindingsResults.length; ++i) { - if (typeof object.listFindingsResults[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.listFindingsResults: object expected"); - message.listFindingsResults[i] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.fromObject(object.listFindingsResults[i]); - } + var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.securityHealthAnalyticsCustomModule != null) { + if (typeof object.securityHealthAnalyticsCustomModule !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListFindingsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse} message ListFindingsResponse + * @param {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFindingsResponse.toObject = function toObject(message, options) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.listFindingsResults = []; if (options.defaults) { - object.readTime = null; - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.listFindingsResults && message.listFindingsResults.length) { - object.listFindingsResults = []; - for (var j = 0; j < message.listFindingsResults.length; ++j) - object.listFindingsResults[j] = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.toObject(message.listFindingsResults[j], options); + object.securityHealthAnalyticsCustomModule = null; + object.updateMask = null; } - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) + object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListFindingsResponse to JSON. + * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @instance * @returns {Object.} JSON object */ - ListFindingsResponse.prototype.toJSON = function toJSON() { + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFindingsResponse + * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse + * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest"; }; - ListFindingsResponse.ListFindingsResult = (function() { - - /** - * Properties of a ListFindingsResult. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @interface IListFindingsResult - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] ListFindingsResult finding - * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange|null} [stateChange] ListFindingsResult stateChange - * @property {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null} [resource] ListFindingsResult resource - */ - - /** - * Constructs a new ListFindingsResult. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse - * @classdesc Represents a ListFindingsResult. - * @implements IListFindingsResult - * @constructor - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set - */ - function ListFindingsResult(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]]; - } - - /** - * ListFindingsResult finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - */ - ListFindingsResult.prototype.finding = null; - - /** - * ListFindingsResult stateChange. - * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange} stateChange - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - */ - ListFindingsResult.prototype.stateChange = 0; - - /** - * ListFindingsResult resource. - * @member {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource|null|undefined} resource - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - */ - ListFindingsResult.prototype.resource = null; - - /** - * Creates a new ListFindingsResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult instance - */ - ListFindingsResult.create = function create(properties) { - return new ListFindingsResult(properties); - }; - - /** - * Encodes the specified ListFindingsResult message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.stateChange != null && Object.hasOwnProperty.call(message, "stateChange")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.stateChange); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListFindingsResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult} message ListFindingsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListFindingsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListFindingsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingsResult.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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); - break; - } - case 2: { - message.stateChange = reader.int32(); - break; - } - case 3: { - message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListFindingsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListFindingsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListFindingsResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListFindingsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - switch (message.stateChange) { - default: - return "stateChange: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a ListFindingsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} ListFindingsResult - */ - ListFindingsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); - } - switch (object.stateChange) { - default: - if (typeof object.stateChange === "number") { - message.stateChange = object.stateChange; - break; - } - break; - case "UNUSED": - case 0: - message.stateChange = 0; - break; - case "CHANGED": - case 1: - message.stateChange = 1; - break; - case "UNCHANGED": - case 2: - message.stateChange = 2; - break; - case "ADDED": - case 3: - message.stateChange = 3; - break; - case "REMOVED": - case 4: - message.stateChange = 4; - break; - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.resource: object expected"); - message.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.fromObject(object.resource); - } - return message; - }; + return UpdateSecurityHealthAnalyticsCustomModuleRequest; + })(); - /** - * Creates a plain object from a ListFindingsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult} message ListFindingsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFindingsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.finding = null; - object.stateChange = options.enums === String ? "UNUSED" : 0; - object.resource = null; - } - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (message.stateChange != null && message.hasOwnProperty("stateChange")) - object.stateChange = options.enums === String ? $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] === undefined ? message.stateChange : $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange[message.stateChange] : message.stateChange; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.toObject(message.resource, options); - return object; - }; + v1.UpdateSourceRequest = (function() { - /** - * Converts this ListFindingsResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @instance - * @returns {Object.} JSON object - */ - ListFindingsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateSourceRequest + * @property {google.cloud.securitycenter.v1.ISource|null} [source] UpdateSourceRequest source + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask + */ - /** - * Gets the default type url for ListFindingsResult - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListFindingsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult"; - }; + /** + * Constructs a new UpdateSourceRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateSourceRequest. + * @implements IUpdateSourceRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set + */ + function UpdateSourceRequest(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]]; + } - /** - * StateChange enum. - * @name google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange - * @enum {number} - * @property {number} UNUSED=0 UNUSED value - * @property {number} CHANGED=1 CHANGED value - * @property {number} UNCHANGED=2 UNCHANGED value - * @property {number} ADDED=3 ADDED value - * @property {number} REMOVED=4 REMOVED value - */ - ListFindingsResult.StateChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNUSED"] = 0; - values[valuesById[1] = "CHANGED"] = 1; - values[valuesById[2] = "UNCHANGED"] = 2; - values[valuesById[3] = "ADDED"] = 3; - values[valuesById[4] = "REMOVED"] = 4; - return values; - })(); + /** + * UpdateSourceRequest source. + * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @instance + */ + UpdateSourceRequest.prototype.source = null; - ListFindingsResult.Resource = (function() { + /** + * UpdateSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @instance + */ + UpdateSourceRequest.prototype.updateMask = null; - /** - * Properties of a Resource. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @interface IResource - * @property {string|null} [name] Resource name - * @property {string|null} [displayName] Resource displayName - * @property {string|null} [type] Resource type - * @property {string|null} [projectName] Resource projectName - * @property {string|null} [projectDisplayName] Resource projectDisplayName - * @property {string|null} [parentName] Resource parentName - * @property {string|null} [parentDisplayName] Resource parentDisplayName - * @property {Array.|null} [folders] Resource folders - */ + /** + * Creates a new UpdateSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest instance + */ + UpdateSourceRequest.create = function create(properties) { + return new UpdateSourceRequest(properties); + }; - /** - * Constructs a new Resource. - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - * @classdesc Represents a Resource. - * @implements IResource - * @constructor - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set - */ - function Resource(properties) { - this.folders = []; - 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 UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSourceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Resource name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.name = ""; + /** + * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Resource displayName. - * @member {string} displayName - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.displayName = ""; + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSourceRequest.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.cloud.securitycenter.v1.UpdateSourceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Resource type. - * @member {string} type - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.type = ""; + /** + * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Resource projectName. - * @member {string} projectName - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.projectName = ""; + /** + * Verifies an UpdateSourceRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSourceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); + if (error) + return "source." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; - /** - * Resource projectDisplayName. - * @member {string} projectDisplayName - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.projectDisplayName = ""; + /** + * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + */ + UpdateSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSourceRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.source: object expected"); + message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Resource parentName. - * @member {string} parentName - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.parentName = ""; + /** + * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateSourceRequest} message UpdateSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.updateMask = null; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Resource parentDisplayName. - * @member {string} parentDisplayName - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.parentDisplayName = ""; + /** + * Converts this UpdateSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Resource folders. - * @member {Array.} folders - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - */ - Resource.prototype.folders = $util.emptyArray; + /** + * Gets the default type url for UpdateSourceRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSourceRequest"; + }; - /** - * Creates a new Resource instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource instance - */ - Resource.create = function create(properties) { - return new Resource(properties); - }; + return UpdateSourceRequest; + })(); - /** - * Encodes the specified Resource message. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.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.projectName != null && Object.hasOwnProperty.call(message, "projectName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectName); - if (message.projectDisplayName != null && Object.hasOwnProperty.call(message, "projectDisplayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDisplayName); - if (message.parentName != null && Object.hasOwnProperty.call(message, "parentName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentName); - if (message.parentDisplayName != null && Object.hasOwnProperty.call(message, "parentDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.parentDisplayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type); - if (message.folders != null && message.folders.length) - for (var i = 0; i < message.folders.length; ++i) - $root.google.cloud.securitycenter.v1.Folder.encode(message.folders[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); - return writer; - }; + v1.UpdateSecurityMarksRequest = (function() { - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an UpdateSecurityMarksRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IUpdateSecurityMarksRequest + * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask + * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime + */ - /** - * Decodes a Resource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.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.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 8: { - message.displayName = reader.string(); - break; - } - case 6: { - message.type = reader.string(); - break; - } - case 2: { - message.projectName = reader.string(); - break; - } - case 3: { - message.projectDisplayName = reader.string(); - break; - } - case 4: { - message.parentName = reader.string(); - break; - } - case 5: { - message.parentDisplayName = reader.string(); - break; - } - case 7: { - if (!(message.folders && message.folders.length)) - message.folders = []; - message.folders.push($root.google.cloud.securitycenter.v1.Folder.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new UpdateSecurityMarksRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents an UpdateSecurityMarksRequest. + * @implements IUpdateSecurityMarksRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set + */ + function UpdateSecurityMarksRequest(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]]; + } - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * UpdateSecurityMarksRequest securityMarks. + * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @instance + */ + UpdateSecurityMarksRequest.prototype.securityMarks = null; - /** - * Verifies a Resource message. - * @function verify - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Resource.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.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.projectName != null && message.hasOwnProperty("projectName")) - if (!$util.isString(message.projectName)) - return "projectName: string expected"; - if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - if (!$util.isString(message.projectDisplayName)) - return "projectDisplayName: string expected"; - if (message.parentName != null && message.hasOwnProperty("parentName")) - if (!$util.isString(message.parentName)) - return "parentName: string expected"; - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - if (!$util.isString(message.parentDisplayName)) - return "parentDisplayName: string expected"; - if (message.folders != null && message.hasOwnProperty("folders")) { - if (!Array.isArray(message.folders)) - return "folders: array expected"; - for (var i = 0; i < message.folders.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.Folder.verify(message.folders[i]); - if (error) - return "folders." + error; - } - } - return null; - }; + /** + * UpdateSecurityMarksRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @instance + */ + UpdateSecurityMarksRequest.prototype.updateMask = null; - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} Resource - */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource) - return object; - var message = new $root.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) - message.type = String(object.type); - if (object.projectName != null) - message.projectName = String(object.projectName); - if (object.projectDisplayName != null) - message.projectDisplayName = String(object.projectDisplayName); - if (object.parentName != null) - message.parentName = String(object.parentName); - if (object.parentDisplayName != null) - message.parentDisplayName = String(object.parentDisplayName); - if (object.folders) { - if (!Array.isArray(object.folders)) - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.folders: array expected"); - message.folders = []; - for (var i = 0; i < object.folders.length; ++i) { - if (typeof object.folders[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource.folders: object expected"); - message.folders[i] = $root.google.cloud.securitycenter.v1.Folder.fromObject(object.folders[i]); - } - } - return message; - }; + /** + * UpdateSecurityMarksRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @instance + */ + UpdateSecurityMarksRequest.prototype.startTime = null; - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource} message Resource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Resource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.folders = []; - if (options.defaults) { - object.name = ""; - object.projectName = ""; - object.projectDisplayName = ""; - object.parentName = ""; - object.parentDisplayName = ""; - object.type = ""; - object.displayName = ""; + /** + * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance + */ + UpdateSecurityMarksRequest.create = function create(properties) { + return new UpdateSecurityMarksRequest(properties); + }; + + /** + * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityMarksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) + $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityMarksRequest.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.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); + break; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.projectName != null && message.hasOwnProperty("projectName")) - object.projectName = message.projectName; - if (message.projectDisplayName != null && message.hasOwnProperty("projectDisplayName")) - object.projectDisplayName = message.projectDisplayName; - if (message.parentName != null && message.hasOwnProperty("parentName")) - object.parentName = message.parentName; - if (message.parentDisplayName != null && message.hasOwnProperty("parentDisplayName")) - object.parentDisplayName = message.parentDisplayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.folders && message.folders.length) { - object.folders = []; - for (var j = 0; j < message.folders.length; ++j) - object.folders[j] = $root.google.cloud.securitycenter.v1.Folder.toObject(message.folders[j], options); + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this Resource to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @instance - * @returns {Object.} JSON object - */ - Resource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Resource - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource"; - }; + /** + * Verifies an UpdateSecurityMarksRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSecurityMarksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { + var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); + if (error) + return "securityMarks." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; - return Resource; - })(); + /** + * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + */ + UpdateSecurityMarksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); + if (object.securityMarks != null) { + if (typeof object.securityMarks !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.securityMarks: object expected"); + message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; - return ListFindingsResult; - })(); + /** + * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSecurityMarksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.securityMarks = null; + object.updateMask = null; + object.startTime = null; + } + if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) + object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + return object; + }; - return ListFindingsResponse; + /** + * Converts this UpdateSecurityMarksRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSecurityMarksRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSecurityMarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSecurityMarksRequest"; + }; + + return UpdateSecurityMarksRequest; })(); - v1.SetFindingStateRequest = (function() { + v1.CreateBigQueryExportRequest = (function() { /** - * Properties of a SetFindingStateRequest. + * Properties of a CreateBigQueryExportRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISetFindingStateRequest - * @property {string|null} [name] SetFindingStateRequest name - * @property {google.cloud.securitycenter.v1.Finding.State|null} [state] SetFindingStateRequest state - * @property {google.protobuf.ITimestamp|null} [startTime] SetFindingStateRequest startTime + * @interface ICreateBigQueryExportRequest + * @property {string|null} [parent] CreateBigQueryExportRequest parent + * @property {google.cloud.securitycenter.v1.IBigQueryExport|null} [bigQueryExport] CreateBigQueryExportRequest bigQueryExport + * @property {string|null} [bigQueryExportId] CreateBigQueryExportRequest bigQueryExportId */ /** - * Constructs a new SetFindingStateRequest. + * Constructs a new CreateBigQueryExportRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SetFindingStateRequest. - * @implements ISetFindingStateRequest + * @classdesc Represents a CreateBigQueryExportRequest. + * @implements ICreateBigQueryExportRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest=} [properties] Properties to set */ - function SetFindingStateRequest(properties) { + function CreateBigQueryExportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39105,103 +54136,103 @@ } /** - * SetFindingStateRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * CreateBigQueryExportRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @instance */ - SetFindingStateRequest.prototype.name = ""; + CreateBigQueryExportRequest.prototype.parent = ""; /** - * SetFindingStateRequest state. - * @member {google.cloud.securitycenter.v1.Finding.State} state - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * CreateBigQueryExportRequest bigQueryExport. + * @member {google.cloud.securitycenter.v1.IBigQueryExport|null|undefined} bigQueryExport + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @instance */ - SetFindingStateRequest.prototype.state = 0; + CreateBigQueryExportRequest.prototype.bigQueryExport = null; /** - * SetFindingStateRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * CreateBigQueryExportRequest bigQueryExportId. + * @member {string} bigQueryExportId + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @instance */ - SetFindingStateRequest.prototype.startTime = null; + CreateBigQueryExportRequest.prototype.bigQueryExportId = ""; /** - * Creates a new SetFindingStateRequest instance using the specified properties. + * Creates a new CreateBigQueryExportRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest instance + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest instance */ - SetFindingStateRequest.create = function create(properties) { - return new SetFindingStateRequest(properties); + CreateBigQueryExportRequest.create = function create(properties) { + return new CreateBigQueryExportRequest(properties); }; /** - * Encodes the specified SetFindingStateRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified CreateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} message CreateBigQueryExportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encode = function encode(message, writer) { + CreateBigQueryExportRequest.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.bigQueryExport != null && Object.hasOwnProperty.call(message, "bigQueryExport")) + $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigQueryExportId != null && Object.hasOwnProperty.call(message, "bigQueryExportId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigQueryExportId); return writer; }; /** - * Encodes the specified SetFindingStateRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetFindingStateRequest.verify|verify} messages. + * Encodes the specified CreateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetFindingStateRequest} message SetFindingStateRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} message CreateBigQueryExportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetFindingStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer. + * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decode = function decode(reader, length) { + CreateBigQueryExportRequest.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.cloud.securitycenter.v1.SetFindingStateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.state = reader.int32(); + message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32()); break; } case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.bigQueryExportId = reader.string(); break; } default: @@ -39213,169 +54244,145 @@ }; /** - * Decodes a SetFindingStateRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetFindingStateRequest.decodeDelimited = function decodeDelimited(reader) { + CreateBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetFindingStateRequest message. + * Verifies a CreateBigQueryExportRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetFindingStateRequest.verify = function verify(message) { + CreateBigQueryExportRequest.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) { + var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExport); if (error) - return "startTime." + error; + return "bigQueryExport." + error; } + if (message.bigQueryExportId != null && message.hasOwnProperty("bigQueryExportId")) + if (!$util.isString(message.bigQueryExportId)) + return "bigQueryExportId: string expected"; return null; }; /** - * Creates a SetFindingStateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SetFindingStateRequest} SetFindingStateRequest + * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest */ - SetFindingStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SetFindingStateRequest) + CreateBigQueryExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SetFindingStateRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SetFindingStateRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + var message = new $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.bigQueryExport != null) { + if (typeof object.bigQueryExport !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateBigQueryExportRequest.bigQueryExport: object expected"); + message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExport); } + if (object.bigQueryExportId != null) + message.bigQueryExportId = String(object.bigQueryExportId); return message; }; /** - * Creates a plain object from a SetFindingStateRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateBigQueryExportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.SetFindingStateRequest} message SetFindingStateRequest + * @param {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} message CreateBigQueryExportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetFindingStateRequest.toObject = function toObject(message, options) { + CreateBigQueryExportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.startTime = null; + object.parent = ""; + object.bigQueryExport = null; + object.bigQueryExportId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycenter.v1.Finding.State[message.state] : message.state; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) + object.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExport, options); + if (message.bigQueryExportId != null && message.hasOwnProperty("bigQueryExportId")) + object.bigQueryExportId = message.bigQueryExportId; return object; }; /** - * Converts this SetFindingStateRequest to JSON. + * Converts this CreateBigQueryExportRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @instance * @returns {Object.} JSON object */ - SetFindingStateRequest.prototype.toJSON = function toJSON() { + CreateBigQueryExportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetFindingStateRequest + * Gets the default type url for CreateBigQueryExportRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SetFindingStateRequest + * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetFindingStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SetFindingStateRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateBigQueryExportRequest"; }; - return SetFindingStateRequest; + return CreateBigQueryExportRequest; })(); - v1.SetMuteRequest = (function() { + v1.UpdateBigQueryExportRequest = (function() { /** - * Properties of a SetMuteRequest. + * Properties of an UpdateBigQueryExportRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISetMuteRequest - * @property {string|null} [name] SetMuteRequest name - * @property {google.cloud.securitycenter.v1.Finding.Mute|null} [mute] SetMuteRequest mute + * @interface IUpdateBigQueryExportRequest + * @property {google.cloud.securitycenter.v1.IBigQueryExport|null} [bigQueryExport] UpdateBigQueryExportRequest bigQueryExport + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBigQueryExportRequest updateMask */ /** - * Constructs a new SetMuteRequest. + * Constructs a new UpdateBigQueryExportRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SetMuteRequest. - * @implements ISetMuteRequest + * @classdesc Represents an UpdateBigQueryExportRequest. + * @implements IUpdateBigQueryExportRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISetMuteRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest=} [properties] Properties to set */ - function SetMuteRequest(properties) { + function UpdateBigQueryExportRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39383,89 +54390,89 @@ } /** - * SetMuteRequest name. - * @member {string} name - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * UpdateBigQueryExportRequest bigQueryExport. + * @member {google.cloud.securitycenter.v1.IBigQueryExport|null|undefined} bigQueryExport + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @instance */ - SetMuteRequest.prototype.name = ""; + UpdateBigQueryExportRequest.prototype.bigQueryExport = null; /** - * SetMuteRequest mute. - * @member {google.cloud.securitycenter.v1.Finding.Mute} mute - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * UpdateBigQueryExportRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @instance */ - SetMuteRequest.prototype.mute = 0; + UpdateBigQueryExportRequest.prototype.updateMask = null; /** - * Creates a new SetMuteRequest instance using the specified properties. + * Creates a new UpdateBigQueryExportRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetMuteRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest instance + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest instance */ - SetMuteRequest.create = function create(properties) { - return new SetMuteRequest(properties); + UpdateBigQueryExportRequest.create = function create(properties) { + return new UpdateBigQueryExportRequest(properties); }; /** - * Encodes the specified SetMuteRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. + * Encodes the specified UpdateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetMuteRequest} message SetMuteRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} message UpdateBigQueryExportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetMuteRequest.encode = function encode(message, writer) { + UpdateBigQueryExportRequest.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.mute != null && Object.hasOwnProperty.call(message, "mute")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mute); + if (message.bigQueryExport != null && Object.hasOwnProperty.call(message, "bigQueryExport")) + $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetMuteRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SetMuteRequest.verify|verify} messages. + * Encodes the specified UpdateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.ISetMuteRequest} message SetMuteRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} message UpdateBigQueryExportRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetMuteRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetMuteRequest message from the specified reader or buffer. + * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest + * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetMuteRequest.decode = function decode(reader, length) { + UpdateBigQueryExportRequest.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.cloud.securitycenter.v1.SetMuteRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32()); break; } case 2: { - message.mute = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -39477,160 +54484,143 @@ }; /** - * Decodes a SetMuteRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest + * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetMuteRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetMuteRequest message. + * Verifies an UpdateBigQueryExportRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetMuteRequest.verify = function verify(message) { + UpdateBigQueryExportRequest.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.mute != null && message.hasOwnProperty("mute")) - switch (message.mute) { - default: - return "mute: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } + if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) { + var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExport); + if (error) + return "bigQueryExport." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a SetMuteRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SetMuteRequest} SetMuteRequest + * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest */ - SetMuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SetMuteRequest) + UpdateBigQueryExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SetMuteRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.mute) { - default: - if (typeof object.mute === "number") { - message.mute = object.mute; - break; - } - break; - case "MUTE_UNSPECIFIED": - case 0: - message.mute = 0; - break; - case "MUTED": - case 1: - message.mute = 1; - break; - case "UNMUTED": - case 2: - message.mute = 2; - break; - case "UNDEFINED": - case 4: - message.mute = 4; - break; + var message = new $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest(); + if (object.bigQueryExport != null) { + if (typeof object.bigQueryExport !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.bigQueryExport: object expected"); + message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExport); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a SetMuteRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBigQueryExportRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static - * @param {google.cloud.securitycenter.v1.SetMuteRequest} message SetMuteRequest + * @param {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} message UpdateBigQueryExportRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetMuteRequest.toObject = function toObject(message, options) { + UpdateBigQueryExportRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.mute = options.enums === String ? "MUTE_UNSPECIFIED" : 0; + object.bigQueryExport = null; + object.updateMask = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.mute != null && message.hasOwnProperty("mute")) - object.mute = options.enums === String ? $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] === undefined ? message.mute : $root.google.cloud.securitycenter.v1.Finding.Mute[message.mute] : message.mute; + if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) + object.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExport, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this SetMuteRequest to JSON. + * Converts this UpdateBigQueryExportRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @instance * @returns {Object.} JSON object */ - SetMuteRequest.prototype.toJSON = function toJSON() { + UpdateBigQueryExportRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetMuteRequest + * Gets the default type url for UpdateBigQueryExportRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SetMuteRequest + * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetMuteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SetMuteRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateBigQueryExportRequest"; }; - return SetMuteRequest; + return UpdateBigQueryExportRequest; })(); - v1.RunAssetDiscoveryRequest = (function() { + v1.ListBigQueryExportsRequest = (function() { /** - * Properties of a RunAssetDiscoveryRequest. + * Properties of a ListBigQueryExportsRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IRunAssetDiscoveryRequest - * @property {string|null} [parent] RunAssetDiscoveryRequest parent + * @interface IListBigQueryExportsRequest + * @property {string|null} [parent] ListBigQueryExportsRequest parent + * @property {number|null} [pageSize] ListBigQueryExportsRequest pageSize + * @property {string|null} [pageToken] ListBigQueryExportsRequest pageToken */ /** - * Constructs a new RunAssetDiscoveryRequest. + * Constructs a new ListBigQueryExportsRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a RunAssetDiscoveryRequest. - * @implements IRunAssetDiscoveryRequest + * @classdesc Represents a ListBigQueryExportsRequest. + * @implements IListBigQueryExportsRequest * @constructor - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest=} [properties] Properties to set */ - function RunAssetDiscoveryRequest(properties) { + function ListBigQueryExportsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39638,70 +54628,90 @@ } /** - * RunAssetDiscoveryRequest parent. + * ListBigQueryExportsRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @instance */ - RunAssetDiscoveryRequest.prototype.parent = ""; + ListBigQueryExportsRequest.prototype.parent = ""; /** - * Creates a new RunAssetDiscoveryRequest instance using the specified properties. + * ListBigQueryExportsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @instance + */ + ListBigQueryExportsRequest.prototype.pageSize = 0; + + /** + * ListBigQueryExportsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @instance + */ + ListBigQueryExportsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListBigQueryExportsRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest instance + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest instance */ - RunAssetDiscoveryRequest.create = function create(properties) { - return new RunAssetDiscoveryRequest(properties); + ListBigQueryExportsRequest.create = function create(properties) { + return new ListBigQueryExportsRequest(properties); }; /** - * Encodes the specified RunAssetDiscoveryRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified ListBigQueryExportsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} message ListBigQueryExportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encode = function encode(message, writer) { + ListBigQueryExportsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified RunAssetDiscoveryRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.RunAssetDiscoveryRequest.verify|verify} messages. + * Encodes the specified ListBigQueryExportsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static - * @param {google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest} message RunAssetDiscoveryRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} message ListBigQueryExportsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunAssetDiscoveryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBigQueryExportsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer. + * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decode = function decode(reader, length) { + ListBigQueryExportsRequest.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.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -39709,6 +54719,14 @@ message.parent = reader.string(); break; } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39718,124 +54736,141 @@ }; /** - * Decodes a RunAssetDiscoveryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunAssetDiscoveryRequest.decodeDelimited = function decodeDelimited(reader) { + ListBigQueryExportsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunAssetDiscoveryRequest message. + * Verifies a ListBigQueryExportsRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunAssetDiscoveryRequest.verify = function verify(message) { + ListBigQueryExportsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a RunAssetDiscoveryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryExportsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} RunAssetDiscoveryRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest */ - RunAssetDiscoveryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest) + ListBigQueryExportsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest(); if (object.parent != null) message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a RunAssetDiscoveryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBigQueryExportsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static - * @param {google.cloud.securitycenter.v1.RunAssetDiscoveryRequest} message RunAssetDiscoveryRequest + * @param {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} message ListBigQueryExportsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunAssetDiscoveryRequest.toObject = function toObject(message, options) { + ListBigQueryExportsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this RunAssetDiscoveryRequest to JSON. + * Converts this ListBigQueryExportsRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @instance * @returns {Object.} JSON object */ - RunAssetDiscoveryRequest.prototype.toJSON = function toJSON() { + ListBigQueryExportsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunAssetDiscoveryRequest + * Gets the default type url for ListBigQueryExportsRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunAssetDiscoveryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBigQueryExportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.RunAssetDiscoveryRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListBigQueryExportsRequest"; }; - return RunAssetDiscoveryRequest; + return ListBigQueryExportsRequest; })(); - v1.SimulateSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListBigQueryExportsResponse = (function() { /** - * Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListBigQueryExportsResponse. * @memberof google.cloud.securitycenter.v1 - * @interface ISimulateSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [parent] SimulateSecurityHealthAnalyticsCustomModuleRequest parent - * @property {google.cloud.securitycenter.v1.ICustomConfig|null} [customConfig] SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig - * @property {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null} [resource] SimulateSecurityHealthAnalyticsCustomModuleRequest resource + * @interface IListBigQueryExportsResponse + * @property {Array.|null} [bigQueryExports] ListBigQueryExportsResponse bigQueryExports + * @property {string|null} [nextPageToken] ListBigQueryExportsResponse nextPageToken */ /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListBigQueryExportsResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. - * @implements ISimulateSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListBigQueryExportsResponse. + * @implements IListBigQueryExportsResponse * @constructor - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse=} [properties] Properties to set */ - function SimulateSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListBigQueryExportsResponse(properties) { + this.bigQueryExports = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39843,103 +54878,92 @@ } /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; - - /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. - * @member {google.cloud.securitycenter.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * ListBigQueryExportsResponse bigQueryExports. + * @member {Array.} bigQueryExports + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @instance */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.customConfig = null; + ListBigQueryExportsResponse.prototype.bigQueryExports = $util.emptyArray; /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest resource. - * @member {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null|undefined} resource - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * ListBigQueryExportsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @instance */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.resource = null; + ListBigQueryExportsResponse.prototype.nextPageToken = ""; /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListBigQueryExportsResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse instance */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new SimulateSecurityHealthAnalyticsCustomModuleRequest(properties); + ListBigQueryExportsResponse.create = function create(properties) { + return new ListBigQueryExportsResponse(properties); }; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListBigQueryExportsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse} message ListBigQueryExportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListBigQueryExportsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycenter.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigQueryExports != null && message.bigQueryExports.length) + for (var i = 0; i < message.bigQueryExports.length; ++i) + $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListBigQueryExportsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse} message ListBigQueryExportsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBigQueryExportsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListBigQueryExportsResponse.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.bigQueryExports && message.bigQueryExports.length)) + message.bigQueryExports = []; + message.bigQueryExports.push($root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32())); break; } case 2: { - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -39951,409 +54975,352 @@ }; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListBigQueryExportsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListBigQueryExportsResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListBigQueryExportsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycenter.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify(message.resource); - if (error) - return "resource." + error; + if (message.bigQueryExports != null && message.hasOwnProperty("bigQueryExports")) { + if (!Array.isArray(message.bigQueryExports)) + return "bigQueryExports: array expected"; + for (var i = 0; i < message.bigQueryExports.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExports[i]); + if (error) + return "bigQueryExports." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryExportsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + ListBigQueryExportsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.fromObject(object.customConfig); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.resource: object expected"); - message.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.fromObject(object.resource); + var message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse(); + if (object.bigQueryExports) { + if (!Array.isArray(object.bigQueryExports)) + throw TypeError(".google.cloud.securitycenter.v1.ListBigQueryExportsResponse.bigQueryExports: array expected"); + message.bigQueryExports = []; + for (var i = 0; i < object.bigQueryExports.length; ++i) { + if (typeof object.bigQueryExports[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListBigQueryExportsResponse.bigQueryExports: object expected"); + message.bigQueryExports[i] = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExports[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBigQueryExportsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} message ListBigQueryExportsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListBigQueryExportsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.customConfig = null; - object.resource = null; + if (options.arrays || options.defaults) + object.bigQueryExports = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.bigQueryExports && message.bigQueryExports.length) { + object.bigQueryExports = []; + for (var j = 0; j < message.bigQueryExports.length; ++j) + object.bigQueryExports[j] = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExports[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycenter.v1.CustomConfig.toObject(message.customConfig, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.toObject(message.resource, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListBigQueryExportsResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @instance * @returns {Object.} JSON object */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListBigQueryExportsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListBigQueryExportsResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBigQueryExportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListBigQueryExportsResponse"; }; - SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource = (function() { - - /** - * Properties of a SimulatedResource. - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @interface ISimulatedResource - * @property {string|null} [resourceType] SimulatedResource resourceType - * @property {google.protobuf.IStruct|null} [resourceData] SimulatedResource resourceData - * @property {google.iam.v1.IPolicy|null} [iamPolicyData] SimulatedResource iamPolicyData - */ + return ListBigQueryExportsResponse; + })(); - /** - * Constructs a new SimulatedResource. - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @classdesc Represents a SimulatedResource. - * @implements ISimulatedResource - * @constructor - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set - */ - function SimulatedResource(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]]; - } + v1.DeleteBigQueryExportRequest = (function() { - /** - * SimulatedResource resourceType. - * @member {string} resourceType - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.resourceType = ""; + /** + * Properties of a DeleteBigQueryExportRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IDeleteBigQueryExportRequest + * @property {string|null} [name] DeleteBigQueryExportRequest name + */ - /** - * SimulatedResource resourceData. - * @member {google.protobuf.IStruct|null|undefined} resourceData - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.resourceData = null; + /** + * Constructs a new DeleteBigQueryExportRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a DeleteBigQueryExportRequest. + * @implements IDeleteBigQueryExportRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest=} [properties] Properties to set + */ + function DeleteBigQueryExportRequest(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]]; + } - /** - * SimulatedResource iamPolicyData. - * @member {google.iam.v1.IPolicy|null|undefined} iamPolicyData - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.iamPolicyData = null; + /** + * DeleteBigQueryExportRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @instance + */ + DeleteBigQueryExportRequest.prototype.name = ""; - /** - * Creates a new SimulatedResource instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource instance - */ - SimulatedResource.create = function create(properties) { - return new SimulatedResource(properties); - }; + /** + * Creates a new DeleteBigQueryExportRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest instance + */ + DeleteBigQueryExportRequest.create = function create(properties) { + return new DeleteBigQueryExportRequest(properties); + }; - /** - * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); - if (message.resourceData != null && Object.hasOwnProperty.call(message, "resourceData")) - $root.google.protobuf.Struct.encode(message.resourceData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.iamPolicyData != null && Object.hasOwnProperty.call(message, "iamPolicyData")) - $root.google.iam.v1.Policy.encode(message.iamPolicyData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DeleteBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} message DeleteBigQueryExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBigQueryExportRequest.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); + return writer; + }; - /** - * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} message DeleteBigQueryExportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SimulatedResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResource.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.string(); - break; - } - case 2: { - message.resourceData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.iamPolicyData = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBigQueryExportRequest.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.cloud.securitycenter.v1.DeleteBigQueryExportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulatedResource message. - * @function verify - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulatedResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resourceData != null && message.hasOwnProperty("resourceData")) { - var error = $root.google.protobuf.Struct.verify(message.resourceData); - if (error) - return "resourceData." + error; - } - if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) { - var error = $root.google.iam.v1.Policy.verify(message.iamPolicyData); - if (error) - return "iamPolicyData." + error; - } - return null; - }; + } + return message; + }; - /** - * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - */ - SimulatedResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) - return object; - var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resourceData != null) { - if (typeof object.resourceData !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.resourceData: object expected"); - message.resourceData = $root.google.protobuf.Struct.fromObject(object.resourceData); - } - if (object.iamPolicyData != null) { - if (typeof object.iamPolicyData !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.iamPolicyData: object expected"); - message.iamPolicyData = $root.google.iam.v1.Policy.fromObject(object.iamPolicyData); - } - return message; - }; + /** + * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} message SimulatedResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulatedResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = ""; - object.resourceData = null; - object.iamPolicyData = null; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resourceData != null && message.hasOwnProperty("resourceData")) - object.resourceData = $root.google.protobuf.Struct.toObject(message.resourceData, options); - if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) - object.iamPolicyData = $root.google.iam.v1.Policy.toObject(message.iamPolicyData, options); + /** + * Verifies a DeleteBigQueryExportRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBigQueryExportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + */ + DeleteBigQueryExportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) return object; - }; + var message = new $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this SimulatedResource to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - * @returns {Object.} JSON object - */ - SimulatedResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteBigQueryExportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} message DeleteBigQueryExportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBigQueryExportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Gets the default type url for SimulatedResource - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulatedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource"; - }; + /** + * Converts this DeleteBigQueryExportRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBigQueryExportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SimulatedResource; - })(); + /** + * Gets the default type url for DeleteBigQueryExportRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteBigQueryExportRequest"; + }; - return SimulateSecurityHealthAnalyticsCustomModuleRequest; + return DeleteBigQueryExportRequest; })(); - v1.SimulateSecurityHealthAnalyticsCustomModuleResponse = (function() { + v1.CreateEventThreatDetectionCustomModuleRequest = (function() { /** - * Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. + * Properties of a CreateEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ISimulateSecurityHealthAnalyticsCustomModuleResponse - * @property {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null} [result] SimulateSecurityHealthAnalyticsCustomModuleResponse result + * @interface ICreateEventThreatDetectionCustomModuleRequest + * @property {string|null} [parent] CreateEventThreatDetectionCustomModuleRequest parent + * @property {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. + * Constructs a new CreateEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. - * @implements ISimulateSecurityHealthAnalyticsCustomModuleResponse + * @classdesc Represents a CreateEventThreatDetectionCustomModuleRequest. + * @implements ICreateEventThreatDetectionCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set */ - function SimulateSecurityHealthAnalyticsCustomModuleResponse(properties) { + function CreateEventThreatDetectionCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40361,75 +55328,89 @@ } /** - * SimulateSecurityHealthAnalyticsCustomModuleResponse result. - * @member {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null|undefined} result - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * CreateEventThreatDetectionCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @instance */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.result = null; + CreateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. + * CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. + * @member {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest + * @instance + */ + CreateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; + + /** + * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse instance + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest instance */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.create = function create(properties) { - return new SimulateSecurityHealthAnalyticsCustomModuleResponse(properties); + CreateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new CreateEventThreatDetectionCustomModuleRequest(properties); }; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.encode = function encode(message, writer) { + CreateEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) + $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns {google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.decode = function decode(reader, length) { + CreateEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + } + case 2: { + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); break; } default: @@ -40441,425 +55422,386 @@ }; /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns {google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { + CreateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. + * Verifies a CreateEventThreatDetectionCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.verify = function verify(message) { + CreateEventThreatDetectionCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify(message.result); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { + var error = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); if (error) - return "result." + error; + return "eventThreatDetectionCustomModule." + error; } return null; }; /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns {google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + CreateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.result: object expected"); - message.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.fromObject(object.result); + var message = new $root.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.eventThreatDetectionCustomModule != null) { + if (typeof object.eventThreatDetectionCustomModule !== "object") + throw TypeError(".google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); } return message; }; /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse + * @param {google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.toObject = function toObject(message, options) { + CreateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.toObject(message.result, options); + if (options.defaults) { + object.parent = ""; + object.eventThreatDetectionCustomModule = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) + object.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); return object; }; /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. + * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @instance * @returns {Object.} JSON object */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.toJSON = function toJSON() { + CreateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse + * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @memberof google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest"; }; - SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult = (function() { - - /** - * Properties of a SimulatedResult. - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @interface ISimulatedResult - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] SimulatedResult finding - * @property {google.protobuf.IEmpty|null} [noViolation] SimulatedResult noViolation - * @property {google.rpc.IStatus|null} [error] SimulatedResult error - */ + return CreateEventThreatDetectionCustomModuleRequest; + })(); - /** - * Constructs a new SimulatedResult. - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @classdesc Represents a SimulatedResult. - * @implements ISimulatedResult - * @constructor - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set - */ - function SimulatedResult(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]]; - } + v1.ValidateEventThreatDetectionCustomModuleRequest = (function() { - /** - * SimulatedResult finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.finding = null; + /** + * Properties of a ValidateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IValidateEventThreatDetectionCustomModuleRequest + * @property {string|null} [parent] ValidateEventThreatDetectionCustomModuleRequest parent + * @property {string|null} [rawText] ValidateEventThreatDetectionCustomModuleRequest rawText + * @property {string|null} [type] ValidateEventThreatDetectionCustomModuleRequest type + */ - /** - * SimulatedResult noViolation. - * @member {google.protobuf.IEmpty|null|undefined} noViolation - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.noViolation = null; + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a ValidateEventThreatDetectionCustomModuleRequest. + * @implements IValidateEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function ValidateEventThreatDetectionCustomModuleRequest(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]]; + } - /** - * SimulatedResult error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.error = null; + /** + * ValidateEventThreatDetectionCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ValidateEventThreatDetectionCustomModuleRequest rawText. + * @member {string} rawText + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.rawText = ""; - /** - * SimulatedResult result. - * @member {"finding"|"noViolation"|"error"|undefined} result - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - Object.defineProperty(SimulatedResult.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["finding", "noViolation", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ValidateEventThreatDetectionCustomModuleRequest type. + * @member {string} type + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.type = ""; - /** - * Creates a new SimulatedResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult instance - */ - SimulatedResult.create = function create(properties) { - return new SimulatedResult(properties); - }; + /** + * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest instance + */ + ValidateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new ValidateEventThreatDetectionCustomModuleRequest(properties); + }; - /** - * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.noViolation != null && Object.hasOwnProperty.call(message, "noViolation")) - $root.google.protobuf.Empty.encode(message.noViolation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rawText != null && Object.hasOwnProperty.call(message, "rawText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rawText); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; - /** - * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SimulatedResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResult.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.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); - break; - } - case 2: { - message.noViolation = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulatedResult message. - * @function verify - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulatedResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.finding != null && message.hasOwnProperty("finding")) { - properties.result = 1; - { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - } - if (message.noViolation != null && message.hasOwnProperty("noViolation")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Empty.verify(message.noViolation); - if (error) - return "noViolation." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; + case 2: { + message.rawText = reader.string(); + break; } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return null; - }; - - /** - * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - */ - SimulatedResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) - return object; - var message = new $root.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); - } - if (object.noViolation != null) { - if (typeof object.noViolation !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.noViolation: object expected"); - message.noViolation = $root.google.protobuf.Empty.fromObject(object.noViolation); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} message SimulatedResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulatedResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.finding != null && message.hasOwnProperty("finding")) { - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (options.oneofs) - object.result = "finding"; - } - if (message.noViolation != null && message.hasOwnProperty("noViolation")) { - object.noViolation = $root.google.protobuf.Empty.toObject(message.noViolation, options); - if (options.oneofs) - object.result = "noViolation"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } + } + return message; + }; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateEventThreatDetectionCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rawText != null && message.hasOwnProperty("rawText")) + if (!$util.isString(message.rawText)) + return "rawText: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + */ + ValidateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest) return object; - }; + var message = new $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rawText != null) + message.rawText = String(object.rawText); + if (object.type != null) + message.type = String(object.type); + return message; + }; - /** - * Converts this SimulatedResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - * @returns {Object.} JSON object - */ - SimulatedResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rawText = ""; + object.type = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rawText != null && message.hasOwnProperty("rawText")) + object.rawText = message.rawText; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; - /** - * Gets the default type url for SimulatedResult - * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulatedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult"; - }; + /** + * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SimulatedResult; - })(); + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest"; + }; - return SimulateSecurityHealthAnalyticsCustomModuleResponse; + return ValidateEventThreatDetectionCustomModuleRequest; })(); - v1.UpdateExternalSystemRequest = (function() { + v1.ValidateEventThreatDetectionCustomModuleResponse = (function() { /** - * Properties of an UpdateExternalSystemRequest. + * Properties of a ValidateEventThreatDetectionCustomModuleResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateExternalSystemRequest - * @property {google.cloud.securitycenter.v1.IExternalSystem|null} [externalSystem] UpdateExternalSystemRequest externalSystem - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateExternalSystemRequest updateMask + * @interface IValidateEventThreatDetectionCustomModuleResponse + * @property {google.cloud.securitycenter.v1.ICustomModuleValidationErrors|null} [errors] ValidateEventThreatDetectionCustomModuleResponse errors */ /** - * Constructs a new UpdateExternalSystemRequest. + * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateExternalSystemRequest. - * @implements IUpdateExternalSystemRequest + * @classdesc Represents a ValidateEventThreatDetectionCustomModuleResponse. + * @implements IValidateEventThreatDetectionCustomModuleResponse * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set */ - function UpdateExternalSystemRequest(properties) { + function ValidateEventThreatDetectionCustomModuleResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40867,89 +55809,75 @@ } /** - * UpdateExternalSystemRequest externalSystem. - * @member {google.cloud.securitycenter.v1.IExternalSystem|null|undefined} externalSystem - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest - * @instance - */ - UpdateExternalSystemRequest.prototype.externalSystem = null; - - /** - * UpdateExternalSystemRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * ValidateEventThreatDetectionCustomModuleResponse errors. + * @member {google.cloud.securitycenter.v1.ICustomModuleValidationErrors|null|undefined} errors + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @instance */ - UpdateExternalSystemRequest.prototype.updateMask = null; + ValidateEventThreatDetectionCustomModuleResponse.prototype.errors = null; /** - * Creates a new UpdateExternalSystemRequest instance using the specified properties. + * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest instance + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse instance */ - UpdateExternalSystemRequest.create = function create(properties) { - return new UpdateExternalSystemRequest(properties); + ValidateEventThreatDetectionCustomModuleResponse.create = function create(properties) { + return new ValidateEventThreatDetectionCustomModuleResponse(properties); }; /** - * Encodes the specified UpdateExternalSystemRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} message UpdateExternalSystemRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExternalSystemRequest.encode = function encode(message, writer) { + ValidateEventThreatDetectionCustomModuleResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.externalSystem != null && Object.hasOwnProperty.call(message, "externalSystem")) - $root.google.cloud.securitycenter.v1.ExternalSystem.encode(message.externalSystem, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.errors != null && Object.hasOwnProperty.call(message, "errors")) + $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors.encode(message.errors, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateExternalSystemRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateExternalSystemRequest.verify|verify} messages. + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateExternalSystemRequest} message UpdateExternalSystemRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateExternalSystemRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidateEventThreatDetectionCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer. + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExternalSystemRequest.decode = function decode(reader, length) { + ValidateEventThreatDetectionCustomModuleResponse.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.cloud.securitycenter.v1.UpdateExternalSystemRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.decode(reader, reader.uint32()); - break; - } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.errors = $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors.decode(reader, reader.uint32()); break; } default: @@ -40961,142 +55889,127 @@ }; /** - * Decodes an UpdateExternalSystemRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateExternalSystemRequest.decodeDelimited = function decodeDelimited(reader) { + ValidateEventThreatDetectionCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateExternalSystemRequest message. + * Verifies a ValidateEventThreatDetectionCustomModuleResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateExternalSystemRequest.verify = function verify(message) { + ValidateEventThreatDetectionCustomModuleResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.externalSystem != null && message.hasOwnProperty("externalSystem")) { - var error = $root.google.cloud.securitycenter.v1.ExternalSystem.verify(message.externalSystem); - if (error) - return "externalSystem." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.errors != null && message.hasOwnProperty("errors")) { + var error = $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors.verify(message.errors); if (error) - return "updateMask." + error; + return "errors." + error; } return null; }; /** - * Creates an UpdateExternalSystemRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} UpdateExternalSystemRequest + * @returns {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse */ - UpdateExternalSystemRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) + ValidateEventThreatDetectionCustomModuleResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateExternalSystemRequest(); - if (object.externalSystem != null) { - if (typeof object.externalSystem !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateExternalSystemRequest.externalSystem: object expected"); - message.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.fromObject(object.externalSystem); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateExternalSystemRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse(); + if (object.errors != null) { + if (typeof object.errors !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse.errors: object expected"); + message.errors = $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors.fromObject(object.errors); } return message; }; /** - * Creates a plain object from an UpdateExternalSystemRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static - * @param {google.cloud.securitycenter.v1.UpdateExternalSystemRequest} message UpdateExternalSystemRequest + * @param {google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateExternalSystemRequest.toObject = function toObject(message, options) { + ValidateEventThreatDetectionCustomModuleResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.externalSystem = null; - object.updateMask = null; - } - if (message.externalSystem != null && message.hasOwnProperty("externalSystem")) - object.externalSystem = $root.google.cloud.securitycenter.v1.ExternalSystem.toObject(message.externalSystem, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.errors = null; + if (message.errors != null && message.hasOwnProperty("errors")) + object.errors = $root.google.cloud.securitycenter.v1.CustomModuleValidationErrors.toObject(message.errors, options); return object; }; /** - * Converts this UpdateExternalSystemRequest to JSON. + * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @instance * @returns {Object.} JSON object */ - UpdateExternalSystemRequest.prototype.toJSON = function toJSON() { + ValidateEventThreatDetectionCustomModuleResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateExternalSystemRequest + * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateExternalSystemRequest + * @memberof google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateExternalSystemRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidateEventThreatDetectionCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateExternalSystemRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse"; }; - return UpdateExternalSystemRequest; + return ValidateEventThreatDetectionCustomModuleResponse; })(); - v1.UpdateFindingRequest = (function() { + v1.DeleteEventThreatDetectionCustomModuleRequest = (function() { /** - * Properties of an UpdateFindingRequest. + * Properties of a DeleteEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateFindingRequest - * @property {google.cloud.securitycenter.v1.IFinding|null} [finding] UpdateFindingRequest finding - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFindingRequest updateMask + * @interface IDeleteEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] DeleteEventThreatDetectionCustomModuleRequest name */ /** - * Constructs a new UpdateFindingRequest. + * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateFindingRequest. - * @implements IUpdateFindingRequest + * @classdesc Represents a DeleteEventThreatDetectionCustomModuleRequest. + * @implements IDeleteEventThreatDetectionCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set */ - function UpdateFindingRequest(properties) { + function DeleteEventThreatDetectionCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41104,89 +56017,278 @@ } /** - * UpdateFindingRequest finding. - * @member {google.cloud.securitycenter.v1.IFinding|null|undefined} finding - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * DeleteEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest * @instance */ - UpdateFindingRequest.prototype.finding = null; + DeleteEventThreatDetectionCustomModuleRequest.prototype.name = ""; /** - * UpdateFindingRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest instance + */ + DeleteEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new DeleteEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventThreatDetectionCustomModuleRequest.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); + return writer; + }; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEventThreatDetectionCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + */ + DeleteEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest * @instance + * @returns {Object.} JSON object */ - UpdateFindingRequest.prototype.updateMask = null; + DeleteEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new UpdateFindingRequest instance using the specified properties. + * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest"; + }; + + return DeleteEventThreatDetectionCustomModuleRequest; + })(); + + v1.GetEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a GetEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @interface IGetEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] GetEventThreatDetectionCustomModuleRequest name + */ + + /** + * Constructs a new GetEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a GetEventThreatDetectionCustomModuleRequest. + * @implements IGetEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function GetEventThreatDetectionCustomModuleRequest(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]]; + } + + /** + * GetEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest + * @instance + */ + GetEventThreatDetectionCustomModuleRequest.prototype.name = ""; + + /** + * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest instance + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest instance */ - UpdateFindingRequest.create = function create(properties) { - return new UpdateFindingRequest(properties); + GetEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new GetEventThreatDetectionCustomModuleRequest(properties); }; /** - * Encodes the specified UpdateFindingRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encode = function encode(message, writer) { + GetEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycenter.v1.Finding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateFindingRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateFindingRequest.verify|verify} messages. + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateFindingRequest} message UpdateFindingRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer. + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decode = function decode(reader, length) { + GetEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.UpdateFindingRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.finding = $root.google.cloud.securitycenter.v1.Finding.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -41198,142 +56300,124 @@ }; /** - * Decodes an UpdateFindingRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFindingRequest.decodeDelimited = function decodeDelimited(reader) { + GetEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFindingRequest message. + * Verifies a GetEventThreatDetectionCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFindingRequest.verify = function verify(message) { + GetEventThreatDetectionCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.finding != null && message.hasOwnProperty("finding")) { - var error = $root.google.cloud.securitycenter.v1.Finding.verify(message.finding); - if (error) - return "finding." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateFindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateFindingRequest} UpdateFindingRequest + * @returns {google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest */ - UpdateFindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateFindingRequest) + GetEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateFindingRequest(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.finding: object expected"); - message.finding = $root.google.cloud.securitycenter.v1.Finding.fromObject(object.finding); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateFindingRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateFindingRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateFindingRequest} message UpdateFindingRequest + * @param {google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFindingRequest.toObject = function toObject(message, options) { + GetEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.finding = null; - object.updateMask = null; - } - if (message.finding != null && message.hasOwnProperty("finding")) - object.finding = $root.google.cloud.securitycenter.v1.Finding.toObject(message.finding, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateFindingRequest to JSON. + * Converts this GetEventThreatDetectionCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @instance * @returns {Object.} JSON object */ - UpdateFindingRequest.prototype.toJSON = function toJSON() { + GetEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateFindingRequest + * Gets the default type url for GetEventThreatDetectionCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateFindingRequest + * @memberof google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateFindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateFindingRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest"; }; - return UpdateFindingRequest; + return GetEventThreatDetectionCustomModuleRequest; })(); - v1.UpdateMuteConfigRequest = (function() { + v1.ListDescendantEventThreatDetectionCustomModulesRequest = (function() { /** - * Properties of an UpdateMuteConfigRequest. + * Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateMuteConfigRequest - * @property {google.cloud.securitycenter.v1.IMuteConfig|null} [muteConfig] UpdateMuteConfigRequest muteConfig - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMuteConfigRequest updateMask + * @interface IListDescendantEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListDescendantEventThreatDetectionCustomModulesRequest parent + * @property {string|null} [pageToken] ListDescendantEventThreatDetectionCustomModulesRequest pageToken + * @property {number|null} [pageSize] ListDescendantEventThreatDetectionCustomModulesRequest pageSize */ /** - * Constructs a new UpdateMuteConfigRequest. + * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateMuteConfigRequest. - * @implements IUpdateMuteConfigRequest + * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesRequest. + * @implements IListDescendantEventThreatDetectionCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set */ - function UpdateMuteConfigRequest(properties) { + function ListDescendantEventThreatDetectionCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41341,89 +56425,103 @@ } /** - * UpdateMuteConfigRequest muteConfig. - * @member {google.cloud.securitycenter.v1.IMuteConfig|null|undefined} muteConfig - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * ListDescendantEventThreatDetectionCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @instance */ - UpdateMuteConfigRequest.prototype.muteConfig = null; + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.parent = ""; /** - * UpdateMuteConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * ListDescendantEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @instance */ - UpdateMuteConfigRequest.prototype.updateMask = null; + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; /** - * Creates a new UpdateMuteConfigRequest instance using the specified properties. + * ListDescendantEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; + + /** + * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest instance */ - UpdateMuteConfigRequest.create = function create(properties) { - return new UpdateMuteConfigRequest(properties); + ListDescendantEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListDescendantEventThreatDetectionCustomModulesRequest(properties); }; /** - * Encodes the specified UpdateMuteConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} message UpdateMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMuteConfigRequest.encode = function encode(message, writer) { + ListDescendantEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.muteConfig != null && Object.hasOwnProperty.call(message, "muteConfig")) - $root.google.cloud.securitycenter.v1.MuteConfig.encode(message.muteConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateMuteConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateMuteConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateMuteConfigRequest} message UpdateMuteConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMuteConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDescendantEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer. + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMuteConfigRequest.decode = function decode(reader, length) { + ListDescendantEventThreatDetectionCustomModulesRequest.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.cloud.securitycenter.v1.UpdateMuteConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } default: @@ -41435,142 +56533,141 @@ }; /** - * Decodes an UpdateMuteConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMuteConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListDescendantEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMuteConfigRequest message. + * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMuteConfigRequest.verify = function verify(message) { + ListDescendantEventThreatDetectionCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) { - var error = $root.google.cloud.securitycenter.v1.MuteConfig.verify(message.muteConfig); - if (error) - return "muteConfig." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateMuteConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} UpdateMuteConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest */ - UpdateMuteConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest) + ListDescendantEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateMuteConfigRequest(); - if (object.muteConfig != null) { - if (typeof object.muteConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateMuteConfigRequest.muteConfig: object expected"); - message.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.fromObject(object.muteConfig); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateMuteConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateMuteConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateMuteConfigRequest} message UpdateMuteConfigRequest + * @param {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMuteConfigRequest.toObject = function toObject(message, options) { + ListDescendantEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.muteConfig = null; - object.updateMask = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.muteConfig != null && message.hasOwnProperty("muteConfig")) - object.muteConfig = $root.google.cloud.securitycenter.v1.MuteConfig.toObject(message.muteConfig, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateMuteConfigRequest to JSON. + * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @instance * @returns {Object.} JSON object */ - UpdateMuteConfigRequest.prototype.toJSON = function toJSON() { + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMuteConfigRequest + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateMuteConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMuteConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDescendantEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateMuteConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest"; }; - return UpdateMuteConfigRequest; + return ListDescendantEventThreatDetectionCustomModulesRequest; })(); - v1.UpdateNotificationConfigRequest = (function() { + v1.ListDescendantEventThreatDetectionCustomModulesResponse = (function() { /** - * Properties of an UpdateNotificationConfigRequest. + * Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateNotificationConfigRequest - * @property {google.cloud.securitycenter.v1.INotificationConfig|null} [notificationConfig] UpdateNotificationConfigRequest notificationConfig - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNotificationConfigRequest updateMask + * @interface IListDescendantEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [eventThreatDetectionCustomModules] ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken */ /** - * Constructs a new UpdateNotificationConfigRequest. + * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateNotificationConfigRequest. - * @implements IUpdateNotificationConfigRequest + * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesResponse. + * @implements IListDescendantEventThreatDetectionCustomModulesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set */ - function UpdateNotificationConfigRequest(properties) { + function ListDescendantEventThreatDetectionCustomModulesResponse(properties) { + this.eventThreatDetectionCustomModules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41578,89 +56675,92 @@ } /** - * UpdateNotificationConfigRequest notificationConfig. - * @member {google.cloud.securitycenter.v1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. + * @member {Array.} eventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @instance */ - UpdateNotificationConfigRequest.prototype.notificationConfig = null; + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; /** - * UpdateNotificationConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @instance */ - UpdateNotificationConfigRequest.prototype.updateMask = null; + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateNotificationConfigRequest instance using the specified properties. + * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest instance + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse instance */ - UpdateNotificationConfigRequest.create = function create(properties) { - return new UpdateNotificationConfigRequest(properties); + ListDescendantEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListDescendantEventThreatDetectionCustomModulesResponse(properties); }; /** - * Encodes the specified UpdateNotificationConfigRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} message UpdateNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateNotificationConfigRequest.encode = function encode(message, writer) { + ListDescendantEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.securitycenter.v1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateNotificationConfigRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.verify|verify} messages. + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateNotificationConfigRequest} message UpdateNotificationConfigRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateNotificationConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDescendantEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer. + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateNotificationConfigRequest.decode = function decode(reader, length) { + ListDescendantEventThreatDetectionCustomModulesResponse.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.cloud.securitycenter.v1.UpdateNotificationConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.decode(reader, reader.uint32()); + if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) + message.eventThreatDetectionCustomModules = []; + message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -41672,142 +56772,150 @@ }; /** - * Decodes an UpdateNotificationConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateNotificationConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListDescendantEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateNotificationConfigRequest message. + * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateNotificationConfigRequest.verify = function verify(message) { + ListDescendantEventThreatDetectionCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.securitycenter.v1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { + if (!Array.isArray(message.eventThreatDetectionCustomModules)) + return "eventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); + if (error) + return "eventThreatDetectionCustomModules." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateNotificationConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} UpdateNotificationConfigRequest + * @returns {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse */ - UpdateNotificationConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest) + ListDescendantEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest(); - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateNotificationConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); + if (object.eventThreatDetectionCustomModules) { + if (!Array.isArray(object.eventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); + message.eventThreatDetectionCustomModules = []; + for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { + if (typeof object.eventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); + message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateNotificationConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.UpdateNotificationConfigRequest} message UpdateNotificationConfigRequest + * @param {google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateNotificationConfigRequest.toObject = function toObject(message, options) { + ListDescendantEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.notificationConfig = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.eventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { + object.eventThreatDetectionCustomModules = []; + for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) + object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.securitycenter.v1.NotificationConfig.toObject(message.notificationConfig, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateNotificationConfigRequest to JSON. + * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @instance * @returns {Object.} JSON object */ - UpdateNotificationConfigRequest.prototype.toJSON = function toJSON() { + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateNotificationConfigRequest + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + * @memberof google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateNotificationConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDescendantEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateNotificationConfigRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse"; }; - return UpdateNotificationConfigRequest; + return ListDescendantEventThreatDetectionCustomModulesResponse; })(); - v1.UpdateOrganizationSettingsRequest = (function() { + v1.ListEventThreatDetectionCustomModulesRequest = (function() { /** - * Properties of an UpdateOrganizationSettingsRequest. + * Properties of a ListEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateOrganizationSettingsRequest - * @property {google.cloud.securitycenter.v1.IOrganizationSettings|null} [organizationSettings] UpdateOrganizationSettingsRequest organizationSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateOrganizationSettingsRequest updateMask + * @interface IListEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListEventThreatDetectionCustomModulesRequest parent + * @property {string|null} [pageToken] ListEventThreatDetectionCustomModulesRequest pageToken + * @property {number|null} [pageSize] ListEventThreatDetectionCustomModulesRequest pageSize */ /** - * Constructs a new UpdateOrganizationSettingsRequest. + * Constructs a new ListEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateOrganizationSettingsRequest. - * @implements IUpdateOrganizationSettingsRequest + * @classdesc Represents a ListEventThreatDetectionCustomModulesRequest. + * @implements IListEventThreatDetectionCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set */ - function UpdateOrganizationSettingsRequest(properties) { + function ListEventThreatDetectionCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41815,89 +56923,103 @@ } /** - * UpdateOrganizationSettingsRequest organizationSettings. - * @member {google.cloud.securitycenter.v1.IOrganizationSettings|null|undefined} organizationSettings - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * ListEventThreatDetectionCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @instance */ - UpdateOrganizationSettingsRequest.prototype.organizationSettings = null; + ListEventThreatDetectionCustomModulesRequest.prototype.parent = ""; /** - * UpdateOrganizationSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * ListEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @instance */ - UpdateOrganizationSettingsRequest.prototype.updateMask = null; + ListEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; /** - * Creates a new UpdateOrganizationSettingsRequest instance using the specified properties. + * ListEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; + + /** + * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest instance + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest instance */ - UpdateOrganizationSettingsRequest.create = function create(properties) { - return new UpdateOrganizationSettingsRequest(properties); + ListEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListEventThreatDetectionCustomModulesRequest(properties); }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encode = function encode(message, writer) { + ListEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.organizationSettings != null && Object.hasOwnProperty.call(message, "organizationSettings")) - $root.google.cloud.securitycenter.v1.OrganizationSettings.encode(message.organizationSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified UpdateOrganizationSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.verify|verify} messages. + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateOrganizationSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer. + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decode = function decode(reader, length) { + ListEventThreatDetectionCustomModulesRequest.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.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); break; } default: @@ -41909,142 +57031,141 @@ }; /** - * Decodes an UpdateOrganizationSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateOrganizationSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + ListEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateOrganizationSettingsRequest message. + * Verifies a ListEventThreatDetectionCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateOrganizationSettingsRequest.verify = function verify(message) { + ListEventThreatDetectionCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) { - var error = $root.google.cloud.securitycenter.v1.OrganizationSettings.verify(message.organizationSettings); - if (error) - return "organizationSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates an UpdateOrganizationSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} UpdateOrganizationSettingsRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest */ - UpdateOrganizationSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest) + ListEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest(); - if (object.organizationSettings != null) { - if (typeof object.organizationSettings !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.organizationSettings: object expected"); - message.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.fromObject(object.organizationSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from an UpdateOrganizationSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest} message UpdateOrganizationSettingsRequest + * @param {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateOrganizationSettingsRequest.toObject = function toObject(message, options) { + ListEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.organizationSettings = null; - object.updateMask = null; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.organizationSettings != null && message.hasOwnProperty("organizationSettings")) - object.organizationSettings = $root.google.cloud.securitycenter.v1.OrganizationSettings.toObject(message.organizationSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this UpdateOrganizationSettingsRequest to JSON. + * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @instance * @returns {Object.} JSON object */ - UpdateOrganizationSettingsRequest.prototype.toJSON = function toJSON() { + ListEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateOrganizationSettingsRequest + * Gets the default type url for ListEventThreatDetectionCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateOrganizationSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest"; }; - return UpdateOrganizationSettingsRequest; + return ListEventThreatDetectionCustomModulesRequest; })(); - v1.UpdateSecurityHealthAnalyticsCustomModuleRequest = (function() { + v1.ListEventThreatDetectionCustomModulesResponse = (function() { /** - * Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. + * Properties of a ListEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateSecurityHealthAnalyticsCustomModuleRequest - * @property {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask + * @interface IListEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [eventThreatDetectionCustomModules] ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListEventThreatDetectionCustomModulesResponse nextPageToken */ /** - * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. + * Constructs a new ListEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. - * @implements IUpdateSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a ListEventThreatDetectionCustomModulesResponse. + * @implements IListEventThreatDetectionCustomModulesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set */ - function UpdateSecurityHealthAnalyticsCustomModuleRequest(properties) { + function ListEventThreatDetectionCustomModulesResponse(properties) { + this.eventThreatDetectionCustomModules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42052,89 +57173,92 @@ } /** - * UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. - * @member {google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. + * @member {Array.} eventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @instance */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; + ListEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; /** - * UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * ListEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @instance */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.updateMask = null; + ListEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest instance + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse instance */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new UpdateSecurityHealthAnalyticsCustomModuleRequest(properties); + ListEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListEventThreatDetectionCustomModulesResponse(properties); }; /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + ListEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) - $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + ListEventThreatDetectionCustomModulesResponse.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.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); + if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) + message.eventThreatDetectionCustomModules = []; + message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -42146,142 +57270,149 @@ }; /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + ListEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. + * Verifies a ListEventThreatDetectionCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + ListEventThreatDetectionCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { - var error = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); - if (error) - return "securityHealthAnalyticsCustomModule." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { + if (!Array.isArray(message.eventThreatDetectionCustomModules)) + return "eventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); + if (error) + return "eventThreatDetectionCustomModules." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + * @returns {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest) + ListEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.securityHealthAnalyticsCustomModule != null) { - if (typeof object.securityHealthAnalyticsCustomModule !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse(); + if (object.eventThreatDetectionCustomModules) { + if (!Array.isArray(object.eventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); + message.eventThreatDetectionCustomModules = []; + for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { + if (typeof object.eventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); + message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest + * @param {google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + ListEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.securityHealthAnalyticsCustomModule = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.eventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { + object.eventThreatDetectionCustomModules = []; + for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) + object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); } - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) - object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @instance * @returns {Object.} JSON object */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + ListEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest + * Gets the default type url for ListEventThreatDetectionCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @memberof google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse"; }; - return UpdateSecurityHealthAnalyticsCustomModuleRequest; + return ListEventThreatDetectionCustomModulesResponse; })(); - v1.UpdateSourceRequest = (function() { + v1.UpdateEventThreatDetectionCustomModuleRequest = (function() { /** - * Properties of an UpdateSourceRequest. + * Properties of an UpdateEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateSourceRequest - * @property {google.cloud.securitycenter.v1.ISource|null} [source] UpdateSourceRequest source - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSourceRequest updateMask + * @interface IUpdateEventThreatDetectionCustomModuleRequest + * @property {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEventThreatDetectionCustomModuleRequest updateMask */ /** - * Constructs a new UpdateSourceRequest. + * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateSourceRequest. - * @implements IUpdateSourceRequest + * @classdesc Represents an UpdateEventThreatDetectionCustomModuleRequest. + * @implements IUpdateEventThreatDetectionCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set */ - function UpdateSourceRequest(properties) { + function UpdateEventThreatDetectionCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42289,85 +57420,85 @@ } /** - * UpdateSourceRequest source. - * @member {google.cloud.securitycenter.v1.ISource|null|undefined} source - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. + * @member {google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @instance */ - UpdateSourceRequest.prototype.source = null; + UpdateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; /** - * UpdateSourceRequest updateMask. + * UpdateEventThreatDetectionCustomModuleRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @instance */ - UpdateSourceRequest.prototype.updateMask = null; + UpdateEventThreatDetectionCustomModuleRequest.prototype.updateMask = null; /** - * Creates a new UpdateSourceRequest instance using the specified properties. + * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest instance + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest instance */ - UpdateSourceRequest.create = function create(properties) { - return new UpdateSourceRequest(properties); + UpdateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new UpdateEventThreatDetectionCustomModuleRequest(properties); }; /** - * Encodes the specified UpdateSourceRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encode = function encode(message, writer) { + UpdateEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.securitycenter.v1.Source.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) + $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateSourceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSourceRequest.verify|verify} messages. + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSourceRequest} message UpdateSourceRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer. + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decode = function decode(reader, length) { + UpdateEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.UpdateSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.source = $root.google.cloud.securitycenter.v1.Source.decode(reader, reader.uint32()); + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); break; } case 2: { @@ -42383,36 +57514,36 @@ }; /** - * Decodes an UpdateSourceRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSourceRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSourceRequest message. + * Verifies an UpdateEventThreatDetectionCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSourceRequest.verify = function verify(message) { + UpdateEventThreatDetectionCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.securitycenter.v1.Source.verify(message.source); + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { + var error = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); if (error) - return "source." + error; + return "eventThreatDetectionCustomModule." + error; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); @@ -42423,103 +57554,101 @@ }; /** - * Creates an UpdateSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateSourceRequest} UpdateSourceRequest + * @returns {google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest */ - UpdateSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSourceRequest) + UpdateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateSourceRequest(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.source: object expected"); - message.source = $root.google.cloud.securitycenter.v1.Source.fromObject(object.source); + var message = new $root.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest(); + if (object.eventThreatDetectionCustomModule != null) { + if (typeof object.eventThreatDetectionCustomModule !== "object") + throw TypeError(".google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSourceRequest.updateMask: object expected"); + throw TypeError(".google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from an UpdateSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateSourceRequest} message UpdateSourceRequest + * @param {google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSourceRequest.toObject = function toObject(message, options) { + UpdateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.source = null; + object.eventThreatDetectionCustomModule = null; object.updateMask = null; } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.securitycenter.v1.Source.toObject(message.source, options); + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) + object.eventThreatDetectionCustomModule = $root.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateSourceRequest to JSON. + * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @instance * @returns {Object.} JSON object */ - UpdateSourceRequest.prototype.toJSON = function toJSON() { + UpdateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSourceRequest + * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateSourceRequest + * @memberof google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSourceRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest"; }; - return UpdateSourceRequest; + return UpdateEventThreatDetectionCustomModuleRequest; })(); - v1.UpdateSecurityMarksRequest = (function() { + v1.GetEffectiveEventThreatDetectionCustomModuleRequest = (function() { /** - * Properties of an UpdateSecurityMarksRequest. + * Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateSecurityMarksRequest - * @property {google.cloud.securitycenter.v1.ISecurityMarks|null} [securityMarks] UpdateSecurityMarksRequest securityMarks - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityMarksRequest updateMask - * @property {google.protobuf.ITimestamp|null} [startTime] UpdateSecurityMarksRequest startTime + * @interface IGetEffectiveEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] GetEffectiveEventThreatDetectionCustomModuleRequest name */ /** - * Constructs a new UpdateSecurityMarksRequest. + * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateSecurityMarksRequest. - * @implements IUpdateSecurityMarksRequest + * @classdesc Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. + * @implements IGetEffectiveEventThreatDetectionCustomModuleRequest * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set */ - function UpdateSecurityMarksRequest(properties) { + function GetEffectiveEventThreatDetectionCustomModuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42527,103 +57656,75 @@ } /** - * UpdateSecurityMarksRequest securityMarks. - * @member {google.cloud.securitycenter.v1.ISecurityMarks|null|undefined} securityMarks - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - * @instance - */ - UpdateSecurityMarksRequest.prototype.securityMarks = null; - - /** - * UpdateSecurityMarksRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - * @instance - */ - UpdateSecurityMarksRequest.prototype.updateMask = null; - - /** - * UpdateSecurityMarksRequest startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * GetEffectiveEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @instance */ - UpdateSecurityMarksRequest.prototype.startTime = null; + GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.name = ""; /** - * Creates a new UpdateSecurityMarksRequest instance using the specified properties. + * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest instance + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest instance */ - UpdateSecurityMarksRequest.create = function create(properties) { - return new UpdateSecurityMarksRequest(properties); + GetEffectiveEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new GetEffectiveEventThreatDetectionCustomModuleRequest(properties); }; /** - * Encodes the specified UpdateSecurityMarksRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityMarksRequest.encode = function encode(message, writer) { + GetEffectiveEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.securityMarks != null && Object.hasOwnProperty.call(message, "securityMarks")) - $root.google.cloud.securitycenter.v1.SecurityMarks.encode(message.securityMarks, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateSecurityMarksRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.verify|verify} messages. + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.IUpdateSecurityMarksRequest} message UpdateSecurityMarksRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSecurityMarksRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEffectiveEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer. + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decode = function decode(reader, length) { + GetEffectiveEventThreatDetectionCustomModuleRequest.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.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -42635,156 +57736,124 @@ }; /** - * Decodes an UpdateSecurityMarksRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSecurityMarksRequest.decodeDelimited = function decodeDelimited(reader) { + GetEffectiveEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSecurityMarksRequest message. + * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSecurityMarksRequest.verify = function verify(message) { + GetEffectiveEventThreatDetectionCustomModuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) { - var error = $root.google.cloud.securitycenter.v1.SecurityMarks.verify(message.securityMarks); - if (error) - return "securityMarks." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateSecurityMarksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} UpdateSecurityMarksRequest + * @returns {google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest */ - UpdateSecurityMarksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest) + GetEffectiveEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest(); - if (object.securityMarks != null) { - if (typeof object.securityMarks !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.securityMarks: object expected"); - message.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.fromObject(object.securityMarks); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateSecurityMarksRequest.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } + var message = new $root.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateSecurityMarksRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static - * @param {google.cloud.securitycenter.v1.UpdateSecurityMarksRequest} message UpdateSecurityMarksRequest + * @param {google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSecurityMarksRequest.toObject = function toObject(message, options) { + GetEffectiveEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.securityMarks = null; - object.updateMask = null; - object.startTime = null; - } - if (message.securityMarks != null && message.hasOwnProperty("securityMarks")) - object.securityMarks = $root.google.cloud.securitycenter.v1.SecurityMarks.toObject(message.securityMarks, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateSecurityMarksRequest to JSON. + * Converts this GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @instance * @returns {Object.} JSON object */ - UpdateSecurityMarksRequest.prototype.toJSON = function toJSON() { + GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSecurityMarksRequest + * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + * @memberof google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSecurityMarksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEffectiveEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateSecurityMarksRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest"; }; - return UpdateSecurityMarksRequest; + return GetEffectiveEventThreatDetectionCustomModuleRequest; })(); - v1.CreateBigQueryExportRequest = (function() { + v1.ListEffectiveEventThreatDetectionCustomModulesRequest = (function() { /** - * Properties of a CreateBigQueryExportRequest. + * Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @interface ICreateBigQueryExportRequest - * @property {string|null} [parent] CreateBigQueryExportRequest parent - * @property {google.cloud.securitycenter.v1.IBigQueryExport|null} [bigQueryExport] CreateBigQueryExportRequest bigQueryExport - * @property {string|null} [bigQueryExportId] CreateBigQueryExportRequest bigQueryExportId + * @interface IListEffectiveEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListEffectiveEventThreatDetectionCustomModulesRequest parent + * @property {string|null} [pageToken] ListEffectiveEventThreatDetectionCustomModulesRequest pageToken + * @property {number|null} [pageSize] ListEffectiveEventThreatDetectionCustomModulesRequest pageSize */ /** - * Constructs a new CreateBigQueryExportRequest. + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a CreateBigQueryExportRequest. - * @implements ICreateBigQueryExportRequest + * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. + * @implements IListEffectiveEventThreatDetectionCustomModulesRequest * @constructor - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set */ - function CreateBigQueryExportRequest(properties) { + function ListEffectiveEventThreatDetectionCustomModulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42792,90 +57861,90 @@ } /** - * CreateBigQueryExportRequest parent. + * ListEffectiveEventThreatDetectionCustomModulesRequest parent. * @member {string} parent - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @instance */ - CreateBigQueryExportRequest.prototype.parent = ""; + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.parent = ""; /** - * CreateBigQueryExportRequest bigQueryExport. - * @member {google.cloud.securitycenter.v1.IBigQueryExport|null|undefined} bigQueryExport - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @instance */ - CreateBigQueryExportRequest.prototype.bigQueryExport = null; + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; /** - * CreateBigQueryExportRequest bigQueryExportId. - * @member {string} bigQueryExportId - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @instance */ - CreateBigQueryExportRequest.prototype.bigQueryExportId = ""; + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; /** - * Creates a new CreateBigQueryExportRequest instance using the specified properties. + * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest instance + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest instance */ - CreateBigQueryExportRequest.create = function create(properties) { - return new CreateBigQueryExportRequest(properties); + ListEffectiveEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListEffectiveEventThreatDetectionCustomModulesRequest(properties); }; /** - * Encodes the specified CreateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} message CreateBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBigQueryExportRequest.encode = function encode(message, writer) { + ListEffectiveEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.bigQueryExport != null && Object.hasOwnProperty.call(message, "bigQueryExport")) - $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.bigQueryExportId != null && Object.hasOwnProperty.call(message, "bigQueryExportId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.bigQueryExportId); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); return writer; }; /** - * Encodes the specified CreateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CreateBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.ICreateBigQueryExportRequest} message CreateBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEffectiveEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBigQueryExportRequest.decode = function decode(reader, length) { + ListEffectiveEventThreatDetectionCustomModulesRequest.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.cloud.securitycenter.v1.CreateBigQueryExportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -42884,11 +57953,11 @@ break; } case 2: { - message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 3: { - message.bigQueryExportId = reader.string(); + message.pageSize = reader.int32(); break; } default: @@ -42900,145 +57969,141 @@ }; /** - * Decodes a CreateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + ListEffectiveEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBigQueryExportRequest message. + * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest message. * @function verify - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBigQueryExportRequest.verify = function verify(message) { + ListEffectiveEventThreatDetectionCustomModulesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) { - var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExport); - if (error) - return "bigQueryExport." + error; - } - if (message.bigQueryExportId != null && message.hasOwnProperty("bigQueryExportId")) - if (!$util.isString(message.bigQueryExportId)) - return "bigQueryExportId: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; return null; }; /** - * Creates a CreateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} CreateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest */ - CreateBigQueryExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest) + ListEffectiveEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest) return object; - var message = new $root.google.cloud.securitycenter.v1.CreateBigQueryExportRequest(); + var message = new $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.bigQueryExport != null) { - if (typeof object.bigQueryExport !== "object") - throw TypeError(".google.cloud.securitycenter.v1.CreateBigQueryExportRequest.bigQueryExport: object expected"); - message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExport); - } - if (object.bigQueryExportId != null) - message.bigQueryExportId = String(object.bigQueryExportId); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; return message; }; /** - * Creates a plain object from a CreateBigQueryExportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static - * @param {google.cloud.securitycenter.v1.CreateBigQueryExportRequest} message CreateBigQueryExportRequest + * @param {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBigQueryExportRequest.toObject = function toObject(message, options) { + ListEffectiveEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.bigQueryExport = null; - object.bigQueryExportId = ""; + object.pageToken = ""; + object.pageSize = 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) - object.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExport, options); - if (message.bigQueryExportId != null && message.hasOwnProperty("bigQueryExportId")) - object.bigQueryExportId = message.bigQueryExportId; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; return object; }; /** - * Converts this CreateBigQueryExportRequest to JSON. + * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @instance * @returns {Object.} JSON object */ - CreateBigQueryExportRequest.prototype.toJSON = function toJSON() { + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBigQueryExportRequest + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.CreateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEffectiveEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.CreateBigQueryExportRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest"; }; - return CreateBigQueryExportRequest; + return ListEffectiveEventThreatDetectionCustomModulesRequest; })(); - v1.UpdateBigQueryExportRequest = (function() { + v1.ListEffectiveEventThreatDetectionCustomModulesResponse = (function() { /** - * Properties of an UpdateBigQueryExportRequest. + * Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @interface IUpdateBigQueryExportRequest - * @property {google.cloud.securitycenter.v1.IBigQueryExport|null} [bigQueryExport] UpdateBigQueryExportRequest bigQueryExport - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBigQueryExportRequest updateMask + * @interface IListEffectiveEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [effectiveEventThreatDetectionCustomModules] ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken */ /** - * Constructs a new UpdateBigQueryExportRequest. + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents an UpdateBigQueryExportRequest. - * @implements IUpdateBigQueryExportRequest + * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. + * @implements IListEffectiveEventThreatDetectionCustomModulesResponse * @constructor - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set */ - function UpdateBigQueryExportRequest(properties) { + function ListEffectiveEventThreatDetectionCustomModulesResponse(properties) { + this.effectiveEventThreatDetectionCustomModules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43046,89 +58111,92 @@ } /** - * UpdateBigQueryExportRequest bigQueryExport. - * @member {google.cloud.securitycenter.v1.IBigQueryExport|null|undefined} bigQueryExport - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. + * @member {Array.} effectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @instance */ - UpdateBigQueryExportRequest.prototype.bigQueryExport = null; + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.effectiveEventThreatDetectionCustomModules = $util.emptyArray; /** - * UpdateBigQueryExportRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @instance */ - UpdateBigQueryExportRequest.prototype.updateMask = null; + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateBigQueryExportRequest instance using the specified properties. + * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest instance + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse instance */ - UpdateBigQueryExportRequest.create = function create(properties) { - return new UpdateBigQueryExportRequest(properties); + ListEffectiveEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListEffectiveEventThreatDetectionCustomModulesResponse(properties); }; /** - * Encodes the specified UpdateBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} message UpdateBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBigQueryExportRequest.encode = function encode(message, writer) { + ListEffectiveEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigQueryExport != null && Object.hasOwnProperty.call(message, "bigQueryExport")) - $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.effectiveEventThreatDetectionCustomModules != null && message.effectiveEventThreatDetectionCustomModules.length) + for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.encode(message.effectiveEventThreatDetectionCustomModules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.IUpdateBigQueryExportRequest} message UpdateBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEffectiveEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBigQueryExportRequest.decode = function decode(reader, length) { + ListEffectiveEventThreatDetectionCustomModulesResponse.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.cloud.securitycenter.v1.UpdateBigQueryExportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32()); + if (!(message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length)) + message.effectiveEventThreatDetectionCustomModules = []; + message.effectiveEventThreatDetectionCustomModules.push($root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -43140,143 +58208,152 @@ }; /** - * Decodes an UpdateBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + ListEffectiveEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBigQueryExportRequest message. + * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse message. * @function verify - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBigQueryExportRequest.verify = function verify(message) { + ListEffectiveEventThreatDetectionCustomModulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) { - var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExport); - if (error) - return "bigQueryExport." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.effectiveEventThreatDetectionCustomModules != null && message.hasOwnProperty("effectiveEventThreatDetectionCustomModules")) { + if (!Array.isArray(message.effectiveEventThreatDetectionCustomModules)) + return "effectiveEventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.verify(message.effectiveEventThreatDetectionCustomModules[i]); + if (error) + return "effectiveEventThreatDetectionCustomModules." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} UpdateBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse */ - UpdateBigQueryExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest) + ListEffectiveEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) return object; - var message = new $root.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest(); - if (object.bigQueryExport != null) { - if (typeof object.bigQueryExport !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.bigQueryExport: object expected"); - message.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExport); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycenter.v1.UpdateBigQueryExportRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); + if (object.effectiveEventThreatDetectionCustomModules) { + if (!Array.isArray(object.effectiveEventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: array expected"); + message.effectiveEventThreatDetectionCustomModules = []; + for (var i = 0; i < object.effectiveEventThreatDetectionCustomModules.length; ++i) { + if (typeof object.effectiveEventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: object expected"); + message.effectiveEventThreatDetectionCustomModules[i] = $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.fromObject(object.effectiveEventThreatDetectionCustomModules[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateBigQueryExportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static - * @param {google.cloud.securitycenter.v1.UpdateBigQueryExportRequest} message UpdateBigQueryExportRequest + * @param {google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBigQueryExportRequest.toObject = function toObject(message, options) { + ListEffectiveEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.bigQueryExport = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.effectiveEventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length) { + object.effectiveEventThreatDetectionCustomModules = []; + for (var j = 0; j < message.effectiveEventThreatDetectionCustomModules.length; ++j) + object.effectiveEventThreatDetectionCustomModules[j] = $root.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.toObject(message.effectiveEventThreatDetectionCustomModules[j], options); } - if (message.bigQueryExport != null && message.hasOwnProperty("bigQueryExport")) - object.bigQueryExport = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExport, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateBigQueryExportRequest to JSON. + * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @instance * @returns {Object.} JSON object */ - UpdateBigQueryExportRequest.prototype.toJSON = function toJSON() { + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateBigQueryExportRequest + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEffectiveEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.UpdateBigQueryExportRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse"; }; - return UpdateBigQueryExportRequest; + return ListEffectiveEventThreatDetectionCustomModulesResponse; })(); - v1.ListBigQueryExportsRequest = (function() { + v1.Simulation = (function() { /** - * Properties of a ListBigQueryExportsRequest. + * Properties of a Simulation. * @memberof google.cloud.securitycenter.v1 - * @interface IListBigQueryExportsRequest - * @property {string|null} [parent] ListBigQueryExportsRequest parent - * @property {number|null} [pageSize] ListBigQueryExportsRequest pageSize - * @property {string|null} [pageToken] ListBigQueryExportsRequest pageToken + * @interface ISimulation + * @property {string|null} [name] Simulation name + * @property {google.protobuf.ITimestamp|null} [createTime] Simulation createTime + * @property {Array.|null} [resourceValueConfigsMetadata] Simulation resourceValueConfigsMetadata + * @property {google.cloud.securitycenter.v1.CloudProvider|null} [cloudProvider] Simulation cloudProvider */ /** - * Constructs a new ListBigQueryExportsRequest. + * Constructs a new Simulation. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListBigQueryExportsRequest. - * @implements IListBigQueryExportsRequest + * @classdesc Represents a Simulation. + * @implements ISimulation * @constructor - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.ISimulation=} [properties] Properties to set */ - function ListBigQueryExportsRequest(properties) { + function Simulation(properties) { + this.resourceValueConfigsMetadata = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43284,103 +58361,120 @@ } /** - * ListBigQueryExportsRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * Simulation name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.Simulation * @instance */ - ListBigQueryExportsRequest.prototype.parent = ""; + Simulation.prototype.name = ""; /** - * ListBigQueryExportsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * Simulation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.securitycenter.v1.Simulation * @instance */ - ListBigQueryExportsRequest.prototype.pageSize = 0; + Simulation.prototype.createTime = null; /** - * ListBigQueryExportsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * Simulation resourceValueConfigsMetadata. + * @member {Array.} resourceValueConfigsMetadata + * @memberof google.cloud.securitycenter.v1.Simulation * @instance */ - ListBigQueryExportsRequest.prototype.pageToken = ""; + Simulation.prototype.resourceValueConfigsMetadata = $util.emptyArray; /** - * Creates a new ListBigQueryExportsRequest instance using the specified properties. + * Simulation cloudProvider. + * @member {google.cloud.securitycenter.v1.CloudProvider} cloudProvider + * @memberof google.cloud.securitycenter.v1.Simulation + * @instance + */ + Simulation.prototype.cloudProvider = 0; + + /** + * Creates a new Simulation instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest instance + * @param {google.cloud.securitycenter.v1.ISimulation=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.Simulation} Simulation instance */ - ListBigQueryExportsRequest.create = function create(properties) { - return new ListBigQueryExportsRequest(properties); + Simulation.create = function create(properties) { + return new Simulation(properties); }; /** - * Encodes the specified ListBigQueryExportsRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. + * Encodes the specified Simulation message. Does not implicitly {@link google.cloud.securitycenter.v1.Simulation.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} message ListBigQueryExportsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulation} message Simulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryExportsRequest.encode = function encode(message, writer) { + Simulation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceValueConfigsMetadata != null && message.resourceValueConfigsMetadata.length) + for (var i = 0; i < message.resourceValueConfigsMetadata.length; ++i) + $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.encode(message.resourceValueConfigsMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudProvider != null && Object.hasOwnProperty.call(message, "cloudProvider")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.cloudProvider); return writer; }; /** - * Encodes the specified ListBigQueryExportsRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsRequest.verify|verify} messages. + * Encodes the specified Simulation message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.Simulation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsRequest} message ListBigQueryExportsRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.ISimulation} message Simulation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryExportsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Simulation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer. + * Decodes a Simulation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest + * @returns {google.cloud.securitycenter.v1.Simulation} Simulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryExportsRequest.decode = function decode(reader, length) { + Simulation.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.cloud.securitycenter.v1.ListBigQueryExportsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.Simulation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + if (!(message.resourceValueConfigsMetadata && message.resourceValueConfigsMetadata.length)) + message.resourceValueConfigsMetadata = []; + message.resourceValueConfigsMetadata.push($root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.decode(reader, reader.uint32())); + break; + } + case 4: { + message.cloudProvider = reader.int32(); break; } default: @@ -43392,141 +58486,206 @@ }; /** - * Decodes a ListBigQueryExportsRequest message from the specified reader or buffer, length delimited. + * Decodes a Simulation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest + * @returns {google.cloud.securitycenter.v1.Simulation} Simulation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryExportsRequest.decodeDelimited = function decodeDelimited(reader) { + Simulation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryExportsRequest message. + * Verifies a Simulation message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryExportsRequest.verify = function verify(message) { + Simulation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.resourceValueConfigsMetadata != null && message.hasOwnProperty("resourceValueConfigsMetadata")) { + if (!Array.isArray(message.resourceValueConfigsMetadata)) + return "resourceValueConfigsMetadata: array expected"; + for (var i = 0; i < message.resourceValueConfigsMetadata.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify(message.resourceValueConfigsMetadata[i]); + if (error) + return "resourceValueConfigsMetadata." + error; + } + } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + switch (message.cloudProvider) { + default: + return "cloudProvider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a ListBigQueryExportsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Simulation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} ListBigQueryExportsRequest + * @returns {google.cloud.securitycenter.v1.Simulation} Simulation */ - ListBigQueryExportsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest) + Simulation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.Simulation) return object; - var message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.securitycenter.v1.Simulation(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Simulation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.resourceValueConfigsMetadata) { + if (!Array.isArray(object.resourceValueConfigsMetadata)) + throw TypeError(".google.cloud.securitycenter.v1.Simulation.resourceValueConfigsMetadata: array expected"); + message.resourceValueConfigsMetadata = []; + for (var i = 0; i < object.resourceValueConfigsMetadata.length; ++i) { + if (typeof object.resourceValueConfigsMetadata[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Simulation.resourceValueConfigsMetadata: object expected"); + message.resourceValueConfigsMetadata[i] = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.fromObject(object.resourceValueConfigsMetadata[i]); + } + } + switch (object.cloudProvider) { + default: + if (typeof object.cloudProvider === "number") { + message.cloudProvider = object.cloudProvider; + break; + } + break; + case "CLOUD_PROVIDER_UNSPECIFIED": + case 0: + message.cloudProvider = 0; + break; + case "GOOGLE_CLOUD_PLATFORM": + case 1: + message.cloudProvider = 1; + break; + case "AMAZON_WEB_SERVICES": + case 2: + message.cloudProvider = 2; + break; + case "MICROSOFT_AZURE": + case 3: + message.cloudProvider = 3; + break; + } return message; }; /** - * Creates a plain object from a ListBigQueryExportsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Simulation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static - * @param {google.cloud.securitycenter.v1.ListBigQueryExportsRequest} message ListBigQueryExportsRequest + * @param {google.cloud.securitycenter.v1.Simulation} message Simulation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryExportsRequest.toObject = function toObject(message, options) { + Simulation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceValueConfigsMetadata = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.createTime = null; + object.cloudProvider = options.enums === String ? "CLOUD_PROVIDER_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.resourceValueConfigsMetadata && message.resourceValueConfigsMetadata.length) { + object.resourceValueConfigsMetadata = []; + for (var j = 0; j < message.resourceValueConfigsMetadata.length; ++j) + object.resourceValueConfigsMetadata[j] = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.toObject(message.resourceValueConfigsMetadata[j], options); + } + if (message.cloudProvider != null && message.hasOwnProperty("cloudProvider")) + object.cloudProvider = options.enums === String ? $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] === undefined ? message.cloudProvider : $root.google.cloud.securitycenter.v1.CloudProvider[message.cloudProvider] : message.cloudProvider; return object; }; /** - * Converts this ListBigQueryExportsRequest to JSON. + * Converts this Simulation to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @instance * @returns {Object.} JSON object */ - ListBigQueryExportsRequest.prototype.toJSON = function toJSON() { + Simulation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryExportsRequest + * Gets the default type url for Simulation * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsRequest + * @memberof google.cloud.securitycenter.v1.Simulation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryExportsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Simulation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListBigQueryExportsRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.Simulation"; }; - return ListBigQueryExportsRequest; + return Simulation; })(); - v1.ListBigQueryExportsResponse = (function() { + v1.ValuedResource = (function() { /** - * Properties of a ListBigQueryExportsResponse. + * Properties of a ValuedResource. * @memberof google.cloud.securitycenter.v1 - * @interface IListBigQueryExportsResponse - * @property {Array.|null} [bigQueryExports] ListBigQueryExportsResponse bigQueryExports - * @property {string|null} [nextPageToken] ListBigQueryExportsResponse nextPageToken + * @interface IValuedResource + * @property {string|null} [name] ValuedResource name + * @property {string|null} [resource] ValuedResource resource + * @property {string|null} [resourceType] ValuedResource resourceType + * @property {string|null} [displayName] ValuedResource displayName + * @property {google.cloud.securitycenter.v1.ValuedResource.ResourceValue|null} [resourceValue] ValuedResource resourceValue + * @property {number|null} [exposedScore] ValuedResource exposedScore + * @property {Array.|null} [resourceValueConfigsUsed] ValuedResource resourceValueConfigsUsed */ /** - * Constructs a new ListBigQueryExportsResponse. + * Constructs a new ValuedResource. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a ListBigQueryExportsResponse. - * @implements IListBigQueryExportsResponse + * @classdesc Represents a ValuedResource. + * @implements IValuedResource * @constructor - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IValuedResource=} [properties] Properties to set */ - function ListBigQueryExportsResponse(properties) { - this.bigQueryExports = []; + function ValuedResource(properties) { + this.resourceValueConfigsUsed = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43534,92 +58693,162 @@ } /** - * ListBigQueryExportsResponse bigQueryExports. - * @member {Array.} bigQueryExports - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * ValuedResource name. + * @member {string} name + * @memberof google.cloud.securitycenter.v1.ValuedResource * @instance */ - ListBigQueryExportsResponse.prototype.bigQueryExports = $util.emptyArray; + ValuedResource.prototype.name = ""; /** - * ListBigQueryExportsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * ValuedResource resource. + * @member {string} resource + * @memberof google.cloud.securitycenter.v1.ValuedResource * @instance */ - ListBigQueryExportsResponse.prototype.nextPageToken = ""; + ValuedResource.prototype.resource = ""; /** - * Creates a new ListBigQueryExportsResponse instance using the specified properties. + * ValuedResource resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycenter.v1.ValuedResource + * @instance + */ + ValuedResource.prototype.resourceType = ""; + + /** + * ValuedResource displayName. + * @member {string} displayName + * @memberof google.cloud.securitycenter.v1.ValuedResource + * @instance + */ + ValuedResource.prototype.displayName = ""; + + /** + * ValuedResource resourceValue. + * @member {google.cloud.securitycenter.v1.ValuedResource.ResourceValue} resourceValue + * @memberof google.cloud.securitycenter.v1.ValuedResource + * @instance + */ + ValuedResource.prototype.resourceValue = 0; + + /** + * ValuedResource exposedScore. + * @member {number} exposedScore + * @memberof google.cloud.securitycenter.v1.ValuedResource + * @instance + */ + ValuedResource.prototype.exposedScore = 0; + + /** + * ValuedResource resourceValueConfigsUsed. + * @member {Array.} resourceValueConfigsUsed + * @memberof google.cloud.securitycenter.v1.ValuedResource + * @instance + */ + ValuedResource.prototype.resourceValueConfigsUsed = $util.emptyArray; + + /** + * Creates a new ValuedResource instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse instance + * @param {google.cloud.securitycenter.v1.IValuedResource=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ValuedResource} ValuedResource instance */ - ListBigQueryExportsResponse.create = function create(properties) { - return new ListBigQueryExportsResponse(properties); + ValuedResource.create = function create(properties) { + return new ValuedResource(properties); }; /** - * Encodes the specified ListBigQueryExportsResponse message. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. + * Encodes the specified ValuedResource message. Does not implicitly {@link google.cloud.securitycenter.v1.ValuedResource.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse} message ListBigQueryExportsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IValuedResource} message ValuedResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryExportsResponse.encode = function encode(message, writer) { + ValuedResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigQueryExports != null && message.bigQueryExports.length) - for (var i = 0; i < message.bigQueryExports.length; ++i) - $root.google.cloud.securitycenter.v1.BigQueryExport.encode(message.bigQueryExports[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resource); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceType); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.resourceValue != null && Object.hasOwnProperty.call(message, "resourceValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.resourceValue); + if (message.exposedScore != null && Object.hasOwnProperty.call(message, "exposedScore")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.exposedScore); + if (message.resourceValueConfigsUsed != null && message.resourceValueConfigsUsed.length) + for (var i = 0; i < message.resourceValueConfigsUsed.length; ++i) + $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.encode(message.resourceValueConfigsUsed[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBigQueryExportsResponse message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ListBigQueryExportsResponse.verify|verify} messages. + * Encodes the specified ValuedResource message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ValuedResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static - * @param {google.cloud.securitycenter.v1.IListBigQueryExportsResponse} message ListBigQueryExportsResponse message or plain object to encode + * @param {google.cloud.securitycenter.v1.IValuedResource} message ValuedResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryExportsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ValuedResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer. + * Decodes a ValuedResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse + * @returns {google.cloud.securitycenter.v1.ValuedResource} ValuedResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryExportsResponse.decode = function decode(reader, length) { + ValuedResource.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.cloud.securitycenter.v1.ListBigQueryExportsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ValuedResource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.bigQueryExports && message.bigQueryExports.length)) - message.bigQueryExports = []; - message.bigQueryExports.push($root.google.cloud.securitycenter.v1.BigQueryExport.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.resource = reader.string(); + break; + } + case 3: { + message.resourceType = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.resourceValue = reader.int32(); + break; + } + case 6: { + message.exposedScore = reader.double(); + break; + } + case 7: { + if (!(message.resourceValueConfigsUsed && message.resourceValueConfigsUsed.length)) + message.resourceValueConfigsUsed = []; + message.resourceValueConfigsUsed.push($root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.decode(reader, reader.uint32())); break; } default: @@ -43631,148 +58860,236 @@ }; /** - * Decodes a ListBigQueryExportsResponse message from the specified reader or buffer, length delimited. + * Decodes a ValuedResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse + * @returns {google.cloud.securitycenter.v1.ValuedResource} ValuedResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryExportsResponse.decodeDelimited = function decodeDelimited(reader) { + ValuedResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryExportsResponse message. + * Verifies a ValuedResource message. * @function verify - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryExportsResponse.verify = function verify(message) { + ValuedResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bigQueryExports != null && message.hasOwnProperty("bigQueryExports")) { - if (!Array.isArray(message.bigQueryExports)) - return "bigQueryExports: array expected"; - for (var i = 0; i < message.bigQueryExports.length; ++i) { - var error = $root.google.cloud.securitycenter.v1.BigQueryExport.verify(message.bigQueryExports[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.resourceValue != null && message.hasOwnProperty("resourceValue")) + switch (message.resourceValue) { + default: + return "resourceValue: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exposedScore != null && message.hasOwnProperty("exposedScore")) + if (typeof message.exposedScore !== "number") + return "exposedScore: number expected"; + if (message.resourceValueConfigsUsed != null && message.hasOwnProperty("resourceValueConfigsUsed")) { + if (!Array.isArray(message.resourceValueConfigsUsed)) + return "resourceValueConfigsUsed: array expected"; + for (var i = 0; i < message.resourceValueConfigsUsed.length; ++i) { + var error = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify(message.resourceValueConfigsUsed[i]); if (error) - return "bigQueryExports." + error; + return "resourceValueConfigsUsed." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBigQueryExportsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ValuedResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} ListBigQueryExportsResponse + * @returns {google.cloud.securitycenter.v1.ValuedResource} ValuedResource */ - ListBigQueryExportsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse) + ValuedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ValuedResource) return object; - var message = new $root.google.cloud.securitycenter.v1.ListBigQueryExportsResponse(); - if (object.bigQueryExports) { - if (!Array.isArray(object.bigQueryExports)) - throw TypeError(".google.cloud.securitycenter.v1.ListBigQueryExportsResponse.bigQueryExports: array expected"); - message.bigQueryExports = []; - for (var i = 0; i < object.bigQueryExports.length; ++i) { - if (typeof object.bigQueryExports[i] !== "object") - throw TypeError(".google.cloud.securitycenter.v1.ListBigQueryExportsResponse.bigQueryExports: object expected"); - message.bigQueryExports[i] = $root.google.cloud.securitycenter.v1.BigQueryExport.fromObject(object.bigQueryExports[i]); + var message = new $root.google.cloud.securitycenter.v1.ValuedResource(); + if (object.name != null) + message.name = String(object.name); + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.resourceValue) { + default: + if (typeof object.resourceValue === "number") { + message.resourceValue = object.resourceValue; + break; + } + break; + case "RESOURCE_VALUE_UNSPECIFIED": + case 0: + message.resourceValue = 0; + break; + case "RESOURCE_VALUE_LOW": + case 1: + message.resourceValue = 1; + break; + case "RESOURCE_VALUE_MEDIUM": + case 2: + message.resourceValue = 2; + break; + case "RESOURCE_VALUE_HIGH": + case 3: + message.resourceValue = 3; + break; + } + if (object.exposedScore != null) + message.exposedScore = Number(object.exposedScore); + if (object.resourceValueConfigsUsed) { + if (!Array.isArray(object.resourceValueConfigsUsed)) + throw TypeError(".google.cloud.securitycenter.v1.ValuedResource.resourceValueConfigsUsed: array expected"); + message.resourceValueConfigsUsed = []; + for (var i = 0; i < object.resourceValueConfigsUsed.length; ++i) { + if (typeof object.resourceValueConfigsUsed[i] !== "object") + throw TypeError(".google.cloud.securitycenter.v1.ValuedResource.resourceValueConfigsUsed: object expected"); + message.resourceValueConfigsUsed[i] = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.fromObject(object.resourceValueConfigsUsed[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBigQueryExportsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ValuedResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static - * @param {google.cloud.securitycenter.v1.ListBigQueryExportsResponse} message ListBigQueryExportsResponse + * @param {google.cloud.securitycenter.v1.ValuedResource} message ValuedResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryExportsResponse.toObject = function toObject(message, options) { + ValuedResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.bigQueryExports = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.bigQueryExports && message.bigQueryExports.length) { - object.bigQueryExports = []; - for (var j = 0; j < message.bigQueryExports.length; ++j) - object.bigQueryExports[j] = $root.google.cloud.securitycenter.v1.BigQueryExport.toObject(message.bigQueryExports[j], options); + object.resourceValueConfigsUsed = []; + if (options.defaults) { + object.name = ""; + object.resource = ""; + object.resourceType = ""; + object.displayName = ""; + object.resourceValue = options.enums === String ? "RESOURCE_VALUE_UNSPECIFIED" : 0; + object.exposedScore = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.resourceValue != null && message.hasOwnProperty("resourceValue")) + object.resourceValue = options.enums === String ? $root.google.cloud.securitycenter.v1.ValuedResource.ResourceValue[message.resourceValue] === undefined ? message.resourceValue : $root.google.cloud.securitycenter.v1.ValuedResource.ResourceValue[message.resourceValue] : message.resourceValue; + if (message.exposedScore != null && message.hasOwnProperty("exposedScore")) + object.exposedScore = options.json && !isFinite(message.exposedScore) ? String(message.exposedScore) : message.exposedScore; + if (message.resourceValueConfigsUsed && message.resourceValueConfigsUsed.length) { + object.resourceValueConfigsUsed = []; + for (var j = 0; j < message.resourceValueConfigsUsed.length; ++j) + object.resourceValueConfigsUsed[j] = $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata.toObject(message.resourceValueConfigsUsed[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListBigQueryExportsResponse to JSON. + * Converts this ValuedResource to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @instance * @returns {Object.} JSON object */ - ListBigQueryExportsResponse.prototype.toJSON = function toJSON() { + ValuedResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryExportsResponse + * Gets the default type url for ValuedResource * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.ListBigQueryExportsResponse + * @memberof google.cloud.securitycenter.v1.ValuedResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryExportsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValuedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.ListBigQueryExportsResponse"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ValuedResource"; }; - return ListBigQueryExportsResponse; + /** + * ResourceValue enum. + * @name google.cloud.securitycenter.v1.ValuedResource.ResourceValue + * @enum {number} + * @property {number} RESOURCE_VALUE_UNSPECIFIED=0 RESOURCE_VALUE_UNSPECIFIED value + * @property {number} RESOURCE_VALUE_LOW=1 RESOURCE_VALUE_LOW value + * @property {number} RESOURCE_VALUE_MEDIUM=2 RESOURCE_VALUE_MEDIUM value + * @property {number} RESOURCE_VALUE_HIGH=3 RESOURCE_VALUE_HIGH value + */ + ValuedResource.ResourceValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_VALUE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_VALUE_LOW"] = 1; + values[valuesById[2] = "RESOURCE_VALUE_MEDIUM"] = 2; + values[valuesById[3] = "RESOURCE_VALUE_HIGH"] = 3; + return values; + })(); + + return ValuedResource; })(); - v1.DeleteBigQueryExportRequest = (function() { + v1.ResourceValueConfigMetadata = (function() { /** - * Properties of a DeleteBigQueryExportRequest. + * Properties of a ResourceValueConfigMetadata. * @memberof google.cloud.securitycenter.v1 - * @interface IDeleteBigQueryExportRequest - * @property {string|null} [name] DeleteBigQueryExportRequest name + * @interface IResourceValueConfigMetadata + * @property {string|null} [name] ResourceValueConfigMetadata name */ /** - * Constructs a new DeleteBigQueryExportRequest. + * Constructs a new ResourceValueConfigMetadata. * @memberof google.cloud.securitycenter.v1 - * @classdesc Represents a DeleteBigQueryExportRequest. - * @implements IDeleteBigQueryExportRequest + * @classdesc Represents a ResourceValueConfigMetadata. + * @implements IResourceValueConfigMetadata * @constructor - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest=} [properties] Properties to set + * @param {google.cloud.securitycenter.v1.IResourceValueConfigMetadata=} [properties] Properties to set */ - function DeleteBigQueryExportRequest(properties) { + function ResourceValueConfigMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43780,35 +59097,35 @@ } /** - * DeleteBigQueryExportRequest name. + * ResourceValueConfigMetadata name. * @member {string} name - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @instance */ - DeleteBigQueryExportRequest.prototype.name = ""; + ResourceValueConfigMetadata.prototype.name = ""; /** - * Creates a new DeleteBigQueryExportRequest instance using the specified properties. + * Creates a new ResourceValueConfigMetadata instance using the specified properties. * @function create - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest=} [properties] Properties to set - * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest instance + * @param {google.cloud.securitycenter.v1.IResourceValueConfigMetadata=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.ResourceValueConfigMetadata} ResourceValueConfigMetadata instance */ - DeleteBigQueryExportRequest.create = function create(properties) { - return new DeleteBigQueryExportRequest(properties); + ResourceValueConfigMetadata.create = function create(properties) { + return new ResourceValueConfigMetadata(properties); }; /** - * Encodes the specified DeleteBigQueryExportRequest message. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ResourceValueConfigMetadata message. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} message DeleteBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IResourceValueConfigMetadata} message ResourceValueConfigMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBigQueryExportRequest.encode = function encode(message, writer) { + ResourceValueConfigMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -43817,33 +59134,33 @@ }; /** - * Encodes the specified DeleteBigQueryExportRequest message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.verify|verify} messages. + * Encodes the specified ResourceValueConfigMetadata message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.ResourceValueConfigMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static - * @param {google.cloud.securitycenter.v1.IDeleteBigQueryExportRequest} message DeleteBigQueryExportRequest message or plain object to encode + * @param {google.cloud.securitycenter.v1.IResourceValueConfigMetadata} message ResourceValueConfigMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBigQueryExportRequest.encodeDelimited = function encodeDelimited(message, writer) { + ResourceValueConfigMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer. + * Decodes a ResourceValueConfigMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ResourceValueConfigMetadata} ResourceValueConfigMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBigQueryExportRequest.decode = function decode(reader, length) { + ResourceValueConfigMetadata.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.cloud.securitycenter.v1.DeleteBigQueryExportRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -43860,30 +59177,30 @@ }; /** - * Decodes a DeleteBigQueryExportRequest message from the specified reader or buffer, length delimited. + * Decodes a ResourceValueConfigMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ResourceValueConfigMetadata} ResourceValueConfigMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBigQueryExportRequest.decodeDelimited = function decodeDelimited(reader) { + ResourceValueConfigMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBigQueryExportRequest message. + * Verifies a ResourceValueConfigMetadata message. * @function verify - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBigQueryExportRequest.verify = function verify(message) { + ResourceValueConfigMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -43893,32 +59210,32 @@ }; /** - * Creates a DeleteBigQueryExportRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceValueConfigMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} DeleteBigQueryExportRequest + * @returns {google.cloud.securitycenter.v1.ResourceValueConfigMetadata} ResourceValueConfigMetadata */ - DeleteBigQueryExportRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest) + ResourceValueConfigMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata) return object; - var message = new $root.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest(); + var message = new $root.google.cloud.securitycenter.v1.ResourceValueConfigMetadata(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteBigQueryExportRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResourceValueConfigMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static - * @param {google.cloud.securitycenter.v1.DeleteBigQueryExportRequest} message DeleteBigQueryExportRequest + * @param {google.cloud.securitycenter.v1.ResourceValueConfigMetadata} message ResourceValueConfigMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBigQueryExportRequest.toObject = function toObject(message, options) { + ResourceValueConfigMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -43930,32 +59247,32 @@ }; /** - * Converts this DeleteBigQueryExportRequest to JSON. + * Converts this ResourceValueConfigMetadata to JSON. * @function toJSON - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @instance * @returns {Object.} JSON object */ - DeleteBigQueryExportRequest.prototype.toJSON = function toJSON() { + ResourceValueConfigMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBigQueryExportRequest + * Gets the default type url for ResourceValueConfigMetadata * @function getTypeUrl - * @memberof google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + * @memberof google.cloud.securitycenter.v1.ResourceValueConfigMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBigQueryExportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceValueConfigMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.securitycenter.v1.DeleteBigQueryExportRequest"; + return typeUrlPrefix + "/google.cloud.securitycenter.v1.ResourceValueConfigMetadata"; }; - return DeleteBigQueryExportRequest; + return ResourceValueConfigMetadata; })(); v1.Source = (function() { diff --git a/packages/google-cloud-securitycenter/protos/protos.json b/packages/google-cloud-securitycenter/protos/protos.json index eca340dab11f..fa8ae977af04 100644 --- a/packages/google-cloud-securitycenter/protos/protos.json +++ b/packages/google-cloud-securitycenter/protos/protos.json @@ -11,12 +11,12 @@ "csharp_namespace": "Google.Cloud.SecurityCenter.V1", "go_package": "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb", "java_multiple_files": true, - "java_outer_classname": "SecurityHealthAnalyticsCustomModuleProto", + "java_outer_classname": "ValuedResourceProto", "java_package": "com.google.cloud.securitycenter.v1", "php_namespace": "Google\\Cloud\\SecurityCenter\\V1", "ruby_package": "Google::Cloud::SecurityCenter::V1", - "(google.api.resource_definition).type": "securitycenter.googleapis.com/SecurityHealthAnalyticsSettings", - "(google.api.resource_definition).pattern": "projects/{project}/securityHealthAnalyticsSettings" + "(google.api.resource_definition).type": "securitycenter.googleapis.com/EventThreatDetectionSettings", + "(google.api.resource_definition).pattern": "projects/{project}/eventThreatDetectionSettings" }, "nested": { "Access": { @@ -103,7 +103,9 @@ "Asset": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/Asset", - "(google.api.resource).pattern": "projects/{project}/assets/{asset}" + "(google.api.resource).pattern": "projects/{project}/assets/{asset}", + "(google.api.resource).plural": "assets", + "(google.api.resource).singular": "asset" }, "fields": { "name": { @@ -226,6 +228,167 @@ } } }, + "AttackExposure": { + "fields": { + "score": { + "type": "double", + "id": 1 + }, + "latestCalculationTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "attackExposureResult": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + }, + "exposedHighValueResourcesCount": { + "type": "int32", + "id": 5 + }, + "exposedMediumValueResourcesCount": { + "type": "int32", + "id": 6 + }, + "exposedLowValueResourcesCount": { + "type": "int32", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CALCULATED": 1, + "NOT_CALCULATED": 2 + } + } + } + }, + "AttackPath": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/AttackPath", + "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}", + "(google.api.resource).plural": "attackPaths", + "(google.api.resource).singular": "attackPath" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "pathNodes": { + "rule": "repeated", + "type": "AttackPathNode", + "id": 2 + }, + "edges": { + "rule": "repeated", + "type": "AttackPathEdge", + "id": 3 + } + }, + "nested": { + "AttackPathNode": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "resourceType": { + "type": "string", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + }, + "associatedFindings": { + "rule": "repeated", + "type": "PathNodeAssociatedFinding", + "id": 4 + }, + "uuid": { + "type": "string", + "id": 5 + }, + "attackSteps": { + "rule": "repeated", + "type": "AttackStepNode", + "id": 6 + } + }, + "nested": { + "PathNodeAssociatedFinding": { + "fields": { + "canonicalFinding": { + "type": "string", + "id": 1 + }, + "findingCategory": { + "type": "string", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + }, + "NodeType": { + "values": { + "NODE_TYPE_UNSPECIFIED": 0, + "NODE_TYPE_AND": 1, + "NODE_TYPE_OR": 2, + "NODE_TYPE_DEFENSE": 3, + "NODE_TYPE_ATTACKER": 4 + } + }, + "AttackStepNode": { + "fields": { + "uuid": { + "type": "string", + "id": 1 + }, + "type": { + "type": "NodeType", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + } + } + } + } + }, + "AttackPathEdge": { + "fields": { + "source": { + "type": "string", + "id": 1 + }, + "destination": { + "type": "string", + "id": 2 + } + } + } + } + }, "BackupDisasterRecovery": { "fields": { "backupTemplate": { @@ -276,7 +439,9 @@ "BigQueryExport": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/BigQueryExport", - "(google.api.resource).pattern": "projects/{project}/bigQueryExports/{export}" + "(google.api.resource).pattern": "projects/{project}/bigQueryExports/{export}", + "(google.api.resource).plural": "bigQueryExports", + "(google.api.resource).singular": "bigQueryExport" }, "fields": { "name": { @@ -596,6 +761,65 @@ } } }, + "EffectiveEventThreatDetectionCustomModule": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule", + "(google.api.resource).pattern": "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "config": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, "EffectiveSecurityHealthAnalyticsCustomModule": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule", @@ -712,41 +936,169 @@ } } }, - "Exfiltration": { + "EventThreatDetectionCustomModule": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule", + "(google.api.resource).pattern": "projects/{project}/eventThreatDetectionSettings/customModules/{module}" + }, "fields": { - "sources": { - "rule": "repeated", - "type": "ExfilResource", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "targets": { - "rule": "repeated", - "type": "ExfilResource", + "config": { + "type": "google.protobuf.Struct", "id": 2 }, - "totalExfiltratedBytes": { - "type": "int64", - "id": 3 - } - } - }, - "ExfilResource": { - "fields": { - "name": { + "ancestorModule": { "type": "string", - "id": 1 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } }, - "components": { - "rule": "repeated", + "enablementState": { + "type": "EnablementState", + "id": 4 + }, + "type": { "type": "string", - "id": 2 + "id": 5 + }, + "displayName": { + "type": "string", + "id": 6 + }, + "description": { + "type": "string", + "id": 7 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastEditor": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "INHERITED": 3 + } + } + } + }, + "CustomModuleValidationErrors": { + "fields": { + "errors": { + "rule": "repeated", + "type": "CustomModuleValidationError", + "id": 1 + } + } + }, + "CustomModuleValidationError": { + "oneofs": { + "_start": { + "oneof": [ + "start" + ] + }, + "_end": { + "oneof": [ + "end" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "fieldPath": { + "type": "string", + "id": 2 + }, + "start": { + "type": "Position", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "end": { + "type": "Position", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "Position": { + "fields": { + "lineNumber": { + "type": "int32", + "id": 1 + }, + "columnNumber": { + "type": "int32", + "id": 2 + } + } + }, + "Exfiltration": { + "fields": { + "sources": { + "rule": "repeated", + "type": "ExfilResource", + "id": 1 + }, + "targets": { + "rule": "repeated", + "type": "ExfilResource", + "id": 2 + }, + "totalExfiltratedBytes": { + "type": "int64", + "id": 3 + } + } + }, + "ExfilResource": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "components": { + "rule": "repeated", + "type": "string", + "id": 2 } } }, "ExternalSystem": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/ExternalSystem", - "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}" + "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}", + "(google.api.resource).plural": "externalSystems", + "(google.api.resource).singular": "externalSystem" }, "fields": { "name": { @@ -875,7 +1227,9 @@ "Finding": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/Finding", - "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}" + "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}", + "(google.api.resource).plural": "findings", + "(google.api.resource).singular": "finding" }, "fields": { "name": { @@ -1037,6 +1391,10 @@ "type": "Database", "id": 44 }, + "attackExposure": { + "type": "AttackExposure", + "id": 45 + }, "files": { "rule": "repeated", "type": "File", @@ -1630,6 +1988,7 @@ "PROCESS_DISCOVERY": 56, "COMMAND_AND_SCRIPTING_INTERPRETER": 6, "UNIX_SHELL": 7, + "PYTHON": 59, "PERMISSION_GROUPS_DISCOVERY": 18, "CLOUD_GROUPS": 19, "APPLICATION_LAYER_PROTOCOL": 45, @@ -1679,7 +2038,10 @@ "OBTAIN_CAPABILITIES": 43, "ACTIVE_SCANNING": 1, "SCANNING_IP_BLOCKS": 2, - "CONTAINER_AND_RESOURCE_DISCOVERY": 57 + "CONTAINER_ADMINISTRATION_COMMAND": 60, + "ESCAPE_TO_HOST": 61, + "CONTAINER_AND_RESOURCE_DISCOVERY": 57, + "STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES": 62 } } } @@ -2060,7 +2422,9 @@ "MuteConfig": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/MuteConfig", - "(google.api.resource).pattern": "projects/{project}/muteConfigs/{mute_config}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/muteConfigs/{mute_config}", + "(google.api.resource).plural": "muteConfigs", + "(google.api.resource).singular": "muteConfig" }, "fields": { "name": { @@ -2111,7 +2475,9 @@ "NotificationConfig": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/NotificationConfig", - "(google.api.resource).pattern": "projects/{project}/notificationConfigs/{notification_config}" + "(google.api.resource).pattern": "projects/{project}/notificationConfigs/{notification_config}", + "(google.api.resource).plural": "notificationConfigs", + "(google.api.resource).singular": "notificationConfig" }, "oneofs": { "notifyConfig": { @@ -2183,6 +2549,14 @@ } }, "Resource": { + "oneofs": { + "cloudProviderMetadata": { + "oneof": [ + "awsMetadata", + "azureMetadata" + ] + } + }, "fields": { "name": { "type": "string", @@ -2219,76 +2593,352 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 9 + }, + "organization": { + "type": "string", + "id": 10 + }, + "service": { + "type": "string", + "id": 11 + }, + "location": { + "type": "string", + "id": 12 + }, + "awsMetadata": { + "type": "AwsMetadata", + "id": 16 + }, + "azureMetadata": { + "type": "AzureMetadata", + "id": 17 + }, + "resourcePath": { + "type": "ResourcePath", + "id": 18 + }, + "resourcePathString": { + "type": "string", + "id": 19 } } }, - "OrganizationSettings": { - "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/OrganizationSettings", - "(google.api.resource).pattern": "organizations/{organization}/organizationSettings" - }, + "CloudProvider": { + "values": { + "CLOUD_PROVIDER_UNSPECIFIED": 0, + "GOOGLE_CLOUD_PLATFORM": 1, + "AMAZON_WEB_SERVICES": 2, + "MICROSOFT_AZURE": 3 + } + }, + "AwsMetadata": { "fields": { - "name": { - "type": "string", - "id": 1 - }, - "enableAssetDiscovery": { - "type": "bool", + "organization": { + "type": "AwsOrganization", "id": 2 }, - "assetDiscoveryConfig": { - "type": "AssetDiscoveryConfig", + "organizationalUnits": { + "rule": "repeated", + "type": "AwsOrganizationalUnit", "id": 3 + }, + "account": { + "type": "AwsAccount", + "id": 4 } }, "nested": { - "AssetDiscoveryConfig": { + "AwsOrganization": { "fields": { - "projectIds": { - "rule": "repeated", + "id": { + "type": "string", + "id": 1 + } + } + }, + "AwsOrganizationalUnit": { + "fields": { + "id": { "type": "string", "id": 1 }, - "inclusionMode": { - "type": "InclusionMode", + "name": { + "type": "string", "id": 2 + } + } + }, + "AwsAccount": { + "fields": { + "id": { + "type": "string", + "id": 1 }, - "folderIds": { - "rule": "repeated", + "name": { "type": "string", - "id": 3 - } - }, - "nested": { - "InclusionMode": { - "values": { - "INCLUSION_MODE_UNSPECIFIED": 0, - "INCLUDE_ONLY": 1, - "EXCLUDE": 2 - } + "id": 2 } } } } }, - "RunAssetDiscoveryResponse": { + "AzureMetadata": { "fields": { - "state": { - "type": "State", - "id": 1 + "managementGroups": { + "rule": "repeated", + "type": "AzureManagementGroup", + "id": 4 }, - "duration": { - "type": "google.protobuf.Duration", - "id": 2 + "subscription": { + "type": "AzureSubscription", + "id": 5 + }, + "resourceGroup": { + "type": "AzureResourceGroup", + "id": 6 } }, "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "COMPLETED": 1, - "SUPERSEDED": 2, - "TERMINATED": 3 + "AzureManagementGroup": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "AzureSubscription": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "AzureResourceGroup": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ResourcePath": { + "fields": { + "nodes": { + "rule": "repeated", + "type": "ResourcePathNode", + "id": 1 + } + }, + "nested": { + "ResourcePathNodeType": { + "values": { + "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED": 0, + "GCP_ORGANIZATION": 1, + "GCP_FOLDER": 2, + "GCP_PROJECT": 3, + "AWS_ORGANIZATION": 4, + "AWS_ORGANIZATIONAL_UNIT": 5, + "AWS_ACCOUNT": 6, + "AZURE_MANAGEMENT_GROUP": 7, + "AZURE_SUBSCRIPTION": 8, + "AZURE_RESOURCE_GROUP": 9 + } + }, + "ResourcePathNode": { + "fields": { + "nodeType": { + "type": "ResourcePathNodeType", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + } + } + } + } + }, + "OrganizationSettings": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/OrganizationSettings", + "(google.api.resource).pattern": "organizations/{organization}/organizationSettings", + "(google.api.resource).plural": "organizationSettings", + "(google.api.resource).singular": "organizationSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "enableAssetDiscovery": { + "type": "bool", + "id": 2 + }, + "assetDiscoveryConfig": { + "type": "AssetDiscoveryConfig", + "id": 3 + } + }, + "nested": { + "AssetDiscoveryConfig": { + "fields": { + "projectIds": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "inclusionMode": { + "type": "InclusionMode", + "id": 2 + }, + "folderIds": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "InclusionMode": { + "values": { + "INCLUSION_MODE_UNSPECIFIED": 0, + "INCLUDE_ONLY": 1, + "EXCLUDE": 2 + } + } + } + } + } + }, + "ResourceValueConfig": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/ResourceValueConfig", + "(google.api.resource).pattern": "organizations/{organization}/resourceValueConfigs/{resource_value_config}", + "(google.api.resource).plural": "resourceValueConfigs", + "(google.api.resource).singular": "resourceValueConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "resourceValue": { + "type": "ResourceValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "tagValues": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceType": { + "type": "string", + "id": 4 + }, + "scope": { + "type": "string", + "id": 5 + }, + "resourceLabelsSelector": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "description": { + "type": "string", + "id": 7 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 10 + }, + "sensitiveDataProtectionMapping": { + "type": "SensitiveDataProtectionMapping", + "id": 11 + } + }, + "nested": { + "SensitiveDataProtectionMapping": { + "fields": { + "highSensitivityMapping": { + "type": "ResourceValue", + "id": 1 + }, + "mediumSensitivityMapping": { + "type": "ResourceValue", + "id": 2 + } + } + } + } + }, + "ResourceValue": { + "values": { + "RESOURCE_VALUE_UNSPECIFIED": 0, + "HIGH": 1, + "MEDIUM": 2, + "LOW": 3, + "NONE": 4 + } + }, + "RunAssetDiscoveryResponse": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "COMPLETED": 1, + "SUPERSEDED": 2, + "TERMINATED": 3 } } } @@ -2476,7 +3126,7 @@ "options": { "(google.api.http).post": "/v1/{parent=organizations/*}/muteConfigs", "(google.api.http).body": "mute_config", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*}/muteConfigs", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/muteConfigs", "(google.api.http).additional_bindings.body": "mute_config", "(google.api.method_signature)": "parent,mute_config,mute_config_id" }, @@ -2486,13 +3136,25 @@ "post": "/v1/{parent=organizations/*}/muteConfigs", "body": "mute_config", "additional_bindings": [ + { + "post": "/v1/{parent=organizations/*/locations/*}/muteConfigs", + "body": "mute_config" + }, { "post": "/v1/{parent=folders/*}/muteConfigs", "body": "mute_config" }, + { + "post": "/v1/{parent=folders/*/locations/*}/muteConfigs", + "body": "mute_config" + }, { "post": "/v1/{parent=projects/*}/muteConfigs", "body": "mute_config" + }, + { + "post": "/v1/{parent=projects/*/locations/*}/muteConfigs", + "body": "mute_config" } ] } @@ -2545,7 +3207,7 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=organizations/*/muteConfigs/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/muteConfigs/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/muteConfigs/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ @@ -2558,6 +3220,15 @@ }, { "delete": "/v1/{name=projects/*/muteConfigs/*}" + }, + { + "delete": "/v1/{name=organizations/*/locations/*/muteConfigs/*}" + }, + { + "delete": "/v1/{name=folders/*/locations/*/muteConfigs/*}" + }, + { + "delete": "/v1/{name=projects/*/locations/*/muteConfigs/*}" } ] } @@ -2621,19 +3292,55 @@ } ] }, - "GetBigQueryExport": { - "requestType": "GetBigQueryExportRequest", - "responseType": "BigQueryExport", + "GetSimulation": { + "requestType": "GetSimulationRequest", + "responseType": "Simulation", "options": { - "(google.api.http).get": "/v1/{name=organizations/*/bigQueryExports/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/bigQueryExports/*}", + "(google.api.http).get": "/v1/{name=organizations/*/simulations/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=organizations/*/bigQueryExports/*}", - "additional_bindings": [ + "get": "/v1/{name=organizations/*/simulations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetValuedResource": { + "requestType": "GetValuedResourceRequest", + "responseType": "ValuedResource", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/simulations/*/valuedResources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/simulations/*/valuedResources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetBigQueryExport": { + "requestType": "GetBigQueryExportRequest", + "responseType": "BigQueryExport", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/bigQueryExports/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/bigQueryExports/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/bigQueryExports/*}", + "additional_bindings": [ { "get": "/v1/{name=folders/*/bigQueryExports/*}" }, @@ -2673,7 +3380,7 @@ "responseType": "MuteConfig", "options": { "(google.api.http).get": "/v1/{name=organizations/*/muteConfigs/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/muteConfigs/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/muteConfigs/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ @@ -2686,6 +3393,15 @@ }, { "get": "/v1/{name=projects/*/muteConfigs/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/muteConfigs/*}" + }, + { + "get": "/v1/{name=folders/*/locations/*/muteConfigs/*}" + }, + { + "get": "/v1/{name=projects/*/locations/*/muteConfigs/*}" } ] } @@ -2958,7 +3674,7 @@ "responseType": "ListMuteConfigsResponse", "options": { "(google.api.http).get": "/v1/{parent=organizations/*}/muteConfigs", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*}/muteConfigs", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/muteConfigs}", "(google.api.method_signature)": "parent" }, "parsedOptions": [ @@ -2971,6 +3687,15 @@ }, { "get": "/v1/{parent=projects/*}/muteConfigs" + }, + { + "get": "/v1/{parent=organizations/*/locations/*/muteConfigs}" + }, + { + "get": "/v1/{parent=folders/*/locations/*/muteConfigs}" + }, + { + "get": "/v1/{parent=projects/*/locations/*/muteConfigs}" } ] } @@ -3326,7 +4051,7 @@ "options": { "(google.api.http).patch": "/v1/{mute_config.name=organizations/*/muteConfigs/*}", "(google.api.http).body": "mute_config", - "(google.api.http).additional_bindings.patch": "/v1/{mute_config.name=projects/*/muteConfigs/*}", + "(google.api.http).additional_bindings.patch": "/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}", "(google.api.http).additional_bindings.body": "mute_config", "(google.api.method_signature)": "mute_config,update_mask" }, @@ -3343,6 +4068,18 @@ { "patch": "/v1/{mute_config.name=projects/*/muteConfigs/*}", "body": "mute_config" + }, + { + "patch": "/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}", + "body": "mute_config" + }, + { + "patch": "/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}", + "body": "mute_config" + }, + { + "patch": "/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}", + "body": "mute_config" } ] } @@ -3620,84 +4357,601 @@ "(google.api.method_signature)": "parent" } ] + }, + "CreateEventThreatDetectionCustomModule": { + "requestType": "CreateEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules", + "(google.api.http).body": "event_threat_detection_custom_module", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules", + "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", + "(google.api.method_signature)": "parent,event_threat_detection_custom_module" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules", + "body": "event_threat_detection_custom_module", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules", + "body": "event_threat_detection_custom_module" + }, + { + "post": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules", + "body": "event_threat_detection_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,event_threat_detection_custom_module" + } + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "requestType": "DeleteEventThreatDetectionCustomModuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "additional_bindings": [ + { + "delete": "/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}" + }, + { + "delete": "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetEventThreatDetectionCustomModule": { + "requestType": "GetEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}" + }, + { + "get": "/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "requestType": "ListDescendantEventThreatDetectionCustomModulesRequest", + "responseType": "ListDescendantEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendant", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendant", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendant" + }, + { + "get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListEventThreatDetectionCustomModules": { + "requestType": "ListEventThreatDetectionCustomModulesRequest", + "responseType": "ListEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules" + }, + { + "get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "requestType": "UpdateEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.http).body": "event_threat_detection_custom_module", + "(google.api.http).additional_bindings.patch": "/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}", + "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", + "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}", + "body": "event_threat_detection_custom_module", + "additional_bindings": [ + { + "patch": "/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}", + "body": "event_threat_detection_custom_module" + }, + { + "patch": "/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}", + "body": "event_threat_detection_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" + } + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "requestType": "ValidateEventThreatDetectionCustomModuleRequest", + "responseType": "ValidateEventThreatDetectionCustomModuleResponse", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule", + "body": "*", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule", + "body": "*" + }, + { + "post": "/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule", + "body": "*" + } + ] + } + } + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "requestType": "GetEffectiveEventThreatDetectionCustomModuleRequest", + "responseType": "EffectiveEventThreatDetectionCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}" + }, + { + "get": "/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "requestType": "ListEffectiveEventThreatDetectionCustomModulesRequest", + "responseType": "ListEffectiveEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModules" + }, + { + "get": "/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "BatchCreateResourceValueConfigs": { + "requestType": "BatchCreateResourceValueConfigsRequest", + "responseType": "BatchCreateResourceValueConfigsResponse", + "options": { + "(google.api.http).post": "/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,requests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,requests" + } + ] + }, + "DeleteResourceValueConfig": { + "requestType": "DeleteResourceValueConfigRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=organizations/*/resourceValueConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=organizations/*/resourceValueConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetResourceValueConfig": { + "requestType": "GetResourceValueConfigRequest", + "responseType": "ResourceValueConfig", + "options": { + "(google.api.http).get": "/v1/{name=organizations/*/resourceValueConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=organizations/*/resourceValueConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListResourceValueConfigs": { + "requestType": "ListResourceValueConfigsRequest", + "responseType": "ListResourceValueConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*}/resourceValueConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*}/resourceValueConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateResourceValueConfig": { + "requestType": "UpdateResourceValueConfigRequest", + "responseType": "ResourceValueConfig", + "options": { + "(google.api.http).patch": "/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}", + "(google.api.http).body": "resource_value_config", + "(google.api.method_signature)": "resource_value_config,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}", + "body": "resource_value_config" + } + }, + { + "(google.api.method_signature)": "resource_value_config,update_mask" + } + ] + }, + "ListValuedResources": { + "requestType": "ListValuedResourcesRequest", + "responseType": "ListValuedResourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/simulations/*}/valuedResources", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/simulations/*}/valuedResources", + "additional_bindings": { + "get": "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListAttackPaths": { + "requestType": "ListAttackPathsRequest", + "responseType": "ListAttackPathsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=organizations/*/simulations/*}/attackPaths", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=organizations/*/simulations/*}/attackPaths", + "additional_bindings": [ + { + "get": "/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPaths" + }, + { + "get": "/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "BulkMuteFindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "muteAnnotation": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + } + } + }, + "BulkMuteFindingsResponse": { + "fields": {} + }, + "CreateFindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + } + }, + "findingId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "finding": { + "type": "Finding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateMuteConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/MuteConfig" + } + }, + "muteConfig": { + "type": "MuteConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "muteConfigId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "BulkMuteFindingsRequest": { + "CreateResourceValueConfigRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/ResourceValueConfig" } }, - "filter": { - "type": "string", - "id": 2 - }, - "muteAnnotation": { - "type": "string", - "id": 3, + "resourceValueConfig": { + "type": "ResourceValueConfig", + "id": 2, "options": { - "deprecated": true + "(google.api.field_behavior)": "REQUIRED" } } } }, - "BulkMuteFindingsResponse": { - "fields": {} - }, - "CreateFindingRequest": { + "BatchCreateResourceValueConfigsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycenter.googleapis.com/Source" + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/ResourceValueConfig" } }, - "findingId": { - "type": "string", + "requests": { + "rule": "repeated", + "type": "CreateResourceValueConfigRequest", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "finding": { - "type": "Finding", - "id": 3, + } + } + }, + "BatchCreateResourceValueConfigsResponse": { + "fields": { + "resourceValueConfigs": { + "rule": "repeated", + "type": "ResourceValueConfig", + "id": 1 + } + } + }, + "DeleteResourceValueConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/ResourceValueConfig" } } } }, - "CreateMuteConfigRequest": { + "GetResourceValueConfigRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/MuteConfig" + "(google.api.resource_reference).type": "securitycenter.googleapis.com/ResourceValueConfig" } - }, - "muteConfig": { - "type": "MuteConfig", - "id": 2, + } + } + }, + "ListResourceValueConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/ResourceValueConfig" } }, - "muteConfigId": { + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { "type": "string", - "id": 3, + "id": 3 + } + } + }, + "ListResourceValueConfigsResponse": { + "fields": { + "resourceValueConfigs": { + "rule": "repeated", + "type": "ResourceValueConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateResourceValueConfigRequest": { + "fields": { + "resourceValueConfig": { + "type": "ResourceValueConfig", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 } } }, @@ -4051,6 +5305,115 @@ } } }, + "ListValuedResourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/ValuedResource" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListValuedResourcesResponse": { + "fields": { + "valuedResources": { + "rule": "repeated", + "type": "ValuedResource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListAttackPathsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/AttackPath" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + } + } + }, + "ListAttackPathsResponse": { + "fields": { + "attackPaths": { + "rule": "repeated", + "type": "AttackPath", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetSimulationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/Simulation" + } + } + } + }, + "GetValuedResourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/ValuedResource" + } + } + } + }, "ListMuteConfigsRequest": { "fields": { "parent": { @@ -4391,6 +5754,14 @@ } }, "Resource": { + "oneofs": { + "cloudProviderMetadata": { + "oneof": [ + "awsMetadata", + "azureMetadata" + ] + } + }, "fields": { "name": { "type": "string", @@ -4424,6 +5795,38 @@ "rule": "repeated", "type": "Folder", "id": 7 + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 9 + }, + "organization": { + "type": "string", + "id": 10 + }, + "service": { + "type": "string", + "id": 11 + }, + "location": { + "type": "string", + "id": 12 + }, + "awsMetadata": { + "type": "AwsMetadata", + "id": 16 + }, + "azureMetadata": { + "type": "AzureMetadata", + "id": 17 + }, + "resourcePath": { + "type": "ResourcePath", + "id": 18 + }, + "resourcePathString": { + "type": "string", + "id": 19 } } } @@ -4785,6 +6188,296 @@ } } }, + "CreateEventThreatDetectionCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "eventThreatDetectionCustomModule": { + "type": "EventThreatDetectionCustomModule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ValidateEventThreatDetectionCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "rawText": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ValidateEventThreatDetectionCustomModuleResponse": { + "fields": { + "errors": { + "type": "CustomModuleValidationErrors", + "id": 2 + } + } + }, + "DeleteEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + } + } + }, + "GetEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + } + } + }, + "ListDescendantEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListDescendantEventThreatDetectionCustomModulesResponse": { + "fields": { + "eventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListEventThreatDetectionCustomModulesResponse": { + "fields": { + "eventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateEventThreatDetectionCustomModuleRequest": { + "fields": { + "eventThreatDetectionCustomModule": { + "type": "EventThreatDetectionCustomModule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "GetEffectiveEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + } + } + }, + "ListEffectiveEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + } + } + }, + "ListEffectiveEventThreatDetectionCustomModulesResponse": { + "fields": { + "effectiveEventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EffectiveEventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "Simulation": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Simulation", + "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}", + "(google.api.resource).plural": "simulations", + "(google.api.resource).singular": "simulation" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceValueConfigsMetadata": { + "rule": "repeated", + "type": "ResourceValueConfigMetadata", + "id": 3 + }, + "cloudProvider": { + "type": "CloudProvider", + "id": 4 + } + } + }, + "ValuedResource": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/ValuedResource", + "(google.api.resource).pattern": "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}", + "(google.api.resource).plural": "valuedResources", + "(google.api.resource).singular": "valuedResource" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "resource": { + "type": "string", + "id": 2 + }, + "resourceType": { + "type": "string", + "id": 3 + }, + "displayName": { + "type": "string", + "id": 4 + }, + "resourceValue": { + "type": "ResourceValue", + "id": 5 + }, + "exposedScore": { + "type": "double", + "id": 6 + }, + "resourceValueConfigsUsed": { + "rule": "repeated", + "type": "ResourceValueConfigMetadata", + "id": 7 + } + }, + "nested": { + "ResourceValue": { + "values": { + "RESOURCE_VALUE_UNSPECIFIED": 0, + "RESOURCE_VALUE_LOW": 1, + "RESOURCE_VALUE_MEDIUM": 2, + "RESOURCE_VALUE_HIGH": 3 + } + } + } + }, + "ResourceValueConfigMetadata": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, "Source": { "options": { "(google.api.resource).type": "securitycenter.googleapis.com/Source", diff --git a/packages/google-cloud-securitycenter/samples/README.md b/packages/google-cloud-securitycenter/samples/README.md index b29b58739e6b..91e70ff795c2 100644 --- a/packages/google-cloud-securitycenter/samples/README.md +++ b/packages/google-cloud-securitycenter/samples/README.md @@ -12,36 +12,51 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Security_center.batch_create_resource_value_configs](#security_center.batch_create_resource_value_configs) * [Security_center.bulk_mute_findings](#security_center.bulk_mute_findings) * [Security_center.create_big_query_export](#security_center.create_big_query_export) + * [Security_center.create_event_threat_detection_custom_module](#security_center.create_event_threat_detection_custom_module) * [Security_center.create_finding](#security_center.create_finding) * [Security_center.create_mute_config](#security_center.create_mute_config) * [Security_center.create_notification_config](#security_center.create_notification_config) * [Security_center.create_security_health_analytics_custom_module](#security_center.create_security_health_analytics_custom_module) * [Security_center.create_source](#security_center.create_source) * [Security_center.delete_big_query_export](#security_center.delete_big_query_export) + * [Security_center.delete_event_threat_detection_custom_module](#security_center.delete_event_threat_detection_custom_module) * [Security_center.delete_mute_config](#security_center.delete_mute_config) * [Security_center.delete_notification_config](#security_center.delete_notification_config) + * [Security_center.delete_resource_value_config](#security_center.delete_resource_value_config) * [Security_center.delete_security_health_analytics_custom_module](#security_center.delete_security_health_analytics_custom_module) * [Security_center.get_big_query_export](#security_center.get_big_query_export) + * [Security_center.get_effective_event_threat_detection_custom_module](#security_center.get_effective_event_threat_detection_custom_module) * [Security_center.get_effective_security_health_analytics_custom_module](#security_center.get_effective_security_health_analytics_custom_module) + * [Security_center.get_event_threat_detection_custom_module](#security_center.get_event_threat_detection_custom_module) * [Security_center.get_iam_policy](#security_center.get_iam_policy) * [Security_center.get_mute_config](#security_center.get_mute_config) * [Security_center.get_notification_config](#security_center.get_notification_config) * [Security_center.get_organization_settings](#security_center.get_organization_settings) + * [Security_center.get_resource_value_config](#security_center.get_resource_value_config) * [Security_center.get_security_health_analytics_custom_module](#security_center.get_security_health_analytics_custom_module) + * [Security_center.get_simulation](#security_center.get_simulation) * [Security_center.get_source](#security_center.get_source) + * [Security_center.get_valued_resource](#security_center.get_valued_resource) * [Security_center.group_assets](#security_center.group_assets) * [Security_center.group_findings](#security_center.group_findings) * [Security_center.list_assets](#security_center.list_assets) + * [Security_center.list_attack_paths](#security_center.list_attack_paths) * [Security_center.list_big_query_exports](#security_center.list_big_query_exports) + * [Security_center.list_descendant_event_threat_detection_custom_modules](#security_center.list_descendant_event_threat_detection_custom_modules) * [Security_center.list_descendant_security_health_analytics_custom_modules](#security_center.list_descendant_security_health_analytics_custom_modules) + * [Security_center.list_effective_event_threat_detection_custom_modules](#security_center.list_effective_event_threat_detection_custom_modules) * [Security_center.list_effective_security_health_analytics_custom_modules](#security_center.list_effective_security_health_analytics_custom_modules) + * [Security_center.list_event_threat_detection_custom_modules](#security_center.list_event_threat_detection_custom_modules) * [Security_center.list_findings](#security_center.list_findings) * [Security_center.list_mute_configs](#security_center.list_mute_configs) * [Security_center.list_notification_configs](#security_center.list_notification_configs) + * [Security_center.list_resource_value_configs](#security_center.list_resource_value_configs) * [Security_center.list_security_health_analytics_custom_modules](#security_center.list_security_health_analytics_custom_modules) * [Security_center.list_sources](#security_center.list_sources) + * [Security_center.list_valued_resources](#security_center.list_valued_resources) * [Security_center.run_asset_discovery](#security_center.run_asset_discovery) * [Security_center.set_finding_state](#security_center.set_finding_state) * [Security_center.set_iam_policy](#security_center.set_iam_policy) @@ -49,14 +64,17 @@ * [Security_center.simulate_security_health_analytics_custom_module](#security_center.simulate_security_health_analytics_custom_module) * [Security_center.test_iam_permissions](#security_center.test_iam_permissions) * [Security_center.update_big_query_export](#security_center.update_big_query_export) + * [Security_center.update_event_threat_detection_custom_module](#security_center.update_event_threat_detection_custom_module) * [Security_center.update_external_system](#security_center.update_external_system) * [Security_center.update_finding](#security_center.update_finding) * [Security_center.update_mute_config](#security_center.update_mute_config) * [Security_center.update_notification_config](#security_center.update_notification_config) * [Security_center.update_organization_settings](#security_center.update_organization_settings) + * [Security_center.update_resource_value_config](#security_center.update_resource_value_config) * [Security_center.update_security_health_analytics_custom_module](#security_center.update_security_health_analytics_custom_module) * [Security_center.update_security_marks](#security_center.update_security_marks) * [Security_center.update_source](#security_center.update_source) + * [Security_center.validate_event_threat_detection_custom_module](#security_center.validate_event_threat_detection_custom_module) * [Security_center.create_finding](#security_center.create_finding) * [Security_center.create_source](#security_center.create_source) * [Security_center.get_iam_policy](#security_center.get_iam_policy) @@ -155,6 +173,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Security_center.batch_create_resource_value_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js` + + +----- + + + + ### Security_center.bulk_mute_findings View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js). @@ -189,6 +224,23 @@ __Usage:__ +### Security_center.create_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.create_finding View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js). @@ -291,6 +343,23 @@ __Usage:__ +### Security_center.delete_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.delete_mute_config View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js). @@ -325,6 +394,23 @@ __Usage:__ +### Security_center.delete_resource_value_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js` + + +----- + + + + ### Security_center.delete_security_health_analytics_custom_module View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js). @@ -359,6 +445,23 @@ __Usage:__ +### Security_center.get_effective_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.get_effective_security_health_analytics_custom_module View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js). @@ -376,6 +479,23 @@ __Usage:__ +### Security_center.get_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.get_iam_policy View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_iam_policy.js). @@ -444,6 +564,23 @@ __Usage:__ +### Security_center.get_resource_value_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js` + + +----- + + + + ### Security_center.get_security_health_analytics_custom_module View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js). @@ -461,6 +598,23 @@ __Usage:__ +### Security_center.get_simulation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js` + + +----- + + + + ### Security_center.get_source View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js). @@ -478,6 +632,23 @@ __Usage:__ +### Security_center.get_valued_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js` + + +----- + + + + ### Security_center.group_assets View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js). @@ -529,6 +700,23 @@ __Usage:__ +### Security_center.list_attack_paths + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js` + + +----- + + + + ### Security_center.list_big_query_exports View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js). @@ -546,6 +734,23 @@ __Usage:__ +### Security_center.list_descendant_event_threat_detection_custom_modules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js` + + +----- + + + + ### Security_center.list_descendant_security_health_analytics_custom_modules View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js). @@ -563,6 +768,23 @@ __Usage:__ +### Security_center.list_effective_event_threat_detection_custom_modules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js` + + +----- + + + + ### Security_center.list_effective_security_health_analytics_custom_modules View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js). @@ -580,6 +802,23 @@ __Usage:__ +### Security_center.list_event_threat_detection_custom_modules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js` + + +----- + + + + ### Security_center.list_findings View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js). @@ -631,6 +870,23 @@ __Usage:__ +### Security_center.list_resource_value_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js` + + +----- + + + + ### Security_center.list_security_health_analytics_custom_modules View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js). @@ -665,6 +921,23 @@ __Usage:__ +### Security_center.list_valued_resources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js` + + +----- + + + + ### Security_center.run_asset_discovery View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js). @@ -784,6 +1057,23 @@ __Usage:__ +### Security_center.update_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.update_external_system View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_external_system.js). @@ -869,6 +1159,23 @@ __Usage:__ +### Security_center.update_resource_value_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js` + + +----- + + + + ### Security_center.update_security_health_analytics_custom_module View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js). @@ -920,6 +1227,23 @@ __Usage:__ +### Security_center.validate_event_threat_detection_custom_module + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js` + + +----- + + + + ### Security_center.create_finding View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-securitycenter/samples/generated/v1beta1/security_center.create_finding.js). diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js new file mode 100644 index 000000000000..494c55b95077 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.batch_create_resource_value_configs.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the new ResourceValueConfig's parent. + * The parent field in the CreateResourceValueConfigRequest + * messages must either be empty or match this field. + */ + // const parent = 'abc123' + /** + * Required. The resource value configs to be created. + */ + // const requests = [1,2,3,4] + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callBatchCreateResourceValueConfigs() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await securitycenterClient.batchCreateResourceValueConfigs(request); + console.log(response); + } + + callBatchCreateResourceValueConfigs(); + // [END securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js index 58fabc87d068..574ce609ad19 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.bulk_mute_findings.js @@ -30,8 +30,8 @@ function main(parent) { */ /** * Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js index ccca06bf7a84..dad027aa5bd8 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_big_query_export.js @@ -30,8 +30,8 @@ function main(parent, bigQueryExport, bigQueryExportId) { */ /** * Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * format is `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..522ee61b9015 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_event_threat_detection_custom_module.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, eventThreatDetectionCustomModule) { + // [START securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The new custom module's parent. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + */ + // const parent = 'abc123' + /** + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. + */ + // const eventThreatDetectionCustomModule = {} + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callCreateEventThreatDetectionCustomModule() { + // Construct request + const request = { + parent, + eventThreatDetectionCustomModule, + }; + + // Run request + const response = await securitycenterClient.createEventThreatDetectionCustomModule(request); + console.log(response); + } + + callCreateEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js index 5f9fdb4ac5a3..9a5d097dee75 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_finding.js @@ -30,7 +30,7 @@ function main(parent, findingId, finding) { */ /** * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". + * `organizations/[organization_id]/sources/[source_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js index 9c6465b0615a..7295b4b80a7d 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_mute_config.js @@ -30,8 +30,8 @@ function main(parent, muteConfig, muteConfigId) { */ /** * Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js index 581acd10f74c..83348425fca6 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_notification_config.js @@ -30,8 +30,8 @@ function main(parent, configId, notificationConfig) { */ /** * Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * is `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js index a757e8340ba4..1dd5a05c543b 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_security_health_analytics_custom_module.js @@ -30,9 +30,9 @@ function main(parent, securityHealthAnalyticsCustomModule) { */ /** * Required. Resource name of the new custom module's parent. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js index 03156579dcb5..419a0d14bb0c 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.create_source.js @@ -30,7 +30,7 @@ function main(parent, source) { */ /** * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". + * `organizations/[organization_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js index 0f3515d3666d..0ae2bee6698c 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_big_query_export.js @@ -30,9 +30,9 @@ function main(name) { */ /** * Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} + * `organizations/{organization}/bigQueryExports/{export_id}`, + * `folders/{folder}/bigQueryExports/{export_id}`, or + * `projects/{project}/bigQueryExports/{export_id}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..6ae34956023b --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the custom module to delete. + * Its format is: + * * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". + * * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". + * * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callDeleteEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.deleteEventThreatDetectionCustomModule(request); + console.log(response); + } + + callDeleteEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js index 2c14f03af143..b8b69fad2bb6 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_mute_config.js @@ -30,9 +30,12 @@ function main(name) { */ /** * Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} + * `organizations/{organization}/muteConfigs/{config_id}`, + * `folders/{folder}/muteConfigs/{config_id}`, + * `projects/{project}/muteConfigs/{config_id}`, + * `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + * `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + * `projects/{project}/locations/global/muteConfigs/{config_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js index 96e5a356db3d..cfe933251142 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_notification_config.js @@ -30,9 +30,9 @@ function main(name) { */ /** * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". + * `organizations/[organization_id]/notificationConfigs/[config_id]`, + * `folders/[folder_id]/notificationConfigs/[config_id]`, + * or `projects/[project_id]/notificationConfigs/[config_id]`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js new file mode 100644 index 000000000000..4bac0cdf0d3f --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_resource_value_config.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the ResourceValueConfig to delete + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callDeleteResourceValueConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.deleteResourceValueConfig(request); + console.log(response); + } + + callDeleteResourceValueConfig(); + // [END securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js index 3b2d69098a02..a91dab9a2f94 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.delete_security_health_analytics_custom_module.js @@ -30,10 +30,10 @@ function main(name) { */ /** * Required. Name of the custom module to delete. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js index 5202507f5a8b..c96fa75e2c3e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_big_query_export.js @@ -30,9 +30,9 @@ function main(name) { */ /** * Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} + * `organizations/{organization}/bigQueryExports/{export_id}`, + * `folders/{folder}/bigQueryExports/{export_id}`, or + * `projects/{project}/bigQueryExports/{export_id}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..86fbe8780e51 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the effective Event Threat Detection custom + * module. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + * * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + * * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callGetEffectiveEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.getEffectiveEventThreatDetectionCustomModule(request); + console.log(response); + } + + callGetEffectiveEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js index 22d0cfa58a89..0475622b31a6 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_effective_security_health_analytics_custom_module.js @@ -30,10 +30,10 @@ function main(name) { */ /** * Required. Name of the effective custom module to get. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..1b0c778ae11e --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_event_threat_detection_custom_module.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the custom module to get. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + * * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + * * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callGetEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.getEventThreatDetectionCustomModule(request); + console.log(response); + } + + callGetEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js index 9b278104f924..daa6a5aba836 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_mute_config.js @@ -30,9 +30,12 @@ function main(name) { */ /** * Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} + * `organizations/{organization}/muteConfigs/{config_id}`, + * `folders/{folder}/muteConfigs/{config_id}`, + * `projects/{project}/muteConfigs/{config_id}`, + * `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + * `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + * `projects/{project}/locations/global/muteConfigs/{config_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js index 50f040f9d901..7404aaf8792d 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_notification_config.js @@ -30,9 +30,9 @@ function main(name) { */ /** * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". + * `organizations/[organization_id]/notificationConfigs/[config_id]`, + * `folders/[folder_id]/notificationConfigs/[config_id]`, + * or `projects/[project_id]/notificationConfigs/[config_id]`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js index 95d3bb1b80a1..21aaca1facd1 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_organization_settings.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". + * format is `organizations/[organization_id]/organizationSettings`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js new file mode 100644 index 000000000000..3182c258af0f --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_resource_value_config.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource value config to retrieve. Its format is + * `organizations/{organization}/resourceValueConfigs/{config_id}`. + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callGetResourceValueConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.getResourceValueConfig(request); + console.log(response); + } + + callGetResourceValueConfig(); + // [END securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js index ef08fd3dedf0..1d2b1de7d024 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_security_health_analytics_custom_module.js @@ -30,10 +30,10 @@ function main(name) { */ /** * Required. Name of the custom module to get. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js new file mode 100644 index 000000000000..561e1d34958f --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_simulation.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_GetSimulation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The organization name or simulation name of this simulation + * Valid format: + * `organizations/{organization}/simulations/latest` + * `organizations/{organization}/simulations/{simulation}` + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callGetSimulation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.getSimulation(request); + console.log(response); + } + + callGetSimulation(); + // [END securitycenter_v1_generated_SecurityCenter_GetSimulation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js index 58652985ae7d..4497a81ba129 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_source.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * `organizations/[organization_id]/source/[source_id]`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js new file mode 100644 index 000000000000..3bfd1bab2393 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.get_valued_resource.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycenter_v1_generated_SecurityCenter_GetValuedResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of this valued resource + * Valid format: + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + */ + // const name = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callGetValuedResource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycenterClient.getValuedResource(request); + console.log(response); + } + + callGetValuedResource(); + // [END securitycenter_v1_generated_SecurityCenter_GetValuedResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js index 37c7d22b2f35..0e8a44cba911 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_assets.js @@ -30,8 +30,8 @@ function main(parent, groupBy) { */ /** * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js index 1e74fa970f8a..c5eb202a4f86 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.group_findings.js @@ -30,12 +30,12 @@ function main(parent, groupBy) { */ /** * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To groupBy across all sources * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- + * `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + * or `projects/{project_id}/sources/-` */ // const parent = 'abc123' /** @@ -90,12 +90,6 @@ function main(parent, groupBy) { * Required. Expression that defines what assets fields to use for grouping * (including `state_change`). The string value should follow SQL syntax: * comma separated list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity * The following fields are supported when compare_duration is set: * * state_change */ diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js index e10982c38965..9ad1d291106e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_assets.js @@ -32,8 +32,8 @@ function main(parent) { * Required. The name of the parent resource that contains the assets. The * value that you can specify on parent depends on the method in which you * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js new file mode 100644 index 000000000000..1e33409e2827 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_attack_paths.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListAttackPaths_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list attack paths. + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + */ + // const parent = 'abc123' + /** + * The filter expression that filters the attack path in the response. + * Supported fields: + * * `valued_resources` supports = + */ + // const filter = 'abc123' + /** + * The value returned by the last `ListAttackPathsResponse`; indicates + * that this is a continuation of a prior `ListAttackPaths` call, and + * that the system should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListAttackPaths() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listAttackPathsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAttackPaths(); + // [END securitycenter_v1_generated_SecurityCenter_ListAttackPaths_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js index de7a42432620..b84074094206 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_big_query_exports.js @@ -30,8 +30,8 @@ function main(parent) { */ /** * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * format is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js new file mode 100644 index 000000000000..24562405e8c6 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent to list custom modules under. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + */ + // const parent = 'abc123' + /** + * A page token, received from a previous + * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDescendantEventThreatDetectionCustomModules` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListDescendantEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listDescendantEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDescendantEventThreatDetectionCustomModules(); + // [END securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js index d0e54a8f1e4b..6fa3c10728db 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js @@ -30,9 +30,9 @@ function main(parent) { */ /** * Required. Name of parent to list descendant custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js new file mode 100644 index 000000000000..e0a58673c57a --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent to list custom modules for. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + */ + // const parent = 'abc123' + /** + * A page token, received from a previous + * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListEffectiveEventThreatDetectionCustomModules` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListEffectiveEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listEffectiveEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEffectiveEventThreatDetectionCustomModules(); + // [END securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js index d3f09d3cf4aa..a829a5e68d55 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js @@ -30,9 +30,9 @@ function main(parent) { */ /** * Required. Name of parent to list effective custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js new file mode 100644 index 000000000000..abbe06723d7b --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js @@ -0,0 +1,83 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent to list custom modules under. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + */ + // const parent = 'abc123' + /** + * A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEventThreatDetectionCustomModules(); + // [END securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js index 4ef45527e16c..a9301493819d 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_findings.js @@ -30,12 +30,12 @@ function main(parent) { */ /** * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To list across all sources * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- + * `organizations/{organization_id}/sources/-`, + * `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js index 79ebe0d883fb..81e5a38d4d68 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_mute_configs.js @@ -30,8 +30,8 @@ function main(parent) { */ /** * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js new file mode 100644 index 000000000000..0771cb632400 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_resource_value_configs.js @@ -0,0 +1,81 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns the collection of resource value configs. + * Its format is + * `organizations/[organization_id]` + */ + // const parent = 'abc123' + /** + * The number of results to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListResourceValueConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListResourceValueConfigs` must match the call that provided the + * page token. + * page_size can be specified, and the new page_size will be used. + */ + // const pageToken = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListResourceValueConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listResourceValueConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceValueConfigs(); + // [END securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js index 3abae4a0137d..b90c5bcfc81e 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js @@ -30,9 +30,9 @@ function main(parent) { */ /** * Required. Name of parent to list custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js index 0aa853c679a5..9cdcc9aa5157 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_sources.js @@ -30,8 +30,8 @@ function main(parent) { */ /** * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * be `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js new file mode 100644 index 000000000000..087721e4cd88 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.list_valued_resources.js @@ -0,0 +1,100 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START securitycenter_v1_generated_SecurityCenter_ListValuedResources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list valued resources. + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + */ + // const parent = 'abc123' + /** + * The filter expression that filters the valued resources in the response. + * Supported fields: + * * `resource_value` supports = + * * `resource_type` supports = + */ + // const filter = 'abc123' + /** + * The value returned by the last `ListValuedResourcesResponse`; indicates + * that this is a continuation of a prior `ListValuedResources` call, and + * that the system should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. The fields by which to order the valued resources response. + * Supported fields: + * * `exposed_score` + * * `resource_value` + * * `resource_type` + * * `resource` + * * `display_name` + * Values should be a comma separated list of fields. For example: + * `exposed_score,resource_value`. + * The default sorting order is descending. To specify ascending or descending + * order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + * example: `exposed_score DESC`. + */ + // const orderBy = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callListValuedResources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycenterClient.listValuedResourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListValuedResources(); + // [END securitycenter_v1_generated_SecurityCenter_ListValuedResources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js index 0d6251940613..9fd6c2fcdb88 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.run_asset_discovery.js @@ -30,7 +30,7 @@ function main(parent) { */ /** * Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". + * is `organizations/[organization_id]`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js index 460a3da9755c..f1b0aa7b29d7 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_finding_state.js @@ -32,9 +32,9 @@ function main(name, state, startTime) { * Required. The relative resource * name (https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_mute.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_mute.js index a939ccf56211..43cfabc446a3 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_mute.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.set_mute.js @@ -32,9 +32,9 @@ function main(name, mute) { * Required. The relative resource * name (https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..c6bb2694f374 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_event_threat_detection_custom_module.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(eventThreatDetectionCustomModule) { + // [START securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The module being updated. + */ + // const eventThreatDetectionCustomModule = {} + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + */ + // const updateMask = {} + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callUpdateEventThreatDetectionCustomModule() { + // Construct request + const request = { + eventThreatDetectionCustomModule, + }; + + // Run request + const response = await securitycenterClient.updateEventThreatDetectionCustomModule(request); + console.log(response); + } + + callUpdateEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js new file mode 100644 index 000000000000..f69679c66dc1 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_resource_value_config.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resourceValueConfig) { + // [START securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource value config being updated. + */ + // const resourceValueConfig = {} + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + */ + // const updateMask = {} + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callUpdateResourceValueConfig() { + // Construct request + const request = { + resourceValueConfig, + }; + + // Run request + const response = await securitycenterClient.updateResourceValueConfig(request); + console.log(response); + } + + callUpdateResourceValueConfig(); + // [END securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js index c7155dbd4b28..1390d787f957 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.update_security_health_analytics_custom_module.js @@ -33,7 +33,9 @@ function main(securityHealthAnalyticsCustomModule) { */ // const securityHealthAnalyticsCustomModule = {} /** - * The list of fields to update. + * The list of fields to be updated. The only fields that can be updated are + * `enablement_state` and `custom_config`. If empty or set to the wildcard + * value `*`, both `enablement_state` and `custom_config` are updated. */ // const updateMask = {} diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js new file mode 100644 index 000000000000..46759e5ca9f9 --- /dev/null +++ b/packages/google-cloud-securitycenter/samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, rawText, type) { + // [START securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the parent to validate the Custom Module under. + * Its format is: + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + */ + // const parent = 'abc123' + /** + * Required. The raw text of the module's contents. Used to generate error + * messages. + */ + // const rawText = 'abc123' + /** + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + */ + // const type = 'abc123' + + // Imports the Securitycenter library + const {SecurityCenterClient} = require('@google-cloud/security-center').v1; + + // Instantiates a client + const securitycenterClient = new SecurityCenterClient(); + + async function callValidateEventThreatDetectionCustomModule() { + // Construct request + const request = { + parent, + rawText, + type, + }; + + // Run request + const response = await securitycenterClient.validateEventThreatDetectionCustomModule(request); + console.log(response); + } + + callValidateEventThreatDetectionCustomModule(); + // [END securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json index 4e23bce283bc..c7145ae4b307 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json @@ -302,7 +302,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -411,6 +411,86 @@ } } }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_GetSimulation_async", + "title": "SecurityCenter getSimulation Sample", + "origin": "API_DEFINITION", + "description": " Get the simulation by name or the latest simulation for the given organization.", + "canonical": true, + "file": "security_center.get_simulation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSimulation", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.Simulation", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "GetSimulation", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_GetValuedResource_async", + "title": "SecurityCenter getValuedResource Sample", + "origin": "API_DEFINITION", + "description": " Get the valued resource by name", + "canonical": true, + "file": "security_center.get_valued_resource.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetValuedResource", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ValuedResource", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "GetValuedResource", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, { "regionTag": "securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_async", "title": "SecurityCenter getBigQueryExport Sample", @@ -506,7 +586,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -810,7 +890,7 @@ "segments": [ { "start": 25, - "end": 172, + "end": 166, "type": "FULL" } ], @@ -1790,7 +1870,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -2094,6 +2174,730 @@ } } } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_async", + "title": "SecurityCenter createEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", + "canonical": true, + "file": "security_center.create_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "event_threat_detection_custom_module", + "type": ".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule" + } + ], + "resultType": ".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "CreateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_async", + "title": "SecurityCenter deleteEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.", + "canonical": true, + "file": "security_center.delete_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "DeleteEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_async", + "title": "SecurityCenter getEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Gets an Event Threat Detection custom module.", + "canonical": true, + "file": "security_center.get_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "GetEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_async", + "title": "SecurityCenter listDescendantEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.", + "canonical": true, + "file": "security_center.list_descendant_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDescendantEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListDescendantEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_async", + "title": "SecurityCenter listEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", + "canonical": true, + "file": "security_center.list_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_async", + "title": "SecurityCenter updateEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", + "canonical": true, + "file": "security_center.update_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "event_threat_detection_custom_module", + "type": ".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.securitycenter.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "UpdateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_async", + "title": "SecurityCenter validateEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Validates the given Event Threat Detection custom module.", + "canonical": true, + "file": "security_center.validate_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ValidateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "raw_text", + "type": "TYPE_STRING" + }, + { + "name": "type", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ValidateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_async", + "title": "SecurityCenter getEffectiveEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Gets an effective Event Threat Detection custom module at the given level.", + "canonical": true, + "file": "security_center.get_effective_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEffectiveEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "GetEffectiveEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_async", + "title": "SecurityCenter listEffectiveEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", + "canonical": true, + "file": "security_center.list_effective_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEffectiveEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListEffectiveEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_async", + "title": "SecurityCenter batchCreateResourceValueConfigs Sample", + "origin": "API_DEFINITION", + "description": " Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.", + "canonical": true, + "file": "security_center.batch_create_resource_value_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateResourceValueConfigs", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "BatchCreateResourceValueConfigs", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_async", + "title": "SecurityCenter deleteResourceValueConfig Sample", + "origin": "API_DEFINITION", + "description": " Deletes a ResourceValueConfig.", + "canonical": true, + "file": "security_center.delete_resource_value_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "DeleteResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_async", + "title": "SecurityCenter getResourceValueConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets a ResourceValueConfig.", + "canonical": true, + "file": "security_center.get_resource_value_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ResourceValueConfig", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "GetResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_async", + "title": "SecurityCenter listResourceValueConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists all ResourceValueConfigs.", + "canonical": true, + "file": "security_center.list_resource_value_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResourceValueConfigs", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListResourceValueConfigsResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListResourceValueConfigs", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_async", + "title": "SecurityCenter updateResourceValueConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing ResourceValueConfigs with new rules.", + "canonical": true, + "file": "security_center.update_resource_value_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", + "async": true, + "parameters": [ + { + "name": "resource_value_config", + "type": ".google.cloud.securitycenter.v1.ResourceValueConfig" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ResourceValueConfig", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "UpdateResourceValueConfig", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListValuedResources_async", + "title": "SecurityCenter listValuedResources Sample", + "origin": "API_DEFINITION", + "description": " Lists the valued resources for a set of simulation results and filter.", + "canonical": true, + "file": "security_center.list_valued_resources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 92, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListValuedResources", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListValuedResourcesResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListValuedResources", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } + }, + { + "regionTag": "securitycenter_v1_generated_SecurityCenter_ListAttackPaths_async", + "title": "SecurityCenter listAttackPaths Sample", + "origin": "API_DEFINITION", + "description": " Lists the attack paths for a set of simulation results or valued resources and filter.", + "canonical": true, + "file": "security_center.list_attack_paths.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAttackPaths", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.securitycenter.v1.ListAttackPathsResponse", + "client": { + "shortName": "SecurityCenterClient", + "fullName": "google.cloud.securitycenter.v1.SecurityCenterClient" + }, + "method": { + "shortName": "ListAttackPaths", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", + "service": { + "shortName": "SecurityCenter", + "fullName": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-securitycenter/src/v1/gapic_metadata.json b/packages/google-cloud-securitycenter/src/v1/gapic_metadata.json index e86b21802787..bf53b41973b9 100644 --- a/packages/google-cloud-securitycenter/src/v1/gapic_metadata.json +++ b/packages/google-cloud-securitycenter/src/v1/gapic_metadata.json @@ -50,6 +50,16 @@ "deleteSecurityHealthAnalyticsCustomModule" ] }, + "GetSimulation": { + "methods": [ + "getSimulation" + ] + }, + "GetValuedResource": { + "methods": [ + "getValuedResource" + ] + }, "GetBigQueryExport": { "methods": [ "getBigQueryExport" @@ -170,6 +180,56 @@ "updateBigQueryExport" ] }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "createEventThreatDetectionCustomModule" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "deleteEventThreatDetectionCustomModule" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "getEventThreatDetectionCustomModule" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "updateEventThreatDetectionCustomModule" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validateEventThreatDetectionCustomModule" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "getEffectiveEventThreatDetectionCustomModule" + ] + }, + "BatchCreateResourceValueConfigs": { + "methods": [ + "batchCreateResourceValueConfigs" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "deleteResourceValueConfig" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "getResourceValueConfig" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "updateResourceValueConfig" + ] + }, "BulkMuteFindings": { "methods": [ "bulkMuteFindings" @@ -256,6 +316,48 @@ "listBigQueryExportsStream", "listBigQueryExportsAsync" ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "listDescendantEventThreatDetectionCustomModules", + "listDescendantEventThreatDetectionCustomModulesStream", + "listDescendantEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "listEventThreatDetectionCustomModules", + "listEventThreatDetectionCustomModulesStream", + "listEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "listEffectiveEventThreatDetectionCustomModules", + "listEffectiveEventThreatDetectionCustomModulesStream", + "listEffectiveEventThreatDetectionCustomModulesAsync" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "listResourceValueConfigs", + "listResourceValueConfigsStream", + "listResourceValueConfigsAsync" + ] + }, + "ListValuedResources": { + "methods": [ + "listValuedResources", + "listValuedResourcesStream", + "listValuedResourcesAsync" + ] + }, + "ListAttackPaths": { + "methods": [ + "listAttackPaths", + "listAttackPathsStream", + "listAttackPathsAsync" + ] } } }, @@ -302,6 +404,16 @@ "deleteSecurityHealthAnalyticsCustomModule" ] }, + "GetSimulation": { + "methods": [ + "getSimulation" + ] + }, + "GetValuedResource": { + "methods": [ + "getValuedResource" + ] + }, "GetBigQueryExport": { "methods": [ "getBigQueryExport" @@ -422,6 +534,56 @@ "updateBigQueryExport" ] }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "createEventThreatDetectionCustomModule" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "deleteEventThreatDetectionCustomModule" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "getEventThreatDetectionCustomModule" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "updateEventThreatDetectionCustomModule" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validateEventThreatDetectionCustomModule" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "getEffectiveEventThreatDetectionCustomModule" + ] + }, + "BatchCreateResourceValueConfigs": { + "methods": [ + "batchCreateResourceValueConfigs" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "deleteResourceValueConfig" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "getResourceValueConfig" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "updateResourceValueConfig" + ] + }, "BulkMuteFindings": { "methods": [ "bulkMuteFindings" @@ -508,6 +670,48 @@ "listBigQueryExportsStream", "listBigQueryExportsAsync" ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "listDescendantEventThreatDetectionCustomModules", + "listDescendantEventThreatDetectionCustomModulesStream", + "listDescendantEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "listEventThreatDetectionCustomModules", + "listEventThreatDetectionCustomModulesStream", + "listEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "listEffectiveEventThreatDetectionCustomModules", + "listEffectiveEventThreatDetectionCustomModulesStream", + "listEffectiveEventThreatDetectionCustomModulesAsync" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "listResourceValueConfigs", + "listResourceValueConfigsStream", + "listResourceValueConfigsAsync" + ] + }, + "ListValuedResources": { + "methods": [ + "listValuedResources", + "listValuedResourcesStream", + "listValuedResourcesAsync" + ] + }, + "ListAttackPaths": { + "methods": [ + "listAttackPaths", + "listAttackPathsStream", + "listAttackPathsAsync" + ] } } } diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts index 0c4e8b7202d6..fb10c964b825 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts @@ -202,6 +202,9 @@ export class SecurityCenterClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + attackPathPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}' + ), folderAssetPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/assets/{asset}' ), @@ -211,9 +214,16 @@ export class SecurityCenterClient { folderConstraintNamePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/policies/{constraint_name}' ), + folderEventThreatDetectionSettingsModulePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}' + ), folderExportPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/bigQueryExports/{export}' ), + folderLocationMuteConfigPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/muteConfigs/{mute_config}' + ), folderMuteConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/muteConfigs/{mute_config}' ), @@ -255,9 +265,21 @@ export class SecurityCenterClient { organizationConstraintNamePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/policies/{constraint_name}' ), + organizationEventThreatDetectionSettingsPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/eventThreatDetectionSettings' + ), + organizationEventThreatDetectionSettingsModulePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}' + ), organizationExportPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/bigQueryExports/{export}' ), + organizationLocationMuteConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/muteConfigs/{mute_config}' + ), organizationMuteConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/muteConfigs/{mute_config}' ), @@ -280,6 +302,9 @@ export class SecurityCenterClient { organizationSettingsPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/organizationSettings' ), + organizationSimulationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}' + ), organizationSourcePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/sources/{source}' ), @@ -303,9 +328,16 @@ export class SecurityCenterClient { projectConstraintNamePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/policies/{constraint_name}' ), + projectEventThreatDetectionSettingsModulePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}' + ), projectExportPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/bigQueryExports/{export}' ), + projectLocationMuteConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/muteConfigs/{mute_config}' + ), projectMuteConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/muteConfigs/{mute_config}' ), @@ -334,6 +366,15 @@ export class SecurityCenterClient { new this._gaxModule.PathTemplate( 'projects/{project}/sources/{source}/findings/{finding}/securityMarks' ), + resourceValueConfigPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/resourceValueConfigs/{resource_value_config}' + ), + simulationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}' + ), + valuedResourcePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}' + ), }; // Some of the methods on this service return "paged" results, @@ -398,6 +439,38 @@ export class SecurityCenterClient { 'nextPageToken', 'bigQueryExports' ), + listDescendantEventThreatDetectionCustomModules: + new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'eventThreatDetectionCustomModules' + ), + listEventThreatDetectionCustomModules: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'eventThreatDetectionCustomModules' + ), + listEffectiveEventThreatDetectionCustomModules: + new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'effectiveEventThreatDetectionCustomModules' + ), + listResourceValueConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceValueConfigs' + ), + listValuedResources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'valuedResources' + ), + listAttackPaths: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'attackPaths' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -517,6 +590,8 @@ export class SecurityCenterClient { 'deleteMuteConfig', 'deleteNotificationConfig', 'deleteSecurityHealthAnalyticsCustomModule', + 'getSimulation', + 'getValuedResource', 'getBigQueryExport', 'getIamPolicy', 'getMuteConfig', @@ -553,6 +628,22 @@ export class SecurityCenterClient { 'deleteBigQueryExport', 'updateBigQueryExport', 'listBigQueryExports', + 'createEventThreatDetectionCustomModule', + 'deleteEventThreatDetectionCustomModule', + 'getEventThreatDetectionCustomModule', + 'listDescendantEventThreatDetectionCustomModules', + 'listEventThreatDetectionCustomModules', + 'updateEventThreatDetectionCustomModule', + 'validateEventThreatDetectionCustomModule', + 'getEffectiveEventThreatDetectionCustomModule', + 'listEffectiveEventThreatDetectionCustomModules', + 'batchCreateResourceValueConfigs', + 'deleteResourceValueConfig', + 'getResourceValueConfig', + 'listResourceValueConfigs', + 'updateResourceValueConfig', + 'listValuedResources', + 'listAttackPaths', ]; for (const methodName of securityCenterStubMethods) { const callPromise = this.securityCenterStub.then( @@ -680,9 +771,9 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. Resource name of the new custom module's parent. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule * Required. SecurityHealthAnalytics custom module to create. The provided * name is ignored and reset with provided parent information and @@ -787,7 +878,7 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". + * `organizations/[organization_id]`. * @param {google.cloud.securitycenter.v1.Source} request.source * Required. The Source being created, only the display_name and description * will be used. All other fields will be ignored. @@ -882,7 +973,7 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". + * `organizations/[organization_id]/sources/[source_id]`. * @param {string} request.findingId * Required. Unique identifier provided by the client within the parent scope. * It must be alphanumeric and less than or equal to 32 characters and @@ -980,8 +1071,8 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. * @param {google.cloud.securitycenter.v1.MuteConfig} request.muteConfig * Required. The mute config being created. * @param {string} request.muteConfigId @@ -1085,8 +1176,8 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * is `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. * @param {string} request.configId * Required. * Unique identifier provided by the client within the parent scope. @@ -1196,9 +1287,12 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} + * `organizations/{organization}/muteConfigs/{config_id}`, + * `folders/{folder}/muteConfigs/{config_id}`, + * `projects/{project}/muteConfigs/{config_id}`, + * `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + * `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + * `projects/{project}/locations/global/muteConfigs/{config_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1295,9 +1389,9 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". + * `organizations/[organization_id]/notificationConfigs/[config_id]`, + * `folders/[folder_id]/notificationConfigs/[config_id]`, + * or `projects/[project_id]/notificationConfigs/[config_id]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1400,10 +1494,10 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the custom module to delete. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1497,6 +1591,200 @@ export class SecurityCenterClient { callback ); } + /** + * Get the simulation by name or the latest simulation for the given + * organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The organization name or simulation name of this simulation + * + * Valid format: + * `organizations/{organization}/simulations/latest` + * `organizations/{organization}/simulations/{simulation}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.Simulation|Simulation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.get_simulation.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GetSimulation_async + */ + getSimulation( + request?: protos.google.cloud.securitycenter.v1.IGetSimulationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ISimulation, + protos.google.cloud.securitycenter.v1.IGetSimulationRequest | undefined, + {} | undefined, + ] + >; + getSimulation( + request: protos.google.cloud.securitycenter.v1.IGetSimulationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.ISimulation, + | protos.google.cloud.securitycenter.v1.IGetSimulationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSimulation( + request: protos.google.cloud.securitycenter.v1.IGetSimulationRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.ISimulation, + | protos.google.cloud.securitycenter.v1.IGetSimulationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSimulation( + request?: protos.google.cloud.securitycenter.v1.IGetSimulationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.ISimulation, + | protos.google.cloud.securitycenter.v1.IGetSimulationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.ISimulation, + | protos.google.cloud.securitycenter.v1.IGetSimulationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ISimulation, + protos.google.cloud.securitycenter.v1.IGetSimulationRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getSimulation(request, options, callback); + } + /** + * Get the valued resource by name + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of this valued resource + * + * Valid format: + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.ValuedResource|ValuedResource}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.get_valued_resource.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GetValuedResource_async + */ + getValuedResource( + request?: protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IValuedResource, + ( + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | undefined + ), + {} | undefined, + ] + >; + getValuedResource( + request: protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IValuedResource, + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getValuedResource( + request: protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IValuedResource, + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getValuedResource( + request?: protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IValuedResource, + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IValuedResource, + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IValuedResource, + ( + | protos.google.cloud.securitycenter.v1.IGetValuedResourceRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getValuedResource(request, options, callback); + } /** * Gets a BigQuery export. * @@ -1504,9 +1792,9 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} + * `organizations/{organization}/bigQueryExports/{export_id}`, + * `folders/{folder}/bigQueryExports/{export_id}`, or + * `projects/{project}/bigQueryExports/{export_id}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1689,9 +1977,12 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} + * `organizations/{organization}/muteConfigs/{config_id}`, + * `folders/{folder}/muteConfigs/{config_id}`, + * `projects/{project}/muteConfigs/{config_id}`, + * `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + * `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + * `projects/{project}/locations/global/muteConfigs/{config_id}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1782,9 +2073,9 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". + * `organizations/[organization_id]/notificationConfigs/[config_id]`, + * `folders/[folder_id]/notificationConfigs/[config_id]`, + * or `projects/[project_id]/notificationConfigs/[config_id]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1881,7 +2172,7 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". + * format is `organizations/[organization_id]/organizationSettings`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1982,10 +2273,10 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the effective custom module to get. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2086,10 +2377,10 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the custom module to get. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", - * "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", + * `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + * `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, * or - * "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2190,7 +2481,7 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". + * `organizations/[organization_id]/source/[source_id]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2283,9 +2574,9 @@ export class SecurityCenterClient { * Required. The [relative resource * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. * @param {google.cloud.securitycenter.v1.Finding.State} request.state * Required. The desired State of the finding. * @param {google.protobuf.Timestamp} request.startTime @@ -2382,9 +2673,9 @@ export class SecurityCenterClient { * Required. The [relative resource * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + * `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. * @param {google.cloud.securitycenter.v1.Finding.Mute} request.mute * Required. The desired state of the Mute. * @param {object} [options] @@ -3279,7 +3570,9 @@ export class SecurityCenterClient { * @param {google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule * Required. The SecurityHealthAnalytics custom module to update. * @param {google.protobuf.FieldMask} request.updateMask - * The list of fields to update. + * The list of fields to be updated. The only fields that can be updated are + * `enablement_state` and `custom_config`. If empty or set to the wildcard + * value `*`, both `enablement_state` and `custom_config` are updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3582,8 +3875,8 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.parent * Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * format is `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. * @param {google.cloud.securitycenter.v1.BigQueryExport} request.bigQueryExport * Required. The BigQuery export being created. * @param {string} request.bigQueryExportId @@ -3687,9 +3980,9 @@ export class SecurityCenterClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} + * `organizations/{organization}/bigQueryExports/{export_id}`, + * `folders/{folder}/bigQueryExports/{export_id}`, or + * `projects/{project}/bigQueryExports/{export_id}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3878,116 +4171,94 @@ export class SecurityCenterClient { this.initialize(); return this.innerApiCalls.updateBigQueryExport(request, options, callback); } - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The - * parent can be either an organization, folder or project. The findings - * matched by the filter will be muted after the LRO is done. + * Creates a resident Event Threat Detection custom module at the scope of the + * given Resource Manager parent, and also creates inherited custom modules + * for all descendants of the given parent. These modules are enabled by + * default. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param {string} request.filter - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. + * Required. The new custom module's parent. * - * The supported value types are: + * Its format is: * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * @param {string} request.muteAnnotation - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule + * Required. The module to create. The + * event_threat_detection_custom_module.name will be ignored and server + * generated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.bulk_mute_findings.js - * region_tag:securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_async + * @example include:samples/generated/v1/security_center.create_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_async */ - bulkMuteFindings( - request?: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + createEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | undefined + ), {} | undefined, ] >; - bulkMuteFindings( - request: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + createEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): void; - bulkMuteFindings( - request: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + createEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, callback: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): void; - bulkMuteFindings( - request?: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + createEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.ICreateEventThreatDetectionCustomModuleRequest + | undefined + ), {} | undefined, ] > | void { @@ -4007,130 +4278,95 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.bulkMuteFindings(request, options, callback); - } - /** - * Check the status of the long running operation returned by `bulkMuteFindings()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/security_center.bulk_mute_findings.js - * region_tag:securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_async - */ - async checkBulkMuteFindingsProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.securitycenter.v1.BulkMuteFindingsResponse, - protos.google.protobuf.Empty - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.bulkMuteFindings, - this._gaxModule.createDefaultBackoffSettings() + return this.innerApiCalls.createEventThreatDetectionCustomModule( + request, + options, + callback ); - return decodeOperation as LROperation< - protos.google.cloud.securitycenter.v1.BulkMuteFindingsResponse, - protos.google.protobuf.Empty - >; } /** - * Runs asset discovery. The discovery is tracked with a long-running - * operation. - * - * This API can only be called with limited frequency for an organization. If - * it is called too frequently the caller will receive a TOO_MANY_REQUESTS - * error. + * Deletes the specified Event Threat Detection custom module and all of its + * descendants in the Resource Manager hierarchy. This method is only + * supported for resident custom modules. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". + * @param {string} request.name + * Required. Name of the custom module to delete. + * + * Its format is: + * + * * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". + * * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". + * * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.run_asset_discovery.js - * region_tag:securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_async - * @deprecated RunAssetDiscovery is deprecated and may be removed in a future version. + * @example include:samples/generated/v1/security_center.delete_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_async */ - runAssetDiscovery( - request?: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + deleteEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | undefined + ), {} | undefined, ] >; - runAssetDiscovery( - request: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + deleteEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): void; - runAssetDiscovery( - request: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + deleteEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, callback: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): void; - runAssetDiscovery( - request?: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + deleteEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.securitycenter.v1.IDeleteEventThreatDetectionCustomModuleRequest + | undefined + ), {} | undefined, ] > | void { @@ -4147,255 +4383,317 @@ export class SecurityCenterClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$RunAssetDiscovery', - 'RunAssetDiscovery is deprecated and may be removed in a future version.', - 'DeprecationWarning' + return this.innerApiCalls.deleteEventThreatDetectionCustomModule( + request, + options, + callback ); - return this.innerApiCalls.runAssetDiscovery(request, options, callback); } /** - * Check the status of the long running operation returned by `runAssetDiscovery()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * Gets an Event Threat Detection custom module. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the custom module to get. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + * * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + * * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.run_asset_discovery.js - * region_tag:securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_async - * @deprecated RunAssetDiscovery is deprecated and may be removed in a future version. + * @example include:samples/generated/v1/security_center.get_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_async */ - async checkRunAssetDiscoveryProgress( - name: string + getEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, - protos.google.protobuf.Empty + [ + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + >; + getEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined > - > { - this.warn( - 'DEP$SecurityCenter-$checkRunAssetDiscoveryProgress', - 'checkRunAssetDiscoveryProgress is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.runAssetDiscovery, - this._gaxModule.createDefaultBackoffSettings() + ): void; + getEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IGetEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getEventThreatDetectionCustomModule( + request, + options, + callback ); - return decodeOperation as LROperation< - protos.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, - protos.google.protobuf.Empty - >; } /** - * Filters an organization's assets and groups them by their specified - * properties. + * Updates the Event Threat Detection custom module with the given name based + * on the given update mask. Updating the enablement state is supported for + * both resident and inherited modules (though resident modules cannot have an + * enablement state of "inherited"). Updating the display name or + * configuration of a module is supported for resident modules only. The type + * of a module cannot be changed. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param {string} request.filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * - * The following fields are supported when compare_duration is not set: - * - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * - * The following fields are supported when compare_duration is set: - * - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. + * @param {google.cloud.securitycenter.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule + * Required. The module being updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.update_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_async + */ + updateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + >; + updateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IUpdateEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'event_threat_detection_custom_module.name': + request.eventThreatDetectionCustomModule!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEventThreatDetectionCustomModule( + request, + options, + callback + ); + } + /** + * Validates the given Event Threat Detection custom module. * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @param {string} request.pageToken - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent to validate the Custom Module under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + * @param {string} request.rawText + * Required. The raw text of the module's contents. Used to generate error + * messages. + * @param {string} request.type + * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `groupAssetsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse|ValidateEventThreatDetectionCustomModuleResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @deprecated GroupAssets is deprecated and may be removed in a future version. + * @example include:samples/generated/v1/security_center.validate_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_async */ - groupAssets( - request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + validateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.IGroupResult[], - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest | null, - protos.google.cloud.securitycenter.v1.IGroupAssetsResponse, + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + ( + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, ] >; - groupAssets( - request: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + validateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, - | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + callback: Callback< + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + {} | null | undefined > ): void; - groupAssets( - request: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, - callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, - | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + validateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + {} | null | undefined > ): void; - groupAssets( - request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + validateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest, optionsOrCallback?: | CallOptions - | PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, - | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + | Callback< + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + {} | null | undefined >, - callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, - | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + callback?: Callback< + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + {} | null | undefined > ): Promise< [ - protos.google.cloud.securitycenter.v1.IGroupResult[], - protos.google.cloud.securitycenter.v1.IGroupAssetsRequest | null, - protos.google.cloud.securitycenter.v1.IGroupAssetsResponse, + protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse, + ( + | protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, ] > | void { request = request || {}; @@ -4414,36 +4712,2203 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$GroupAssets', - 'GroupAssets is deprecated and may be removed in a future version.', - 'DeprecationWarning' + return this.innerApiCalls.validateEventThreatDetectionCustomModule( + request, + options, + callback ); - return this.innerApiCalls.groupAssets(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * Gets an effective Event Threat Detection custom module at the given level. + * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param {string} request.filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. + * @param {string} request.name + * Required. The resource name of the effective Event Threat Detection custom + * module. * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: + * Its format is: * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka + * * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + * * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + * * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.get_effective_event_threat_detection_custom_module.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_async + */ + getEffectiveEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + >; + getEffectiveEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEffectiveEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEffectiveEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule, + ( + | protos.google.cloud.securitycenter.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getEffectiveEventThreatDetectionCustomModule( + request, + options, + callback + ); + } + /** + * Creates a ResourceValueConfig for an organization. Maps user's tags to + * difference resource values for use by the attack path simulation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the new ResourceValueConfig's parent. + * The parent field in the CreateResourceValueConfigRequest + * messages must either be empty or match this field. + * @param {number[]} request.requests + * Required. The resource value configs to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse|BatchCreateResourceValueConfigsResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.batch_create_resource_value_configs.js + * region_tag:securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_async + */ + batchCreateResourceValueConfigs( + request?: protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + ( + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | undefined + ), + {} | undefined, + ] + >; + batchCreateResourceValueConfigs( + request: protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateResourceValueConfigs( + request: protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateResourceValueConfigs( + request?: protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse, + ( + | protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchCreateResourceValueConfigs( + request, + options, + callback + ); + } + /** + * Deletes a ResourceValueConfig. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the ResourceValueConfig to delete + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.delete_resource_value_config.js + * region_tag:securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_async + */ + deleteResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + >; + deleteResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.securitycenter.v1.IDeleteResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteResourceValueConfig( + request, + options, + callback + ); + } + /** + * Gets a ResourceValueConfig. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource value config to retrieve. Its format is + * `organizations/{organization}/resourceValueConfigs/{config_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.ResourceValueConfig|ResourceValueConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.get_resource_value_config.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_async + */ + getResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + ( + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + >; + getResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + ( + | protos.google.cloud.securitycenter.v1.IGetResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getResourceValueConfig( + request, + options, + callback + ); + } + /** + * Updates an existing ResourceValueConfigs with new rules. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.securitycenter.v1.ResourceValueConfig} request.resourceValueConfig + * Required. The resource value config being updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycenter.v1.ResourceValueConfig|ResourceValueConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.update_resource_value_config.js + * region_tag:securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_async + */ + updateResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + ( + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + >; + updateResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateResourceValueConfig( + request: protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, + callback: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateResourceValueConfig( + request?: protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IResourceValueConfig, + ( + | protos.google.cloud.securitycenter.v1.IUpdateResourceValueConfigRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'resource_value_config.name': request.resourceValueConfig!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateResourceValueConfig( + request, + options, + callback + ); + } + + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The + * parent can be either an organization, folder or project. The findings + * matched by the filter will be muted after the LRO is done. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, at which bulk action needs to be applied. Its format + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * @param {string} request.muteAnnotation + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.bulk_mute_findings.js + * region_tag:securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_async + */ + bulkMuteFindings( + request?: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + bulkMuteFindings( + request: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkMuteFindings( + request: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + callback: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkMuteFindings( + request?: protos.google.cloud.securitycenter.v1.IBulkMuteFindingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkMuteFindings(request, options, callback); + } + /** + * Check the status of the long running operation returned by `bulkMuteFindings()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.bulk_mute_findings.js + * region_tag:securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_async + */ + async checkBulkMuteFindingsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.securitycenter.v1.BulkMuteFindingsResponse, + protos.google.protobuf.Empty + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkMuteFindings, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.securitycenter.v1.BulkMuteFindingsResponse, + protos.google.protobuf.Empty + >; + } + /** + * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the organization to run asset discovery for. Its format + * is `organizations/[organization_id]`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.run_asset_discovery.js + * region_tag:securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_async + * @deprecated RunAssetDiscovery is deprecated and may be removed in a future version. + */ + runAssetDiscovery( + request?: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + runAssetDiscovery( + request: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + runAssetDiscovery( + request: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + callback: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + runAssetDiscovery( + request?: protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$RunAssetDiscovery', + 'RunAssetDiscovery is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.innerApiCalls.runAssetDiscovery(request, options, callback); + } + /** + * Check the status of the long running operation returned by `runAssetDiscovery()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.run_asset_discovery.js + * region_tag:securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_async + * @deprecated RunAssetDiscovery is deprecated and may be removed in a future version. + */ + async checkRunAssetDiscoveryProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, + protos.google.protobuf.Empty + > + > { + this.warn( + 'DEP$SecurityCenter-$checkRunAssetDiscoveryProgress', + 'checkRunAssetDiscoveryProgress is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.runAssetDiscovery, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse, + protos.google.protobuf.Empty + >; + } + /** + * Filters an organization's assets and groups them by their specified + * properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent to group the assets by. Its format is + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * + * The following fields are supported when compare_duration is not set: + * + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * + * The following fields are supported when compare_duration is set: + * + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @param {string} request.pageToken + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `groupAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @deprecated GroupAssets is deprecated and may be removed in a future version. + */ + groupAssets( + request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IGroupResult[], + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest | null, + protos.google.cloud.securitycenter.v1.IGroupAssetsResponse, + ] + >; + groupAssets( + request: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): void; + groupAssets( + request: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): void; + groupAssets( + request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + | protos.google.cloud.securitycenter.v1.IGroupAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IGroupResult[], + protos.google.cloud.securitycenter.v1.IGroupAssetsRequest | null, + protos.google.cloud.securitycenter.v1.IGroupAssetsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$GroupAssets', + 'GroupAssets is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.innerApiCalls.groupAssets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent to group the assets by. Its format is + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * + * The following fields are supported when compare_duration is not set: + * + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * + * The following fields are supported when compare_duration is set: + * + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @param {string} request.pageToken + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `groupAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @deprecated GroupAssets is deprecated and may be removed in a future version. + */ + groupAssetsStream( + request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['groupAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$GroupAssets', + 'GroupAssets is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.descriptors.page.groupAssets.createStream( + this.innerApiCalls.groupAssets as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `groupAssets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent to group the assets by. Its format is + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * + * The following fields are supported when compare_duration is not set: + * + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * + * The following fields are supported when compare_duration is set: + * + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @param {string} request.pageToken + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.group_assets.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GroupAssets_async + * @deprecated GroupAssets is deprecated and may be removed in a future version. + */ + groupAssetsAsync( + request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['groupAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$GroupAssets', + 'GroupAssets is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.descriptors.page.groupAssets.asyncIterate( + this.innerApiCalls['groupAssets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Filters an organization or source's findings and groups them by their + * specified properties. + * + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings, + * /v1/folders/{folder_id}/sources/-/findings, + * /v1/projects/{project_id}/sources/-/findings + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the source to groupBy. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + * provide a source_id of `-`. For example: + * `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + * or `projects/{project_id}/sources/-` + * @param {string} request.filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * + * The following fields are supported when compare_duration is set: + * + * * state_change + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {string} request.pageToken + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `groupFindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + groupFindings( + request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IGroupResult[], + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest | null, + protos.google.cloud.securitycenter.v1.IGroupFindingsResponse, + ] + >; + groupFindings( + request: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): void; + groupFindings( + request: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): void; + groupFindings( + request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IGroupResult + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IGroupResult[], + protos.google.cloud.securitycenter.v1.IGroupFindingsRequest | null, + protos.google.cloud.securitycenter.v1.IGroupFindingsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.groupFindings(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the source to groupBy. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + * provide a source_id of `-`. For example: + * `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + * or `projects/{project_id}/sources/-` + * @param {string} request.filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * + * The following fields are supported when compare_duration is set: + * + * * state_change + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {string} request.pageToken + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `groupFindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + groupFindingsStream( + request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['groupFindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.groupFindings.createStream( + this.innerApiCalls.groupFindings as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `groupFindings`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the source to groupBy. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + * provide a source_id of `-`. For example: + * `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + * or `projects/{project_id}/sources/-` + * @param {string} request.filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * @param {string} request.groupBy + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * + * The following fields are supported when compare_duration is set: + * + * * state_change + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @param {string} request.pageToken + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.group_findings.js + * region_tag:securitycenter_v1_generated_SecurityCenter_GroupFindings_async + */ + groupFindingsAsync( + request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['groupFindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.groupFindings.asyncIterate( + this.innerApiCalls['groupFindings'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists an organization's assets. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following are the allowed field and operator combinations: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @param {google.protobuf.Duration} request.compareDuration + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @param {string} request.pageToken + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAssetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @deprecated ListAssets is deprecated and may be removed in a future version. + */ + listAssets( + request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[], + protos.google.cloud.securitycenter.v1.IListAssetsRequest | null, + protos.google.cloud.securitycenter.v1.IListAssetsResponse, + ] + >; + listAssets( + request: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListAssetsRequest, + | protos.google.cloud.securitycenter.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + > + ): void; + listAssets( + request: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListAssetsRequest, + | protos.google.cloud.securitycenter.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + > + ): void; + listAssets( + request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IListAssetsRequest, + | protos.google.cloud.securitycenter.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListAssetsRequest, + | protos.google.cloud.securitycenter.v1.IListAssetsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[], + protos.google.cloud.securitycenter.v1.IListAssetsRequest | null, + protos.google.cloud.securitycenter.v1.IListAssetsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$ListAssets', + 'ListAssets is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.innerApiCalls.listAssets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka * * The supported operators are: * @@ -4457,7 +6922,7 @@ export class SecurityCenterClient { * * integer literals without quotes. * * boolean literals `true` and `false` without quotes. * - * The following field and operator combinations are supported: + * The following are the allowed field and operator combinations: * * * name: `=` * * update_time: `=`, `>`, `<`, `>=`, `<=` @@ -4493,33 +6958,41 @@ export class SecurityCenterClient { * * Use a negated partial match on the empty string to filter based on a * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * - * The following fields are supported when compare_duration is not set: - * - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * - * The following fields are supported when compare_duration is set: + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. * - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and * read_time. * - * The state change value is derived based on the presence of the asset at the + * The state_change value is derived based on the presence of the asset at the * two points in time. Intermediate state changes between the two times don't * affect the result. For example, the results aren't affected if the asset is * removed and re-created again. @@ -4527,45 +7000,41 @@ export class SecurityCenterClient { * Possible "state_change" values when compare_duration is specified: * * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. + * compare_duration, but present at read_time. * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. + * compare_duration, but not present at read_time. * * "ACTIVE": indicates that the asset was present at both the * start and the end of the time period defined by - * compare_duration and reference_time. + * compare_duration and read_time. * * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at + * is "UNUSED", which will be the state_change set for all assets present at * read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. * @param {string} request.pageToken - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `groupAssetsAsync()` + * We recommend using `listAssetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @deprecated GroupAssets is deprecated and may be removed in a future version. + * @deprecated ListAssets is deprecated and may be removed in a future version. */ - groupAssetsStream( - request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + listAssetsStream( + request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -4576,31 +7045,33 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['groupAssets']; + const defaultCallSettings = this._defaults['listAssets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); this.warn( - 'DEP$SecurityCenter-$GroupAssets', - 'GroupAssets is deprecated and may be removed in a future version.', + 'DEP$SecurityCenter-$ListAssets', + 'ListAssets is deprecated and may be removed in a future version.', 'DeprecationWarning' ); - return this.descriptors.page.groupAssets.createStream( - this.innerApiCalls.groupAssets as GaxCall, + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as GaxCall, request, callSettings ); } /** - * Equivalent to `groupAssets`, but returns an iterable object. + * Equivalent to `listAssets`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. * @param {string} request.filter * Expression that defines the filter to apply across assets. * The expression is a list of zero or more restrictions combined via logical @@ -4628,7 +7099,7 @@ export class SecurityCenterClient { * * integer literals without quotes. * * boolean literals `true` and `false` without quotes. * - * The following field and operator combinations are supported: + * The following are the allowed field and operator combinations: * * * name: `=` * * update_time: `=`, `>`, `<`, `>=`, `<=` @@ -4664,33 +7135,41 @@ export class SecurityCenterClient { * * Use a negated partial match on the empty string to filter based on a * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * - * The following fields are supported when compare_duration is not set: - * - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * - * The following fields are supported when compare_duration is set: + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. * - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @param {google.protobuf.Timestamp} request.readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and * read_time. * - * The state change value is derived based on the presence of the asset at the + * The state_change value is derived based on the presence of the asset at the * two points in time. Intermediate state changes between the two times don't * affect the result. For example, the results aren't affected if the asset is * removed and re-created again. @@ -4698,48 +7177,254 @@ export class SecurityCenterClient { * Possible "state_change" values when compare_duration is specified: * * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. + * compare_duration, but present at read_time. * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. + * compare_duration, but not present at read_time. * * "ACTIVE": indicates that the asset was present at both the * start and the end of the time period defined by - * compare_duration and reference_time. + * compare_duration and read_time. * * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at + * is "UNUSED", which will be the state_change set for all assets present at * read_time. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @param {string} request.pageToken + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.list_assets.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListAssets_async + * @deprecated ListAssets is deprecated and may be removed in a future version. + */ + listAssetsAsync( + request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + this.warn( + 'DEP$SecurityCenter-$ListAssets', + 'ListAssets is deprecated and may be removed in a future version.', + 'DeprecationWarning' + ); + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of all resident SecurityHealthAnalyticsCustomModules under + * the given CRM parent and all of the parent’s CRM descendants. * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list descendant custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {string} request.pageToken + * The value returned by the last call indicating a continuation + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDescendantSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, + ] + >; + listDescendantSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + > + ): void; + listDescendantSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + > + ): void; + listDescendantSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list descendant custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. * @param {string} request.pageToken - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. + * The value returned by the last call indicating a continuation + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDescendantSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDescendantSecurityHealthAnalyticsCustomModules`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list descendant custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. + * @param {string} request.pageToken + * The value returned by the last call indicating a continuation * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.group_assets.js - * region_tag:securitycenter_v1_generated_SecurityCenter_GroupAssets_async - * @deprecated GroupAssets is deprecated and may be removed in a future version. + * @example include:samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_async */ - groupAssetsAsync( - request?: protos.google.cloud.securitycenter.v1.IGroupAssetsRequest, + listDescendantSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -4748,39 +7433,34 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['groupAssets']; + const defaultCallSettings = + this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$GroupAssets', - 'GroupAssets is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.descriptors.page.groupAssets.asyncIterate( - this.innerApiCalls['groupAssets'] as GaxCall, + return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls[ + 'listDescendantSecurityHealthAnalyticsCustomModules' + ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Filters an organization or source's findings and groups them by their - * specified properties. + * Lists an organization or source's findings. * - * To group across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings, - * /v1/folders/{folder_id}/sources/-/findings, - * /v1/projects/{project_id}/sources/-/findings + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * Required. Name of the source the findings belong to. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To list across all sources * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- + * `organizations/{organization_id}/sources/-`, + * `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` * @param {string} request.filter * Expression that defines the filter to apply across findings. * The expression is a list of one or more restrictions combined via logical @@ -4841,33 +7521,39 @@ export class SecurityCenterClient { * * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. * * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity - * - * The following fields are supported when compare_duration is set: - * - * * state_change + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks * @param {google.protobuf.Timestamp} request.readTime * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. * * The state_change value is derived based on the presence and state of the * finding at the two points in time. Intermediate state changes between the @@ -4890,14 +7576,14 @@ export class SecurityCenterClient { * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. * @param {string} request.pageToken - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is @@ -4905,69 +7591,69 @@ export class SecurityCenterClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `groupFindingsAsync()` + * We recommend using `listFindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - groupFindings( - request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listFindings( + request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.IGroupResult[], - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest | null, - protos.google.cloud.securitycenter.v1.IGroupFindingsResponse, + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[], + protos.google.cloud.securitycenter.v1.IListFindingsRequest | null, + protos.google.cloud.securitycenter.v1.IListFindingsResponse, ] >; - groupFindings( - request: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listFindings( + request: protos.google.cloud.securitycenter.v1.IListFindingsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, - | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + protos.google.cloud.securitycenter.v1.IListFindingsRequest, + | protos.google.cloud.securitycenter.v1.IListFindingsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult > ): void; - groupFindings( - request: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listFindings( + request: protos.google.cloud.securitycenter.v1.IListFindingsRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, - | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + protos.google.cloud.securitycenter.v1.IListFindingsRequest, + | protos.google.cloud.securitycenter.v1.IListFindingsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult > ): void; - groupFindings( - request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listFindings( + request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, - | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + protos.google.cloud.securitycenter.v1.IListFindingsRequest, + | protos.google.cloud.securitycenter.v1.IListFindingsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, - | protos.google.cloud.securitycenter.v1.IGroupFindingsResponse + protos.google.cloud.securitycenter.v1.IListFindingsRequest, + | protos.google.cloud.securitycenter.v1.IListFindingsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IGroupResult + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult > ): Promise< [ - protos.google.cloud.securitycenter.v1.IGroupResult[], - protos.google.cloud.securitycenter.v1.IGroupFindingsRequest | null, - protos.google.cloud.securitycenter.v1.IGroupFindingsResponse, + protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[], + protos.google.cloud.securitycenter.v1.IListFindingsRequest | null, + protos.google.cloud.securitycenter.v1.IListFindingsResponse, ] > | void { request = request || {}; @@ -4986,7 +7672,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.groupFindings(request, options, callback); + return this.innerApiCalls.listFindings(request, options, callback); } /** @@ -4994,13 +7680,13 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * Required. Name of the source the findings belong to. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To list across all sources * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- + * `organizations/{organization_id}/sources/-`, + * `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` * @param {string} request.filter * Expression that defines the filter to apply across findings. * The expression is a list of one or more restrictions combined via logical @@ -5061,33 +7747,39 @@ export class SecurityCenterClient { * * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. * * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity - * - * The following fields are supported when compare_duration is set: - * - * * state_change + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks * @param {google.protobuf.Timestamp} request.readTime * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. * * The state_change value is derived based on the presence and state of the * finding at the two points in time. Intermediate state changes between the @@ -5110,14 +7802,14 @@ export class SecurityCenterClient { * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. * @param {string} request.pageToken - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is @@ -5125,16 +7817,16 @@ export class SecurityCenterClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `groupFindingsAsync()` + * We recommend using `listFindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - groupFindingsStream( - request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listFindingsStream( + request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5145,30 +7837,30 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['groupFindings']; + const defaultCallSettings = this._defaults['listFindings']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.groupFindings.createStream( - this.innerApiCalls.groupFindings as GaxCall, + return this.descriptors.page.listFindings.createStream( + this.innerApiCalls.listFindings as GaxCall, request, callSettings ); } /** - * Equivalent to `groupFindings`, but returns an iterable object. + * Equivalent to `listFindings`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * Required. Name of the source the findings belong to. Its format is + * `organizations/[organization_id]/sources/[source_id]`, + * `folders/[folder_id]/sources/[source_id]`, or + * `projects/[project_id]/sources/[source_id]`. To list across all sources * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- + * `organizations/{organization_id}/sources/-`, + * `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` * @param {string} request.filter * Expression that defines the filter to apply across findings. * The expression is a list of one or more restrictions combined via logical @@ -5229,33 +7921,39 @@ export class SecurityCenterClient { * * resource.project_name: `=`, `:` * * resource.project_display_name: `=`, `:` * * resource.type: `=`, `:` - * @param {string} request.groupBy - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * @param {string} request.orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. * * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity - * - * The following fields are supported when compare_duration is set: - * - * * state_change + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks * @param {google.protobuf.Timestamp} request.readTime * Time used as a reference point when filtering findings. The filter is * limited to findings existing at the supplied time and their values are * those at that specific time. Absence of this field will default to the * API's version of NOW. * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. * * The state_change value is derived based on the presence and state of the * finding at the two points in time. Intermediate state changes between the @@ -5278,34 +7976,247 @@ export class SecurityCenterClient { * the filter at read_time. * * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @param {google.protobuf.FieldMask} request.fieldMask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * @param {string} request.pageToken + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.list_findings.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListFindings_async + */ + listFindingsAsync( + request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFindings.asyncIterate( + this.innerApiCalls['listFindings'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists mute configs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of mute configs. Its format + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. + * @param {number} request.pageSize + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMuteConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMuteConfigs( + request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IMuteConfig[], + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse, + ] + >; + listMuteConfigs( + request: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IMuteConfig + > + ): void; + listMuteConfigs( + request: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IMuteConfig + > + ): void; + listMuteConfigs( + request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IMuteConfig + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IMuteConfig + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IMuteConfig[], + protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listMuteConfigs(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of mute configs. Its format + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. + * @param {number} request.pageSize + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMuteConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMuteConfigsStream( + request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMuteConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMuteConfigs.createStream( + this.innerApiCalls.listMuteConfigs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMuteConfigs`, but returns an iterable object. * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @param {string} request.pageToken - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of mute configs. Its format + * is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.GroupResult|GroupResult}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.group_findings.js - * region_tag:securitycenter_v1_generated_SecurityCenter_GroupFindings_async + * @example include:samples/generated/v1/security_center.list_mute_configs.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_async */ - groupFindingsAsync( - request?: protos.google.cloud.securitycenter.v1.IGroupFindingsRequest, + listMuteConfigsAsync( + request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -5314,148 +8225,27 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['groupFindings']; + const defaultCallSettings = this._defaults['listMuteConfigs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.groupFindings.asyncIterate( - this.innerApiCalls['groupFindings'] as GaxCall, + return this.descriptors.page.listMuteConfigs.asyncIterate( + this.innerApiCalls['listMuteConfigs'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists an organization's assets. + * Lists notification configs. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param {string} request.filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following are the allowed field and operator combinations: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". * @param {string} request.pageToken - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is @@ -5463,70 +8253,69 @@ export class SecurityCenterClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listAssetsAsync()` + * We recommend using `listNotificationConfigsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @deprecated ListAssets is deprecated and may be removed in a future version. */ - listAssets( - request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listNotificationConfigs( + request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[], - protos.google.cloud.securitycenter.v1.IListAssetsRequest | null, - protos.google.cloud.securitycenter.v1.IListAssetsResponse, + protos.google.cloud.securitycenter.v1.INotificationConfig[], + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse, ] >; - listAssets( - request: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listNotificationConfigs( + request: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListAssetsRequest, - | protos.google.cloud.securitycenter.v1.IListAssetsResponse + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + protos.google.cloud.securitycenter.v1.INotificationConfig > ): void; - listAssets( - request: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listNotificationConfigs( + request: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListAssetsRequest, - | protos.google.cloud.securitycenter.v1.IListAssetsResponse + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + protos.google.cloud.securitycenter.v1.INotificationConfig > ): void; - listAssets( - request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listNotificationConfigs( + request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListAssetsRequest, - | protos.google.cloud.securitycenter.v1.IListAssetsResponse + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + protos.google.cloud.securitycenter.v1.INotificationConfig >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListAssetsRequest, - | protos.google.cloud.securitycenter.v1.IListAssetsResponse + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult + protos.google.cloud.securitycenter.v1.INotificationConfig > ): Promise< [ - protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[], - protos.google.cloud.securitycenter.v1.IListAssetsRequest | null, - protos.google.cloud.securitycenter.v1.IListAssetsResponse, + protos.google.cloud.securitycenter.v1.INotificationConfig[], + protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse, ] > | void { request = request || {}; @@ -5545,12 +8334,11 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$ListAssets', - 'ListAssets is deprecated and may be removed in a future version.', - 'DeprecationWarning' + return this.innerApiCalls.listNotificationConfigs( + request, + options, + callback ); - return this.innerApiCalls.listAssets(request, options, callback); } /** @@ -5558,151 +8346,234 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param {string} request.filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following are the allowed field and operator combinations: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * @param {string} request.pageToken + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listNotificationConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listNotificationConfigsStream( + request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listNotificationConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listNotificationConfigs.createStream( + this.innerApiCalls.listNotificationConfigs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listNotificationConfigs`, but returns an iterable object. * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". * @param {string} request.pageToken - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.list_notification_configs.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_async + */ + listNotificationConfigsAsync( + request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listNotificationConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listNotificationConfigs.asyncIterate( + this.innerApiCalls['listNotificationConfigs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + * given parent. This includes resident modules defined at the scope of the + * parent, and inherited modules, inherited from CRM ancestors. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {string} request.pageToken + * The value returned by the last call indicating a continuation + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listEffectiveSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, + ] + >; + listEffectiveSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + > + ): void; + listEffectiveSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + > + ): void; + listEffectiveSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {string} request.pageToken + * The value returned by the last call indicating a continuation + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listAssetsAsync()` + * We recommend using `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @deprecated ListAssets is deprecated and may be removed in a future version. */ - listAssetsStream( - request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listEffectiveSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5713,176 +8584,50 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAssets']; + const defaultCallSettings = + this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$ListAssets', - 'ListAssets is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.descriptors.page.listAssets.createStream( - this.innerApiCalls.listAssets as GaxCall, + return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as GaxCall, request, callSettings ); } /** - * Equivalent to `listAssets`, but returns an iterable object. + * Equivalent to `listEffectiveSecurityHealthAnalyticsCustomModules`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param {string} request.filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following are the allowed field and operator combinations: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * @param {string} request.pageToken - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. + * Required. Name of parent to list effective custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. + * @param {string} request.pageToken + * The value returned by the last call indicating a continuation * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult|ListAssetsResult}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_assets.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListAssets_async - * @deprecated ListAssets is deprecated and may be removed in a future version. + * @example include:samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_async */ - listAssetsAsync( - request?: protos.google.cloud.securitycenter.v1.IListAssetsRequest, + listEffectiveSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -5891,31 +8636,30 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAssets']; + const defaultCallSettings = + this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - this.warn( - 'DEP$SecurityCenter-$ListAssets', - 'ListAssets is deprecated and may be removed in a future version.', - 'DeprecationWarning' - ); - return this.descriptors.page.listAssets.asyncIterate( - this.innerApiCalls['listAssets'] as GaxCall, + return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls[ + 'listEffectiveSecurityHealthAnalyticsCustomModules' + ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns a list of all resident SecurityHealthAnalyticsCustomModules under - * the given CRM parent and all of the parent’s CRM descendants. + * Returns a list of all SecurityHealthAnalyticsCustomModules for the given + * parent. This includes resident modules defined at the scope of the parent, + * and inherited modules, inherited from CRM ancestors. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list descendant custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. @@ -5928,56 +8672,56 @@ export class SecurityCenterClient { * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listSecurityHealthAnalyticsCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listDescendantSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + listSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, options?: CallOptions ): Promise< [ protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, ] >; - listDescendantSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + listSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse | null | undefined, protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule > ): void; - listDescendantSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + listSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse | null | undefined, protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule > ): void; - listDescendantSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + listSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse | null | undefined, protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse | null | undefined, protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule @@ -5985,8 +8729,8 @@ export class SecurityCenterClient { ): Promise< [ protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, ] > | void { request = request || {}; @@ -6005,7 +8749,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules( + return this.innerApiCalls.listSecurityHealthAnalyticsCustomModules( request, options, callback @@ -6017,10 +8761,10 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list descendant custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. @@ -6032,13 +8776,13 @@ export class SecurityCenterClient { * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listSecurityHealthAnalyticsCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listDescendantSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + listSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -6050,208 +8794,78 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); const defaultCallSettings = - this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream( - this.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listDescendantSecurityHealthAnalyticsCustomModules`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent to list descendant custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" - * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * @param {string} request.pageToken - * The value returned by the last call indicating a continuation - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/security_center.list_descendant_security_health_analytics_custom_modules.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_async - */ - listDescendantSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycenter.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - options?: CallOptions - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = - this._defaults['listDescendantSecurityHealthAnalyticsCustomModules']; + this._defaults['listSecurityHealthAnalyticsCustomModules']; const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate( - this.innerApiCalls[ - 'listDescendantSecurityHealthAnalyticsCustomModules' - ] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists an organization or source's findings. - * - * To list across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @param {string} request.filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. + this.initialize(); + return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls.listSecurityHealthAnalyticsCustomModules as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listSecurityHealthAnalyticsCustomModules`, but returns an iterable object. * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list custom modules. Its format is + * `organizations/{organization}/securityHealthAnalyticsSettings`, + * `folders/{folder}/securityHealthAnalyticsSettings`, or + * `projects/{project}/securityHealthAnalyticsSettings` + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. * @param {string} request.pageToken - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and + * The value returned by the last call indicating a continuation + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_async + */ + listSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls['listSecurityHealthAnalyticsCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all sources belonging to an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent of sources to list. Its format should + * be `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.pageToken + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is @@ -6259,69 +8873,69 @@ export class SecurityCenterClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.Source|Source}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listFindingsAsync()` + * We recommend using `listSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listFindings( - request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listSources( + request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[], - protos.google.cloud.securitycenter.v1.IListFindingsRequest | null, - protos.google.cloud.securitycenter.v1.IListFindingsResponse, + protos.google.cloud.securitycenter.v1.ISource[], + protos.google.cloud.securitycenter.v1.IListSourcesRequest | null, + protos.google.cloud.securitycenter.v1.IListSourcesResponse, ] >; - listFindings( - request: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listSources( + request: protos.google.cloud.securitycenter.v1.IListSourcesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListFindingsRequest, - | protos.google.cloud.securitycenter.v1.IListFindingsResponse + protos.google.cloud.securitycenter.v1.IListSourcesRequest, + | protos.google.cloud.securitycenter.v1.IListSourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult + protos.google.cloud.securitycenter.v1.ISource > ): void; - listFindings( - request: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listSources( + request: protos.google.cloud.securitycenter.v1.IListSourcesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListFindingsRequest, - | protos.google.cloud.securitycenter.v1.IListFindingsResponse + protos.google.cloud.securitycenter.v1.IListSourcesRequest, + | protos.google.cloud.securitycenter.v1.IListSourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult + protos.google.cloud.securitycenter.v1.ISource > ): void; - listFindings( - request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listSources( + request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListFindingsRequest, - | protos.google.cloud.securitycenter.v1.IListFindingsResponse + protos.google.cloud.securitycenter.v1.IListSourcesRequest, + | protos.google.cloud.securitycenter.v1.IListSourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult + protos.google.cloud.securitycenter.v1.ISource >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListFindingsRequest, - | protos.google.cloud.securitycenter.v1.IListFindingsResponse + protos.google.cloud.securitycenter.v1.IListSourcesRequest, + | protos.google.cloud.securitycenter.v1.IListSourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult + protos.google.cloud.securitycenter.v1.ISource > ): Promise< [ - protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[], - protos.google.cloud.securitycenter.v1.IListFindingsRequest | null, - protos.google.cloud.securitycenter.v1.IListFindingsResponse, + protos.google.cloud.securitycenter.v1.ISource[], + protos.google.cloud.securitycenter.v1.IListSourcesRequest | null, + protos.google.cloud.securitycenter.v1.IListSourcesResponse, ] > | void { request = request || {}; @@ -6340,7 +8954,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listFindings(request, options, callback); + return this.innerApiCalls.listSources(request, options, callback); } /** @@ -6348,136 +8962,12 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @param {string} request.filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. + * Required. Resource name of the parent of sources to list. Its format should + * be `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. * @param {string} request.pageToken - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is @@ -6485,16 +8975,16 @@ export class SecurityCenterClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.Source|Source} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listFindingsAsync()` + * We recommend using `listSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listFindingsStream( - request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listSourcesStream( + request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -6505,173 +8995,263 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listFindings']; + const defaultCallSettings = this._defaults['listSources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFindings.createStream( - this.innerApiCalls.listFindings as GaxCall, + return this.descriptors.page.listSources.createStream( + this.innerApiCalls.listSources as GaxCall, request, callSettings ); } /** - * Equivalent to `listFindings`, but returns an iterable object. + * Equivalent to `listSources`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @param {string} request.filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * @param {string} request.orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @param {google.protobuf.Timestamp} request.readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @param {google.protobuf.Duration} request.compareDuration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. + * Required. Resource name of the parent of sources to list. Its format should + * be `organizations/[organization_id]`, `folders/[folder_id]`, or + * `projects/[project_id]`. + * @param {string} request.pageToken + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycenter.v1.Source|Source}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center.list_sources.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListSources_async + */ + listSourcesAsync( + request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSources.asyncIterate( + this.innerApiCalls['listSources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a + * given level all exports under that level are also returned e.g. if + * requesting BigQuery exports under a folder, then all BigQuery exports + * immediately under the folder plus the ones created under the projects + * within the folder are returned. * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @param {google.protobuf.FieldMask} request.fieldMask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. + * @param {number} request.pageSize + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBigQueryExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBigQueryExports( + request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IBigQueryExport[], + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest | null, + protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse, + ] + >; + listBigQueryExports( + request: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IBigQueryExport + > + ): void; + listBigQueryExports( + request: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + callback: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IBigQueryExport + > + ): void; + listBigQueryExports( + request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IBigQueryExport + >, + callback?: PaginationCallback< + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + | null + | undefined, + protos.google.cloud.securitycenter.v1.IBigQueryExport + > + ): Promise< + [ + protos.google.cloud.securitycenter.v1.IBigQueryExport[], + protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest | null, + protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listBigQueryExports(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. + * @param {number} request.pageSize + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBigQueryExportsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBigQueryExportsStream( + request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBigQueryExports']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBigQueryExports.createStream( + this.innerApiCalls.listBigQueryExports as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBigQueryExports`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is `organizations/[organization_id]`, `folders/[folder_id]`, + * `projects/[project_id]`. * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult|ListFindingsResult}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_findings.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListFindings_async + * @example include:samples/generated/v1/security_center.list_big_query_exports.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_async */ - listFindingsAsync( - request?: protos.google.cloud.securitycenter.v1.IListFindingsRequest, + listBigQueryExportsAsync( + request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -6680,101 +9260,108 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listFindings']; + const defaultCallSettings = this._defaults['listBigQueryExports']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFindings.asyncIterate( - this.innerApiCalls['listFindings'] as GaxCall, + return this.descriptors.page.listBigQueryExports.asyncIterate( + this.innerApiCalls['listBigQueryExports'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists mute configs. + * Lists all resident Event Threat Detection custom modules under the + * given Resource Manager parent and its descendants. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDescendantEventThreatDetectionCustomModules` must match the call that + * provided the page token. * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than + * The maximum number of modules to return. The service may return fewer than * this value. * If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listMuteConfigsAsync()` + * We recommend using `listDescendantEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listMuteConfigs( - request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.IMuteConfig[], - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest | null, - protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse, ] >; - listMuteConfigs( - request: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IMuteConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): void; - listMuteConfigs( - request: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IMuteConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): void; - listMuteConfigs( - request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IMuteConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IMuteConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): Promise< [ - protos.google.cloud.securitycenter.v1.IMuteConfig[], - protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest | null, - protos.google.cloud.securitycenter.v1.IListMuteConfigsResponse, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesResponse, ] > | void { request = request || {}; @@ -6793,7 +9380,11 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listMuteConfigs(request, options, callback); + return this.innerApiCalls.listDescendantEventThreatDetectionCustomModules( + request, + options, + callback + ); } /** @@ -6801,33 +9392,39 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDescendantEventThreatDetectionCustomModules` must match the call that + * provided the page token. * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than + * The maximum number of modules to return. The service may return fewer than * this value. * If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listMuteConfigsAsync()` + * We recommend using `listDescendantEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listMuteConfigsStream( - request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -6838,53 +9435,61 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listMuteConfigs']; + const defaultCallSettings = + this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMuteConfigs.createStream( - this.innerApiCalls.listMuteConfigs as GaxCall, + return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream( + this.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as GaxCall, request, callSettings ); } /** - * Equivalent to `listMuteConfigs`, but returns an iterable object. + * Equivalent to `listDescendantEventThreatDetectionCustomModules`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDescendantEventThreatDetectionCustomModules` must match the call that + * provided the page token. * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than + * The maximum number of modules to return. The service may return fewer than * this value. * If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.MuteConfig|MuteConfig}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_mute_configs.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_async + * @example include:samples/generated/v1/security_center.list_descendant_event_threat_detection_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_async */ - listMuteConfigsAsync( - request?: protos.google.cloud.securitycenter.v1.IListMuteConfigsRequest, + listDescendantEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListDescendantEventThreatDetectionCustomModulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -6893,97 +9498,112 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listMuteConfigs']; + const defaultCallSettings = + this._defaults['listDescendantEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMuteConfigs.asyncIterate( - this.innerApiCalls['listMuteConfigs'] as GaxCall, + return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate( + this.innerApiCalls[ + 'listDescendantEventThreatDetectionCustomModules' + ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists notification configs. + * Lists all Event Threat Detection custom modules for the given + * Resource Manager parent. This includes resident modules defined at the + * scope of the parent along with modules inherited from ancestors. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. + * A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listNotificationConfigsAsync()` + * We recommend using `listEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listNotificationConfigs( - request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.INotificationConfig[], - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest | null, - protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse, + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse, ] >; - listNotificationConfigs( - request: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.INotificationConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): void; - listNotificationConfigs( - request: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.INotificationConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): void; - listNotificationConfigs( - request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.INotificationConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, - | protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.INotificationConfig + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule > ): Promise< - [ - protos.google.cloud.securitycenter.v1.INotificationConfig[], - protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest | null, - protos.google.cloud.securitycenter.v1.IListNotificationConfigsResponse, + [ + protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesResponse, ] > | void { request = request || {}; @@ -7002,7 +9622,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listNotificationConfigs( + return this.innerApiCalls.listEventThreatDetectionCustomModules( request, options, callback @@ -7014,29 +9634,39 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. + * A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listNotificationConfigsAsync()` + * We recommend using `listEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listNotificationConfigsStream( - request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -7047,49 +9677,60 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listNotificationConfigs']; + const defaultCallSettings = + this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listNotificationConfigs.createStream( - this.innerApiCalls.listNotificationConfigs as GaxCall, + return this.descriptors.page.listEventThreatDetectionCustomModules.createStream( + this.innerApiCalls.listEventThreatDetectionCustomModules as GaxCall, request, callSettings ); } /** - * Equivalent to `listNotificationConfigs`, but returns an iterable object. + * Equivalent to `listEventThreatDetectionCustomModules`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". + * Required. Name of the parent to list custom modules under. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. + * A page token, received from a previous + * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + * subsequent page. + * + * When paginating, all other parameters provided to + * `ListEventThreatDetectionCustomModules` must match the call that provided + * the page token. * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.NotificationConfig|NotificationConfig}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_notification_configs.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_async + * @example include:samples/generated/v1/security_center.list_event_threat_detection_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_async */ - listNotificationConfigsAsync( - request?: protos.google.cloud.securitycenter.v1.IListNotificationConfigsRequest, + listEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListEventThreatDetectionCustomModulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -7098,98 +9739,110 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listNotificationConfigs']; + const defaultCallSettings = + this._defaults['listEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listNotificationConfigs.asyncIterate( - this.innerApiCalls['listNotificationConfigs'] as GaxCall, + return this.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate( + this.innerApiCalls['listEventThreatDetectionCustomModules'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + * Lists all effective Event Threat Detection custom modules for the * given parent. This includes resident modules defined at the scope of the - * parent, and inherited modules, inherited from CRM ancestors. + * parent along with modules inherited from its ancestors. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" - * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * Required. Name of the parent to list custom modules for. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous + * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListEffectiveEventThreatDetectionCustomModules` must match the call that + * provided the page token. + * @param {number} request.pageSize + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listEffectiveEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listEffectiveSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, ] >; - listEffectiveSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule > ): void; - listEffectiveSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule > ): void; - listEffectiveSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + | protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule > ): Promise< [ - protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[], + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest | null, + protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, ] > | void { request = request || {}; @@ -7208,7 +9861,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules( + return this.innerApiCalls.listEffectiveEventThreatDetectionCustomModules( request, options, callback @@ -7220,28 +9873,39 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" - * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * Required. Name of the parent to list custom modules for. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous + * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListEffectiveEventThreatDetectionCustomModules` must match the call that + * provided the page token. + * @param {number} request.pageSize + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listEffectiveEventThreatDetectionCustomModulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listEffectiveSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -7253,49 +9917,60 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); const defaultCallSettings = - this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; + this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream( + return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream( this.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as GaxCall, + .listEffectiveEventThreatDetectionCustomModules as GaxCall, request, callSettings ); } /** - * Equivalent to `listEffectiveSecurityHealthAnalyticsCustomModules`, but returns an iterable object. + * Equivalent to `listEffectiveEventThreatDetectionCustomModules`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" - * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * Required. Name of the parent to list custom modules for. + * + * Its format is: + * + * * `organizations/{organization}/eventThreatDetectionSettings`. + * * `folders/{folder}/eventThreatDetectionSettings`. + * * `projects/{project}/eventThreatDetectionSettings`. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous + * `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + * retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListEffectiveEventThreatDetectionCustomModules` must match the call that + * provided the page token. + * @param {number} request.pageSize + * The maximum number of modules to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_effective_security_health_analytics_custom_modules.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_async + * @example include:samples/generated/v1/security_center.list_effective_event_threat_detection_custom_modules.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_async */ - listEffectiveSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycenter.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + listEffectiveEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycenter.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -7305,100 +9980,106 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); const defaultCallSettings = - this._defaults['listEffectiveSecurityHealthAnalyticsCustomModules']; + this._defaults['listEffectiveEventThreatDetectionCustomModules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate( + return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate( this.innerApiCalls[ - 'listEffectiveSecurityHealthAnalyticsCustomModules' + 'listEffectiveEventThreatDetectionCustomModules' ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns a list of all SecurityHealthAnalyticsCustomModules for the given - * parent. This includes resident modules defined at the scope of the parent, - * and inherited modules, inherited from CRM ancestors. + * Lists all ResourceValueConfigs. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * Required. The parent, which owns the collection of resource value configs. + * Its format is + * `organizations/[organization_id]` * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The number of results to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous `ListResourceValueConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListResourceValueConfigs` must match the call that provided the + * page token. + * + * page_size can be specified, and the new page_size will be used. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ResourceValueConfig|ResourceValueConfig}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listResourceValueConfigsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigs( + request?: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IResourceValueConfig[], + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse, ] >; - listSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigs( + request: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IResourceValueConfig > ): void; - listSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigs( + request: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IResourceValueConfig > ): void; - listSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigs( + request?: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IResourceValueConfig >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - | protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, + | protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule + protos.google.cloud.securitycenter.v1.IResourceValueConfig > ): Promise< [ - protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest | null, - protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesResponse, + protos.google.cloud.securitycenter.v1.IResourceValueConfig[], + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest | null, + protos.google.cloud.securitycenter.v1.IListResourceValueConfigsResponse, ] > | void { request = request || {}; @@ -7417,7 +10098,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listSecurityHealthAnalyticsCustomModules( + return this.innerApiCalls.listResourceValueConfigs( request, options, callback @@ -7429,28 +10110,36 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * Required. The parent, which owns the collection of resource value configs. + * Its format is + * `organizations/[organization_id]` * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The number of results to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous `ListResourceValueConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListResourceValueConfigs` must match the call that provided the + * page token. + * + * page_size can be specified, and the new page_size will be used. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ResourceValueConfig|ResourceValueConfig} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listSecurityHealthAnalyticsCustomModulesAsync()` + * We recommend using `listResourceValueConfigsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigsStream( + request?: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -7461,49 +10150,56 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listSecurityHealthAnalyticsCustomModules']; + const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream( - this.innerApiCalls.listSecurityHealthAnalyticsCustomModules as GaxCall, + return this.descriptors.page.listResourceValueConfigs.createStream( + this.innerApiCalls.listResourceValueConfigs as GaxCall, request, callSettings ); } /** - * Equivalent to `listSecurityHealthAnalyticsCustomModules`, but returns an iterable object. + * Equivalent to `listResourceValueConfigs`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * "organizations/{organization}/securityHealthAnalyticsSettings", - * "folders/{folder}/securityHealthAnalyticsSettings", or - * "projects/{project}/securityHealthAnalyticsSettings" + * Required. The parent, which owns the collection of resource value configs. + * Its format is + * `organizations/[organization_id]` * @param {number} request.pageSize - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. + * The number of results to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken - * The value returned by the last call indicating a continuation + * A page token, received from a previous `ListResourceValueConfigs` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListResourceValueConfigs` must match the call that provided the + * page token. + * + * page_size can be specified, and the new page_size will be used. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.ResourceValueConfig|ResourceValueConfig}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_security_health_analytics_custom_modules.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_async + * @example include:samples/generated/v1/security_center.list_resource_value_configs.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_async */ - listSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycenter.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + listResourceValueConfigsAsync( + request?: protos.google.cloud.securitycenter.v1.IListResourceValueConfigsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -7512,98 +10208,127 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listSecurityHealthAnalyticsCustomModules']; + const defaultCallSettings = this._defaults['listResourceValueConfigs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate( - this.innerApiCalls['listSecurityHealthAnalyticsCustomModules'] as GaxCall, + return this.descriptors.page.listResourceValueConfigs.asyncIterate( + this.innerApiCalls['listResourceValueConfigs'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all sources belonging to an organization. + * Lists the valued resources for a set of simulation results and filter. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * Required. Name of parent to list valued resources. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * @param {string} request.filter + * The filter expression that filters the valued resources in the response. + * Supported fields: + * + * * `resource_value` supports = + * * `resource_type` supports = * @param {string} request.pageToken - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and + * The value returned by the last `ListValuedResourcesResponse`; indicates + * that this is a continuation of a prior `ListValuedResources` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. + * @param {string} [request.orderBy] + * Optional. The fields by which to order the valued resources response. + * + * Supported fields: + * + * * `exposed_score` + * + * * `resource_value` + * + * * `resource_type` + * + * * `resource` + * + * * `display_name` + * + * Values should be a comma separated list of fields. For example: + * `exposed_score,resource_value`. + * + * The default sorting order is descending. To specify ascending or descending + * order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + * example: `exposed_score DESC`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.Source|Source}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.ValuedResource|ValuedResource}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listSourcesAsync()` + * We recommend using `listValuedResourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listSources( - request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResources( + request?: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.ISource[], - protos.google.cloud.securitycenter.v1.IListSourcesRequest | null, - protos.google.cloud.securitycenter.v1.IListSourcesResponse, + protos.google.cloud.securitycenter.v1.IValuedResource[], + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest | null, + protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse, ] >; - listSources( - request: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResources( + request: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSourcesRequest, - | protos.google.cloud.securitycenter.v1.IListSourcesResponse + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, + | protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISource + protos.google.cloud.securitycenter.v1.IValuedResource > ): void; - listSources( - request: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResources( + request: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSourcesRequest, - | protos.google.cloud.securitycenter.v1.IListSourcesResponse + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, + | protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISource + protos.google.cloud.securitycenter.v1.IValuedResource > ): void; - listSources( - request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResources( + request?: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSourcesRequest, - | protos.google.cloud.securitycenter.v1.IListSourcesResponse + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, + | protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISource + protos.google.cloud.securitycenter.v1.IValuedResource >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListSourcesRequest, - | protos.google.cloud.securitycenter.v1.IListSourcesResponse + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, + | protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse | null | undefined, - protos.google.cloud.securitycenter.v1.ISource + protos.google.cloud.securitycenter.v1.IValuedResource > ): Promise< [ - protos.google.cloud.securitycenter.v1.ISource[], - protos.google.cloud.securitycenter.v1.IListSourcesRequest | null, - protos.google.cloud.securitycenter.v1.IListSourcesResponse, + protos.google.cloud.securitycenter.v1.IValuedResource[], + protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest | null, + protos.google.cloud.securitycenter.v1.IListValuedResourcesResponse, ] > | void { request = request || {}; @@ -7622,7 +10347,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listSources(request, options, callback); + return this.innerApiCalls.listValuedResources(request, options, callback); } /** @@ -7630,29 +10355,59 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * Required. Name of parent to list valued resources. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * @param {string} request.filter + * The filter expression that filters the valued resources in the response. + * Supported fields: + * + * * `resource_value` supports = + * * `resource_type` supports = * @param {string} request.pageToken - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and + * The value returned by the last `ListValuedResourcesResponse`; indicates + * that this is a continuation of a prior `ListValuedResources` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. + * @param {string} [request.orderBy] + * Optional. The fields by which to order the valued resources response. + * + * Supported fields: + * + * * `exposed_score` + * + * * `resource_value` + * + * * `resource_type` + * + * * `resource` + * + * * `display_name` + * + * Values should be a comma separated list of fields. For example: + * `exposed_score,resource_value`. + * + * The default sorting order is descending. To specify ascending or descending + * order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + * example: `exposed_score DESC`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.Source|Source} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.ValuedResource|ValuedResource} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listSourcesAsync()` + * We recommend using `listValuedResourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listSourcesStream( - request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResourcesStream( + request?: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -7663,49 +10418,79 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSources']; + const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSources.createStream( - this.innerApiCalls.listSources as GaxCall, + return this.descriptors.page.listValuedResources.createStream( + this.innerApiCalls.listValuedResources as GaxCall, request, callSettings ); } /** - * Equivalent to `listSources`, but returns an iterable object. + * Equivalent to `listValuedResources`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". + * Required. Name of parent to list valued resources. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * @param {string} request.filter + * The filter expression that filters the valued resources in the response. + * Supported fields: + * + * * `resource_value` supports = + * * `resource_type` supports = * @param {string} request.pageToken - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and + * The value returned by the last `ListValuedResourcesResponse`; indicates + * that this is a continuation of a prior `ListValuedResources` call, and * that the system should return the next page of data. * @param {number} request.pageSize * The maximum number of results to return in a single response. Default is * 10, minimum is 1, maximum is 1000. + * @param {string} [request.orderBy] + * Optional. The fields by which to order the valued resources response. + * + * Supported fields: + * + * * `exposed_score` + * + * * `resource_value` + * + * * `resource_type` + * + * * `resource` + * + * * `display_name` + * + * Values should be a comma separated list of fields. For example: + * `exposed_score,resource_value`. + * + * The default sorting order is descending. To specify ascending or descending + * order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + * example: `exposed_score DESC`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.Source|Source}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.ValuedResource|ValuedResource}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_sources.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListSources_async + * @example include:samples/generated/v1/security_center.list_valued_resources.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListValuedResources_async */ - listSourcesAsync( - request?: protos.google.cloud.securitycenter.v1.IListSourcesRequest, + listValuedResourcesAsync( + request?: protos.google.cloud.securitycenter.v1.IListValuedResourcesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -7714,104 +10499,107 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSources']; + const defaultCallSettings = this._defaults['listValuedResources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSources.asyncIterate( - this.innerApiCalls['listSources'] as GaxCall, + return this.descriptors.page.listValuedResources.asyncIterate( + this.innerApiCalls['listValuedResources'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a - * given level all exports under that level are also returned e.g. if - * requesting BigQuery exports under a folder, then all BigQuery exports - * immediately under the folder plus the ones created under the projects - * within the folder are returned. + * Lists the attack paths for a set of simulation results or valued resources + * and filter. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Required. Name of parent to list attack paths. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + * @param {string} request.filter + * The filter expression that filters the attack path in the response. + * Supported fields: + * + * * `valued_resources` supports = * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. + * The value returned by the last `ListAttackPathsResponse`; indicates + * that this is a continuation of a prior `ListAttackPaths` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport}. + * The first element of the array is Array of {@link protos.google.cloud.securitycenter.v1.AttackPath|AttackPath}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listBigQueryExportsAsync()` + * We recommend using `listAttackPathsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listBigQueryExports( - request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPaths( + request?: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.securitycenter.v1.IBigQueryExport[], - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest | null, - protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse, + protos.google.cloud.securitycenter.v1.IAttackPath[], + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest | null, + protos.google.cloud.securitycenter.v1.IListAttackPathsResponse, ] >; - listBigQueryExports( - request: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPaths( + request: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, - | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, + | protos.google.cloud.securitycenter.v1.IListAttackPathsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IBigQueryExport + protos.google.cloud.securitycenter.v1.IAttackPath > ): void; - listBigQueryExports( - request: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPaths( + request: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, callback: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, - | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, + | protos.google.cloud.securitycenter.v1.IListAttackPathsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IBigQueryExport + protos.google.cloud.securitycenter.v1.IAttackPath > ): void; - listBigQueryExports( - request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPaths( + request?: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, - | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, + | protos.google.cloud.securitycenter.v1.IListAttackPathsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IBigQueryExport + protos.google.cloud.securitycenter.v1.IAttackPath >, callback?: PaginationCallback< - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, - | protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, + | protos.google.cloud.securitycenter.v1.IListAttackPathsResponse | null | undefined, - protos.google.cloud.securitycenter.v1.IBigQueryExport + protos.google.cloud.securitycenter.v1.IAttackPath > ): Promise< [ - protos.google.cloud.securitycenter.v1.IBigQueryExport[], - protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest | null, - protos.google.cloud.securitycenter.v1.IListBigQueryExportsResponse, + protos.google.cloud.securitycenter.v1.IAttackPath[], + protos.google.cloud.securitycenter.v1.IListAttackPathsRequest | null, + protos.google.cloud.securitycenter.v1.IListAttackPathsResponse, ] > | void { request = request || {}; @@ -7830,7 +10618,7 @@ export class SecurityCenterClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listBigQueryExports(request, options, callback); + return this.innerApiCalls.listAttackPaths(request, options, callback); } /** @@ -7838,32 +10626,38 @@ export class SecurityCenterClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Required. Name of parent to list attack paths. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + * @param {string} request.filter + * The filter expression that filters the attack path in the response. + * Supported fields: + * + * * `valued_resources` supports = * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. + * The value returned by the last `ListAttackPathsResponse`; indicates + * that this is a continuation of a prior `ListAttackPaths` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.securitycenter.v1.AttackPath|AttackPath} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listBigQueryExportsAsync()` + * We recommend using `listAttackPathsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listBigQueryExportsStream( - request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPathsStream( + request?: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -7874,52 +10668,58 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listBigQueryExports']; + const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listBigQueryExports.createStream( - this.innerApiCalls.listBigQueryExports as GaxCall, + return this.descriptors.page.listAttackPaths.createStream( + this.innerApiCalls.listAttackPaths as GaxCall, request, callSettings ); } /** - * Equivalent to `listBigQueryExports`, but returns an iterable object. + * Equivalent to `listAttackPaths`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param {number} request.pageSize - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Required. Name of parent to list attack paths. + * + * Valid formats: + * `organizations/{organization}`, + * `organizations/{organization}/simulations/{simulation}` + * `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + * `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + * @param {string} request.filter + * The filter expression that filters the attack path in the response. + * Supported fields: + * + * * `valued_resources` supports = * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. + * The value returned by the last `ListAttackPathsResponse`; indicates + * that this is a continuation of a prior `ListAttackPaths` call, and + * that the system should return the next page of data. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycenter.v1.BigQueryExport|BigQueryExport}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.securitycenter.v1.AttackPath|AttackPath}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/security_center.list_big_query_exports.js - * region_tag:securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_async + * @example include:samples/generated/v1/security_center.list_attack_paths.js + * region_tag:securitycenter_v1_generated_SecurityCenter_ListAttackPaths_async */ - listBigQueryExportsAsync( - request?: protos.google.cloud.securitycenter.v1.IListBigQueryExportsRequest, + listAttackPathsAsync( + request?: protos.google.cloud.securitycenter.v1.IListAttackPathsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -7928,14 +10728,14 @@ export class SecurityCenterClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listBigQueryExports']; + const defaultCallSettings = this._defaults['listAttackPaths']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listBigQueryExports.asyncIterate( - this.innerApiCalls['listBigQueryExports'] as GaxCall, + return this.descriptors.page.listAttackPaths.asyncIterate( + this.innerApiCalls['listAttackPaths'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the latest state of a long-running operation. Clients can use this @@ -8116,6 +10916,77 @@ export class SecurityCenterClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified attackPath resource name string. + * + * @param {string} organization + * @param {string} simulation + * @param {string} valued_resource + * @param {string} attack_path + * @returns {string} Resource name string. + */ + attackPathPath( + organization: string, + simulation: string, + valuedResource: string, + attackPath: string + ) { + return this.pathTemplates.attackPathPathTemplate.render({ + organization: organization, + simulation: simulation, + valued_resource: valuedResource, + attack_path: attackPath, + }); + } + + /** + * Parse the organization from AttackPath resource. + * + * @param {string} attackPathName + * A fully-qualified path representing AttackPath resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromAttackPathName(attackPathName: string) { + return this.pathTemplates.attackPathPathTemplate.match(attackPathName) + .organization; + } + + /** + * Parse the simulation from AttackPath resource. + * + * @param {string} attackPathName + * A fully-qualified path representing AttackPath resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromAttackPathName(attackPathName: string) { + return this.pathTemplates.attackPathPathTemplate.match(attackPathName) + .simulation; + } + + /** + * Parse the valued_resource from AttackPath resource. + * + * @param {string} attackPathName + * A fully-qualified path representing AttackPath resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromAttackPathName(attackPathName: string) { + return this.pathTemplates.attackPathPathTemplate.match(attackPathName) + .valued_resource; + } + + /** + * Parse the attack_path from AttackPath resource. + * + * @param {string} attackPathName + * A fully-qualified path representing AttackPath resource. + * @returns {string} A string representing the attack_path. + */ + matchAttackPathFromAttackPathName(attackPathName: string) { + return this.pathTemplates.attackPathPathTemplate.match(attackPathName) + .attack_path; + } + /** * Return a fully-qualified folderAsset resource name string. * @@ -8240,6 +11111,52 @@ export class SecurityCenterClient { ).constraint_name; } + /** + * Return a fully-qualified folderEventThreatDetectionSettingsModule resource name string. + * + * @param {string} folder + * @param {string} module + * @returns {string} Resource name string. + */ + folderEventThreatDetectionSettingsModulePath(folder: string, module: string) { + return this.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.render( + { + folder: folder, + module: module, + } + ); + } + + /** + * Parse the folder from FolderEventThreatDetectionSettingsModule resource. + * + * @param {string} folderEventThreatDetectionSettingsModuleName + * A fully-qualified path representing folder_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderEventThreatDetectionSettingsModuleName( + folderEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.match( + folderEventThreatDetectionSettingsModuleName + ).folder; + } + + /** + * Parse the module from FolderEventThreatDetectionSettingsModule resource. + * + * @param {string} folderEventThreatDetectionSettingsModuleName + * A fully-qualified path representing folder_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the module. + */ + matchModuleFromFolderEventThreatDetectionSettingsModuleName( + folderEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.match( + folderEventThreatDetectionSettingsModuleName + ).module; + } + /** * Return a fully-qualified folderExport resource name string. * @@ -8257,25 +11174,90 @@ export class SecurityCenterClient { /** * Parse the folder from FolderExport resource. * - * @param {string} folderExportName - * A fully-qualified path representing folder_export resource. - * @returns {string} A string representing the folder. + * @param {string} folderExportName + * A fully-qualified path representing folder_export resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderExportName(folderExportName: string) { + return this.pathTemplates.folderExportPathTemplate.match(folderExportName) + .folder; + } + + /** + * Parse the export from FolderExport resource. + * + * @param {string} folderExportName + * A fully-qualified path representing folder_export resource. + * @returns {string} A string representing the export. + */ + matchExportFromFolderExportName(folderExportName: string) { + return this.pathTemplates.folderExportPathTemplate.match(folderExportName) + .export; + } + + /** + * Return a fully-qualified folderLocationMuteConfig resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} mute_config + * @returns {string} Resource name string. + */ + folderLocationMuteConfigPath( + folder: string, + location: string, + muteConfig: string + ) { + return this.pathTemplates.folderLocationMuteConfigPathTemplate.render({ + folder: folder, + location: location, + mute_config: muteConfig, + }); + } + + /** + * Parse the folder from FolderLocationMuteConfig resource. + * + * @param {string} folderLocationMuteConfigName + * A fully-qualified path representing folder_location_mute_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationMuteConfigName( + folderLocationMuteConfigName: string + ) { + return this.pathTemplates.folderLocationMuteConfigPathTemplate.match( + folderLocationMuteConfigName + ).folder; + } + + /** + * Parse the location from FolderLocationMuteConfig resource. + * + * @param {string} folderLocationMuteConfigName + * A fully-qualified path representing folder_location_mute_config resource. + * @returns {string} A string representing the location. */ - matchFolderFromFolderExportName(folderExportName: string) { - return this.pathTemplates.folderExportPathTemplate.match(folderExportName) - .folder; + matchLocationFromFolderLocationMuteConfigName( + folderLocationMuteConfigName: string + ) { + return this.pathTemplates.folderLocationMuteConfigPathTemplate.match( + folderLocationMuteConfigName + ).location; } /** - * Parse the export from FolderExport resource. + * Parse the mute_config from FolderLocationMuteConfig resource. * - * @param {string} folderExportName - * A fully-qualified path representing folder_export resource. - * @returns {string} A string representing the export. + * @param {string} folderLocationMuteConfigName + * A fully-qualified path representing folder_location_mute_config resource. + * @returns {string} A string representing the mute_config. */ - matchExportFromFolderExportName(folderExportName: string) { - return this.pathTemplates.folderExportPathTemplate.match(folderExportName) - .export; + matchMuteConfigFromFolderLocationMuteConfigName( + folderLocationMuteConfigName: string + ) { + return this.pathTemplates.folderLocationMuteConfigPathTemplate.match( + folderLocationMuteConfigName + ).mute_config; } /** @@ -8859,6 +11841,84 @@ export class SecurityCenterClient { ).constraint_name; } + /** + * Return a fully-qualified organizationEventThreatDetectionSettings resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationEventThreatDetectionSettingsPath(organization: string) { + return this.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.render( + { + organization: organization, + } + ); + } + + /** + * Parse the organization from OrganizationEventThreatDetectionSettings resource. + * + * @param {string} organizationEventThreatDetectionSettingsName + * A fully-qualified path representing organization_eventThreatDetectionSettings resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationEventThreatDetectionSettingsName( + organizationEventThreatDetectionSettingsName: string + ) { + return this.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.match( + organizationEventThreatDetectionSettingsName + ).organization; + } + + /** + * Return a fully-qualified organizationEventThreatDetectionSettingsModule resource name string. + * + * @param {string} organization + * @param {string} module + * @returns {string} Resource name string. + */ + organizationEventThreatDetectionSettingsModulePath( + organization: string, + module: string + ) { + return this.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.render( + { + organization: organization, + module: module, + } + ); + } + + /** + * Parse the organization from OrganizationEventThreatDetectionSettingsModule resource. + * + * @param {string} organizationEventThreatDetectionSettingsModuleName + * A fully-qualified path representing organization_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationEventThreatDetectionSettingsModuleName( + organizationEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.match( + organizationEventThreatDetectionSettingsModuleName + ).organization; + } + + /** + * Parse the module from OrganizationEventThreatDetectionSettingsModule resource. + * + * @param {string} organizationEventThreatDetectionSettingsModuleName + * A fully-qualified path representing organization_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the module. + */ + matchModuleFromOrganizationEventThreatDetectionSettingsModuleName( + organizationEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.match( + organizationEventThreatDetectionSettingsModuleName + ).module; + } + /** * Return a fully-qualified organizationExport resource name string. * @@ -8899,6 +11959,73 @@ export class SecurityCenterClient { ).export; } + /** + * Return a fully-qualified organizationLocationMuteConfig resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} mute_config + * @returns {string} Resource name string. + */ + organizationLocationMuteConfigPath( + organization: string, + location: string, + muteConfig: string + ) { + return this.pathTemplates.organizationLocationMuteConfigPathTemplate.render( + { + organization: organization, + location: location, + mute_config: muteConfig, + } + ); + } + + /** + * Parse the organization from OrganizationLocationMuteConfig resource. + * + * @param {string} organizationLocationMuteConfigName + * A fully-qualified path representing organization_location_mute_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationMuteConfigName( + organizationLocationMuteConfigName: string + ) { + return this.pathTemplates.organizationLocationMuteConfigPathTemplate.match( + organizationLocationMuteConfigName + ).organization; + } + + /** + * Parse the location from OrganizationLocationMuteConfig resource. + * + * @param {string} organizationLocationMuteConfigName + * A fully-qualified path representing organization_location_mute_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationMuteConfigName( + organizationLocationMuteConfigName: string + ) { + return this.pathTemplates.organizationLocationMuteConfigPathTemplate.match( + organizationLocationMuteConfigName + ).location; + } + + /** + * Parse the mute_config from OrganizationLocationMuteConfig resource. + * + * @param {string} organizationLocationMuteConfigName + * A fully-qualified path representing organization_location_mute_config resource. + * @returns {string} A string representing the mute_config. + */ + matchMuteConfigFromOrganizationLocationMuteConfigName( + organizationLocationMuteConfigName: string + ) { + return this.pathTemplates.organizationLocationMuteConfigPathTemplate.match( + organizationLocationMuteConfigName + ).mute_config; + } + /** * Return a fully-qualified organizationMuteConfig resource name string. * @@ -9146,6 +12273,50 @@ export class SecurityCenterClient { ).organization; } + /** + * Return a fully-qualified organizationSimulation resource name string. + * + * @param {string} organization + * @param {string} simulation + * @returns {string} Resource name string. + */ + organizationSimulationPath(organization: string, simulation: string) { + return this.pathTemplates.organizationSimulationPathTemplate.render({ + organization: organization, + simulation: simulation, + }); + } + + /** + * Parse the organization from OrganizationSimulation resource. + * + * @param {string} organizationSimulationName + * A fully-qualified path representing OrganizationSimulation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSimulationName( + organizationSimulationName: string + ) { + return this.pathTemplates.organizationSimulationPathTemplate.match( + organizationSimulationName + ).organization; + } + + /** + * Parse the simulation from OrganizationSimulation resource. + * + * @param {string} organizationSimulationName + * A fully-qualified path representing OrganizationSimulation resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromOrganizationSimulationName( + organizationSimulationName: string + ) { + return this.pathTemplates.organizationSimulationPathTemplate.match( + organizationSimulationName + ).simulation; + } + /** * Return a fully-qualified organizationSource resource name string. * @@ -9527,6 +12698,55 @@ export class SecurityCenterClient { ).constraint_name; } + /** + * Return a fully-qualified projectEventThreatDetectionSettingsModule resource name string. + * + * @param {string} project + * @param {string} module + * @returns {string} Resource name string. + */ + projectEventThreatDetectionSettingsModulePath( + project: string, + module: string + ) { + return this.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.render( + { + project: project, + module: module, + } + ); + } + + /** + * Parse the project from ProjectEventThreatDetectionSettingsModule resource. + * + * @param {string} projectEventThreatDetectionSettingsModuleName + * A fully-qualified path representing project_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectEventThreatDetectionSettingsModuleName( + projectEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.match( + projectEventThreatDetectionSettingsModuleName + ).project; + } + + /** + * Parse the module from ProjectEventThreatDetectionSettingsModule resource. + * + * @param {string} projectEventThreatDetectionSettingsModuleName + * A fully-qualified path representing project_eventThreatDetectionSettings_module resource. + * @returns {string} A string representing the module. + */ + matchModuleFromProjectEventThreatDetectionSettingsModuleName( + projectEventThreatDetectionSettingsModuleName: string + ) { + return this.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.match( + projectEventThreatDetectionSettingsModuleName + ).module; + } + /** * Return a fully-qualified projectExport resource name string. * @@ -9565,6 +12785,71 @@ export class SecurityCenterClient { .export; } + /** + * Return a fully-qualified projectLocationMuteConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} mute_config + * @returns {string} Resource name string. + */ + projectLocationMuteConfigPath( + project: string, + location: string, + muteConfig: string + ) { + return this.pathTemplates.projectLocationMuteConfigPathTemplate.render({ + project: project, + location: location, + mute_config: muteConfig, + }); + } + + /** + * Parse the project from ProjectLocationMuteConfig resource. + * + * @param {string} projectLocationMuteConfigName + * A fully-qualified path representing project_location_mute_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationMuteConfigName( + projectLocationMuteConfigName: string + ) { + return this.pathTemplates.projectLocationMuteConfigPathTemplate.match( + projectLocationMuteConfigName + ).project; + } + + /** + * Parse the location from ProjectLocationMuteConfig resource. + * + * @param {string} projectLocationMuteConfigName + * A fully-qualified path representing project_location_mute_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationMuteConfigName( + projectLocationMuteConfigName: string + ) { + return this.pathTemplates.projectLocationMuteConfigPathTemplate.match( + projectLocationMuteConfigName + ).location; + } + + /** + * Parse the mute_config from ProjectLocationMuteConfig resource. + * + * @param {string} projectLocationMuteConfigName + * A fully-qualified path representing project_location_mute_config resource. + * @returns {string} A string representing the mute_config. + */ + matchMuteConfigFromProjectLocationMuteConfigName( + projectLocationMuteConfigName: string + ) { + return this.pathTemplates.projectLocationMuteConfigPathTemplate.match( + projectLocationMuteConfigName + ).mute_config; + } + /** * Return a fully-qualified projectMuteConfig resource name string. * @@ -9992,6 +13277,147 @@ export class SecurityCenterClient { ).finding; } + /** + * Return a fully-qualified resourceValueConfig resource name string. + * + * @param {string} organization + * @param {string} resource_value_config + * @returns {string} Resource name string. + */ + resourceValueConfigPath(organization: string, resourceValueConfig: string) { + return this.pathTemplates.resourceValueConfigPathTemplate.render({ + organization: organization, + resource_value_config: resourceValueConfig, + }); + } + + /** + * Parse the organization from ResourceValueConfig resource. + * + * @param {string} resourceValueConfigName + * A fully-qualified path representing ResourceValueConfig resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromResourceValueConfigName( + resourceValueConfigName: string + ) { + return this.pathTemplates.resourceValueConfigPathTemplate.match( + resourceValueConfigName + ).organization; + } + + /** + * Parse the resource_value_config from ResourceValueConfig resource. + * + * @param {string} resourceValueConfigName + * A fully-qualified path representing ResourceValueConfig resource. + * @returns {string} A string representing the resource_value_config. + */ + matchResourceValueConfigFromResourceValueConfigName( + resourceValueConfigName: string + ) { + return this.pathTemplates.resourceValueConfigPathTemplate.match( + resourceValueConfigName + ).resource_value_config; + } + + /** + * Return a fully-qualified simulation resource name string. + * + * @param {string} organization + * @param {string} simulation + * @returns {string} Resource name string. + */ + simulationPath(organization: string, simulation: string) { + return this.pathTemplates.simulationPathTemplate.render({ + organization: organization, + simulation: simulation, + }); + } + + /** + * Parse the organization from Simulation resource. + * + * @param {string} simulationName + * A fully-qualified path representing Simulation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromSimulationName(simulationName: string) { + return this.pathTemplates.simulationPathTemplate.match(simulationName) + .organization; + } + + /** + * Parse the simulation from Simulation resource. + * + * @param {string} simulationName + * A fully-qualified path representing Simulation resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromSimulationName(simulationName: string) { + return this.pathTemplates.simulationPathTemplate.match(simulationName) + .simulation; + } + + /** + * Return a fully-qualified valuedResource resource name string. + * + * @param {string} organization + * @param {string} simulation + * @param {string} valued_resource + * @returns {string} Resource name string. + */ + valuedResourcePath( + organization: string, + simulation: string, + valuedResource: string + ) { + return this.pathTemplates.valuedResourcePathTemplate.render({ + organization: organization, + simulation: simulation, + valued_resource: valuedResource, + }); + } + + /** + * Parse the organization from ValuedResource resource. + * + * @param {string} valuedResourceName + * A fully-qualified path representing ValuedResource resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromValuedResourceName(valuedResourceName: string) { + return this.pathTemplates.valuedResourcePathTemplate.match( + valuedResourceName + ).organization; + } + + /** + * Parse the simulation from ValuedResource resource. + * + * @param {string} valuedResourceName + * A fully-qualified path representing ValuedResource resource. + * @returns {string} A string representing the simulation. + */ + matchSimulationFromValuedResourceName(valuedResourceName: string) { + return this.pathTemplates.valuedResourcePathTemplate.match( + valuedResourceName + ).simulation; + } + + /** + * Parse the valued_resource from ValuedResource resource. + * + * @param {string} valuedResourceName + * A fully-qualified path representing ValuedResource resource. + * @returns {string} A string representing the valued_resource. + */ + matchValuedResourceFromValuedResourceName(valuedResourceName: string) { + return this.pathTemplates.valuedResourcePathTemplate.match( + valuedResourceName + ).valued_resource; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json b/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json index ef821fbfe275..84de80f3ebad 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client_config.json @@ -62,6 +62,14 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "GetSimulation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetValuedResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetBigQueryExport": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" @@ -230,6 +238,70 @@ "ListBigQueryExports": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDescendantEventThreatDetectionCustomModules": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEventThreatDetectionCustomModules": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ValidateEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "BatchCreateResourceValueConfigs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteResourceValueConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetResourceValueConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListResourceValueConfigs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateResourceValueConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListValuedResources": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAttackPaths": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json index e28a93bb8b47..c0d87dc84bfa 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json +++ b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json @@ -2,6 +2,8 @@ "../../protos/google/cloud/securitycenter/v1/access.proto", "../../protos/google/cloud/securitycenter/v1/application.proto", "../../protos/google/cloud/securitycenter/v1/asset.proto", + "../../protos/google/cloud/securitycenter/v1/attack_exposure.proto", + "../../protos/google/cloud/securitycenter/v1/attack_path.proto", "../../protos/google/cloud/securitycenter/v1/backup_disaster_recovery.proto", "../../protos/google/cloud/securitycenter/v1/bigquery_export.proto", "../../protos/google/cloud/securitycenter/v1/cloud_armor.proto", @@ -12,7 +14,10 @@ "../../protos/google/cloud/securitycenter/v1/contact_details.proto", "../../protos/google/cloud/securitycenter/v1/container.proto", "../../protos/google/cloud/securitycenter/v1/database.proto", + "../../protos/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto", "../../protos/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto", + "../../protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto", + "../../protos/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto", "../../protos/google/cloud/securitycenter/v1/exfiltration.proto", "../../protos/google/cloud/securitycenter/v1/external_system.proto", "../../protos/google/cloud/securitycenter/v1/file.proto", @@ -35,13 +40,16 @@ "../../protos/google/cloud/securitycenter/v1/organization_settings.proto", "../../protos/google/cloud/securitycenter/v1/process.proto", "../../protos/google/cloud/securitycenter/v1/resource.proto", + "../../protos/google/cloud/securitycenter/v1/resource_value_config.proto", "../../protos/google/cloud/securitycenter/v1/run_asset_discovery_response.proto", "../../protos/google/cloud/securitycenter/v1/security_health_analytics_custom_config.proto", "../../protos/google/cloud/securitycenter/v1/security_health_analytics_custom_module.proto", "../../protos/google/cloud/securitycenter/v1/security_marks.proto", "../../protos/google/cloud/securitycenter/v1/security_posture.proto", "../../protos/google/cloud/securitycenter/v1/securitycenter_service.proto", + "../../protos/google/cloud/securitycenter/v1/simulation.proto", "../../protos/google/cloud/securitycenter/v1/source.proto", "../../protos/google/cloud/securitycenter/v1/toxic_combination.proto", + "../../protos/google/cloud/securitycenter/v1/valued_resource.proto", "../../protos/google/cloud/securitycenter/v1/vulnerability.proto" ] diff --git a/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts b/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts index dd243c900a7b..fb9f597a8a41 100644 --- a/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts +++ b/packages/google-cloud-securitycenter/test/gapic_security_center_v1.ts @@ -1418,6 +1418,266 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('getSimulation', () => { + it('invokes getSimulation without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetSimulationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetSimulationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.Simulation() + ); + client.innerApiCalls.getSimulation = stubSimpleCall(expectedResponse); + const [response] = await client.getSimulation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSimulation without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetSimulationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetSimulationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.Simulation() + ); + client.innerApiCalls.getSimulation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSimulation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.ISimulation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSimulation with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetSimulationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetSimulationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSimulation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getSimulation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSimulation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSimulation with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetSimulationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetSimulationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSimulation(request), expectedError); + }); + }); + + describe('getValuedResource', () => { + it('invokes getValuedResource without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetValuedResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValuedResource() + ); + client.innerApiCalls.getValuedResource = stubSimpleCall(expectedResponse); + const [response] = await client.getValuedResource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getValuedResource without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetValuedResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValuedResource() + ); + client.innerApiCalls.getValuedResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getValuedResource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IValuedResource | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getValuedResource with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetValuedResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getValuedResource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getValuedResource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getValuedResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getValuedResource with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetValuedResourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetValuedResourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getValuedResource(request), expectedError); + }); + }); + describe('getBigQueryExport', () => { it('invokes getBigQueryExport without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ @@ -4644,69 +4904,66 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('bulkMuteFindings', () => { - it('invokes bulkMuteFindings without error', async () => { + describe('createEventThreatDetectionCustomModule', () => { + it('invokes createEventThreatDetectionCustomModule without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + '.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ); - client.innerApiCalls.bulkMuteFindings = - stubLongRunningCall(expectedResponse); - const [operation] = await client.bulkMuteFindings(request); - const [response] = await operation.promise(); + client.innerApiCalls.createEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.createEventThreatDetectionCustomModule(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkMuteFindings without error using callback', async () => { + it('invokes createEventThreatDetectionCustomModule without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + '.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ); - client.innerApiCalls.bulkMuteFindings = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.createEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.bulkMuteFindings( + client.createEventThreatDetectionCustomModule( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - > | null + result?: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule | null ) => { if (err) { reject(err); @@ -4716,194 +4973,269 @@ describe('v1.SecurityCenterClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, - protos.google.protobuf.IEmpty - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkMuteFindings with call error', async () => { + it('invokes createEventThreatDetectionCustomModule with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + '.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.bulkMuteFindings = stubLongRunningCall( - undefined, + client.innerApiCalls.createEventThreatDetectionCustomModule = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.createEventThreatDetectionCustomModule(request), expectedError ); - await assert.rejects(client.bulkMuteFindings(request), expectedError); const actualRequest = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkMuteFindings with LRO error', async () => { + it('invokes createEventThreatDetectionCustomModule with closed client', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + new protos.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + '.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.bulkMuteFindings = stubLongRunningCall( - undefined, - undefined, + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createEventThreatDetectionCustomModule(request), expectedError ); - const [operation] = await client.bulkMuteFindings(request); - await assert.rejects(operation.promise(), expectedError); + }); + }); + + describe('deleteEventThreatDetectionCustomModule', () => { + it('invokes deleteEventThreatDetectionCustomModule without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.deleteEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkMuteFindings as SinonStub + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkBulkMuteFindingsProgress without error', async () => { + it('invokes deleteEventThreatDetectionCustomModule without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkBulkMuteFindingsProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest', + ['name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEventThreatDetectionCustomModule( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkBulkMuteFindingsProgress with error', async () => { + it('invokes deleteEventThreatDetectionCustomModule with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, + client.innerApiCalls.deleteEventThreatDetectionCustomModule = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.deleteEventThreatDetectionCustomModule(request), expectedError ); + const actualRequest = ( + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); await assert.rejects( - client.checkBulkMuteFindingsProgress(''), + client.deleteEventThreatDetectionCustomModule(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('runAssetDiscovery', () => { - it('invokes runAssetDiscovery without error', async () => { + describe('getEventThreatDetectionCustomModule', () => { + it('invokes getEventThreatDetectionCustomModule without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', - ['parent'] + '.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ); - client.innerApiCalls.runAssetDiscovery = - stubLongRunningCall(expectedResponse); - const [operation] = await client.runAssetDiscovery(request); - const [response] = await operation.promise(); - assert(stub.calledOnce); + client.innerApiCalls.getEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.getEventThreatDetectionCustomModule(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes runAssetDiscovery without error using callback', async () => { + it('invokes getEventThreatDetectionCustomModule without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', - ['parent'] + '.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ); - client.innerApiCalls.runAssetDiscovery = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.runAssetDiscovery( + client.getEventThreatDetectionCustomModule( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - > | null + result?: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule | null ) => { if (err) { reject(err); @@ -4913,214 +5245,3612 @@ describe('v1.SecurityCenterClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, - protos.google.protobuf.IEmpty - >; - const [response] = await operation.promise(); - assert(stub.calledOnce); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes runAssetDiscovery with call error', async () => { + it('invokes getEventThreatDetectionCustomModule with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', - ['parent'] + '.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.runAssetDiscovery = stubLongRunningCall( + client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.runAssetDiscovery(request), expectedError); - assert(stub.calledOnce); + await assert.rejects( + client.getEventThreatDetectionCustomModule(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes runAssetDiscovery with LRO error', async () => { + it('invokes getEventThreatDetectionCustomModule with closed client', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + new protos.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', - ['parent'] + '.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.runAssetDiscovery = stubLongRunningCall( - undefined, - undefined, + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getEventThreatDetectionCustomModule(request), expectedError ); - const [operation] = await client.runAssetDiscovery(request); - await assert.rejects(operation.promise(), expectedError); - assert(stub.calledOnce); + }); + }); + + describe('updateEventThreatDetectionCustomModule', () => { + it('invokes updateEventThreatDetectionCustomModule without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest', + ['eventThreatDetectionCustomModule', 'name'] + ); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.updateEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.updateEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.runAssetDiscovery as SinonStub + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkRunAssetDiscoveryProgress without error', async () => { + it('invokes updateEventThreatDetectionCustomModule without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRunAssetDiscoveryProgress( - expectedResponse.name + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest', + ['eventThreatDetectionCustomModule', 'name'] ); - assert(stub.calledOnce); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.updateEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEventThreatDetectionCustomModule( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkRunAssetDiscoveryProgress with error', async () => { + it('invokes updateEventThreatDetectionCustomModule with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest', + ['eventThreatDetectionCustomModule', 'name'] + ); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEventThreatDetectionCustomModule = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.updateEventThreatDetectionCustomModule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest', + ['eventThreatDetectionCustomModule', 'name'] + ); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateEventThreatDetectionCustomModule(request), + expectedError + ); + }); + }); + + describe('validateEventThreatDetectionCustomModule', () => { + it('invokes validateEventThreatDetectionCustomModule without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse() + ); + client.innerApiCalls.validateEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.validateEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse() + ); + client.innerApiCalls.validateEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.validateEventThreatDetectionCustomModule( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IValidateEventThreatDetectionCustomModuleResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.validateEventThreatDetectionCustomModule = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.validateEventThreatDetectionCustomModule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .validateEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.validateEventThreatDetectionCustomModule(request), + expectedError + ); + }); + }); + + describe('getEffectiveEventThreatDetectionCustomModule', () => { + it('invokes getEffectiveEventThreatDetectionCustomModule without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = + stubSimpleCall(expectedResponse); + const [response] = + await client.getEffectiveEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEffectiveEventThreatDetectionCustomModule( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getEffectiveEventThreatDetectionCustomModule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getEffectiveEventThreatDetectionCustomModule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getEffectiveEventThreatDetectionCustomModule(request), + expectedError + ); + }); + }); + + describe('batchCreateResourceValueConfigs', () => { + it('invokes batchCreateResourceValueConfigs without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse() + ); + client.innerApiCalls.batchCreateResourceValueConfigs = + stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateResourceValueConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateResourceValueConfigs without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse() + ); + client.innerApiCalls.batchCreateResourceValueConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateResourceValueConfigs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IBatchCreateResourceValueConfigsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateResourceValueConfigs with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateResourceValueConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.batchCreateResourceValueConfigs(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateResourceValueConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateResourceValueConfigs with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.batchCreateResourceValueConfigs(request), + expectedError + ); + }); + }); + + describe('deleteResourceValueConfig', () => { + it('invokes deleteResourceValueConfig without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteResourceValueConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteResourceValueConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteResourceValueConfig without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteResourceValueConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteResourceValueConfig( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteResourceValueConfig with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteResourceValueConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteResourceValueConfig(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteResourceValueConfig with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteResourceValueConfig(request), + expectedError + ); + }); + }); + + describe('getResourceValueConfig', () => { + it('invokes getResourceValueConfig without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() + ); + client.innerApiCalls.getResourceValueConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.getResourceValueConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceValueConfig without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() + ); + client.innerApiCalls.getResourceValueConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResourceValueConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IResourceValueConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceValueConfig with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResourceValueConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getResourceValueConfig(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceValueConfig with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GetResourceValueConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GetResourceValueConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getResourceValueConfig(request), + expectedError + ); + }); + }); + + describe('updateResourceValueConfig', () => { + it('invokes updateResourceValueConfig without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() + ); + request.resourceValueConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest', + ['resourceValueConfig', 'name'] + ); + request.resourceValueConfig.name = defaultValue1; + const expectedHeaderRequestParams = `resource_value_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() + ); + client.innerApiCalls.updateResourceValueConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.updateResourceValueConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateResourceValueConfig without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() + ); + request.resourceValueConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest', + ['resourceValueConfig', 'name'] + ); + request.resourceValueConfig.name = defaultValue1; + const expectedHeaderRequestParams = `resource_value_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() + ); + client.innerApiCalls.updateResourceValueConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateResourceValueConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IResourceValueConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateResourceValueConfig with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() + ); + request.resourceValueConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest', + ['resourceValueConfig', 'name'] + ); + request.resourceValueConfig.name = defaultValue1; + const expectedHeaderRequestParams = `resource_value_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateResourceValueConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateResourceValueConfig(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateResourceValueConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateResourceValueConfig with closed client', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest() + ); + request.resourceValueConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest', + ['resourceValueConfig', 'name'] + ); + request.resourceValueConfig.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateResourceValueConfig(request), + expectedError + ); + }); + }); + + describe('bulkMuteFindings', () => { + it('invokes bulkMuteFindings without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkMuteFindings = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkMuteFindings(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkMuteFindings without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkMuteFindings = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkMuteFindings( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.securitycenter.v1.IBulkMuteFindingsResponse, + protos.google.protobuf.IEmpty + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkMuteFindings with call error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkMuteFindings = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.bulkMuteFindings(request), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkMuteFindings with LRO error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.BulkMuteFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.BulkMuteFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkMuteFindings = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkMuteFindings(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkMuteFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkMuteFindingsProgress without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkBulkMuteFindingsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkMuteFindingsProgress with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkMuteFindingsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('runAssetDiscovery', () => { + it('invokes runAssetDiscovery without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runAssetDiscovery = + stubLongRunningCall(expectedResponse); + const [operation] = await client.runAssetDiscovery(request); + const [response] = await operation.promise(); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAssetDiscovery without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runAssetDiscovery = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runAssetDiscovery( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.securitycenter.v1.IRunAssetDiscoveryResponse, + protos.google.protobuf.IEmpty + >; + const [response] = await operation.promise(); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAssetDiscovery with call error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runAssetDiscovery = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.runAssetDiscovery(request), expectedError); + assert(stub.calledOnce); + const actualRequest = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAssetDiscovery with LRO error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runAssetDiscovery = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.runAssetDiscovery(request); + await assert.rejects(operation.promise(), expectedError); + assert(stub.calledOnce); + const actualRequest = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAssetDiscovery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRunAssetDiscoveryProgress without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRunAssetDiscoveryProgress( + expectedResponse.name + ); + assert(stub.calledOnce); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRunAssetDiscoveryProgress with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRunAssetDiscoveryProgress(''), + expectedError + ); + assert(stub.calledOnce); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('groupAssets', () => { + it('invokes groupAssets without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.innerApiCalls.groupAssets = stubSimpleCall(expectedResponse); + const [response] = await client.groupAssets(request); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupAssets without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.innerApiCalls.groupAssets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.groupAssets( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IGroupResult[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupAssets with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.groupAssets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.groupAssets(request), expectedError); + assert(stub.calledOnce); + const actualRequest = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupAssetsStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.descriptors.page.groupAssets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.groupAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.groupAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.groupAssets, request) + ); + assert( + (client.descriptors.page.groupAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes groupAssetsStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.groupAssets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.groupAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert(stub.calledOnce); + assert( + (client.descriptors.page.groupAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.groupAssets, request) + ); + assert( + (client.descriptors.page.groupAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with groupAssets without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.descriptors.page.groupAssets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + []; + const iterable = client.groupAssetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert(stub.calledOnce); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.groupAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.groupAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with groupAssets with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.groupAssets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.groupAssetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert(stub.calledOnce); + assert.deepStrictEqual( + (client.descriptors.page.groupAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.groupAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('groupFindings', () => { + it('invokes groupFindings without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.innerApiCalls.groupFindings = stubSimpleCall(expectedResponse); + const [response] = await client.groupFindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupFindings without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.innerApiCalls.groupFindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.groupFindings( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IGroupResult[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupFindings with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.groupFindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.groupFindings(request), expectedError); + const actualRequest = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.groupFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes groupFindingsStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.descriptors.page.groupFindings.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.groupFindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.groupFindings.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.groupFindings, request) + ); + assert( + (client.descriptors.page.groupFindings.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes groupFindingsStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.groupFindings.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.groupFindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.groupFindings.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.groupFindings, request) + ); + assert( + (client.descriptors.page.groupFindings.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with groupFindings without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupResult() + ), + ]; + client.descriptors.page.groupFindings.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + []; + const iterable = client.groupFindingsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.groupFindings.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.groupFindings.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with groupFindings with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.GroupFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.groupFindings.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.groupFindingsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.groupFindings.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.groupFindings.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listAssets', () => { + it('invokes listAssets without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + ]; + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssets without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + ]; + client.innerApiCalls.listAssets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssets( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssets with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAssets(request), expectedError); + assert(stub.calledOnce); + const actualRequest = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAssets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssetsStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + ]; + client.descriptors.page.listAssets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert(stub.calledOnce); + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listAssetsStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert(stub.calledOnce); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAssets, request) + ); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAssets without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + ), + ]; + client.descriptors.page.listAssets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] = + []; + const iterable = client.listAssetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert(stub.calledOnce); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAssets with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const stub = sinon.stub(client, 'warn'); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListAssetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listAssetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert(stub.calledOnce); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listDescendantSecurityHealthAnalyticsCustomModules', () => { + it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + ]; + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = + stubSimpleCall(expectedResponse); + const [response] = + await client.listDescendantSecurityHealthAnalyticsCustomModules( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + ]; + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDescendantSecurityHealthAnalyticsCustomModules( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listDescendantSecurityHealthAnalyticsCustomModules(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + ]; + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = + stubPageStreamingCall(expectedResponse); + const stream = + client.listDescendantSecurityHealthAnalyticsCustomModulesStream( + request + ); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules, + request + ) + ); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = + client.listDescendantSecurityHealthAnalyticsCustomModulesStream( + request + ); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls + .listDescendantSecurityHealthAnalyticsCustomModules, + request + ) + ); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + ), + ]; + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = + []; + const iterable = + client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = + client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page + .listDescendantSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFindings', () => { + it('invokes listFindings without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + ]; + client.innerApiCalls.listFindings = stubSimpleCall(expectedResponse); + const [response] = await client.listFindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindings without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + ]; + client.innerApiCalls.listFindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFindings( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindings with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFindings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFindings(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFindingsStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + ]; + client.descriptors.page.listFindings.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listFindings.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFindings, request) + ); + assert( + (client.descriptors.page.listFindings.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listFindingsStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFindings.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listFindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFindings.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFindings, request) + ); + assert( + (client.descriptors.page.listFindings.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listFindings without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + ), + ]; + client.descriptors.page.listFindings.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] = + []; + const iterable = client.listFindingsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFindings.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFindings.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listFindings with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListFindingsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFindings.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFindingsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFindings.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFindings.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listMuteConfigs', () => { + it('invokes listMuteConfigs without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + ]; + client.innerApiCalls.listMuteConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listMuteConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMuteConfigs without error using callback', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + ]; + client.innerApiCalls.listMuteConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMuteConfigs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.securitycenter.v1.IMuteConfig[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMuteConfigs with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMuteConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listMuteConfigs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMuteConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMuteConfigsStream without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + ]; + client.descriptors.page.listMuteConfigs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMuteConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.MuteConfig[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.MuteConfig) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMuteConfigs, request) + ); + assert( + (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listMuteConfigsStream with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMuteConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMuteConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycenter.v1.MuteConfig[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.securitycenter.v1.MuteConfig) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMuteConfigs, request) + ); + assert( + (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listMuteConfigs without error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + generateSampleMessage( + new protos.google.cloud.securitycenter.v1.MuteConfig() + ), + ]; + client.descriptors.page.listMuteConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycenter.v1.IMuteConfig[] = []; + const iterable = client.listMuteConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listMuteConfigs with error', async () => { + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMuteConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMuteConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycenter.v1.IMuteConfig[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - await assert.rejects( - client.checkRunAssetDiscoveryProgress(''), - expectedError + assert( + (client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert(stub.calledOnce); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('groupAssets', () => { - it('invokes groupAssets without error', async () => { + describe('listNotificationConfigs', () => { + it('invokes listNotificationConfigs without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), ]; - client.innerApiCalls.groupAssets = stubSimpleCall(expectedResponse); - const [response] = await client.groupAssets(request); - assert(stub.calledOnce); + client.innerApiCalls.listNotificationConfigs = + stubSimpleCall(expectedResponse); + const [response] = await client.listNotificationConfigs(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupAssets without error using callback', async () => { + it('invokes listNotificationConfigs without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), ]; - client.innerApiCalls.groupAssets = + client.innerApiCalls.listNotificationConfigs = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.groupAssets( + client.listNotificationConfigs( request, ( err?: Error | null, - result?: protos.google.cloud.securitycenter.v1.IGroupResult[] | null + result?: + | protos.google.cloud.securitycenter.v1.INotificationConfig[] + | null ) => { if (err) { reject(err); @@ -5131,87 +8861,88 @@ describe('v1.SecurityCenterClient', () => { ); }); const response = await promise; - assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupAssets with error', async () => { + it('invokes listNotificationConfigs with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.groupAssets = stubSimpleCall( + client.innerApiCalls.listNotificationConfigs = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.groupAssets(request), expectedError); - assert(stub.calledOnce); + await assert.rejects( + client.listNotificationConfigs(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupAssets as SinonStub + client.innerApiCalls.listNotificationConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupAssetsStream without error', async () => { + it('invokes listNotificationConfigsStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), ]; - client.descriptors.page.groupAssets.createStream = + client.descriptors.page.listNotificationConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.groupAssetsStream(request); + const stream = client.listNotificationConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.NotificationConfig[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + ( + response: protos.google.cloud.securitycenter.v1.NotificationConfig + ) => { responses.push(response); } ); @@ -5223,50 +8954,54 @@ describe('v1.SecurityCenterClient', () => { }); }); const responses = await promise; - assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.groupAssets.createStream as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.groupAssets, request) + .calledWith(client.innerApiCalls.listNotificationConfigs, request) ); assert( - (client.descriptors.page.groupAssets.createStream as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes groupAssetsStream with error', async () => { + it('invokes listNotificationConfigsStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.groupAssets.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.groupAssetsStream(request); + client.descriptors.page.listNotificationConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listNotificationConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.NotificationConfig[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + ( + response: protos.google.cloud.securitycenter.v1.NotificationConfig + ) => { responses.push(response); } ); @@ -5278,193 +9013,206 @@ describe('v1.SecurityCenterClient', () => { }); }); await assert.rejects(promise, expectedError); - assert(stub.calledOnce); assert( - (client.descriptors.page.groupAssets.createStream as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.groupAssets, request) + .calledWith(client.innerApiCalls.listNotificationConfigs, request) ); assert( - (client.descriptors.page.groupAssets.createStream as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with groupAssets without error', async () => { + it('uses async iteration with listNotificationConfigs without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.NotificationConfig() ), ]; - client.descriptors.page.groupAssets.asyncIterate = + client.descriptors.page.listNotificationConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.INotificationConfig[] = []; - const iterable = client.groupAssetsAsync(request); + const iterable = client.listNotificationConfigsAsync(request); for await (const resource of iterable) { responses.push(resource!); } - assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.groupAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listNotificationConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.groupAssets.asyncIterate as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with groupAssets with error', async () => { + it('uses async iteration with listNotificationConfigs with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupAssetsRequest', + '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.groupAssets.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.groupAssetsAsync(request); + client.descriptors.page.listNotificationConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listNotificationConfigsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.INotificationConfig[] = []; for await (const resource of iterable) { responses.push(resource!); } }); - assert(stub.calledOnce); assert.deepStrictEqual( - (client.descriptors.page.groupAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listNotificationConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.groupAssets.asyncIterate as SinonStub) + ( + client.descriptors.page.listNotificationConfigs + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('groupFindings', () => { - it('invokes groupFindings without error', async () => { + describe('listEffectiveSecurityHealthAnalyticsCustomModules', () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), ]; - client.innerApiCalls.groupFindings = stubSimpleCall(expectedResponse); - const [response] = await client.groupFindings(request); + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = + stubSimpleCall(expectedResponse); + const [response] = + await client.listEffectiveSecurityHealthAnalyticsCustomModules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupFindings without error using callback', async () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), ]; - client.innerApiCalls.groupFindings = + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.groupFindings( + client.listEffectiveSecurityHealthAnalyticsCustomModules( request, ( err?: Error | null, - result?: protos.google.cloud.securitycenter.v1.IGroupResult[] | null + result?: + | protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] + | null ) => { if (err) { reject(err); @@ -5477,81 +9225,89 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupFindings with error', async () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.groupFindings = stubSimpleCall( - undefined, + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listEffectiveSecurityHealthAnalyticsCustomModules(request), expectedError ); - await assert.rejects(client.groupFindings(request), expectedError); const actualRequest = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.groupFindings as SinonStub + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes groupFindingsStream without error', async () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), ]; - client.descriptors.page.groupFindings.createStream = + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.groupFindingsStream(request); + const stream = + client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + ( + response: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + ) => { responses.push(response); } ); @@ -5565,44 +9321,59 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.groupFindings.createStream as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.groupFindings, request) + .calledWith( + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules, + request + ) ); assert( - (client.descriptors.page.groupFindings.createStream as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes groupFindingsStream with error', async () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.groupFindings.createStream = + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.groupFindingsStream(request); + const stream = + client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.GroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.GroupResult) => { + ( + response: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + ) => { responses.push(response); } ); @@ -5615,90 +9386,110 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.groupFindings.createStream as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.groupFindings, request) + .calledWith( + client.innerApiCalls + .listEffectiveSecurityHealthAnalyticsCustomModules, + request + ) ); assert( - (client.descriptors.page.groupFindings.createStream as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with groupFindings without error', async () => { + it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupResult() + new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() ), ]; - client.descriptors.page.groupFindings.asyncIterate = + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; - const iterable = client.groupFindingsAsync(request); + const iterable = + client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.groupFindings.asyncIterate as SinonStub + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.groupFindings.asyncIterate as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with groupFindings with error', async () => { + it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.GroupFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.GroupFindingsRequest', + '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.groupFindings.asyncIterate = + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.groupFindingsAsync(request); + const iterable = + client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.IGroupResult[] = + const responses: protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -5706,98 +9497,105 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.groupFindings.asyncIterate as SinonStub + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.groupFindings.asyncIterate as SinonStub) + ( + client.descriptors.page + .listEffectiveSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('listAssets', () => { - it('invokes listAssets without error', async () => { + describe('listSecurityHealthAnalyticsCustomModules', () => { + it('invokes listSecurityHealthAnalyticsCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), ]; - client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); - const [response] = await client.listAssets(request); - assert(stub.calledOnce); + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = + stubSimpleCall(expectedResponse); + const [response] = + await client.listSecurityHealthAnalyticsCustomModules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAssets without error using callback', async () => { + it('invokes listSecurityHealthAnalyticsCustomModules without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), ]; - client.innerApiCalls.listAssets = + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAssets( + client.listSecurityHealthAnalyticsCustomModules( request, ( err?: Error | null, result?: - | protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] + | protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] | null ) => { if (err) { @@ -5809,88 +9607,90 @@ describe('v1.SecurityCenterClient', () => { ); }); const response = await promise; - assert(stub.calledOnce); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAssets with error', async () => { + it('invokes listSecurityHealthAnalyticsCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAssets = stubSimpleCall( - undefined, + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listSecurityHealthAnalyticsCustomModules(request), expectedError ); - await assert.rejects(client.listAssets(request), expectedError); - assert(stub.calledOnce); const actualRequest = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAssets as SinonStub + client.innerApiCalls + .listSecurityHealthAnalyticsCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAssetsStream without error', async () => { + it('invokes listSecurityHealthAnalyticsCustomModulesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), ]; - client.descriptors.page.listAssets.createStream = + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAssetsStream(request); + const stream = + client.listSecurityHealthAnalyticsCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult[] = + const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule ) => { responses.push(response); } @@ -5903,51 +9703,57 @@ describe('v1.SecurityCenterClient', () => { }); }); const responses = await promise; - assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listAssets, request) + .calledWith( + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, + request + ) ); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listAssetsStream with error', async () => { + it('invokes listSecurityHealthAnalyticsCustomModulesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAssets.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listAssetsStream(request); + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = + client.listSecurityHealthAnalyticsCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult[] = + const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule ) => { responses.push(response); } @@ -5960,201 +9766,205 @@ describe('v1.SecurityCenterClient', () => { }); }); await assert.rejects(promise, expectedError); - assert(stub.calledOnce); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listAssets, request) + .calledWith( + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, + request + ) ); assert( - (client.descriptors.page.listAssets.createStream as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listAssets without error', async () => { + it('uses async iteration with listSecurityHealthAnalyticsCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult() + new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() ), ]; - client.descriptors.page.listAssets.asyncIterate = + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] = + const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = []; - const iterable = client.listAssetsAsync(request); + const iterable = + client.listSecurityHealthAnalyticsCustomModulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } - assert(stub.calledOnce); assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listAssets with error', async () => { + it('uses async iteration with listSecurityHealthAnalyticsCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - const stub = sinon.stub(client, 'warn'); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListAssetsRequest() + new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListAssetsRequest', + '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listAssetsAsync(request); + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = + client.listSecurityHealthAnalyticsCustomModulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.ListAssetsResponse.IListAssetsResult[] = + const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = []; for await (const resource of iterable) { responses.push(resource!); } }); - assert(stub.calledOnce); assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) + ( + client.descriptors.page.listSecurityHealthAnalyticsCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('listDescendantSecurityHealthAnalyticsCustomModules', () => { - it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + describe('listSources', () => { + it('invokes listSources without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), ]; - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = - stubSimpleCall(expectedResponse); - const [response] = - await client.listDescendantSecurityHealthAnalyticsCustomModules( - request - ); + client.innerApiCalls.listSources = stubSimpleCall(expectedResponse); + const [response] = await client.listSources(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error using callback', async () => { + it('invokes listSources without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), ]; - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listSources = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDescendantSecurityHealthAnalyticsCustomModules( + client.listSources( request, ( err?: Error | null, - result?: - | protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] - | null + result?: protos.google.cloud.securitycenter.v1.ISource[] | null ) => { if (err) { reject(err); @@ -6167,91 +9977,80 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + it('invokes listSources with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = - stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.listDescendantSecurityHealthAnalyticsCustomModules(request), + client.innerApiCalls.listSources = stubSimpleCall( + undefined, expectedError ); + await assert.rejects(client.listSources(request), expectedError); const actualRequest = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream without error', async () => { + it('invokes listSourcesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), ]; - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = + client.descriptors.page.listSources.createStream = stubPageStreamingCall(expectedResponse); - const stream = - client.listDescendantSecurityHealthAnalyticsCustomModulesStream( - request - ); + const stream = client.listSourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = - []; + const responses: protos.google.cloud.securitycenter.v1.Source[] = []; stream.on( 'data', - ( - response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - ) => { + (response: protos.google.cloud.securitycenter.v1.Source) => { responses.push(response); } ); @@ -6265,61 +10064,45 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .createStream as SinonStub - ) + (client.descriptors.page.listSources.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules, - request - ) + .calledWith(client.innerApiCalls.listSources, request) ); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .createStream as SinonStub - ) + (client.descriptors.page.listSources.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream with error', async () => { + it('invokes listSourcesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = - client.listDescendantSecurityHealthAnalyticsCustomModulesStream( - request - ); + client.descriptors.page.listSources.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listSourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = - []; + const responses: protos.google.cloud.securitycenter.v1.Source[] = []; stream.on( 'data', - ( - response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule - ) => { + (response: protos.google.cloud.securitycenter.v1.Source) => { responses.push(response); } ); @@ -6332,212 +10115,187 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .createStream as SinonStub - ) + (client.descriptors.page.listSources.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls - .listDescendantSecurityHealthAnalyticsCustomModules, - request - ) + .calledWith(client.innerApiCalls.listSources, request) ); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .createStream as SinonStub - ) + (client.descriptors.page.listSources.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + it('uses async iteration with listSources without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.Source() ), ]; - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = + client.descriptors.page.listSources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = - []; - const iterable = - client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + const responses: protos.google.cloud.securitycenter.v1.ISource[] = []; + const iterable = client.listSourcesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listSources.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .asyncIterate as SinonStub - ) + (client.descriptors.page.listSources.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + it('uses async iteration with listSources with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = - client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + client.descriptors.page.listSources.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listSourcesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = - []; + const responses: protos.google.cloud.securitycenter.v1.ISource[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listSources.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - ( - client.descriptors.page - .listDescendantSecurityHealthAnalyticsCustomModules - .asyncIterate as SinonStub - ) + (client.descriptors.page.listSources.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); - describe('listFindings', () => { - it('invokes listFindings without error', async () => { + describe('listBigQueryExports', () => { + it('invokes listBigQueryExports without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), ]; - client.innerApiCalls.listFindings = stubSimpleCall(expectedResponse); - const [response] = await client.listFindings(request); + client.innerApiCalls.listBigQueryExports = + stubSimpleCall(expectedResponse); + const [response] = await client.listBigQueryExports(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFindings without error using callback', async () => { + it('invokes listBigQueryExports without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), ]; - client.innerApiCalls.listFindings = + client.innerApiCalls.listBigQueryExports = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listFindings( + client.listBigQueryExports( request, ( err?: Error | null, result?: - | protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] + | protos.google.cloud.securitycenter.v1.IBigQueryExport[] | null ) => { if (err) { @@ -6551,83 +10309,81 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFindings with error', async () => { + it('invokes listBigQueryExports with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listFindings = stubSimpleCall( + client.innerApiCalls.listBigQueryExports = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listFindings(request), expectedError); + await assert.rejects(client.listBigQueryExports(request), expectedError); const actualRequest = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFindings as SinonStub + client.innerApiCalls.listBigQueryExports as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFindingsStream without error', async () => { + it('invokes listBigQueryExportsStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), ]; - client.descriptors.page.listFindings.createStream = + client.descriptors.page.listBigQueryExports.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFindingsStream(request); + const stream = client.listBigQueryExportsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult[] = + const responses: protos.google.cloud.securitycenter.v1.BigQueryExport[] = []; stream.on( 'data', - ( - response: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - ) => { + (response: protos.google.cloud.securitycenter.v1.BigQueryExport) => { responses.push(response); } ); @@ -6641,12 +10397,12 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listFindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryExports.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listFindings, request) + .calledWith(client.innerApiCalls.listBigQueryExports, request) ); assert( - (client.descriptors.page.listFindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryExports.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -6654,35 +10410,31 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listFindingsStream with error', async () => { + it('invokes listBigQueryExportsStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFindings.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listFindingsStream(request); + client.descriptors.page.listBigQueryExports.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBigQueryExportsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult[] = + const responses: protos.google.cloud.securitycenter.v1.BigQueryExport[] = []; stream.on( 'data', - ( - response: protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - ) => { + (response: protos.google.cloud.securitycenter.v1.BigQueryExport) => { responses.push(response); } ); @@ -6695,12 +10447,12 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listFindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryExports.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listFindings, request) + .calledWith(client.innerApiCalls.listBigQueryExports, request) ); assert( - (client.descriptors.page.listFindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryExports.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -6708,49 +10460,49 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listFindings without error', async () => { + it('uses async iteration with listBigQueryExports without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult() + new protos.google.cloud.securitycenter.v1.BigQueryExport() ), ]; - client.descriptors.page.listFindings.asyncIterate = + client.descriptors.page.listBigQueryExports.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] = + const responses: protos.google.cloud.securitycenter.v1.IBigQueryExport[] = []; - const iterable = client.listFindingsAsync(request); + const iterable = client.listBigQueryExportsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listFindings.asyncIterate as SinonStub + client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFindings.asyncIterate as SinonStub) + (client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -6758,27 +10510,27 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listFindings with error', async () => { + it('uses async iteration with listBigQueryExports with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListFindingsRequest() + new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListFindingsRequest', + '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFindings.asyncIterate = + client.descriptors.page.listBigQueryExports.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFindingsAsync(request); + const iterable = client.listBigQueryExportsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.ListFindingsResponse.IListFindingsResult[] = + const responses: protos.google.cloud.securitycenter.v1.IBigQueryExport[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -6786,12 +10538,12 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listFindings.asyncIterate as SinonStub + client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFindings.asyncIterate as SinonStub) + (client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -6800,80 +10552,86 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('listMuteConfigs', () => { - it('invokes listMuteConfigs without error', async () => { + describe('listDescendantEventThreatDetectionCustomModules', () => { + it('invokes listDescendantEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listMuteConfigs = stubSimpleCall(expectedResponse); - const [response] = await client.listMuteConfigs(request); + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = + stubSimpleCall(expectedResponse); + const [response] = + await client.listDescendantEventThreatDetectionCustomModules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMuteConfigs without error using callback', async () => { + it('invokes listDescendantEventThreatDetectionCustomModules without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listMuteConfigs = + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listMuteConfigs( + client.listDescendantEventThreatDetectionCustomModules( request, ( err?: Error | null, - result?: protos.google.cloud.securitycenter.v1.IMuteConfig[] | null + result?: + | protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] + | null ) => { if (err) { reject(err); @@ -6886,81 +10644,89 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMuteConfigs with error', async () => { + it('invokes listDescendantEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listMuteConfigs = stubSimpleCall( - undefined, + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listDescendantEventThreatDetectionCustomModules(request), expectedError ); - await assert.rejects(client.listMuteConfigs(request), expectedError); const actualRequest = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMuteConfigs as SinonStub + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMuteConfigsStream without error', async () => { + it('invokes listDescendantEventThreatDetectionCustomModulesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listMuteConfigs.createStream = + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMuteConfigsStream(request); + const stream = + client.listDescendantEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.MuteConfig[] = + const responses: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.MuteConfig) => { + ( + response: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule + ) => { responses.push(response); } ); @@ -6974,44 +10740,59 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listMuteConfigs, request) + .calledWith( + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules, + request + ) ); assert( - (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listMuteConfigsStream with error', async () => { + it('invokes listDescendantEventThreatDetectionCustomModulesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMuteConfigs.createStream = + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMuteConfigsStream(request); + const stream = + client.listDescendantEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.MuteConfig[] = + const responses: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.MuteConfig) => { + ( + response: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule + ) => { responses.push(response); } ); @@ -7024,89 +10805,110 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listMuteConfigs, request) + .calledWith( + client.innerApiCalls + .listDescendantEventThreatDetectionCustomModules, + request + ) ); assert( - (client.descriptors.page.listMuteConfigs.createStream as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listMuteConfigs without error', async () => { + it('uses async iteration with listDescendantEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.MuteConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listMuteConfigs.asyncIterate = + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.IMuteConfig[] = []; - const iterable = client.listMuteConfigsAsync(request); + const responses: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] = + []; + const iterable = + client.listDescendantEventThreatDetectionCustomModulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listMuteConfigs with error', async () => { + it('uses async iteration with listDescendantEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListMuteConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListMuteConfigsRequest', + '.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMuteConfigs.asyncIterate = + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMuteConfigsAsync(request); + const iterable = + client.listDescendantEventThreatDetectionCustomModulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.IMuteConfig[] = + const responses: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -7114,96 +10916,103 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listMuteConfigs.asyncIterate as SinonStub) + ( + client.descriptors.page + .listDescendantEventThreatDetectionCustomModules + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('listNotificationConfigs', () => { - it('invokes listNotificationConfigs without error', async () => { + describe('listEventThreatDetectionCustomModules', () => { + it('invokes listEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listNotificationConfigs = + client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listNotificationConfigs(request); + const [response] = + await client.listEventThreatDetectionCustomModules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNotificationConfigs without error using callback', async () => { + it('invokes listEventThreatDetectionCustomModules without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listNotificationConfigs = + client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listNotificationConfigs( + client.listEventThreatDetectionCustomModules( request, ( err?: Error | null, result?: - | protos.google.cloud.securitycenter.v1.INotificationConfig[] + | protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] | null ) => { if (err) { @@ -7217,85 +11026,84 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNotificationConfigs with error', async () => { + it('invokes listEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listNotificationConfigs = stubSimpleCall( - undefined, - expectedError - ); + client.innerApiCalls.listEventThreatDetectionCustomModules = + stubSimpleCall(undefined, expectedError); await assert.rejects( - client.listNotificationConfigs(request), + client.listEventThreatDetectionCustomModules(request), expectedError ); const actualRequest = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listNotificationConfigs as SinonStub + client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listNotificationConfigsStream without error', async () => { + it('invokes listEventThreatDetectionCustomModulesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listNotificationConfigs.createStream = + client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listNotificationConfigsStream(request); + const stream = + client.listEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.NotificationConfig[] = + const responses: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.NotificationConfig + response: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule ) => { responses.push(response); } @@ -7311,15 +11119,18 @@ describe('v1.SecurityCenterClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listNotificationConfigs, request) + .calledWith( + client.innerApiCalls.listEventThreatDetectionCustomModules, + request + ) ); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) @@ -7329,32 +11140,33 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listNotificationConfigsStream with error', async () => { + it('invokes listEventThreatDetectionCustomModulesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationConfigs.createStream = + client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listNotificationConfigsStream(request); + const stream = + client.listEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.NotificationConfig[] = + const responses: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.NotificationConfig + response: protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule ) => { responses.push(response); } @@ -7369,15 +11181,18 @@ describe('v1.SecurityCenterClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listNotificationConfigs, request) + .calledWith( + client.innerApiCalls.listEventThreatDetectionCustomModules, + request + ) ); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) @@ -7387,51 +11202,52 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listNotificationConfigs without error', async () => { + it('uses async iteration with listEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.NotificationConfig() + new protos.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listNotificationConfigs.asyncIterate = + client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.INotificationConfig[] = + const responses: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] = []; - const iterable = client.listNotificationConfigsAsync(request); + const iterable = + client.listEventThreatDetectionCustomModulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .asyncIterate as SinonStub ) .getCall(0) @@ -7441,27 +11257,28 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listNotificationConfigs with error', async () => { + it('uses async iteration with listEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListNotificationConfigsRequest() + new protos.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListNotificationConfigsRequest', + '.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationConfigs.asyncIterate = + client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listNotificationConfigsAsync(request); + const iterable = + client.listEventThreatDetectionCustomModulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.INotificationConfig[] = + const responses: protos.google.cloud.securitycenter.v1.IEventThreatDetectionCustomModule[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -7469,14 +11286,14 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listNotificationConfigs + client.descriptors.page.listEventThreatDetectionCustomModules .asyncIterate as SinonStub ) .getCall(0) @@ -7487,85 +11304,85 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('listEffectiveSecurityHealthAnalyticsCustomModules', () => { - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { + describe('listEffectiveEventThreatDetectionCustomModules', () => { + it('invokes listEffectiveEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); const [response] = - await client.listEffectiveSecurityHealthAnalyticsCustomModules(request); + await client.listEffectiveEventThreatDetectionCustomModules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error using callback', async () => { + it('invokes listEffectiveEventThreatDetectionCustomModules without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), ]; - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listEffectiveSecurityHealthAnalyticsCustomModules( + client.listEffectiveEventThreatDetectionCustomModules( request, ( err?: Error | null, result?: - | protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] + | protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[] | null ) => { if (err) { @@ -7580,87 +11397,87 @@ describe('v1.SecurityCenterClient', () => { assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { + it('invokes listEffectiveEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); await assert.rejects( - client.listEffectiveSecurityHealthAnalyticsCustomModules(request), + client.listEffectiveEventThreatDetectionCustomModules(request), expectedError ); const actualRequest = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub + .listEffectiveEventThreatDetectionCustomModules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream without error', async () => { + it('invokes listEffectiveEventThreatDetectionCustomModulesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); const stream = - client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); + client.listEffectiveEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + response: protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule ) => { responses.push(response); } @@ -7676,21 +11493,18 @@ describe('v1.SecurityCenterClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) .calledWith( - client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules, + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request ) ); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) @@ -7700,33 +11514,33 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream with error', async () => { + it('invokes listEffectiveEventThreatDetectionCustomModulesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); const stream = - client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); + client.listEffectiveEventThreatDetectionCustomModulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule + response: protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule ) => { responses.push(response); } @@ -7741,21 +11555,18 @@ describe('v1.SecurityCenterClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) .calledWith( - client.innerApiCalls - .listEffectiveSecurityHealthAnalyticsCustomModules, + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request ) ); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .createStream as SinonStub ) .getCall(0) @@ -7765,54 +11576,52 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { + it('uses async iteration with listEffectiveEventThreatDetectionCustomModules without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule() ), ]; - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[] = []; const iterable = - client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); + client.listEffectiveEventThreatDetectionCustomModulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .asyncIterate as SinonStub ) .getCall(0) @@ -7822,28 +11631,28 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { + it('uses async iteration with listEffectiveEventThreatDetectionCustomModules with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); const iterable = - client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); + client.listEffectiveEventThreatDetectionCustomModulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.IEffectiveEventThreatDetectionCustomModule[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -7851,16 +11660,14 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page - .listEffectiveSecurityHealthAnalyticsCustomModules + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules .asyncIterate as SinonStub ) .getCall(0) @@ -7871,85 +11678,82 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('listSecurityHealthAnalyticsCustomModules', () => { - it('invokes listSecurityHealthAnalyticsCustomModules without error', async () => { + describe('listResourceValueConfigs', () => { + it('invokes listResourceValueConfigs without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), ]; - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listResourceValueConfigs = stubSimpleCall(expectedResponse); - const [response] = - await client.listSecurityHealthAnalyticsCustomModules(request); + const [response] = await client.listResourceValueConfigs(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSecurityHealthAnalyticsCustomModules without error using callback', async () => { + it('invokes listResourceValueConfigs without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), ]; - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = + client.innerApiCalls.listResourceValueConfigs = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSecurityHealthAnalyticsCustomModules( + client.listResourceValueConfigs( request, ( err?: Error | null, result?: - | protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] + | protos.google.cloud.securitycenter.v1.IResourceValueConfig[] | null ) => { if (err) { @@ -7963,88 +11767,85 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSecurityHealthAnalyticsCustomModules with error', async () => { + it('invokes listResourceValueConfigs with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = - stubSimpleCall(undefined, expectedError); + client.innerApiCalls.listResourceValueConfigs = stubSimpleCall( + undefined, + expectedError + ); await assert.rejects( - client.listSecurityHealthAnalyticsCustomModules(request), + client.listResourceValueConfigs(request), expectedError ); const actualRequest = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listSecurityHealthAnalyticsCustomModules as SinonStub + client.innerApiCalls.listResourceValueConfigs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSecurityHealthAnalyticsCustomModulesStream without error', async () => { + it('invokes listResourceValueConfigsStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), ]; - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = + client.descriptors.page.listResourceValueConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = - client.listSecurityHealthAnalyticsCustomModulesStream(request); + const stream = client.listResourceValueConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.ResourceValueConfig[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + response: protos.google.cloud.securitycenter.v1.ResourceValueConfig ) => { responses.push(response); } @@ -8060,18 +11861,15 @@ describe('v1.SecurityCenterClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .createStream as SinonStub ) .getCall(0) - .calledWith( - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, - request - ) + .calledWith(client.innerApiCalls.listResourceValueConfigs, request) ); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .createStream as SinonStub ) .getCall(0) @@ -8081,33 +11879,32 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listSecurityHealthAnalyticsCustomModulesStream with error', async () => { + it('invokes listResourceValueConfigsStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = + client.descriptors.page.listResourceValueConfigs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = - client.listSecurityHealthAnalyticsCustomModulesStream(request); + const stream = client.listResourceValueConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.ResourceValueConfig[] = []; stream.on( 'data', ( - response: protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule + response: protos.google.cloud.securitycenter.v1.ResourceValueConfig ) => { responses.push(response); } @@ -8122,18 +11919,15 @@ describe('v1.SecurityCenterClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .createStream as SinonStub ) .getCall(0) - .calledWith( - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, - request - ) + .calledWith(client.innerApiCalls.listResourceValueConfigs, request) ); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .createStream as SinonStub ) .getCall(0) @@ -8143,52 +11937,51 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listSecurityHealthAnalyticsCustomModules without error', async () => { + it('uses async iteration with listResourceValueConfigs without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule() + new protos.google.cloud.securitycenter.v1.ResourceValueConfig() ), ]; - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = + client.descriptors.page.listResourceValueConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.IResourceValueConfig[] = []; - const iterable = - client.listSecurityHealthAnalyticsCustomModulesAsync(request); + const iterable = client.listResourceValueConfigsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .asyncIterate as SinonStub ) .getCall(0) @@ -8198,28 +11991,27 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listSecurityHealthAnalyticsCustomModules with error', async () => { + it('uses async iteration with listResourceValueConfigs with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + new protos.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest', + '.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = + client.descriptors.page.listResourceValueConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = - client.listSecurityHealthAnalyticsCustomModulesAsync(request); + const iterable = client.listResourceValueConfigsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.ISecurityHealthAnalyticsCustomModule[] = + const responses: protos.google.cloud.securitycenter.v1.IResourceValueConfig[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -8227,14 +12019,14 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listSecurityHealthAnalyticsCustomModules + client.descriptors.page.listResourceValueConfigs .asyncIterate as SinonStub ) .getCall(0) @@ -8245,80 +12037,83 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('listSources', () => { - it('invokes listSources without error', async () => { + describe('listValuedResources', () => { + it('invokes listValuedResources without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), ]; - client.innerApiCalls.listSources = stubSimpleCall(expectedResponse); - const [response] = await client.listSources(request); + client.innerApiCalls.listValuedResources = + stubSimpleCall(expectedResponse); + const [response] = await client.listValuedResources(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSources without error using callback', async () => { + it('invokes listValuedResources without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), ]; - client.innerApiCalls.listSources = + client.innerApiCalls.listValuedResources = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSources( + client.listValuedResources( request, ( err?: Error | null, - result?: protos.google.cloud.securitycenter.v1.ISource[] | null + result?: + | protos.google.cloud.securitycenter.v1.IValuedResource[] + | null ) => { if (err) { reject(err); @@ -8331,80 +12126,81 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSources with error', async () => { + it('invokes listValuedResources with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSources = stubSimpleCall( + client.innerApiCalls.listValuedResources = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listSources(request), expectedError); + await assert.rejects(client.listValuedResources(request), expectedError); const actualRequest = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSources as SinonStub + client.innerApiCalls.listValuedResources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSourcesStream without error', async () => { + it('invokes listValuedResourcesStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), ]; - client.descriptors.page.listSources.createStream = + client.descriptors.page.listValuedResources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSourcesStream(request); + const stream = client.listValuedResourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.Source[] = []; + const responses: protos.google.cloud.securitycenter.v1.ValuedResource[] = + []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.Source) => { + (response: protos.google.cloud.securitycenter.v1.ValuedResource) => { responses.push(response); } ); @@ -8418,12 +12214,12 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listSources.createStream as SinonStub) + (client.descriptors.page.listValuedResources.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSources, request) + .calledWith(client.innerApiCalls.listValuedResources, request) ); assert( - (client.descriptors.page.listSources.createStream as SinonStub) + (client.descriptors.page.listValuedResources.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8431,32 +12227,31 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listSourcesStream with error', async () => { + it('invokes listValuedResourcesStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSources.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listSourcesStream(request); + client.descriptors.page.listValuedResources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listValuedResourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.Source[] = []; + const responses: protos.google.cloud.securitycenter.v1.ValuedResource[] = + []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.Source) => { + (response: protos.google.cloud.securitycenter.v1.ValuedResource) => { responses.push(response); } ); @@ -8469,12 +12264,12 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listSources.createStream as SinonStub) + (client.descriptors.page.listValuedResources.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSources, request) + .calledWith(client.innerApiCalls.listValuedResources, request) ); assert( - (client.descriptors.page.listSources.createStream as SinonStub) + (client.descriptors.page.listValuedResources.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8482,48 +12277,49 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listSources without error', async () => { + it('uses async iteration with listValuedResources without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.Source() + new protos.google.cloud.securitycenter.v1.ValuedResource() ), ]; - client.descriptors.page.listSources.asyncIterate = + client.descriptors.page.listValuedResources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.ISource[] = []; - const iterable = client.listSourcesAsync(request); + const responses: protos.google.cloud.securitycenter.v1.IValuedResource[] = + []; + const iterable = client.listValuedResourcesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listSources.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listValuedResources.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listSources.asyncIterate as SinonStub) + (client.descriptors.page.listValuedResources.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8531,41 +12327,40 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listSources with error', async () => { + it('uses async iteration with listValuedResources with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListSourcesRequest() + new protos.google.cloud.securitycenter.v1.ListValuedResourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListSourcesRequest', + '.google.cloud.securitycenter.v1.ListValuedResourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSources.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listSourcesAsync(request); + client.descriptors.page.listValuedResources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listValuedResourcesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.ISource[] = []; + const responses: protos.google.cloud.securitycenter.v1.IValuedResource[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listSources.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listValuedResources.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listSources.asyncIterate as SinonStub) + (client.descriptors.page.listValuedResources.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8574,83 +12369,80 @@ describe('v1.SecurityCenterClient', () => { }); }); - describe('listBigQueryExports', () => { - it('invokes listBigQueryExports without error', async () => { + describe('listAttackPaths', () => { + it('invokes listAttackPaths without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), ]; - client.innerApiCalls.listBigQueryExports = - stubSimpleCall(expectedResponse); - const [response] = await client.listBigQueryExports(request); + client.innerApiCalls.listAttackPaths = stubSimpleCall(expectedResponse); + const [response] = await client.listAttackPaths(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryExports without error using callback', async () => { + it('invokes listAttackPaths without error using callback', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), ]; - client.innerApiCalls.listBigQueryExports = + client.innerApiCalls.listAttackPaths = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listBigQueryExports( + client.listAttackPaths( request, ( err?: Error | null, - result?: - | protos.google.cloud.securitycenter.v1.IBigQueryExport[] - | null + result?: protos.google.cloud.securitycenter.v1.IAttackPath[] | null ) => { if (err) { reject(err); @@ -8663,81 +12455,81 @@ describe('v1.SecurityCenterClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryExports with error', async () => { + it('invokes listAttackPaths with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listBigQueryExports = stubSimpleCall( + client.innerApiCalls.listAttackPaths = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listBigQueryExports(request), expectedError); + await assert.rejects(client.listAttackPaths(request), expectedError); const actualRequest = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryExports as SinonStub + client.innerApiCalls.listAttackPaths as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryExportsStream without error', async () => { + it('invokes listAttackPathsStream without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), ]; - client.descriptors.page.listBigQueryExports.createStream = + client.descriptors.page.listAttackPaths.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBigQueryExportsStream(request); + const stream = client.listAttackPathsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.BigQueryExport[] = + const responses: protos.google.cloud.securitycenter.v1.AttackPath[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.BigQueryExport) => { + (response: protos.google.cloud.securitycenter.v1.AttackPath) => { responses.push(response); } ); @@ -8751,12 +12543,12 @@ describe('v1.SecurityCenterClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listBigQueryExports.createStream as SinonStub) + (client.descriptors.page.listAttackPaths.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBigQueryExports, request) + .calledWith(client.innerApiCalls.listAttackPaths, request) ); assert( - (client.descriptors.page.listBigQueryExports.createStream as SinonStub) + (client.descriptors.page.listAttackPaths.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8764,31 +12556,31 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('invokes listBigQueryExportsStream with error', async () => { + it('invokes listAttackPathsStream with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBigQueryExports.createStream = + client.descriptors.page.listAttackPaths.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBigQueryExportsStream(request); + const stream = client.listAttackPathsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycenter.v1.BigQueryExport[] = + const responses: protos.google.cloud.securitycenter.v1.AttackPath[] = []; stream.on( 'data', - (response: protos.google.cloud.securitycenter.v1.BigQueryExport) => { + (response: protos.google.cloud.securitycenter.v1.AttackPath) => { responses.push(response); } ); @@ -8801,12 +12593,12 @@ describe('v1.SecurityCenterClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBigQueryExports.createStream as SinonStub) + (client.descriptors.page.listAttackPaths.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBigQueryExports, request) + .calledWith(client.innerApiCalls.listAttackPaths, request) ); assert( - (client.descriptors.page.listBigQueryExports.createStream as SinonStub) + (client.descriptors.page.listAttackPaths.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8814,49 +12606,48 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listBigQueryExports without error', async () => { + it('uses async iteration with listAttackPaths without error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), generateSampleMessage( - new protos.google.cloud.securitycenter.v1.BigQueryExport() + new protos.google.cloud.securitycenter.v1.AttackPath() ), ]; - client.descriptors.page.listBigQueryExports.asyncIterate = + client.descriptors.page.listAttackPaths.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycenter.v1.IBigQueryExport[] = - []; - const iterable = client.listBigQueryExportsAsync(request); + const responses: protos.google.cloud.securitycenter.v1.IAttackPath[] = []; + const iterable = client.listAttackPathsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub + client.descriptors.page.listAttackPaths.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub) + (client.descriptors.page.listAttackPaths.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -8864,27 +12655,27 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('uses async iteration with listBigQueryExports with error', async () => { + it('uses async iteration with listAttackPaths with error', async () => { const client = new securitycenterModule.v1.SecurityCenterClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.securitycenter.v1.ListBigQueryExportsRequest() + new protos.google.cloud.securitycenter.v1.ListAttackPathsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.securitycenter.v1.ListBigQueryExportsRequest', + '.google.cloud.securitycenter.v1.ListAttackPathsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBigQueryExports.asyncIterate = + client.descriptors.page.listAttackPaths.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBigQueryExportsAsync(request); + const iterable = client.listAttackPathsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.securitycenter.v1.IBigQueryExport[] = + const responses: protos.google.cloud.securitycenter.v1.IAttackPath[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -8892,12 +12683,12 @@ describe('v1.SecurityCenterClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub + client.descriptors.page.listAttackPaths.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listBigQueryExports.asyncIterate as SinonStub) + (client.descriptors.page.listAttackPaths.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -9212,6 +13003,82 @@ describe('v1.SecurityCenterClient', () => { }); describe('Path templates', () => { + describe('attackPath', () => { + const fakePath = '/rendered/path/attackPath'; + const expectedParameters = { + organization: 'organizationValue', + simulation: 'simulationValue', + valued_resource: 'valuedResourceValue', + attack_path: 'attackPathValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attackPathPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attackPathPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attackPathPath', () => { + const result = client.attackPathPath( + 'organizationValue', + 'simulationValue', + 'valuedResourceValue', + 'attackPathValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.attackPathPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromAttackPathName', () => { + const result = client.matchOrganizationFromAttackPathName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.attackPathPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimulationFromAttackPathName', () => { + const result = client.matchSimulationFromAttackPathName(fakePath); + assert.strictEqual(result, 'simulationValue'); + assert( + (client.pathTemplates.attackPathPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchValuedResourceFromAttackPathName', () => { + const result = client.matchValuedResourceFromAttackPathName(fakePath); + assert.strictEqual(result, 'valuedResourceValue'); + assert( + (client.pathTemplates.attackPathPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttackPathFromAttackPathName', () => { + const result = client.matchAttackPathFromAttackPathName(fakePath); + assert.strictEqual(result, 'attackPathValue'); + assert( + (client.pathTemplates.attackPathPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderAsset', () => { const fakePath = '/rendered/path/folderAsset'; const expectedParameters = { @@ -9386,6 +13253,75 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('folderEventThreatDetectionSettingsModule', () => { + const fakePath = + '/rendered/path/folderEventThreatDetectionSettingsModule'; + const expectedParameters = { + folder: 'folderValue', + module: 'moduleValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderEventThreatDetectionSettingsModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderEventThreatDetectionSettingsModulePath', () => { + const result = client.folderEventThreatDetectionSettingsModulePath( + 'folderValue', + 'moduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .folderEventThreatDetectionSettingsModulePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchFolderFromFolderEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + ( + client.pathTemplates + .folderEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModuleFromFolderEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchModuleFromFolderEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'moduleValue'); + assert( + ( + client.pathTemplates + .folderEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderExport', () => { const fakePath = '/rendered/path/folderExport'; const expectedParameters = { @@ -9435,6 +13371,85 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('folderLocationMuteConfig', () => { + const fakePath = '/rendered/path/folderLocationMuteConfig'; + const expectedParameters = { + folder: 'folderValue', + location: 'locationValue', + mute_config: 'muteConfigValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationMuteConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderLocationMuteConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderLocationMuteConfigPath', () => { + const result = client.folderLocationMuteConfigPath( + 'folderValue', + 'locationValue', + 'muteConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.folderLocationMuteConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderLocationMuteConfigName', () => { + const result = + client.matchFolderFromFolderLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + ( + client.pathTemplates.folderLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFolderLocationMuteConfigName', () => { + const result = + client.matchLocationFromFolderLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.folderLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMuteConfigFromFolderLocationMuteConfigName', () => { + const result = + client.matchMuteConfigFromFolderLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'muteConfigValue'); + assert( + ( + client.pathTemplates.folderLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('folderMuteConfig', () => { const fakePath = '/rendered/path/folderMuteConfig'; const expectedParameters = { @@ -10222,6 +14237,127 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('organizationEventThreatDetectionSettings', () => { + const fakePath = + '/rendered/path/organizationEventThreatDetectionSettings'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationEventThreatDetectionSettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationEventThreatDetectionSettingsPath', () => { + const result = + client.organizationEventThreatDetectionSettingsPath( + 'organizationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationEventThreatDetectionSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationEventThreatDetectionSettingsName', () => { + const result = + client.matchOrganizationFromOrganizationEventThreatDetectionSettingsName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationEventThreatDetectionSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationEventThreatDetectionSettingsModule', () => { + const fakePath = + '/rendered/path/organizationEventThreatDetectionSettingsModule'; + const expectedParameters = { + organization: 'organizationValue', + module: 'moduleValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationEventThreatDetectionSettingsModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationEventThreatDetectionSettingsModulePath', () => { + const result = + client.organizationEventThreatDetectionSettingsModulePath( + 'organizationValue', + 'moduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationEventThreatDetectionSettingsModulePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchOrganizationFromOrganizationEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModuleFromOrganizationEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchModuleFromOrganizationEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'moduleValue'); + assert( + ( + client.pathTemplates + .organizationEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationExport', () => { const fakePath = '/rendered/path/organizationExport'; const expectedParameters = { @@ -10284,6 +14420,87 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('organizationLocationMuteConfig', () => { + const fakePath = '/rendered/path/organizationLocationMuteConfig'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + mute_config: 'muteConfigValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationMuteConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationMuteConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationMuteConfigPath', () => { + const result = client.organizationLocationMuteConfigPath( + 'organizationValue', + 'locationValue', + 'muteConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationLocationMuteConfigName', () => { + const result = + client.matchOrganizationFromOrganizationLocationMuteConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromOrganizationLocationMuteConfigName', () => { + const result = + client.matchLocationFromOrganizationLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMuteConfigFromOrganizationLocationMuteConfigName', () => { + const result = + client.matchMuteConfigFromOrganizationLocationMuteConfigName( + fakePath + ); + assert.strictEqual(result, 'muteConfigValue'); + assert( + ( + client.pathTemplates.organizationLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('organizationMuteConfig', () => { const fakePath = '/rendered/path/organizationMuteConfig'; const expectedParameters = { @@ -10625,7 +14842,56 @@ describe('v1.SecurityCenterClient', () => { assert.strictEqual(result, fakePath); assert( ( - client.pathTemplates.organizationSettingsPathTemplate + client.pathTemplates.organizationSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationSettingsName', () => { + const result = + client.matchOrganizationFromOrganizationSettingsName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationSimulation', () => { + const fakePath = '/rendered/path/organizationSimulation'; + const expectedParameters = { + organization: 'organizationValue', + simulation: 'simulationValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSimulationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationSimulationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationSimulationPath', () => { + const result = client.organizationSimulationPath( + 'organizationValue', + 'simulationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationSimulationPathTemplate .render as SinonStub ) .getCall(-1) @@ -10633,13 +14899,27 @@ describe('v1.SecurityCenterClient', () => { ); }); - it('matchOrganizationFromOrganizationSettingsName', () => { + it('matchOrganizationFromOrganizationSimulationName', () => { const result = - client.matchOrganizationFromOrganizationSettingsName(fakePath); + client.matchOrganizationFromOrganizationSimulationName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( ( - client.pathTemplates.organizationSettingsPathTemplate + client.pathTemplates.organizationSimulationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimulationFromOrganizationSimulationName', () => { + const result = + client.matchSimulationFromOrganizationSimulationName(fakePath); + assert.strictEqual(result, 'simulationValue'); + assert( + ( + client.pathTemplates.organizationSimulationPathTemplate .match as SinonStub ) .getCall(-1) @@ -11157,6 +15437,75 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('projectEventThreatDetectionSettingsModule', () => { + const fakePath = + '/rendered/path/projectEventThreatDetectionSettingsModule'; + const expectedParameters = { + project: 'projectValue', + module: 'moduleValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectEventThreatDetectionSettingsModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectEventThreatDetectionSettingsModulePath', () => { + const result = client.projectEventThreatDetectionSettingsModulePath( + 'projectValue', + 'moduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectEventThreatDetectionSettingsModulePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchProjectFromProjectEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModuleFromProjectEventThreatDetectionSettingsModuleName', () => { + const result = + client.matchModuleFromProjectEventThreatDetectionSettingsModuleName( + fakePath + ); + assert.strictEqual(result, 'moduleValue'); + assert( + ( + client.pathTemplates + .projectEventThreatDetectionSettingsModulePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectExport', () => { const fakePath = '/rendered/path/projectExport'; const expectedParameters = { @@ -11206,6 +15555,85 @@ describe('v1.SecurityCenterClient', () => { }); }); + describe('projectLocationMuteConfig', () => { + const fakePath = '/rendered/path/projectLocationMuteConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + mute_config: 'muteConfigValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationMuteConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationMuteConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationMuteConfigPath', () => { + const result = client.projectLocationMuteConfigPath( + 'projectValue', + 'locationValue', + 'muteConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationMuteConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationMuteConfigName', () => { + const result = + client.matchProjectFromProjectLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationMuteConfigName', () => { + const result = + client.matchLocationFromProjectLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMuteConfigFromProjectLocationMuteConfigName', () => { + const result = + client.matchMuteConfigFromProjectLocationMuteConfigName(fakePath); + assert.strictEqual(result, 'muteConfigValue'); + assert( + ( + client.pathTemplates.projectLocationMuteConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectMuteConfig', () => { const fakePath = '/rendered/path/projectMuteConfig'; const expectedParameters = { @@ -11781,5 +16209,185 @@ describe('v1.SecurityCenterClient', () => { ); }); }); + + describe('resourceValueConfig', () => { + const fakePath = '/rendered/path/resourceValueConfig'; + const expectedParameters = { + organization: 'organizationValue', + resource_value_config: 'resourceValueConfigValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.resourceValueConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.resourceValueConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('resourceValueConfigPath', () => { + const result = client.resourceValueConfigPath( + 'organizationValue', + 'resourceValueConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.resourceValueConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromResourceValueConfigName', () => { + const result = + client.matchOrganizationFromResourceValueConfigName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.resourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchResourceValueConfigFromResourceValueConfigName', () => { + const result = + client.matchResourceValueConfigFromResourceValueConfigName(fakePath); + assert.strictEqual(result, 'resourceValueConfigValue'); + assert( + ( + client.pathTemplates.resourceValueConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('simulation', () => { + const fakePath = '/rendered/path/simulation'; + const expectedParameters = { + organization: 'organizationValue', + simulation: 'simulationValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.simulationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.simulationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('simulationPath', () => { + const result = client.simulationPath( + 'organizationValue', + 'simulationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.simulationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromSimulationName', () => { + const result = client.matchOrganizationFromSimulationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.simulationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimulationFromSimulationName', () => { + const result = client.matchSimulationFromSimulationName(fakePath); + assert.strictEqual(result, 'simulationValue'); + assert( + (client.pathTemplates.simulationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('valuedResource', () => { + const fakePath = '/rendered/path/valuedResource'; + const expectedParameters = { + organization: 'organizationValue', + simulation: 'simulationValue', + valued_resource: 'valuedResourceValue', + }; + const client = new securitycenterModule.v1.SecurityCenterClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.valuedResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.valuedResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('valuedResourcePath', () => { + const result = client.valuedResourcePath( + 'organizationValue', + 'simulationValue', + 'valuedResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.valuedResourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromValuedResourceName', () => { + const result = client.matchOrganizationFromValuedResourceName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSimulationFromValuedResourceName', () => { + const result = client.matchSimulationFromValuedResourceName(fakePath); + assert.strictEqual(result, 'simulationValue'); + assert( + (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchValuedResourceFromValuedResourceName', () => { + const result = + client.matchValuedResourceFromValuedResourceName(fakePath); + assert.strictEqual(result, 'valuedResourceValue'); + assert( + (client.pathTemplates.valuedResourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); From 2359c347ca89df4aee706b0c6798560d686a15cc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:37:50 -0400 Subject: [PATCH 16/17] feat: enable rest_numeric_enums for aiplatform v1 and v1beta1 (#5531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: enable rest_numeric_enums for aiplatform v1 and v1beta1 PiperOrigin-RevId: 650635427 Source-Link: https://github.com/googleapis/googleapis/commit/a8a188ec30defabf491a4e8b96a056e35fe5ea7f Source-Link: https://github.com/googleapis/googleapis-gen/commit/31fd9548613a7df971ae6cab3153f6af5aeddc03 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjMxZmQ5NTQ4NjEzYTdkZjk3MWFlNmNhYjMxNTNmNmFmNWFlZGRjMDMifQ== * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google-cloud-aiplatform/src/v1/dataset_service_client.ts | 3 +++ .../src/v1/deployment_resource_pool_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/endpoint_service_client.ts | 3 +++ .../src/v1/feature_online_store_admin_service_client.ts | 3 +++ .../src/v1/feature_online_store_service_client.ts | 3 +++ .../src/v1/feature_registry_service_client.ts | 3 +++ .../src/v1/featurestore_online_serving_service_client.ts | 3 +++ .../src/v1/featurestore_service_client.ts | 3 +++ .../src/v1/gen_ai_tuning_service_client.ts | 3 +++ .../src/v1/index_endpoint_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/index_service_client.ts | 3 +++ packages/google-cloud-aiplatform/src/v1/job_service_client.ts | 3 +++ .../src/v1/llm_utility_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/match_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/metadata_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/migration_service_client.ts | 3 +++ .../src/v1/model_garden_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/model_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/notebook_service_client.ts | 3 +++ .../src/v1/persistent_resource_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/pipeline_service_client.ts | 3 +++ .../src/v1/prediction_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/schedule_service_client.ts | 3 +++ .../src/v1/specialist_pool_service_client.ts | 3 +++ .../src/v1/tensorboard_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1/vizier_service_client.ts | 3 +++ .../src/v1beta1/dataset_service_client.ts | 3 +++ .../src/v1beta1/deployment_resource_pool_service_client.ts | 3 +++ .../src/v1beta1/endpoint_service_client.ts | 3 +++ .../src/v1beta1/evaluation_service_client.ts | 3 +++ .../src/v1beta1/extension_execution_service_client.ts | 3 +++ .../src/v1beta1/extension_registry_service_client.ts | 3 +++ .../src/v1beta1/feature_online_store_admin_service_client.ts | 3 +++ .../src/v1beta1/feature_online_store_service_client.ts | 3 +++ .../src/v1beta1/feature_registry_service_client.ts | 3 +++ .../src/v1beta1/featurestore_online_serving_service_client.ts | 3 +++ .../src/v1beta1/featurestore_service_client.ts | 3 +++ .../src/v1beta1/gen_ai_cache_service_client.ts | 3 +++ .../src/v1beta1/gen_ai_tuning_service_client.ts | 3 +++ .../src/v1beta1/index_endpoint_service_client.ts | 3 +++ .../src/v1beta1/index_service_client.ts | 3 +++ .../google-cloud-aiplatform/src/v1beta1/job_service_client.ts | 3 +++ .../src/v1beta1/llm_utility_service_client.ts | 3 +++ .../src/v1beta1/match_service_client.ts | 3 +++ .../src/v1beta1/metadata_service_client.ts | 3 +++ .../src/v1beta1/migration_service_client.ts | 3 +++ .../src/v1beta1/model_garden_service_client.ts | 3 +++ .../src/v1beta1/model_monitoring_service_client.ts | 3 +++ .../src/v1beta1/model_service_client.ts | 3 +++ .../src/v1beta1/notebook_service_client.ts | 3 +++ .../src/v1beta1/persistent_resource_service_client.ts | 3 +++ .../src/v1beta1/pipeline_service_client.ts | 3 +++ .../src/v1beta1/prediction_service_client.ts | 3 +++ .../src/v1beta1/reasoning_engine_execution_service_client.ts | 3 +++ .../src/v1beta1/reasoning_engine_service_client.ts | 3 +++ .../src/v1beta1/schedule_service_client.ts | 3 +++ .../src/v1beta1/specialist_pool_service_client.ts | 3 +++ .../src/v1beta1/tensorboard_service_client.ts | 3 +++ .../src/v1beta1/vertex_rag_data_service_client.ts | 3 +++ .../src/v1beta1/vertex_rag_service_client.ts | 3 +++ .../src/v1beta1/vizier_service_client.ts | 3 +++ 61 files changed, 183 insertions(+) diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts index 49a9e0e77f46..bff1e6bd4662 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts @@ -150,6 +150,9 @@ export class DatasetServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts index b8b8cd0dd5a3..6d8f579b967e 100644 --- a/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/deployment_resource_pool_service_client.ts @@ -151,6 +151,9 @@ export class DeploymentResourcePoolServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts index cfef5a524d54..ea87938b59cd 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts @@ -150,6 +150,9 @@ export class EndpointServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_client.ts b/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_client.ts index 1b1ecd4d9cbf..1715db03350a 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/feature_online_store_admin_service_client.ts @@ -152,6 +152,9 @@ export class FeatureOnlineStoreAdminServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_client.ts b/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_client.ts index fc83a5fdbfa1..a665afef1d33 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/feature_online_store_service_client.ts @@ -146,6 +146,9 @@ export class FeatureOnlineStoreServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/feature_registry_service_client.ts b/packages/google-cloud-aiplatform/src/v1/feature_registry_service_client.ts index d59ed73bf4e5..f61e64dcacd0 100644 --- a/packages/google-cloud-aiplatform/src/v1/feature_registry_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/feature_registry_service_client.ts @@ -152,6 +152,9 @@ export class FeatureRegistryServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts index be7f04a5472e..3d6da0f120f8 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts @@ -146,6 +146,9 @@ export class FeaturestoreOnlineServingServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts index 06eabef7e80a..e8c80bec0ab9 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts @@ -150,6 +150,9 @@ export class FeaturestoreServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_client.ts b/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_client.ts index e9f8b3a3666a..621845150c13 100644 --- a/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/gen_ai_tuning_service_client.ts @@ -147,6 +147,9 @@ export class GenAiTuningServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts index 0edfa6d1efa4..7762897dd0f5 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts @@ -150,6 +150,9 @@ export class IndexEndpointServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts index fc8c9351462f..1d1d479e579c 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts @@ -150,6 +150,9 @@ export class IndexServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts index 922baa923c44..224038d6da06 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts @@ -150,6 +150,9 @@ export class JobServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts index 43a89091c951..0195ee697ef7 100644 --- a/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/llm_utility_service_client.ts @@ -145,6 +145,9 @@ export class LlmUtilityServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1/match_service_client.ts index 68f94b009d0c..4fb37b6546ef 100644 --- a/packages/google-cloud-aiplatform/src/v1/match_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/match_service_client.ts @@ -146,6 +146,9 @@ export class MatchServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts index bbb7e484bc07..af90a452db37 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts @@ -150,6 +150,9 @@ export class MetadataServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts index ba56c7f5771a..d2d338359029 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts @@ -151,6 +151,9 @@ export class MigrationServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts index 531be29776b2..989eab312f5d 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_garden_service_client.ts @@ -145,6 +145,9 @@ export class ModelGardenServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts index cf047a9bc3fb..006ebf077841 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts @@ -150,6 +150,9 @@ export class ModelServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/notebook_service_client.ts b/packages/google-cloud-aiplatform/src/v1/notebook_service_client.ts index 0e2ed190b1ab..0a7a2e4128e1 100644 --- a/packages/google-cloud-aiplatform/src/v1/notebook_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/notebook_service_client.ts @@ -150,6 +150,9 @@ export class NotebookServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_client.ts b/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_client.ts index 90cfcdf8217a..367b8f85f71a 100644 --- a/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/persistent_resource_service_client.ts @@ -151,6 +151,9 @@ export class PersistentResourceServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts index 7168176a1b21..5f13f8d0495f 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts @@ -152,6 +152,9 @@ export class PipelineServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts index 9feafc02de33..9be0357e9bdc 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts @@ -145,6 +145,9 @@ export class PredictionServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/schedule_service_client.ts b/packages/google-cloud-aiplatform/src/v1/schedule_service_client.ts index 3adf65835a01..69422ac4acef 100644 --- a/packages/google-cloud-aiplatform/src/v1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/schedule_service_client.ts @@ -151,6 +151,9 @@ export class ScheduleServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts index 4c3852f41529..9d3ae9fe8b27 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts @@ -156,6 +156,9 @@ export class SpecialistPoolServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts index 79a8e6a1b04f..630efda4b027 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts @@ -150,6 +150,9 @@ export class TensorboardServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts index d2b408f62484..09ae10477136 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts @@ -154,6 +154,9 @@ export class VizierServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts index 33c2ab93201c..5b1bd01731d1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -150,6 +150,9 @@ export class DatasetServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index 563f46c6c041..456a62b72486 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts @@ -151,6 +151,9 @@ export class DeploymentResourcePoolServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts index 234e7bc499c1..1df6ec510308 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -150,6 +150,9 @@ export class EndpointServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts index 8285c3cd526f..d80ef9dd3461 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts @@ -145,6 +145,9 @@ export class EvaluationServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_client.ts index 3f6680a06edf..c154a1cfc4d0 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/extension_execution_service_client.ts @@ -146,6 +146,9 @@ export class ExtensionExecutionServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_client.ts index 171b5f29285c..a19a418802f6 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/extension_registry_service_client.ts @@ -151,6 +151,9 @@ export class ExtensionRegistryServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts index 651a1e530e64..cd214af75141 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts @@ -152,6 +152,9 @@ export class FeatureOnlineStoreAdminServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts index b73fd0fc1222..026f6811c44b 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts @@ -146,6 +146,9 @@ export class FeatureOnlineStoreServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts index 94c641fece90..29e3bfca32da 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts @@ -152,6 +152,9 @@ export class FeatureRegistryServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts index e245f35fe9b4..0a5cc557987a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts @@ -146,6 +146,9 @@ export class FeaturestoreOnlineServingServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts index c6e8f03f0320..3f4ab3c3df49 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -150,6 +150,9 @@ export class FeaturestoreServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_client.ts index 9c0f79042cae..597d3dd6d94a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_cache_service_client.ts @@ -147,6 +147,9 @@ export class GenAiCacheServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_client.ts index 807ec4a28a5d..069639638d98 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/gen_ai_tuning_service_client.ts @@ -147,6 +147,9 @@ export class GenAiTuningServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts index ffe75481016b..b844578859b4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts @@ -150,6 +150,9 @@ export class IndexEndpointServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts index ba626631a3b8..19bf69735a3a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -150,6 +150,9 @@ export class IndexServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts index 0059af8b024f..43be136f0d26 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -150,6 +150,9 @@ export class JobServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts index c3088c1d30f5..b94c3fa40250 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts @@ -145,6 +145,9 @@ export class LlmUtilityServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts index cee8483e514d..3d57822306a5 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts @@ -146,6 +146,9 @@ export class MatchServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts index 253cabdd0b54..aa2412c233fb 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -150,6 +150,9 @@ export class MetadataServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts index fc0a8cde92cd..53a8a8163492 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -151,6 +151,9 @@ export class MigrationServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts index 574ef2805c1c..58add56dc153 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts @@ -147,6 +147,9 @@ export class ModelGardenServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_client.ts index 6d49a0a3adde..1df8f57beee9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_monitoring_service_client.ts @@ -152,6 +152,9 @@ export class ModelMonitoringServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts index f3e346e7ea4a..bc2f611a000a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -150,6 +150,9 @@ export class ModelServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_client.ts index 5f5c6460cd11..d2fb9ba14ae4 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/notebook_service_client.ts @@ -150,6 +150,9 @@ export class NotebookServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts index 092496402301..254829ea74f1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts @@ -151,6 +151,9 @@ export class PersistentResourceServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts index 3ba2cc8a7f79..8c950a5232cb 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -152,6 +152,9 @@ export class PipelineServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts index d2a37f02eecc..19c7bc39c907 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -145,6 +145,9 @@ export class PredictionServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts index 2f3bd13ae4c0..4b7d50d98b45 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts @@ -146,6 +146,9 @@ export class ReasoningEngineExecutionServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts index a4007df11480..4fc28e051360 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts @@ -151,6 +151,9 @@ export class ReasoningEngineServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts index b0f0be20f4a5..2e8bee82c4ea 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts @@ -151,6 +151,9 @@ export class ScheduleServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts index 46349e90fd24..e3279623b934 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts @@ -156,6 +156,9 @@ export class SpecialistPoolServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts index ea81848df30d..488fa2017d0f 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -150,6 +150,9 @@ export class TensorboardServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_client.ts index 21c352b7a5ab..bf83ca151c47 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_data_service_client.ts @@ -150,6 +150,9 @@ export class VertexRagDataServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_client.ts index 49b0814ae0e4..c6869f6d2de0 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vertex_rag_service_client.ts @@ -145,6 +145,9 @@ export class VertexRagServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts index 013437f27e10..48b6b877f554 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -154,6 +154,9 @@ export class VizierServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; From d180161434f82dc834ee7edee53aa00a58be9fd4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:21:36 -0400 Subject: [PATCH 17/17] chore: release main (#5521) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 16 +- changelog.json | 154 +++++++++++++++++- packages/google-chat/CHANGELOG.md | 7 + packages/google-chat/package.json | 2 +- .../v1/snippet_metadata_google.chat.v1.json | 2 +- packages/google-chat/samples/package.json | 2 +- packages/google-cloud-aiplatform/CHANGELOG.md | 8 + packages/google-cloud-aiplatform/package.json | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...t_metadata_google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- ...adata_google.cloud.aiplatform.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- ...google.cloud.bigquery.analyticshub.v1.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-discoveryengine/CHANGELOG.md | 7 + .../google-cloud-discoveryengine/package.json | 2 +- ...adata.google.cloud.discoveryengine.v1.json | 2 +- ...adata_google.cloud.discoveryengine.v1.json | 2 +- ..._google.cloud.discoveryengine.v1alpha.json | 2 +- ...a.google.cloud.discoveryengine.v1beta.json | 2 +- ...a_google.cloud.discoveryengine.v1beta.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-parallelstore/CHANGELOG.md | 7 + .../google-cloud-parallelstore/package.json | 2 +- ...ata_google.cloud.parallelstore.v1beta.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-securitycenter/CHANGELOG.md | 7 + .../google-cloud-securitycenter/package.json | 2 +- ...tadata.google.cloud.securitycenter.v1.json | 2 +- ...tadata_google.cloud.securitycenter.v1.json | 2 +- ...a.google.cloud.securitycenter.v1beta1.json | 2 +- ...a_google.cloud.securitycenter.v1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...google.cloud.securitycenter.v1p1beta1.json | 2 +- ...tadata_google.cloud.securitycenter.v2.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-sql/CHANGELOG.md | 8 + packages/google-cloud-sql/package.json | 2 +- .../snippet_metadata_google.cloud.sql.v1.json | 2 +- ...pet_metadata_google.cloud.sql.v1beta4.json | 2 +- .../google-cloud-sql/samples/package.json | 2 +- packages/google-container/CHANGELOG.md | 7 + packages/google-container/package.json | 2 +- .../snippet_metadata.google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- .../google-container/samples/package.json | 2 +- 52 files changed, 261 insertions(+), 51 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8f673f324bfd..341f2bdf5bee 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -11,7 +11,7 @@ "packages/google-area120-tables": "3.3.0", "packages/google-cloud-accessapproval": "3.3.0", "packages/google-cloud-advisorynotifications": "1.4.0", - "packages/google-cloud-aiplatform": "3.24.0", + "packages/google-cloud-aiplatform": "3.25.0", "packages/google-cloud-alloydb": "1.8.0", "packages/google-cloud-apigateway": "3.3.0", "packages/google-cloud-apigeeconnect": "3.3.0", @@ -26,7 +26,7 @@ "packages/google-cloud-beyondcorp-appgateways": "1.3.0", "packages/google-cloud-beyondcorp-clientconnectorservices": "2.3.0", "packages/google-cloud-beyondcorp-clientgateways": "1.3.0", - "packages/google-cloud-bigquery-analyticshub": "1.5.0", + "packages/google-cloud-bigquery-analyticshub": "1.6.0", "packages/google-cloud-bigquery-connection": "3.3.0", "packages/google-cloud-bigquery-dataexchange": "1.3.0", "packages/google-cloud-bigquery-datapolicies": "1.4.0", @@ -58,7 +58,7 @@ "packages/google-cloud-deploy": "3.7.0", "packages/google-cloud-dialogflow": "6.7.0", "packages/google-cloud-dialogflow-cx": "4.7.0", - "packages/google-cloud-discoveryengine": "1.9.0", + "packages/google-cloud-discoveryengine": "1.10.0", "packages/google-cloud-dns": "4.1.0", "packages/google-cloud-documentai": "8.8.0", "packages/google-cloud-domains": "3.2.0", @@ -113,11 +113,11 @@ "packages/google-cloud-secretmanager": "5.6.0", "packages/google-cloud-security-privateca": "5.4.0", "packages/google-cloud-security-publicca": "1.3.0", - "packages/google-cloud-securitycenter": "8.10.0", + "packages/google-cloud-securitycenter": "8.11.0", "packages/google-cloud-servicedirectory": "5.3.0", "packages/google-cloud-shell": "3.3.0", "packages/google-cloud-speech": "6.6.1", - "packages/google-cloud-sql": "0.15.0", + "packages/google-cloud-sql": "0.16.0", "packages/google-cloud-storageinsights": "1.3.0", "packages/google-cloud-support": "1.3.0", "packages/google-cloud-talent": "6.3.1", @@ -137,7 +137,7 @@ "packages/google-cloud-websecurityscanner": "3.3.0", "packages/google-cloud-workflows-executions": "3.4.0", "packages/google-cloud-workstations": "1.4.0", - "packages/google-container": "5.15.0", + "packages/google-container": "5.15.1", "packages/google-dataflow": "3.3.0", "packages/google-devtools-artifactregistry": "3.4.0", "packages/google-devtools-cloudbuild": "4.5.0", @@ -163,11 +163,11 @@ "packages/google-cloud-redis-cluster": "0.5.0", "packages/google-cloud-servicehealth": "0.4.0", "packages/google-apps-meet": "0.3.0", - "packages/google-cloud-parallelstore": "0.4.0", + "packages/google-cloud-parallelstore": "0.5.0", "packages/google-cloud-cloudcontrolspartner": "0.3.0", "packages/google-cloud-telcoautomation": "0.3.0", "packages/google-cloud-apphub": "0.3.0", - "packages/google-chat": "0.5.0", + "packages/google-chat": "0.6.0", "packages/google-shopping-merchant-quota": "0.2.0", "packages/google-storage-control": "0.2.0", "packages/google-cloud-backupdr": "0.2.0", diff --git a/changelog.json b/changelog.json index 4a1e1a16e2f6..0e5af7c0bfb4 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,158 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "9a80089d974280420e269f24aba563f4adceb4c3", + "message": "[chat] Add doc for Discoverable Space support for GA launch", + "issues": [ + "5525" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/chat", + "id": "200b6aab-7102-4e28-ade4-9d531d4b4e37", + "createTime": "2024-07-10T13:39:29.924Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c1a0a8a52866dee658ad34479b3ae62ae4b21bb5", + "message": "[parallelstore] add iam.googleapis.com/ServiceAccount resource definition", + "issues": [ + "5520" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/parallelstore", + "id": "024116eb-8dc1-40bc-be88-010ba35ec954", + "createTime": "2024-07-10T13:39:29.909Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "88382897c1c0ba6f5f80ba72ab775808de301962", + "message": "[container] Deprecate \"EXPERIMENTAL\" option for Gateway API (this value has never been supported)", + "issues": [ + "5519" + ] + } + ], + "version": "5.15.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "a1e7a682-230f-4de1-a1a9-df976fd6e121", + "createTime": "2024-07-10T13:39:29.893Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "347ea87f938abbf9abe37df7ffb32625ec142e1a", + "message": "[sql] add Dataplex integration opt-in field", + "issues": [ + "5527" + ] + }, + { + "type": "feat", + "sha": "6d8a33d6caf2b9dbe4aa043d083cb76e989ed5a3", + "message": "[sql] add Dataplex integration opt-in field", + "issues": [ + "5518" + ] + } + ], + "version": "0.16.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/sql", + "id": "bfc0b2b4-0a03-41e3-9b38-2c092121dd5c", + "createTime": "2024-07-10T13:39:29.878Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "63f8e88a7cd2f64bfc39aa26a1bfe24963285e1b", + "message": "[securitycenter] added cloud provider field to list findings response", + "issues": [ + "5529" + ] + } + ], + "version": "8.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/security-center", + "id": "63c47a71-64f1-4edd-8954-4c113253dc3d", + "createTime": "2024-07-10T13:39:29.831Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b0dc1b2ef66334394613c6e92a4c5b0ebb8e0faf", + "message": "[discoveryengine] add Chunk resource in the search response", + "issues": [ + "5526" + ] + } + ], + "version": "1.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/discoveryengine", + "id": "efa0432f-de37-4f44-b8f7-4afe87dd4468", + "createTime": "2024-07-10T13:39:29.806Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e85b5752ea97e102b8cd729d1e9b18aadfd8f045", + "message": "[bigquery-analyticshub] support public directory self service for Listings/Exchanges", + "issues": [ + "5523" + ] + } + ], + "version": "1.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-analyticshub", + "id": "369f4b54-d89c-4ed2-9f54-4d3fa65e0fa6", + "createTime": "2024-07-10T13:39:29.773Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "2359c347ca89df4aee706b0c6798560d686a15cc", + "message": "Enable rest_numeric_enums for aiplatform v1 and v1beta1", + "issues": [ + "5531" + ] + }, + { + "type": "feat", + "sha": "89832091d214555b274df86d817866a33b559e05", + "message": "Add model and contents fields to ComputeTokensRequest v1", + "issues": [ + "5517" + ] + } + ], + "version": "3.25.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "0463772e-c740-47ce-896b-66c0cb6aa421", + "createTime": "2024-07-10T13:39:29.635Z" + }, { "changes": [ { @@ -34953,5 +35105,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2024-06-27T09:25:51.635Z" + "updateTime": "2024-07-10T13:39:29.924Z" } \ No newline at end of file diff --git a/packages/google-chat/CHANGELOG.md b/packages/google-chat/CHANGELOG.md index cef4618de5e0..1a30d13be92a 100644 --- a/packages/google-chat/CHANGELOG.md +++ b/packages/google-chat/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.5.0...chat-v0.6.0) (2024-07-10) + + +### Features + +* [chat] Add doc for Discoverable Space support for GA launch ([#5525](https://github.com/googleapis/google-cloud-node/issues/5525)) ([9a80089](https://github.com/googleapis/google-cloud-node/commit/9a80089d974280420e269f24aba563f4adceb4c3)) + ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.4.0...chat-v0.5.0) (2024-05-21) diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index f898e6d6ce96..a22fa865d7dd 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -1,6 +1,6 @@ { "name": "@google-apps/chat", - "version": "0.5.0", + "version": "0.6.0", "description": "Google Chat API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index 6e3b4567cff0..6b9dc6d2b25a 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-chat", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-chat/samples/package.json b/packages/google-chat/samples/package.json index 70f4f1d0583a..bc773acaa494 100644 --- a/packages/google-chat/samples/package.json +++ b/packages/google-chat/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-apps/chat": "^0.5.0" + "@google-apps/chat": "^0.6.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 9cf4061c6f60..b4db7a613f03 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.25.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v3.24.0...aiplatform-v3.25.0) (2024-07-10) + + +### Features + +* Add model and contents fields to ComputeTokensRequest v1 ([#5517](https://github.com/googleapis/google-cloud-node/issues/5517)) ([8983209](https://github.com/googleapis/google-cloud-node/commit/89832091d214555b274df86d817866a33b559e05)) +* Enable rest_numeric_enums for aiplatform v1 and v1beta1 ([#5531](https://github.com/googleapis/google-cloud-node/issues/5531)) ([2359c34](https://github.com/googleapis/google-cloud-node/commit/2359c347ca89df4aee706b0c6798560d686a15cc)) + ## [3.24.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v3.23.0...aiplatform-v3.24.0) (2024-06-26) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 12627837a910..85fa10fcbce5 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "3.24.0", + "version": "3.25.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index f2e8560dc0b4..ee5269a03b4e 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.24.0", + "version": "3.25.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index ed18bc17f329..d5467271b909 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.24.0", + "version": "3.25.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index b3022a69191f..37f620f74f6e 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.24.0", + "version": "3.25.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 5f48ad890db4..03d5b63167d2 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.24.0", + "version": "3.25.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index 14aa631fd390..c13efc0b2bbf 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^3.24.0" + "@google-cloud/aiplatform": "^3.25.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md index b332173f405b..d76f8bbaadab 100644 --- a/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md +++ b/packages/google-cloud-bigquery-analyticshub/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.6.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v1.5.0...bigquery-analyticshub-v1.6.0) (2024-07-10) + + +### Features + +* [bigquery-analyticshub] support public directory self service for Listings/Exchanges ([#5523](https://github.com/googleapis/google-cloud-node/issues/5523)) ([e85b575](https://github.com/googleapis/google-cloud-node/commit/e85b5752ea97e102b8cd729d1e9b18aadfd8f045)) + ## [1.5.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-analyticshub-v1.4.0...bigquery-analyticshub-v1.5.0) (2024-05-21) diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index c303ca31cfd8..c51ab8e890af 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-analyticshub", - "version": "1.5.0", + "version": "1.6.0", "description": "Analytics Hub API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json index 1f7867af6a74..a5ba02e2f5b3 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata.google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "1.5.0", + "version": "1.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json index 34392b13b83e..ce418e190a13 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/generated/v1/snippet_metadata_google.cloud.bigquery.analyticshub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-analyticshub", - "version": "1.5.0", + "version": "1.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-analyticshub/samples/package.json b/packages/google-cloud-bigquery-analyticshub/samples/package.json index 122690f10e82..e4025992c22c 100644 --- a/packages/google-cloud-bigquery-analyticshub/samples/package.json +++ b/packages/google-cloud-bigquery-analyticshub/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/bigquery-analyticshub": "^1.5.0" + "@google-cloud/bigquery-analyticshub": "^1.6.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-discoveryengine/CHANGELOG.md b/packages/google-cloud-discoveryengine/CHANGELOG.md index 921e8817e7b4..402618edbfc4 100644 --- a/packages/google-cloud-discoveryengine/CHANGELOG.md +++ b/packages/google-cloud-discoveryengine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.10.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.9.0...discoveryengine-v1.10.0) (2024-07-10) + + +### Features + +* [discoveryengine] add Chunk resource in the search response ([#5526](https://github.com/googleapis/google-cloud-node/issues/5526)) ([b0dc1b2](https://github.com/googleapis/google-cloud-node/commit/b0dc1b2ef66334394613c6e92a4c5b0ebb8e0faf)) + ## [1.9.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.8.0...discoveryengine-v1.9.0) (2024-06-03) diff --git a/packages/google-cloud-discoveryengine/package.json b/packages/google-cloud-discoveryengine/package.json index e55c1185d9d8..491cbdf8c550 100644 --- a/packages/google-cloud-discoveryengine/package.json +++ b/packages/google-cloud-discoveryengine/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "description": "Discovery Engine API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json index 946695e26c72..6ccbd9cf4172 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata.google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json index c400d997ecc6..a7b465f06069 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json b/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json index 99578682442b..d7d34b662f46 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1alpha/snippet_metadata_google.cloud.discoveryengine.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json index ada663cf560a..aef6b14f7a32 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 6966ae39d365..648debe4b09a 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "1.9.0", + "version": "1.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-discoveryengine/samples/package.json b/packages/google-cloud-discoveryengine/samples/package.json index d6c58b7b6d01..fb05b5c29acf 100644 --- a/packages/google-cloud-discoveryengine/samples/package.json +++ b/packages/google-cloud-discoveryengine/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/discoveryengine": "^1.9.0" + "@google-cloud/discoveryengine": "^1.10.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-parallelstore/CHANGELOG.md b/packages/google-cloud-parallelstore/CHANGELOG.md index b7f45834b596..a429c4bccea3 100644 --- a/packages/google-cloud-parallelstore/CHANGELOG.md +++ b/packages/google-cloud-parallelstore/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/parallelstore-v0.4.0...parallelstore-v0.5.0) (2024-07-10) + + +### Features + +* [parallelstore] add iam.googleapis.com/ServiceAccount resource definition ([#5520](https://github.com/googleapis/google-cloud-node/issues/5520)) ([c1a0a8a](https://github.com/googleapis/google-cloud-node/commit/c1a0a8a52866dee658ad34479b3ae62ae4b21bb5)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/parallelstore-v0.3.0...parallelstore-v0.4.0) (2024-05-21) diff --git a/packages/google-cloud-parallelstore/package.json b/packages/google-cloud-parallelstore/package.json index 26f046db5f6a..4ee2ccacae64 100644 --- a/packages/google-cloud-parallelstore/package.json +++ b/packages/google-cloud-parallelstore/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/parallelstore", - "version": "0.4.0", + "version": "0.5.0", "description": "Parallelstore API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json index 31a0ad6a8d62..0324b492610e 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/snippet_metadata_google.cloud.parallelstore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-parallelstore", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-parallelstore/samples/package.json b/packages/google-cloud-parallelstore/samples/package.json index 8f64e6eff7ce..3ce8b2e4a72e 100644 --- a/packages/google-cloud-parallelstore/samples/package.json +++ b/packages/google-cloud-parallelstore/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/parallelstore": "^0.4.0" + "@google-cloud/parallelstore": "^0.5.0" }, "devDependencies": { "c8": "^8.0.0", diff --git a/packages/google-cloud-securitycenter/CHANGELOG.md b/packages/google-cloud-securitycenter/CHANGELOG.md index d5386e312502..f6a30b83ea04 100644 --- a/packages/google-cloud-securitycenter/CHANGELOG.md +++ b/packages/google-cloud-securitycenter/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/security-center?activeTab=versions +## [8.11.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v8.10.0...security-center-v8.11.0) (2024-07-10) + + +### Features + +* [securitycenter] added cloud provider field to list findings response ([#5529](https://github.com/googleapis/google-cloud-node/issues/5529)) ([63f8e88](https://github.com/googleapis/google-cloud-node/commit/63f8e88a7cd2f64bfc39aa26a1bfe24963285e1b)) + ## [8.10.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v8.9.0...security-center-v8.10.0) (2024-06-27) diff --git a/packages/google-cloud-securitycenter/package.json b/packages/google-cloud-securitycenter/package.json index 26be992ca5c7..2522052519a6 100644 --- a/packages/google-cloud-securitycenter/package.json +++ b/packages/google-cloud-securitycenter/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/security-center", "description": "Cloud Security Command Center API client for Node.js", - "version": "8.10.0", + "version": "8.11.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json index c508bd4cc4e5..72ca1f987fe9 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json index c7145ae4b307..a3987b827627 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata_google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json index 2db58aa4823f..ab8868d95a06 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json index 2db58aa4823f..ab8868d95a06 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata_google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json index 5827d8f6ccde..95d7108784e2 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json index 5827d8f6ccde..95d7108784e2 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json index 83e2e025d460..af8facbb7b19 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json +++ b/packages/google-cloud-securitycenter/samples/generated/v2/snippet_metadata_google.cloud.securitycenter.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/package.json b/packages/google-cloud-securitycenter/samples/package.json index 9e964c753b1a..98d8bb5659a9 100644 --- a/packages/google-cloud-securitycenter/samples/package.json +++ b/packages/google-cloud-securitycenter/samples/package.json @@ -14,7 +14,7 @@ "license": "Apache-2.0", "dependencies": { "@google-cloud/pubsub": "^4.0.0", - "@google-cloud/security-center": "^8.10.0" + "@google-cloud/security-center": "^8.11.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-sql/CHANGELOG.md b/packages/google-cloud-sql/CHANGELOG.md index 32ecd4709f81..dde5ceb0a7e1 100644 --- a/packages/google-cloud-sql/CHANGELOG.md +++ b/packages/google-cloud-sql/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.16.0](https://github.com/googleapis/google-cloud-node/compare/sql-v0.15.0...sql-v0.16.0) (2024-07-10) + + +### Features + +* [sql] add Dataplex integration opt-in field ([#5518](https://github.com/googleapis/google-cloud-node/issues/5518)) ([6d8a33d](https://github.com/googleapis/google-cloud-node/commit/6d8a33d6caf2b9dbe4aa043d083cb76e989ed5a3)) +* [sql] add Dataplex integration opt-in field ([#5527](https://github.com/googleapis/google-cloud-node/issues/5527)) ([347ea87](https://github.com/googleapis/google-cloud-node/commit/347ea87f938abbf9abe37df7ffb32625ec142e1a)) + ## [0.15.0](https://github.com/googleapis/google-cloud-node/compare/sql-v0.14.0...sql-v0.15.0) (2024-06-26) diff --git a/packages/google-cloud-sql/package.json b/packages/google-cloud-sql/package.json index 6a2071d219bd..4b386efbe12b 100644 --- a/packages/google-cloud-sql/package.json +++ b/packages/google-cloud-sql/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/sql", - "version": "0.15.0", + "version": "0.16.0", "description": "Sql client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json index 9d7849c8cd3e..13a006cf1ef9 100644 --- a/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json +++ b/packages/google-cloud-sql/samples/generated/v1/snippet_metadata_google.cloud.sql.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.15.0", + "version": "0.16.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json index 4f94db39e4db..0ce5b91e54df 100644 --- a/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json +++ b/packages/google-cloud-sql/samples/generated/v1beta4/snippet_metadata_google.cloud.sql.v1beta4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-sql", - "version": "0.15.0", + "version": "0.16.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-sql/samples/package.json b/packages/google-cloud-sql/samples/package.json index cb045628e8a1..c8ba1e8b2e5a 100644 --- a/packages/google-cloud-sql/samples/package.json +++ b/packages/google-cloud-sql/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/sql": "^0.15.0" + "@google-cloud/sql": "^0.16.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-container/CHANGELOG.md b/packages/google-container/CHANGELOG.md index 92805c6c6a7e..dfdf9d7f13ae 100644 --- a/packages/google-container/CHANGELOG.md +++ b/packages/google-container/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/container?activeTab=versions +## [5.15.1](https://github.com/googleapis/google-cloud-node/compare/container-v5.15.0...container-v5.15.1) (2024-07-10) + + +### Bug Fixes + +* [container] Deprecate "EXPERIMENTAL" option for Gateway API (this value has never been supported) ([#5519](https://github.com/googleapis/google-cloud-node/issues/5519)) ([8838289](https://github.com/googleapis/google-cloud-node/commit/88382897c1c0ba6f5f80ba72ab775808de301962)) + ## [5.15.0](https://github.com/googleapis/google-cloud-node/compare/container-v5.14.0...container-v5.15.0) (2024-06-12) diff --git a/packages/google-container/package.json b/packages/google-container/package.json index 4d6a6e546d60..2f64289ce01d 100644 --- a/packages/google-container/package.json +++ b/packages/google-container/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/container", "description": "Google Container Engine API client for Node.js", - "version": "5.15.0", + "version": "5.15.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index 44d8e264f207..9a5ebaa91557 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.15.0", + "version": "5.15.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json index 947570a65744..99341d36a79a 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.15.0", + "version": "5.15.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index 598e9fd710e1..a82911e8b796 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.15.0", + "version": "5.15.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json index d4fd42c09c11..4abffe01fe65 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.15.0", + "version": "5.15.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/package.json b/packages/google-container/samples/package.json index 8af1d781d9f5..f62cdb152925 100644 --- a/packages/google-container/samples/package.json +++ b/packages/google-container/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 1000000" }, "dependencies": { - "@google-cloud/container": "^5.15.0", + "@google-cloud/container": "^5.15.1", "uuid": "^9.0.0" }, "devDependencies": {